conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Change the logging to the app dir as well\n" }, { "from": "human", "value": "BASESPEC = {adapter: \"sqlite3\",\n database: \"db/production.sqlite3\",\n pool: 5,\n timeout: 5000}\n\nif defined? Camerasink::BASEDIR\n $stderr.puts \"St...
ruby
chosen
[ { "from": "system", "value": "Update the SHA256 checksum for the v2.0.0 binary.\n" }, { "from": "human", "value": "cask 'awsaml' do\n sha256 '8840a68b2e1c2ce1fa46a3bb830dd1d2d997e1e7cd49fdc7bcfec40351df97e4'\n version '2.0.0'\n\n url \"https://github.com/rapid7/awsaml/releases/download/v#{ver...
ruby
chosen
[ { "from": "human", "value": "Add new specs. Added Enumerator.produce to generate an Enumerator from any custom data transformation\n" }, { "from": "gpt", "value": "require_relative '../../spec_helper'\n\nruby_version_is \"2.7\" do\n describe \"Enumerator.produce\" do\n it \"creates an infini...
ruby
chosen
[ { "from": "system", "value": "Use gem-dependency_management in gemspec. See CP-2346.\n\ngit-svn-id: c3135c47f3c29d4ec17dc77fe0dea76971532c8f@9567 bc291798-7d79-44a5-a816-fbf4f7d05ffa\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-i\nlib = File.expand_path('../lib/', __FILE__)\n$:.u...
ruby
chosen
[ { "from": "system", "value": "Use task queue for set/unset node maintenance\n\nUses task queue instead of making direct provider API calls from the UI.\n This PR contains the necessary model changes.\n" }, { "from": "human", "value": "module ManageIQ::Providers::Openstack::InfraManager::Host::Op...
ruby
chosen
[ { "from": "human", "value": "Add tests for the retryable_typhoeus request patches\n" }, { "from": "gpt", "value": "require_relative '../lib/retryable_typhoeus'\n\nmodule Unipept\n class BatchIteratorTestCase < Unipept::TestCase\n def test_request_retry_default_parameter\n request = new_...
ruby
chosen
[ { "from": "system", "value": "Comment uploader spec until we can revisit\n" }, { "from": "human", "value": "require \"spec_helper\"\nrequire \"carrierwave/test/matchers\"\n\ndescribe AttachmentUploader do\n include CarrierWave::Test::Matchers\n let(:file) { File.open(Rails.root.join(\"spec/fac...
ruby
chosen
[ { "from": "system", "value": "Add rspec as dev dependency\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'tty/which/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Use generic mapping fetcher for AGO mappings\n" }, { "from": "human", "value": "#!/usr/bin/env ruby -w\nrequire 'csv'\nrequire 'uri'\nrequire 'net/http'\nrequire 'pathname'\n\nclass FetchAgoMappings\n\n def fetch\n CSV.open(output_file, \"w:utf-8\") do |output_c...
ruby
chosen
[ { "from": "system", "value": "Speed up database queries and make them scale\n\nThis commit makes use of three ActiveRecord features:\n\n1. Using `select` instead of `all.map` enables ActiveRecord to nest one\nselect into the other, resulting in one more efficient query instead of\ntwo.\n\n2. Using `find_eac...
ruby
chosen
[ { "from": "system", "value": "Add test for application controller." }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe ApplicationController do\n describe \"#access_denied\" do\n let!(:error) { double \"error\" }\n\n before { expect(error).to receive(:message).and_return(\...
ruby
chosen
[ { "from": "system", "value": "FC001: Use strings in preference to symbols.\n" }, { "from": "human", "value": "#\n# Author:: Joshua Timberman <joshua@opscode.com>\n# Cookbook Name:: chef\n# Recipe:: delete_validation\n#\n# Copyright 2010, Opscode, Inc\n#\n# Licensed under the Apache License, Vers...
ruby
chosen
[ { "from": "system", "value": "Update bootstrap requirement from ~> 4.3.1 to >= 4.3.1, < 4.6.0\n\nUpdates the requirements on [bootstrap](https://github.com/twbs/bootstrap-rubygem) to permit the latest version.\n- [Release notes](https://github.com/twbs/bootstrap-rubygem/releases)\n- [Changelog](https://gith...
ruby
chosen
[ { "from": "system", "value": "Use the same database path as the tests\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'active_record'\nrequire 'scout'\nrequire 'rspec'\nrequire File.dirname(__FILE__) + '/../monitor_delayed_jobs'\n\nRAILS_ROOT = File.dirname(__FILE__) + '/rails'\n\...
ruby
chosen
[ { "from": "system", "value": "Handle absence of updated version\n" }, { "from": "human", "value": "module Bummr\n class Updater\n include Log\n\n def initialize(outdated_gems)\n @outdated_gems = outdated_gems\n end\n\n def update_gems\n puts \"Updating outdated gems\".colo...
ruby
chosen
[ { "from": "system", "value": "Add homepage link to rubygems page\n\nSimplifies finding the source code repo when visiting the rubygems page.\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nre...
ruby
chosen
[ { "from": "system", "value": "Fix JUnit 4 for ArrayComparisonFailure\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nclass JunitAdapter < TestingFrameworkAdapter\n COUNT_REGEXP = /Tests run: (\\d+)/.freeze\n FAILURES_REGEXP = /Failures: (\\d+)/.freeze\n SUCCESS_REGEXP = /O...
ruby
chosen
[ { "from": "system", "value": "Create package folder if don't exists\n" }, { "from": "human", "value": "module Kmc\n module Refresher\n class << self\n # Fetch packages from online and delete the old packages, if any.\n def update_packages!\n new_packages_dir = File.join(fetc...
ruby
chosen
[ { "from": "system", "value": "Add redirects from the old dashboard\n" }, { "from": "human", "value": "class ExercismApp < Sinatra::Base\n\n post '/preview' do\n md(params[:comment])\n end\n\n get '/nitpick/:language/?' do |language|\n redirect \"/nitpick/#{language}/no-nits\"\n end\n\n...
ruby
chosen
[ { "from": "system", "value": "Add more logging to PuSH callback\n" }, { "from": "human", "value": "class Api::SubscriptionsController < ApiController\n before_action :set_account\n respond_to :txt\n\n def show\n if @account.subscription(api_subscription_url(@account.id)).valid?(params['hub...
ruby
chosen
[ { "from": "system", "value": "Reset command on each request in Rack adapter\n" }, { "from": "human", "value": "require 'rack'\n\nmodule YARD\n module Server\n class RackAdapter < Adapter\n attr_accessor :server\n attr_accessor :url_map\n \n def initialize(libraries, optio...
ruby
chosen
[ { "from": "system", "value": "Use socket for nginx front-end\n" }, { "from": "human", "value": "stderr_path \"/var/www/manageiq/shared/log/unicorn.stderr.log\"\nstdout_path \"/var/www/manageiq/shared/log/unicorn.stdout.log\"\n\nworker_processes Integer(ENV['WEB_CONCURRENCY'] || 3)\ntimeout 15\np...
ruby
chosen
[ { "from": "system", "value": "Send notifications from within the model\n" }, { "from": "human", "value": "module IonicNotification\n module Concerns\n module IonicNotificable\n extend ActiveSupport::Concern\n\n included do\n serialize :device_tokens, Array\n\n def not...
ruby
chosen
[ { "from": "system", "value": "Add the themes to the search path.\n" }, { "from": "human", "value": "# Be sure to restart your server when you modify this file.\n\n# Version of your assets, change this if you want to expire all your assets.\nRails.application.config.assets.version = '1.0'\n\n# Ad...
ruby
chosen
[ { "from": "system", "value": "Use I18n to pluralize entries\n\nsee: https://github.com/amatsuda/kaminari/commit/7f6e9a877d646263dc0504a5ad96ef4d5f2dd684\n" }, { "from": "human", "value": "# frozen_string_literal: true\nmodule Kaminari\n module MongoMapper\n module PluckyCriteriaMethods\n ...
ruby
chosen
[ { "from": "system", "value": "Use decimal field for capture_events, just like payment table\n" }, { "from": "human", "value": "class CreateSpreePaymentCaptureEvents < ActiveRecord::Migration\n def change\n create_table :spree_payment_capture_events do |t|\n t.integer :amount\n t.in...
ruby
chosen
[ { "from": "system", "value": "Move timestamp for easier sorting.\n" }, { "from": "human", "value": "require 'shellwords'\n\nif ENV['CAPTURE_DIR']\n Before do\n mkdir_p ENV['CAPTURE_DIR']\n end\n\n AfterStep do |scenario|\n cdir = ENV['CAPTURE_DIR']\n now = Time.now.to_f\n fn = She...
ruby
chosen
[ { "from": "system", "value": "Add show method for transactions\n" }, { "from": "human", "value": "class Puddy::TransactionsController < Puddy::ApplicationController\n def index\n @transaction_state = 'All'\n @transactions = Transaction.order(:created_at).\n paginate(page: params[:pag...
ruby
chosen
[ { "from": "system", "value": "Add issued date to medical safety alerts\n\nAdd the issued date attribute to the medical safety alaert date metadata\nin the presenter so that it can be shown in the frontend. This\ncorresponds to this commit in specialist publisher:\nhttps://github.com/alphagov/specialist-pub...
ruby
chosen
[ { "from": "system", "value": "Change pod spec source reference\n" }, { "from": "human", "value": "Pod::Spec.new do |spec|\n spec.name = 'WDAlertView'\n spec.version = '1.0.0'\n spec.license = { :type => 'MIT' }\n spec.homepage = 'https://github.com/alien...
ruby
chosen
[ { "from": "system", "value": "Disable ActiveStorage to avoid heroku warn when deploy\n" }, { "from": "human", "value": "require File.expand_path('../boot', __FILE__)\n\nrequire 'rails/all'\n\n# Require the gems listed in Gemfile, including any gems\n# you've limited to :test, :development, or :p...
ruby
chosen
[ { "from": "system", "value": "Revert \"Fix php builder spec.\"\n\nThis reverts commit ecb8adbc7f9db773978c8a8c8606c76e9667158b.\n\nI am reverting all attempts to fix php builder. There are people who supposed to maintain it.\n" }, { "from": "human", "value": "require 'spec_helper'\nrequire 'trav...
ruby
chosen
[ { "from": "system", "value": "Change factory intervention name to match InterventionTypes\n" }, { "from": "human", "value": "FactoryGirl.define do\n\n factory :intervention do\n association :student\n association :intervention_type\n start_date Date.new(2014, 9, 9)\n number_of_hours...
ruby
chosen
[ { "from": "system", "value": "Reduce the time of a TimedState object rather than setting it to zero\n\nThis allows for long periods of time between updates to not result in\neven longer living times for objects.\n" }, { "from": "human", "value": "# Copyright (c) 2016 Nathan Currier\n\n# This Sou...
ruby
chosen
[ { "from": "system", "value": "Remove todo comment that was done\n" }, { "from": "human", "value": "require 'epub/publication'\n\nmodule EPUB\n module Searcher\n class Publication\n class << self\n # @todo Use named argument in the future\n def search(package, word, **optio...
ruby
chosen
[ { "from": "system", "value": "Fix typo in table name\n" }, { "from": "human", "value": "class AddCreatedAtToSupportersActionJob < ActiveRecord::Migration\n def change\n add_column :supporters_action_job, :created_at, :datetime\n end\nend\n" }, { "from": "gpt", "value": "class Ad...
ruby
chosen
[ { "from": "system", "value": "Include 23.2.6.0 as supported libcapi versions\n\nApparently the package filename is 23.3.8.0 while the contained libs return 23.3.6.0 as versions." }, { "from": "human", "value": "module Liberic\n module SDK\n module Configuration\n LIBERICAPI_VERSION = %w...
ruby
chosen
[ { "from": "system", "value": "Add a require of by_daily_time_field\n" }, { "from": "human", "value": "require 'monkey_patch_activerecord'\nrequire 'monkey_patch_postgres'\nrequire 'monkey_patch_redshift'\n\nrequire 'partitioned/active_record_overrides'\nrequire 'partitioned/partitioned_base/conf...
ruby
chosen
[ { "from": "system", "value": "Update AppManager new Method Documentation\n\nUpdate the comments within the AppManager module to more specifically\ndenote what parameters are required for the new method.\n" }, { "from": "human", "value": "require File.expand_path(File.dirname(__FILE__) + '/app_ma...
ruby
chosen
[ { "from": "system", "value": "Implement monad instance for Maybe\n" }, { "from": "human", "value": "module Propr\n\n class Maybe\n end\n\n class Some < Maybe\n def initialize(value)\n @value = value\n end\n\n def map\n Some.new(yield @value)\n end\n\n def fold(default...
ruby
chosen
[ { "from": "system", "value": "Use Thermite::Config to load the library via Fiddle in a cross-platform way\n" }, { "from": "human", "value": "require 'fiddle'\nrequire 'rbconfig'\n\next = RbConfig::CONFIG['DLEXT'] == 'bundle' ? 'dylib' : RbConfig::CONFIG['DLEXT']\nbasename = \"librusty_blank.#{ex...
ruby
chosen
[ { "from": "system", "value": "Write the gem summary and description\n" }, { "from": "human", "value": "# encoding: utf-8\n\nGem::Specification.new do |gem|\n gem.name = \"figaro\"\n gem.version = \"0.1.0\"\n\n gem.authors = [\"Steve Richert\"]\n gem.email = [\"steve.richert@gmai...
ruby
chosen
[ { "from": "system", "value": "Fix bug where SET commands never finish\n\nTurns out that we're calling Impala::Connection#execute and that opens\nup a cursor, but never closes it. As a hacky, quick fix, Sequelizer\nwill check for a cursor and close it if it can.\n" }, { "from": "human", "value":...
ruby
chosen
[ { "from": "system", "value": "Make resource and collection ivars \"private\"\n" }, { "from": "human", "value": "module SuperResources\n module Resources\n extend ActiveSupport::Concern\n\n included do\n helper_method :collection, :collection?, :resource, :resource?,\n ...
ruby
chosen
[ { "from": "system", "value": "Change to document windows api calls\n" }, { "from": "human", "value": "# encoding: utf-8\n\nrequire 'fiddle'\n\nmodule TTY\n class Prompt\n class Reader\n module WinAPI\n include Fiddle\n\n Handle = RUBY_VERSION >= \"2.0.0\" ? Fiddle::Handle ...
ruby
chosen
[ { "from": "system", "value": "Fix problem with missing rails best practice count.\n" }, { "from": "human", "value": "MetricFu.metrics_require { 'rails_best_practices/rails_best_practices_grapher' }\nmodule MetricFu\n class RailsBestPracticesBluffGrapher < RailsBestPracticesGrapher\n def ti...
ruby
chosen
[ { "from": "system", "value": "Change name of instance variable so it makes more sense for a subclass\n" }, { "from": "human", "value": "# Copyright (C) 2016 Colin Fulton\n# All rights reserved.\n#\n# This software may be modified and distributed under the\n# terms of the three-clause BSD license...
ruby
chosen
[ { "from": "system", "value": "Upgrade Little Snitch to v3.6\n" }, { "from": "human", "value": "cask :v1 => 'little-snitch' do\n version '3.5.3'\n sha256 'cfe44ba45c669e1bf9a04910b2dd8675a26d7e6c00954b74adeffd12f90b8197'\n\n url \"https://www.obdev.at/downloads/littlesnitch/LittleSnitch-#{vers...
ruby
chosen
[ { "from": "system", "value": "Fix the gemspec for the version\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'sidekiq-redis-logger/version'\n\nGem::Specification.new do |ge...
ruby
chosen
[ { "from": "system", "value": "Use nested module/class definitions instead of compact style.\n" }, { "from": "human", "value": "# An OpenBuy represents a Buy transaction on Bitex.\n# OpenBuys are open buy positions that are closed by one or several CloseBuys.\n# TODO: document attributes.\n#\ncla...
ruby
chosen
[ { "from": "human", "value": "Add debot assets precompile for public assets mainly " }, { "from": "gpt", "value": "set :assets_dependencies, %w(public app/assets lib/assets vendor/assets Gemfile.lock config/routes.rb)\n\nnamespace :debot do\n namespace :assets do\n desc <<-DESC\n Run the...
ruby
chosen
[ { "from": "system", "value": "Add basic exception handling for workers\n" }, { "from": "human", "value": "module FastlaneCI\n class WorkerBase\n def initialize\n Thread.new do\n loop do\n sleep(self.timeout)\n self.work\n end\n end\n end\n\n de...
ruby
chosen
[ { "from": "system", "value": "Change string to symbol for stylistic reasons\n" }, { "from": "human", "value": "class FixedArray\n attr_reader :size\n\n def initialize(size)\n @size = size\n size.times do |index|\n set(index, nil)\n end\n end\n\n def get(index)\n instance_var...
ruby
chosen
[ { "from": "system", "value": "Remove now-unnecessary implementation details in DateTimeAttribute\n" }, { "from": "human", "value": "module ArDocStore\n module AttributeTypes\n class DatetimeAttribute < BaseAttribute\n def build\n attribute = @attribute\n load_method = load...
ruby
chosen
[ { "from": "system", "value": "Add possibility to run migration automatically\n" }, { "from": "human", "value": "module SpreeAddressBook\n module Generators\n class InstallGenerator < Rails::Generators::Base\n def add_javascripts\n append_file \"app/assets/javascripts/store/all.js...
ruby
chosen
[ { "from": "system", "value": "Test Heat generates the required properties\n\nSigned-off-by: Tomas Sedovic <2bc6038c3dfca09b2da23c8b6da8ba884dc2dcc2@sedovic.cz>\n" }, { "from": "human", "value": "# Copyright 2012 Red Hat, Inc.\n# Licensed under the Apache License, Version 2.0, see README for deta...
ruby
chosen
[ { "from": "system", "value": "Add source encoding hint for ruby 1.9.3\n\nOtherwise the tests fail on 1.9.3\n" }, { "from": "human", "value": "require 'helper'\n\ndescribe JavaProperties do\n subject{ JavaProperties }\n\n it \"parses from string\" do\n subject.parse(\"item1=item1\").must_equ...
ruby
chosen
[ { "from": "system", "value": "Add missing end of input\n" }, { "from": "human", "value": "require 'rails_helper'\n\n\n\nRSpec.describe Question, type: :model do\n\n before(:each) do\n @comment= FactoryGirl.create(:comment_question)\n @vote= FactoryGirl.create(:vote_question)\n end\n\n d...
ruby
chosen
[ { "from": "system", "value": "Add the single license attribute\n\nSome verifiers don't appear to correctly parse the licenses attribute, so adding the single license version.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n\n$:.push File.expand_path('../lib', __FILE__)\nrequire 'fi...
ruby
chosen
[ { "from": "system", "value": "Update rake & rdoc versions\n\nOlder rake versions had a security hole that was patched in 12.3.3.\n" }, { "from": "human", "value": "$:.unshift File.expand_path('../lib/', __FILE__)\n\nrequire 'measurable/version'\nrequire 'date'\n\nGem::Specification.new do |gem|\...
ruby
chosen
[ { "from": "system", "value": "Remove unnecessary object churn in ResultSet\n" }, { "from": "human", "value": "module SQLite3\n class ResultSet\n def initialize(statement, handle)\n @statement = statement\n @handle = handle\n end\n\n def each(&block)\n until @statement.do...
ruby
chosen
[ { "from": "system", "value": "Add month & categories to index\n" }, { "from": "human", "value": "module Kennedy\n class Post < Georgia::Page\n\n attr_accessible :category_ids\n has_and_belongs_to_many :categories\n\n end\nend" }, { "from": "gpt", "value": "module Kennedy\n c...
ruby
chosen
[ { "from": "system", "value": "Fix SingleValue.get: only get values for the SingleValue Subclass\n" }, { "from": "human", "value": "class SingleValue < ActiveRecord::Base\n @@mutex = Mutex.new\n\n def self.update(value)\n sublcass_name = self.name\n single_value = nil\n @@mutex.synchro...
ruby
chosen
[ { "from": "system", "value": "Change gemspec to match other gems\n" }, { "from": "human", "value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'memoizable/version'\n\nGem::Specification.new do |spec|\n spec.add_development_depend...
ruby
chosen
[ { "from": "human", "value": "Fix GSS codes for some councils in existing Business Support editions\n\n- Following on from frontend PR 948, we had to edit existing Business\n Support Editions so that they would refer to the correct GSS codes\n from the new data in MapIt, not the old ones that no longer wor...
ruby
chosen
[ { "from": "system", "value": "Update rubocop requirement from ~> 0.81.0 to ~> 0.82.0\n\nUpdates the requirements on [rubocop](https://github.com/rubocop-hq/rubocop) to permit the latest version.\n- [Release notes](https://github.com/rubocop-hq/rubocop/releases)\n- [Changelog](https://github.com/rubocop-hq/r...
ruby
chosen
[ { "from": "system", "value": "Add simple idle loop implementation\n" }, { "from": "human", "value": "require 'gir_ffi_test_helper'\n\ndescribe \"threading\" do\n it \"works while a MainLoop is running\" do\n main_loop = GLib::MainLoop.new nil, false\n\n a = []\n GLib.timeout_add(GLib::...
ruby
chosen
[ { "from": "system", "value": "Drop ZenTest as a development dependency\n\nZenTest wants to force the evil that is RubyGems 1.8 on us, but\naccepting that would mean journeying into a world of spammy deprecation\nnotices.\n\nChange-Id: I0badd3f46edb73d25b56c9723630215c15455d9e\nReviewed-on: https://gerrit.ca...
ruby
chosen
[ { "from": "system", "value": "Add dependency to rspec-rails to load generators in it\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'model_base/version'\n\nGem::Specification.new do ...
ruby
chosen
[ { "from": "system", "value": "Test for version history attributes\n" }, { "from": "human", "value": "require 'turntables/version_history'\n\ndescribe VersionHistory do \n\n context \"<<AR>> pattern specification\" do\n it \"should respond to class method check\" do\n VersionHistory.shou...
ruby
chosen
[ { "from": "system", "value": "EventFilters: Add friendly name for PlayerEnterGame\n" }, { "from": "human", "value": "module Australium\n\n # Creates a set of helper methods for all classes containing {Event}s.\n # The #event_filter method must be overridden in the class including this module, ...
ruby
chosen
[ { "from": "system", "value": "Refactor pre-emptive rules to be case-based\n" }, { "from": "human", "value": "module Bouncer\n ##\n # Rules to try before mappings because they are too important to let mappings\n # be used. This is a particular concern with mappings created automatically.\n cl...
ruby
chosen
[ { "from": "system", "value": "Remove nonexistent action :enable from docker_service\n" }, { "from": "human", "value": "class Chef\n class Provider\n class DockerService < Chef::Provider::LWRPBase\n # Create a run_context for provider instances.\n # Each provider action becomes an i...
ruby
chosen
[ { "from": "system", "value": "Select desnecessário caso acessar solicitando json\n" }, { "from": "human", "value": "class EventsController < ApplicationController\n def index\n @event = Event.current\n @track = Track.new(IntervalDecorator.decorate(@event.intervals).to_ary, TalkDecorator.d...
ruby
chosen
[ { "from": "system", "value": "Add logic to the Groups Controller to use the Smarty Street API for\nfinding an address.\n" }, { "from": "human", "value": "class GroupsController < ApplicationController\n def inquire\n end\n\n def assign\n user = current_user\n user.group_id = find_group(...
ruby
chosen
[ { "from": "system", "value": "Use active scope to retrieve projects for homepage\n\n- Ref Issue 405 (https://github.com/andrew/24pullrequests/issues/405)\n" }, { "from": "human", "value": "class StaticController < ApplicationController\n def homepage\n @projects = Project.limit(200).sample(1...
ruby
chosen
[ { "from": "system", "value": "Create event and clear cache on new trag push\n\nSigned-off-by: Dmitriy Zaporozhets <be23d75b156792e5acab51b196a2deb155d35d6a@gmail.com>\n" }, { "from": "human", "value": "class GitTagPushService\n attr_accessor :project, :user, :push_data\n def execute(project, u...
ruby
chosen
[ { "from": "system", "value": "Update renamed README in gemspec.\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"imfilters/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |s|\n...
ruby
chosen
[ { "from": "system", "value": "Allow counter to be variable by ENV\n" }, { "from": "human", "value": "require_relative './spec_init'\n\ndescribe 'Server' do\n specify 'Request and Response' do\n counter = 1\n\n HTTP::Server::Controls::ExampleServer.run do |port, scheduler|\n uri = URI...
ruby
chosen
[ { "from": "system", "value": "Remove Camera test Window assignment for now\n" }, { "from": "human", "value": "require_relative 'test_helper'\n\nclass TestCamera < Poke::Test\n\n class Player\n attr_reader :x, :y\n\n def initialize\n @x = 32\n @y = 64\n end\n end\n\n def set...
ruby
chosen
[ { "from": "system", "value": "Make sure we're including subdirectories as well.\n\nThe commit that removed require_all didn't include the subdirectories of\n`lib` in the test_helper.\n\nThis wasn't obvious because if you're testing everything at once it\nworked fine because all the files include each other ...
ruby
chosen
[ { "from": "system", "value": "Stop the \"no tests were specified\" nonsense\n" }, { "from": "human", "value": "$:.unshift(File.dirname(__FILE__) + '/../lib')\n\nrequire 'rubygems'\n\nrequire 'test/unit'\nrequire 'phone'\n\ndef parse_test(raw, country_code, area_code, number, country_name = nil, ...
ruby
chosen
[ { "from": "system", "value": "Use async approach for delta indexing.\n" }, { "from": "human", "value": "class FlyingSphinx::Controller\n def initialize(api)\n @api = api\n end\n\n def index(*indices)\n options = indices.last.is_a?(Hash) ? indices.pop : {}\n\n FlyingSphinx::IndexReque...
ruby
chosen
[ { "from": "system", "value": "Set default thershold to 1\n" }, { "from": "human", "value": "require_relative 'builder/first_pass'\nrequire_relative 'builder/second_pass'\n\n\nmodule FpGrowth\n module FpTree\n module Builder\n\n def self.build(transactions, threshold=50)\n first_p...
ruby
chosen
[ { "from": "system", "value": "Fix git log for when no range was specified\n\nWhen no range was specified the following arguments were passed to git\nlog: `-L,:<file>`. While it was still valid for the whole file it was\nrestricted to the bounds of the current file's state (i.e., 1:10, which\nthen restricted...
ruby
chosen
[ { "from": "system", "value": "Add method to check if current folder is set up for EB\n" }, { "from": "human", "value": "module Eb\n class Platform\n def initialize(opts)\n @eb = opts[:eb]\n @tag = opts[:tag]\n end\n\n def deploy!\n fail \"Environment NOT READY!\" unl...
ruby
chosen
[ { "from": "system", "value": "Remove EMBEDDED_CONTENT_CONTAINS_SWIFT from the Podspec (oops).\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'DateRangePicker'\n s.version = '4.2'\n\n s.homepage = 'https://github.com/MrMage/...
ruby
chosen
[ { "from": "system", "value": "Add unset method for disable JanusInstance with ActiveRecord\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule RubyRabbitmqJanus\n module Models\n # @author VAILLANT Jeremy <jeremy.vaillant@dazzl.tv>\n #\n # Store instance informat...
ruby
chosen
[ { "from": "system", "value": "Set logs = true when attaching to Docker backend\n\nIn the Docker API v1.15 logs=true is required to capture\nstdout and stderr logs\n\nstdout - if logs=true, return stdout log, if stream=true,\nattach to stdout. Default false\n\nhttps://docs.docker.com/reference/api/docker_rem...
ruby
chosen
[ { "from": "system", "value": "Modify Rails/Output to use NodePattern\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule RuboCop\n module Cop\n module Rails\n # This cop checks for the use of output calls like puts and print\n class Output < Cop\n MSG ...
ruby
chosen
[ { "from": "system", "value": "Revert \"Pod spec go back to 1.0\"\n\nThis reverts commit 68c69c768c1f5e65b481fbe2697a6fc9273840d3.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"Bypass\"\n s.version = \"1.0\"\n s.summary = \"Skip the HTML, Bypass takes m...
ruby
chosen
[ { "from": "system", "value": "Add .pre for next release\n" }, { "from": "human", "value": "module EY\n VERSION = '2.1.3'\n ENGINEYARD_SERVERSIDE_VERSION = ENV['ENGINEYARD_SERVERSIDE_VERSION'] || '2.1.4'\nend\n" }, { "from": "gpt", "value": "module EY\n VERSION = '2.1.4.pre'\n ENG...
ruby
chosen
[ { "from": "system", "value": "Set auto_flushing to 1 explicitly\n" }, { "from": "human", "value": "module ResqueJobLogging\n def around_perform_log_job(*args)\n log_string = \"event=resque_job job=#{self} \"\n error = nil\n time = Benchmark.realtime{\n begin\n yield\n ...
ruby
chosen
[ { "from": "system", "value": "Use the public CE repo URL instead of the one used in the runner\n\nThis will prevent the task to advertise using\nhttps://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx@gitlab.com/gitlab-org/gitlab-ce.git\nwhen https://gitlab.com/gitlab-org/gitlab-ce.git is enough\n\nSigned-off-by: Rémy...
ruby
chosen
[ { "from": "system", "value": "Update Gisto to version 0.3.1" }, { "from": "human", "value": "cask :v1 => 'gisto' do\n version '0.3.0'\n sha256 '803a15125b69486012f72a42dd20f7a63b51dc2d445082303cb3b96cdb622667'\n\n url \"http://download.gistoapp.com/Gisto-#{version}-OSX_x86_64.dmg\"\n appcast...
ruby
chosen
[ { "from": "system", "value": "Update pod version to 1.1.1\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"UPCarouselFlowLayout\"\n s.version = \"1.1.0\"\n s.summary = \"A fancy carousel flow layout for UICollectionView.\"\n s.description ...
ruby
chosen
[ { "from": "system", "value": "Remove method from `ParameterList` public interface\n" }, { "from": "human", "value": "class Curryable\n class ParameterList\n def initialize(list)\n @raw_list = list\n end\n\n def arity\n required_positional.count\n end\n\n def positional\...
ruby
chosen
[ { "from": "system", "value": "Set prawn version to use\n\nThe 2011 0.12.0 version works less well with\ncertain options.\n" }, { "from": "human", "value": "require File.expand_path(\"../lib/kotoba/version\", __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\n \"Tom de Brui...
ruby
chosen
[ { "from": "system", "value": "Include Errawr methods when including Errawr::Rails in controller.\n" }, { "from": "human", "value": "require \"errawr/rails/version\"\n\nmodule Errawr\n module Rails\n # Your code goes here...\n end\nend\n" }, { "from": "gpt", "value": "require 'ac...
ruby
chosen
[ { "from": "system", "value": "Revert \"Further Travis CI investigation\"\n\nThis reverts commit 23cf1f699e566206c9ffe85b0130f68d78a79cf2.\n" }, { "from": "human", "value": "# encoding: utf-8\n\nmodule LibC\n extend ::FFI::Library\n # figures out the correct libc for each platform including Win...
ruby
chosen