conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Add feature spec to verify all 4 different states of closing issues message on Merge Request show page.\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\nfeature 'Merge Commit Description', feature: true do\n let(:user) { create(:user) }\n let(:project) { c...
ruby
chosen
[ { "from": "system", "value": "Remove pry requires from spec\n" }, { "from": "human", "value": "require 'pry'\n\n# frozen_string_literal: true\n\nrequire 'spec_helper'\n\ndescribe Admin::CfpsController do\n let!(:today) { Date.today }\n let!(:conference) { create(:conference, start_date: today ...
ruby
chosen
[ { "from": "system", "value": "Package version is increased from 0.1.3 to 0.2.0\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'casing'\n s.version = '0.1.3'\n s.summary = 'Convert the case of strings, symbols, and hash keys, including ca...
ruby
chosen
[ { "from": "human", "value": "Add a function to write package names\n\nThis function writes out package names that have been\ndefined in a given puppet catalog.\n\nIn order to work this should be place last (or very late)\nin a manifest to ensure it picks up packages.\n\nChange-Id: Ie21b5bf7df71337da02ea4391...
ruby
chosen
[ { "from": "human", "value": "Add example of updating with invalid card\n" }, { "from": "gpt", "value": "\ngem 'chargify_api_ares', '=1.3.5'\nrequire 'chargify_api_ares'\n\nChargify.configure do |c|\n c.subdomain = ENV['CHARGIFY_SUBDOMAIN']\n c.api_key = ENV['CHARGIFY_API_KEY']\nend\n\nsub = ...
ruby
chosen
[ { "from": "system", "value": "Make the installation of lshw and ipmitool based upon where the file it contains is already there.\nTHis allows the system not call yum in the centos discovery image. This explodes.\n" }, { "from": "human", "value": "#\n# Cookbook Name:: ohai\n# Recipe:: default\n#...
ruby
chosen
[ { "from": "system", "value": "Use method missing to generate model\n" }, { "from": "human", "value": "module MetaModel\n\n class PropertyConstructor\n\n attr_reader :model\n\n def initialize(model)\n @model = model\n end\n\n def string(json_key, property_key = nil)\n save_...
ruby
chosen
[ { "from": "system", "value": "Check for value before doing the actual check except for set which can be nil" }, { "from": "human", "value": "module OptimusPrime\n module Transformers\n class Validator < Destination\n # This class accepts a hash object and converts its values\n # to...
ruby
chosen
[ { "from": "system", "value": "Use the right framework to check the version\n" }, { "from": "human", "value": "module Rails\n module Controller\n module Testing\n module Integration\n http_verbs = %w(get post patch put head delete get_via_redirect post_via_redirect)\n http_...
ruby
chosen
[ { "from": "system", "value": "Fix bug display only latest column\n" }, { "from": "human", "value": "module ActiveRecord\n class Schema\n def self.define(_info, &block)\n new.define(&block)\n end\n\n def define(&block)\n instance_eval(&block)\n end\n\n def create_table(t...
ruby
chosen
[ { "from": "system", "value": "Change permission of shipped file to 0755\n" }, { "from": "human", "value": "require 'fileutils'\n\nmodule VagrantPhpStormTunnel\n class Configurator\n def initialize(app, env)\n @app = app\n @env = env\n\n @root_path = @env[:root_path].to_s\n ...
ruby
chosen
[ { "from": "system", "value": "Update podspec to version 0.0.8\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"DFImageManager\"\n s.version = \"0.0.7\"\n s.summary = \"Complete solution for fetching, caching and adjusting images\"\n s.homepage = ...
ruby
chosen
[ { "from": "system", "value": "Rename from NessusDB to Risu\n" }, { "from": "human", "value": "require \"spec_helper\"\n\nmodule NessusDB\n\tmodule CLI\n\t\tdescribe Application do\n\t\t\tbefore(:all) do\n\t\t\t\t@app = Application.new\n\t\t\t\t\t\n\t\t\t\tprintf \"\\n%s\\n\\n\", @app.inspect\t\t...
ruby
chosen
[ { "from": "system", "value": "Refactor to more idiomatic Rspec\n\n[#26437795]\n" }, { "from": "human", "value": "require 'git_tracker'\n\ndescribe GitTracker do\n let(:args) { [\"a_file\", \"the_source\", \"sha1234\"] }\n\n describe \".execute\" do\n it \"runs the hook, passing the args\" d...
ruby
chosen
[ { "from": "human", "value": "Add spec for nesting capabilities of HashObject\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\n# Test support object\ndescribe HashObject do\n\n subject { HashObject.new(hash) }\n let(:hash) do\n {\n :name => 'Steve', \n :address => {:s...
ruby
chosen
[ { "from": "human", "value": "Add chef-spec for setup recipe\n" }, { "from": "gpt", "value": "require_relative '../spec_helper'\n\ndescribe 'backup_restore::setup' do\n let(:chef_run) do\n ChefSpec::Runner.new(\n cookbook_path: %w(site-cookbooks cookbooks),\n platform: 'centos'...
ruby
chosen
[ { "from": "system", "value": "Update spec -- linux command usage\n" }, { "from": "human", "value": "require 'spec_helper'\n\nRSpec.describe VirusScanService::KasperskyRunner::LinuxExecutor do\n subject { described_class.new }\n\n let(:desired_cmd) {\n 'sudo ' +\n '/opt/kaspersky/kes4lwk...
ruby
chosen
[ { "from": "system", "value": "Add proper controller methods spec\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe RailsLocaleDetection::ControllerMethods do\n let(:request) { MockRequest.new }\n let(:controller) { MockController.new(request) }\n\n describe '#available_loca...
ruby
chosen
[ { "from": "system", "value": "Update gem version, add a description\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 'rails_components'\n s.version = '0.0.1'\n s.date = '2016-09-23'\n s.summary = \"Rails view components\"\n s.authors ...
ruby
chosen
[ { "from": "system", "value": "Update rubocop to version 0.58.0" }, { "from": "human", "value": "# frozen_string_literal: true\n\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'anyway/version'\n\nGem::Specification.new do |s|\n s.nam...
ruby
chosen
[ { "from": "human", "value": "Add tests for the Lyricfy::Song class\n" }, { "from": "gpt", "value": "require 'test_helper'\n\ndescribe Lyricfy::Song do\n before do\n @song = Lyricfy::Song.new 'Yellow', 'Coldplay', ['Look at the stars', 'Look how they shine for you']\n end\n\n [\n :title,...
ruby
chosen
[ { "from": "system", "value": "Use @revision.title instead of @page\n" }, { "from": "human", "value": "require 'active_support/concern'\n\nmodule Georgia\n module Concerns\n module Revisioning\n extend ActiveSupport::Concern\n include Helpers\n\n included do\n\n before_f...
ruby
chosen
[ { "from": "system", "value": "Fix symbol at default data\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\nclass Account < ActiveRecord::Base\n include WithClassName\n\n has_secure_password\n\n has_many :delegates, dependent: :destroy\n has_many :projects, through: :delegates\n ac...
ruby
chosen
[ { "from": "system", "value": "Use the indicators-values table on cartoDB to get the list of available countries\n" }, { "from": "human", "value": "require 'httparty'\n\nclass Country\n include HTTParty\n default_timeout 5\n\n class << self\n\n def base_path\n \"#{ENV['GFW_API_HOST']}/...
ruby
chosen
[ { "from": "system", "value": "Add require csv to CanBeSerializedToCSV.\n" }, { "from": "human", "value": "module CanBeSerializedToCsv\n extend ActiveSupport::Concern\n\n included do\n def self.to_csv\n CSV.generate do |csv|\n csv << (respond_to?(:csv_column_names) ? csv_column_n...
ruby
chosen
[ { "from": "system", "value": "Add a transation around HL7 processing\n\nThis prevents a feed_message row being created if we could not parse the OBR/Xs\nand prevents duplicate content for is a message was only partially saved.\n" }, { "from": "human", "value": "require_dependency \"renalware/fee...
ruby
chosen
[ { "from": "human", "value": "Test coverage for Generator class\n" }, { "from": "gpt", "value": "require \"spec_helper\"\nrequire \"afip_bill/generator\"\nrequire \"afip_bill/line_item\"\nrequire \"afip_bill/user\"\n\ndescribe AfipBill::Generator do\n subject { described_class }\n\n let(:user) ...
ruby
chosen
[ { "from": "human", "value": "Add spec for admin users index\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\nrequire 'carrierwave/test/matchers'\nfeature 'As a user' do\n before do\n sign_in\n end\n\n scenario 'I can add a new user' do\n\n visit admin_users_path\n expect(pag...
ruby
chosen
[ { "from": "system", "value": "Fix Redis initialization bug on worker\n" }, { "from": "human", "value": "require 'sidekiq'\nrequire 'socket'\nDEFAULT_SOCKET_PATH=\"/var/run/dokku-daemon/dokku-daemon.sock\"\n\nSidekiq.configure_server do |config|\n config.redis = { url: ENV[\"REDIS_URL\"] }\nend\...
ruby
chosen
[ { "from": "system", "value": "Add support for `options!` method.\n\nSince Faraday doesn't support the `options` request as a first class\nHTTP method (see lostisland/faraday#305) we need to use the `run_request`\nmethod instead of the `options` one.\n" }, { "from": "human", "value": "module Fara...
ruby
chosen
[ { "from": "system", "value": "Add a couple more business cards redirects.\n" }, { "from": "human", "value": "require 'rack-rewrite'\n\nmodule Redirects\n class App < Rack::Rewrite\n def initialize(app)\n super do\n # redirect ruby api to rubydoc.info\n r301 %r{/api/cucumbe...
ruby
chosen
[ { "from": "system", "value": "Add ar60_or_later? method to Util\n" }, { "from": "human", "value": "module ActiveRecord::Turntable\n module Util\n def ar_version_equals_or_later?(version)\n ar_version >= Gem::Version.new(version)\n end\n\n def ar_version_earlier_than?(version)\n ...
ruby
chosen
[ { "from": "system", "value": "Remove Serverspec::Helper for latest major version of serverspec.\n" }, { "from": "human", "value": "# Encoding: utf-8\nrequire 'serverspec'\n\ninclude Serverspec::Helper::Exec\ninclude Serverspec::Helper::DetectOS\n\nRSpec.configure do |c|\n c.before :all do\n ...
ruby
chosen
[ { "from": "system", "value": "Add version route for segment\n" }, { "from": "human", "value": "require 'sinatra/base'\nrequire 'sinatra/respond_with'\nrequire 'llt/segmenter'\nrequire 'llt/core/api'\n\nclass Api < Sinatra::Base\n register Sinatra::RespondWith\n helpers LLT::Core::Api::Helpers\...
ruby
chosen
[ { "from": "system", "value": "Make the auth method better\n" }, { "from": "human", "value": "class Podio::Live < ActivePodio::Base\n property :status, :string\n property :presence, :hash\n property :provider, :string\n property :push, :hash\n property :live_id, :integer\n property :setting...
ruby
chosen
[ { "from": "human", "value": "Add Options class for option parsing\n" }, { "from": "gpt", "value": "require 'optparse'\n\nmodule Punchlist\n class Options\n attr_reader :default_punchlist_line_regexp\n\n def initialize(default_punchlist_line_regexp)\n @default_punchlist_line_regexp = ...
ruby
chosen
[ { "from": "system", "value": "Fix regexp to match better in ellen's convention\n" }, { "from": "human", "value": "module Ellen\n module Handlers\n class JapanWeather < Base\n on /の天気/, name: \"japan_weather\", description: \"Reply weather forecast\"\n\n def japan_weather(message)\n...
ruby
chosen
[ { "from": "system", "value": "Set the default behavior to have timeout 0 and period 0\n\nFor api cache to behave transparently in faraday we can't have it\nimposing it's own timeouts or blocking repeated requests\n" }, { "from": "human", "value": "require 'faraday'\nrequire 'api_cache'\n\nmodule...
ruby
chosen
[ { "from": "system", "value": "Include adapters so we don't have to do so manually\n" }, { "from": "human", "value": "module Flipper\n module Rails\n def flipper\n @flipper ||= Flipper.new(\n ::Rails.application.config.flipper.adapter.new(\n ::Rails.application.config.fli...
ruby
chosen
[ { "from": "system", "value": "Add Bootstrap to asset pipeline\n" }, { "from": "human", "value": "module StatBoard\n class Engine < ::Rails::Engine\n isolate_namespace StatBoard\n end\nend\n" }, { "from": "gpt", "value": "module StatBoard\n class Engine < ::Rails::Engine\n is...
ruby
chosen
[ { "from": "system", "value": "Add rake tasks for creating new instance\n" }, { "from": "human", "value": "# desc \"Explaining what the task does\"\n# task :aws_deployment_tasks do\n# # Task goes here\n# end\n\nnamespace :ops_tasks do\n desc \"deploy with chef recipe\"\n task :deploy => :envi...
ruby
chosen
[ { "from": "system", "value": "Add ok response status to matchers\n" }, { "from": "human", "value": "module RSpec\n module Toolbelt\n module Matchers\n module HTTP\n\n RSpec::Matchers.define :be_unauthorized do\n match do |response|\n response.status == 401\n ...
ruby
chosen
[ { "from": "system", "value": "Fix logging error on failures\n" }, { "from": "human", "value": "require 'kindly'\n\nmodule Kindly\n class Runner\n\n def initialize(db, handler)\n @db = db\n @handler = handler\n end\n\n def run(migration)\n begin\n output = capture_...
ruby
chosen
[ { "from": "system", "value": "Set exit status to 1 if there was at least one error during check\n" }, { "from": "human", "value": "\nclass Licit::Command\n\n def run\n licenser = Licit::Licenser.new load_config\n if ARGV[0] == 'fix'\n fix licenser\n else\n check licenser\n ...
ruby
chosen
[ { "from": "system", "value": "Add expected and actual values to failure message.\n" }, { "from": "human", "value": "class PangramCase < OpenStruct\n def name\n 'test_%s' % description.downcase.tr_s(\" -'\", '_').sub(/_$/, '')\n end\n\n def workload\n [\n \"phrase = '#{input}'\\n\",\n...
ruby
chosen
[ { "from": "system", "value": "Set default host and ports\n" }, { "from": "human", "value": "module Pantry\n\n # Retrieve the current configuration set\n def self.config\n @@config ||= Config.new\n end\n\n # Global configuration values for running all of Pantry.\n class Config\n # Host...
ruby
chosen
[ { "from": "system", "value": "Fix plugin icon with Redmine 3.4.x\n" }, { "from": "human", "value": "Redmine::MenuManager.map :admin_menu do |menu|\n menu.push :redmine_git_hosting, { controller: 'settings', action: 'plugin', id: 'redmine_git_hosting' }, caption: :redmine_git_hosting\nend\n\nRed...
ruby
chosen
[ { "from": "system", "value": "Fix database query by removing a space that somehow got inserted in the query\n" }, { "from": "human", "value": "class Candidate < ActiveRecord::Base\n belongs_to :zipcode\n APPOINTED_OFFICES = ['U.S. Secretary', 'U.S. Attorney', 'Justice']\n CURRENT_PRESIDENT = ...
ruby
chosen
[ { "from": "system", "value": "Remove comments of failed attempt to custom validate.\n" }, { "from": "human", "value": "# class ChoicesSetUnlessEnding < ActiveModel::Validator\n#   def validate(record)\n#     unless record.name.starts_with? 'X'\n#       record.errors[:name] << 'Need a name starti...
ruby
chosen
[ { "from": "system", "value": "Remove old Rails namespace from version\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'jeet/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Fix NoDatabaseError test for AR < 4.1\n" }, { "from": "human", "value": "require 'spec_helper'\n\nclass Mock\n include ActiveRecord::ConnectionHandling\n def logger\n nil\n end\nend\n\ndescribe ActiveRecord::ConnectionHandling do\n\n it 'raises NoDatabaseErro...
ruby
chosen
[ { "from": "system", "value": "Fix wrong Content-Length on Ruby 1.9, leading to Timeout in some cases\n" }, { "from": "human", "value": "class Gem::Commands::PushCommand < Gem::AbstractCommand\n\n def description\n 'Push a gem up to Gemcutter'\n end\n\n def arguments\n \"GEM built ...
ruby
chosen
[ { "from": "system", "value": "Initialize cache state in the PortfoliosController spec\n" }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.describe PortfoliosController, type: :controller do\n render_views\n\n it \"shows a loading screen when there is no data for the requested us...
ruby
chosen
[ { "from": "system", "value": "Fix routing expectation declaration for ruby 2.1.x" }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe 'Dynamic routes' do\n let(:mock) { FactoryGirl.create :mock, request_method: request_method, route_path: route_path }\n let(:request_method) { }\...
ruby
chosen
[ { "from": "system", "value": "Use ruby-git to fetch gh-pages\n" }, { "from": "human", "value": "require 'git'\n\nclass BuildJob\n @queue = :default\n\n def self.perform(tmpdir, token, repo, lang=nil)\n clone_repo(repo, token, tmpdir)\n Dir.chdir \"#{tmpdir}/#{repo}\" do\n setup_git\...
ruby
chosen
[ { "from": "system", "value": "Fix typo in hash of sync worker\n" }, { "from": "human", "value": "class DiscourseSynchronizationWorker < DiscourseWorker\n include Sidekiq::Worker\n\n def perform(user_id)\n \tfor_each_tenant(user_id) do |u,t|\n client(t) do |c|\n c.sso_sync(\n ...
ruby
chosen
[ { "from": "system", "value": "Add license to gemspec for easier automatic discovery\n\nThe LICENSE file already defines this gem as MIT, but this adds that info to the gemspec as well" }, { "from": "human", "value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOA...
ruby
chosen
[ { "from": "system", "value": "Change scala version to make most commonly used one\n" }, { "from": "human", "value": "default['kafka']['user'] = 'kafka'\ndefault['kafka']['group'] = 'kafka'\ndefault['kafka']['version'] = '0.8.1'\ndefault['kafka']['scala_version'] = '2.10'\ndefault['kafka']['jar_...
ruby
chosen
[ { "from": "system", "value": "Fix update_all syntax for Rails 4.1\n\nIn this case, just switch to pure SQL for infinite compatibility\n" }, { "from": "human", "value": "require 'build'\nrequire 'build_attempt'\n\nclass RenameErrorStateToErrored < ActiveRecord::Migration\n def self.up\n Build...
ruby
chosen
[ { "from": "human", "value": "Add a migration to remove travel advice editions\n\nPublisher is no longer responsible for these documents so we can remove\nthem.\n" }, { "from": "gpt", "value": "class RemoveTravelAdviceEditions < Mongoid::Migration\n def self.up\n TravelAdviceEdition.delete_al...
ruby
chosen
[ { "from": "system", "value": "Include the markdown helper into ActionView\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'bundler/setup'\n\nBundler.require(:default)\n\nrequire 'disco/markdown_helper'\n" }, { "from": "gpt", "value": "require 'rubygems'\nrequire 'bundl...
ruby
chosen
[ { "from": "system", "value": "Make Railtie properly set up delegations\n" }, { "from": "human", "value": "module ActiveReplicas\n class Railtie < Rails::Railtie\n class << self\n attr_reader :connection_handler\n\n def hijack_active_record(proxy_configuration, overrides: [])\n ...
ruby
chosen
[ { "from": "system", "value": "Change expected secret key method.\n" }, { "from": "human", "value": "require 'digest/sha1'\n\nmodule BOTR\n\t\n\tmodule Authentication\n\n \tdef signature(params = {})\n \t\tsorted_params = {}\n \t\tstr_params = \"\"\n\n \t\t# Sort params by key (hashes...
ruby
chosen
[ { "from": "system", "value": "Clean makefile after building so rubygems won't crash.\n" }, { "from": "human", "value": "require \"fileutils\"\nrequire \"rbconfig\"\n\nmodule CapybaraWebkitBuilder\n extend self\n\n def make_bin\n ENV['MAKE'] || 'make'\n end\n\n def qmake_bin\n ENV['QMAK...
ruby
chosen
[ { "from": "system", "value": "Make gateway an attr_reader for a class variable" }, { "from": "human", "value": "Dir[\"#{File.dirname(__FILE__)}/jibby/**/*.rb\"].each { |file| require file }\n\n# Jibby is a console client that connects to JIRA\nmodule Jibby\n module_function\n\n attr_reader :ga...
ruby
chosen
[ { "from": "system", "value": "Load the version from source.\n" }, { "from": "human", "value": "# coding: utf-8\nrequire 'rubinius/toolset/version'\n\nGem::Specification.new do |spec|\n spec.name = \"rubinius-toolset\"\n spec.version = Rubinius::Toolset::VERSION\n spec.authors ...
ruby
chosen
[ { "from": "system", "value": "Move all predicates to constants\n" }, { "from": "human", "value": "module Might\n # Contains contains with all supported predicates\n #\n module FilterPredicates\n ON_VALUE = %w(\n not_eq eq\n does_not_match matches\n gt lt\n gteq lteq\n ...
ruby
chosen
[ { "from": "human", "value": "Add support (untested) for a power meter\n" }, { "from": "gpt", "value": "# NOTE: Currently untested with a real power meter\nclass MiOS::Device::PowerMeter < MiOS::Device::Generic\n ServiceId = \"urn:micasaverde-com:serviceId:EnergyMetering1\"\n\n def watts\n @...
ruby
chosen
[ { "from": "system", "value": "Use Stagehand.configuration instead of Rails.configuration\n\nThis avoids a nil exception in with_connection if the configuration settings are not present.\n" }, { "from": "human", "value": "namespace :stagehand do\n desc \"Polls the commit entries table for change...
ruby
chosen
[ { "from": "system", "value": "Fix ThreadError - deadlock; recursive locking\n" }, { "from": "human", "value": "# encoding: utf-8\nrequire 'action_dispatch/middleware/static'\n\nmodule ThemePark\n module Rails\n class Server < ThemePark::Server\n\n # Only for Rails application.\n de...
ruby
chosen
[ { "from": "system", "value": "Load order doesn't seem to matter for translations now, so no need to force the reload of I18n setup.\n" }, { "from": "human", "value": "require 'thinking_sphinx'\nrequire 'rails'\n\nmodule ThinkingSphinx\n class Railtie < Rails::Railtie\n \n initializer 'thi...
ruby
chosen
[ { "from": "system", "value": "Add header to track model test\n" }, { "from": "human", "value": "# Encoding: utf-8\nrequire 'test_helper'\n\nclass TrackTest < ActiveSupport::TestCase\n # test \"the truth\" do\n # assert true\n # end\nend\n" }, { "from": "gpt", "value": "# Encodin...
ruby
chosen
[ { "from": "system", "value": "Allow puppet-lint 2.0 as a dependency and bump check version\n" }, { "from": "human", "value": "Gem::Specification.new do |spec|\n spec.name = 'puppet-lint-yumrepo_gpgcheck_enabled-check'\n spec.version = '0.0.1'\n spec.homepage = 'https://github.co...
ruby
chosen
[ { "from": "human", "value": "Add test that server can send request and wait for client response\n" }, { "from": "gpt", "value": "require 'acceptance/test_helper'\nrequire 'timeout'\n\ndescribe \"Server requests info from the Client\" do\n\n before do\n @server, @client1, @client2 = self.clas...
ruby
chosen
[ { "from": "system", "value": "Update tests following link changes\n" }, { "from": "human", "value": "require_relative \"../../test_helper\"\n\nmodule SmartAnswer::Calculators\n class ArrestedAbroadCalculatorTest < ActiveSupport::TestCase\n context ArrestedAbroad do\n setup do\n @...
ruby
chosen
[ { "from": "system", "value": "Change AFNetworking dependency to >= 0.9.0" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"AFIncrementalStore\"\n s.version = \"0.0.1\"\n s.summary = \"Core Data Persistence with AFNetworking, Done Right\"\n s.homepage = ...
ruby
chosen
[ { "from": "system", "value": "Allow use with Rails 7\n\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nGem::Specification.new do |spec|\n spec.name = \"mta-settings\"\n spec.vers...
ruby
chosen
[ { "from": "system", "value": "Remove 'test_spec' from podspec – it doesn't handle test environments that require keychain sharing\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'Valet'\n s.version = '3.1.2'\n s.license = 'Apache License, Version 2.0'\n s.summary = ...
ruby
chosen
[ { "from": "system", "value": "Update proposal status script with OpenConferenceWare namespace\n" }, { "from": "human", "value": "# Accept and reject talks based on IDs from the scheduling spreadsheet\n#\ndef accept_and_reject_from_spreadsheet\n # Paste IDs from spreadsheet, separated by spaces\...
ruby
chosen
[ { "from": "system", "value": "Fix deprecation warning and be compatible acrross Rails versions\n" }, { "from": "human", "value": "module AjaxDatatablesRails\n module Datatable\n\n TRUE_VALUE = 'true'.freeze\n\n class Datatable\n attr_reader :datatable, :options\n\n def initializ...
ruby
chosen
[ { "from": "system", "value": "Update Boom 2 to v1.0.1\n" }, { "from": "human", "value": "cask :v1 => 'boom' do\n version '1.0'\n sha256 '446605e22d6c4c56e7451373a330c3c86e2a7aa9316ca9aaa2261d200f7e747d'\n\n url \"http://www.globaldelight.com/boom/download/2x/v#{version}/boom2.dmg\"\n homepag...
ruby
chosen
[ { "from": "system", "value": "Update JOSM to version 9979\n" }, { "from": "human", "value": "cask 'josm' do\n version '9963'\n sha256 'd93ae916bc679d0ba1dd56b3262682a862badb7523cc57f099e65f8d056f659d'\n\n url \"https://josm.openstreetmap.de/download/macosx/josm-macosx-#{version}.zip\"\n name...
ruby
chosen
[ { "from": "system", "value": "Love: Fix the sha256 and link binary\n\nThe shasum didn't match. Also link the binary\n" }, { "from": "human", "value": "cask :v1 => 'love' do\n version '0.9.1'\n sha256 '40dfeb1069f6c056b06d0e87c64f3950fd1b1523a9e19af2b03912a5d5c03b13'\n\n # bitbucket.org is the...
ruby
chosen
[ { "from": "human", "value": "Add entity type names like shown in document\n" }, { "from": "gpt", "value": "class AddEntityTypeNames < ActiveRecord::Migration\n def self.up\n #insert entity type names to entity types table\n entity_types = [\n {:id => 1, :name => 'Person...
ruby
chosen
[ { "from": "system", "value": "Include TagHelper instead of TranslationHelper to get content_tag dependency\n" }, { "from": "human", "value": "require 'cortex/snippets/webpage'\nrequire 'addressable/uri'\n\nmodule Cortex\n module Snippets\n class Client\n include ActionView::Helpers::Tra...
ruby
chosen
[ { "from": "system", "value": "Downgrade RSpec for TM1 compatability" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'cloud_files/version'\n\nGem::Specification.new do |spec|\n spec.nam...
ruby
chosen
[ { "from": "system", "value": "Remove test ideas that went into unit tests\n" }, { "from": "human", "value": "describe \"cyoi key_pair aws\" do\n include Cyoi::Cli::Helpers::Settings\n include SettingsHelper\n include Aruba::Api\n before { @settings_dir = File.expand_path(\"~/.cyoi_client_lib...
ruby
chosen
[ { "from": "system", "value": "Update gemspec to reflect Japanese support only for now\n\n[ci skip]\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'agate/version'\n\nGem::Specificatio...
ruby
chosen
[ { "from": "system", "value": "Update IntelliJ EAP to 15; version 142.2491.4.\n" }, { "from": "human", "value": "cask :v1 => 'intellij-idea-eap' do\n version '141.1531.2'\n sha256 '66fe6dcc84508cac655cac251975e69075ed1b0a80e9bf2baaa02b2a0b33c98d'\n\n url \"http://download-cf.jetbrains.com/idea...
ruby
chosen
[ { "from": "system", "value": "Create the directories before we try to download the tar and CD into a\ndirectory that might not exist\n" }, { "from": "human", "value": "#\n# Cookbook Name:: wt_scs\n# Recipe:: default\n#\n# Copyright 2012, Webtrends\n#\n# All rights reserved - Do Not Redistribute\...
ruby
chosen
[ { "from": "system", "value": "Add Date to the feedback report.\n" }, { "from": "human", "value": "module Admin\n class FeedbackReportCSVWriter < CSVWriter\n\n columns :id, :service, :feedbackable_type, :rating, :review, :acknowledged, :email, :phone, :traveler \n\n associations :user\n\n ...
ruby
chosen
[ { "from": "system", "value": "JariBakken: Make sure Firefox shutdown happens even if the RPC fails.\n\ngit-svn-id: aa1aa1384423cb28c2b1e29129bb3a91de1d9196@16693 07704840-8298-11de-bf8c-fd130f914ac9\n" }, { "from": "human", "value": "module Selenium\n module WebDriver\n module Firefox\n\n ...
ruby
chosen
[ { "from": "system", "value": "Add nagira dependency to Gemfile\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"nagira_active_resource/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification....
ruby
chosen
[ { "from": "human", "value": "Test aspect for instance objects\n" }, { "from": "gpt", "value": "require File.expand_path(File.dirname(__FILE__) + '/spec_helper')\n\ndescribe \"Aspector for object\" do\n it \"should work\" do\n klass = Class.new do\n def value\n @value ||= []\n ...
ruby
chosen
[ { "from": "system", "value": "Remove cruft from DegenerateUser model\n" }, { "from": "human", "value": "class ::DegenerateUser\n include Authorize::AuthorizationsTable, Authorize::AuthorizationsTable::TrusteeExtensions\n acts_as_trustee(false)\n\n def authorization_token\n object_id\n end...
ruby
chosen
[ { "from": "system", "value": "Remove deprecation warning in spec test\n" }, { "from": "human", "value": "shared_examples \"with header\" do |header, value|\n it \"sets header #{header}\" do\n expect {\n subject.deliver!\n }.to change { ActionMailer::Base.deliveries.count }.by(1)\n ...
ruby
chosen
[ { "from": "system", "value": "Use nolock: true for Mongo [skip ci]\n" }, { "from": "human", "value": "module Blazer\n module Adapters\n class MongodbAdapter < BaseAdapter\n def run_statement(statement, comment)\n columns = []\n rows = []\n error = nil\n\n beg...
ruby
chosen
[ { "from": "system", "value": "Put mailer in Helpers instead of AppHelpers\n" }, { "from": "human", "value": "module Pakyow\n module AppHelpers\n def mailer(view_path)\n Mailer.from_store(view_path, @presenter.store)\n end\n end\nend\n" }, { "from": "gpt", "value": "modul...
ruby
chosen
[ { "from": "system", "value": "Add separate methods for canvas and hidden field\n" }, { "from": "human", "value": "module JohnHancock\n module Rails\n module FormBuilder\n include ActionView::Helpers::TagHelper\n\n def signature_field(attribute)\n tags = []\n tags << c...
ruby
chosen
[ { "from": "system", "value": "Add gitkeeps for spec dirs\n" }, { "from": "human", "value": "require \"rails\"\n\nmodule Thincloud\n module Generators\n class TestGenerator < ::Rails::Generators::Base\n source_root File.expand_path(\"../templates\", __FILE__)\n\n desc \"Generates th...
ruby
chosen