conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix buffer migration when run during a deploy\n\nMultiple migrations; a previous migration added the \"composite\" column,\nthis migration needs to reload the Technology class to ensure the change\nis picked up.\n" }, { "from": "human", "value": "class AddBuffersAnd...
ruby
chosen
[ { "from": "system", "value": "Update the name and description of the gem\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\nGem::Specification.new do |s|\n s.name = \"nyan-cat-formatter\"\n s.version = \"0.0.1\"\n s.authors = [\"Matt Sears\"]\n...
ruby
chosen
[ { "from": "system", "value": "Fix tests on all builds\n" }, { "from": "human", "value": "When /^I start guard$/ do\n run_interactive(unescape('guard'))\n sleep 5\nend\n\nWhen /^I edit a watched file$/ do\n append_to_file 'app/controllers/application_controller.rb', ' '\n sleep 1\nend\n\nThe...
ruby
chosen
[ { "from": "system", "value": "Add constant for button text height\n" }, { "from": "human", "value": "\nrequire 'gosu'\n\n# Defines application wide constants.\nmodule Constants\n\n\tMAJOR_VERSION = \"0\"\n\tMINOR_VERSION = \"0\"\n\tPATCH = \"0\"\n\n\tVERSION = [MAJOR_VERSION, MINOR_VERSION, PATC...
ruby
chosen
[ { "from": "system", "value": "Add license to gemspec, is MIT\n\nper https://github.com/pivotal/LicenseFinder" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/rails_stdout_logging/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors ...
ruby
chosen
[ { "from": "system", "value": "Change service_account to enterprise_connect in oauth url\n" }, { "from": "human", "value": "module OmniAuth\n module Strategies\n class CronofyServiceAccount < OmniAuth::Strategies::OAuth2\n option :name, \"cronofy_service_account\"\n\n option :client...
ruby
chosen
[ { "from": "system", "value": "Break down fake udp socket methods a bit more.\n" }, { "from": "human", "value": "class FakeUdpSocket\n TimingRegex = /\\:\\d+\\|ms\\Z/\n\n def initialize\n @buffer = []\n end\n\n def send(message, *rest)\n @buffer.push message\n end\n\n def recv\n @b...
ruby
chosen
[ { "from": "system", "value": "Fix bug when listing messages in api\n" }, { "from": "human", "value": "class Api::MessagesController < ApiController\n\n def index\n @account = Account.find(params.fetch(:account))\n authorize_account_read!(@account)\n @messages = account.messages\n re...
ruby
chosen
[ { "from": "system", "value": "Remove Chef 11 combatibility check\n" }, { "from": "human", "value": "name 'ohai'\nmaintainer 'Chef Software, Inc.'\nmaintainer_email 'cookbooks@chef.io'\nlicense 'Apache 2.0'\ndescription 'Provides custom resources for installing Ohai hints and plugins'\nlong_descr...
ruby
chosen
[ { "from": "system", "value": "Change rubyzip dependency to >= 1.0\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'creek/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Add tests for all methods\n" }, { "from": "human", "value": "require './hero'\n\ndescribe Hero do\n it \"has capitalized name\" do\n hero = Hero.new 'mike'\n expect(hero.name).to eq 'Mike'\n end\n\n it \"can power up\" do\n hero = Hero.new 'mike'\n ex...
ruby
chosen
[ { "from": "system", "value": "Change way of requiring version file\n" }, { "from": "human", "value": "# encoding: utf-8\n\nrequire \"lib/pointme/version\"\n\nGem::Specification.new do |s|\n s.name = \"pointme\"\n s.version = Pointme::Version::STRING\n s.authors = [\"Szymon Urba...
ruby
chosen
[ { "from": "system", "value": "Change controller to API and desired responses to JSON objs\n" }, { "from": "human", "value": "class ApplicationController < ActionController::Base\n # Prevent CSRF attacks by raising an exception.\n # For APIs, you may want to use :null_session instead.\n protec...
ruby
chosen
[ { "from": "system", "value": "Add expected html output to test." }, { "from": "human", "value": "require \"formalist/draft_js_compiler\"\n\nRSpec.describe Formalist::DraftJsCompiler do\n subject(:compiler) { Formalist::DraftJsCompiler.new }\n\n let(:ast) {\n block1 = [\"block\", [\"header-t...
ruby
chosen
[ { "from": "system", "value": "Fix gemspec and bump version\n" }, { "from": "human", "value": "# coding: utf-8\n\nGem::Specification.new do |spec|\n spec.name = \"jekyll-materialdocs\"\n spec.version = \"1.1.2\"\n spec.authors = [\"James King\"]\n spec.email = [\"...
ruby
chosen
[ { "from": "human", "value": "Set an env secret token and use default if none\n" }, { "from": "gpt", "value": "Wheelomatic9000::Application.config.secret_token = ENV['SECRET_TOKEN'] || bde8eee598129768ea1d58f28d614ae4db919496f0170dd68b3ee6f2bbb2c6406faf87919a2b22d3e56b41059df5f4227afd7a476231f2e5...
ruby
chosen
[ { "from": "system", "value": "Remove SECRET_TOKEN and calculate a new one\n" }, { "from": "human", "value": "# Be sure to restart your server when you modify this file.\n\n# Your secret key for verifying the integrity of signed cookies.\n# If you change this key, all old signed cookies will beco...
ruby
chosen
[ { "from": "system", "value": "Use genrate scaffold generator method\n" }, { "from": "human", "value": "require 'rails/generators'\nrequire 'rails/generators/migration'\nrequire 'active_record'\nrequire 'rails/generators/active_record'\n\nmodule SamplePlugin\n module Generators\n class Instal...
ruby
chosen
[ { "from": "system", "value": "Refactor VendorPaymentApplyList to use Support::Sublist\n" }, { "from": "human", "value": "module NetSuite\n module Records\n class VendorPaymentApplyList\n include Support::Fields\n include Namespaces::TranPurch\n\n fields :apply\n\n def ini...
ruby
chosen
[ { "from": "system", "value": "Add url to growl test file; update code\n" }, { "from": "human", "value": "require 'growl'\n\nGrowl.notify {\n self.message = \"<a href='http://www.google.com'>This is a test!</a>\"\n self.icon = :Safari\n sticky!\n}\n" }, { "from": "gpt", "value": "r...
ruby
chosen
[ { "from": "system", "value": "Add write action placeholder for raw handler\n" }, { "from": "human", "value": "class RawHandler < Compound::Handler\n\n\taction :view do |path, app|\n\t\tapp.body(File.open(path){ |f| f.read })\n\t\tapp.headers({\"Content-Type\" => \"text/plain\"})\n\tend\n\n\tacti...
ruby
chosen
[ { "from": "human", "value": "Add object for creating page\n\nPageBuilder will have the responsibility of creating a full functioning page. This may mean offloading to ERB or scraping CSS links in the future\n" }, { "from": "gpt", "value": "module Hubdown\n class PageBuilder\n \n def initi...
ruby
chosen
[ { "from": "system", "value": "Disable my weird, custom head request response\n" }, { "from": "human", "value": "module Sinatra\n module TreeStats\n module Routing\n module General\n def self.registered(app)\n app.head '/' do\n status :ok\n body \"\"...
ruby
chosen
[ { "from": "system", "value": "Add gli and formatador to dependencies.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/cognizant/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Gurpartap Singh\"]\n gem.email ...
ruby
chosen
[ { "from": "system", "value": "Fix homepage to use SSL in Max Cask\n\nThe HTTP URL is already getting redirected to HTTPS. Using the HTTPS URL directly\nmakes it more secure and saves a HTTP round-trip.\n" }, { "from": "human", "value": "cask :v1 => 'cycling74-max' do\n version '7.0.3-150402'\n ...
ruby
chosen
[ { "from": "human", "value": "Add Rake task for Factory linting\n" }, { "from": "gpt", "value": "namespace :factory_girl do\n desc \"Verify that all FactoryGirl factories are valid\"\n task lint: :environment do\n if Rails.env.test?\n require \"factory_girl_rails\"\n # TODO: Remove...
ruby
chosen
[ { "from": "human", "value": "Add rake task to lib\n" }, { "from": "gpt", "value": "module Kaleidoscope\n module Task\n def self.obtain_class\n class_name = ENV['CLASS'] || ENV['class']\n raise \"Must specify CLASS\" unless class_name\n class_name\n end\n end\nend" } ]
ruby
chosen
[ { "from": "system", "value": "Add RAC as a dependency.\n" }, { "from": "human", "value": "#\n# Be sure to run `pod lib lint NAME.podspec' to ensure this is a\n# valid spec and remove all comments before submitting the spec.\n#\n# Any lines starting with a # are optional, but encouraged\n#\n# To ...
ruby
chosen
[ { "from": "system", "value": "Remove deprecated has_rdoc= from gemspec.\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = \"redhead\"\n s.version = \"0.0.3\"\n s.authors = [\"Adam Prescott\"]\n s.email = [\"adam@aprescott.com\"]\n s.homepag...
ruby
chosen
[ { "from": "system", "value": "Speed up node reactor start/stop test.\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe DripDrop::Node do\n describe \"initialization\" do\n before do\n @ddn = DripDrop::Node.new {}\n @ddn.start\n sleep 0.1\n end\n \n ...
ruby
chosen
[ { "from": "system", "value": "Add ability to launch Chrome on Windows from scripts.\n" }, { "from": "human", "value": "require 'tmpdir'\n\ndef run_chrome(language)\n user_data_dir = Dir.mktmpdir('marinara')\n extension_dir = File.join(Dir.pwd, 'package')\n\n orig = `defaults read com.google.C...
ruby
chosen
[ { "from": "system", "value": "Load sequel_core before spec_config in the adapter specs\n" }, { "from": "human", "value": "require 'rubygems'\nrequire File.join(File.dirname(__FILE__), '../spec_config.rb')\nunless Object.const_defined?('Sequel')\n $:.unshift(File.join(File.dirname(__FILE__), \"....
ruby
chosen
[ { "from": "human", "value": "Add test cases verifying that SafeERB works\n\nIf an upgrade to Rails breaks SafeERB, we'd like to find out.\n" }, { "from": "gpt", "value": "require File.dirname(__FILE__) + '/../spec_helper'\n\n# Verify that our safe_erb patches are working.\ndescribe \"An ERB temp...
ruby
chosen
[ { "from": "human", "value": "Add a test for only posts of the current site\n" }, { "from": "gpt", "value": "require 'test_helper'\n\nclass SearchTest < ActionDispatch::IntegrationTest\n setup do\n setup_groonga_database\n @current_site = create(:site)\n @other_site = create(:site)\n ...
ruby
chosen
[ { "from": "system", "value": "Use 'require' rather than require_relative\n" }, { "from": "human", "value": "require 'quotes/version'\n\n# require all support files\nrequire_relative 'quotes/support/validation_helpers'\n\nrequire_relative 'quotes/entities'\nrequire_relative 'quotes/services'\nreq...
ruby
chosen
[ { "from": "system", "value": "Add filename & subject to let blocks in importer spec\n" }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe 'UserImporter' do\n\n\n it 'instantiates with a filename' do\n filename = File.join(Rails.root, \"spec\", \"resources\", \"anonymized_user...
ruby
chosen
[ { "from": "system", "value": "Add surveys to instrument spec\n" }, { "from": "human", "value": "require \"spec_helper\"\n\ndescribe Instrument do\n it { should respond_to(:questions) }\nend\n" }, { "from": "gpt", "value": "require \"spec_helper\"\n\ndescribe Instrument do\n it { sh...
ruby
chosen
[ { "from": "system", "value": "Add stubs for the expected methods.\n" }, { "from": "human", "value": "require 'spec_helper'\nrequire 'compo'\n\n# Mock implementation of UrlReferenceable.\nclass MockUrlReferenceable\n include Compo::UrlReferenceable\nend\n\ndescribe MockUrlReferenceable do\nend\n...
ruby
chosen
[ { "from": "human", "value": "Add GitLab SSH key provider\n" }, { "from": "gpt", "value": "require 'gitlab'\nrequire 'httparty'\nrequire 'retries'\n\nmodule Provider\n # GitLab SSH public key provider\n class GitLab\n # @param [Hash] options GitLab credentials for Gitlab::Client\n # @opti...
ruby
chosen
[ { "from": "system", "value": "Raise intelligent error on invalid argument\n" }, { "from": "human", "value": "require \"laadur/version\"\nrequire 'optparse'\nrequire 'pp'\nmodule Laadur\n class CLI\n def initialize\n puts 'test'\n options = {}\n\n optparse = OptionParser.new do...
ruby
chosen
[ { "from": "system", "value": "Change repo to point at master\n" }, { "from": "human", "value": "require 'pathname'\nrequire_relative 'resume/cli/application'\n\nmodule Resume\n VERSION = '1.0'\n # REMOTE_REPO = \"https://raw.githubusercontent.com/paulfioravanti/resume/master\"\n REMOTE_REPO =...
ruby
chosen
[ { "from": "human", "value": "Add day 12 C compiler\n" }, { "from": "gpt", "value": "require 'open3'\nrequire 'tempfile'\n\ndef to_c(input, regs)\n prologue = [\n '#include <stdio.h>',\n 'int main() {',\n ] + regs.map { |k, v|\n \" int #{k} = #{v};\"\n }\n\n come_from = Hash.new { |...
ruby
chosen
[ { "from": "system", "value": "Add stargazers_count to repo factory\n" }, { "from": "human", "value": "require 'securerandom'\n\nFactoryGirl.define do\n sequence :email do |n|\n \"email#{n}@gmail.com\"\n end\n\n factory :project do\n name 'rails'\n platform 'Rubygems...
ruby
chosen
[ { "from": "system", "value": "Add Hero factory for tests\n" }, { "from": "human", "value": "FactoryGirl.define do\n factory :map do\n name \"Dorado\"\n map_type \"escort\"\n end\n\n factory :map_segment do\n map\n name \"Attacking: Payload 1\"\n end\nend\n" }, { "from": "...
ruby
chosen
[ { "from": "system", "value": "Make spec description a little less ambiguous\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe(RSSCache::Feed) do\n it 'can load an RSS feed' do\n expect(@rss_feed).to be_a RSSCache::Feed\n end\n\n it 'can load an Atom feed' do\n expect(...
ruby
chosen
[ { "from": "system", "value": "Update podspec version to 0.2.1\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"VENPromotionsManager\"\n s.version = \"0.2.0\"\n s.summary = \"Definition, management and control of in-app location based promotions.\"\n s.de...
ruby
chosen
[ { "from": "system", "value": "Set Socket::MSG_DONTWAIT not to be blocked\n\nI don't have problems without this flag, but it might be blocked in some\ncases (still I'm not sure).\n" }, { "from": "human", "value": "require 'socket'\n\nmodule Aws\n module Xray\n # Own the responsibility of hold...
ruby
chosen
[ { "from": "human", "value": "Add the missing file, bump the version to 0.1.1.-a\n" }, { "from": "gpt", "value": "require 'nanoc'\n\nmodule Nanoc\n module Filters\n autoload 'NBConvert', 'nanoc/filters/nbconvert'\n\n Nanoc::Filter.register '::Nanoc::Filters::NBConvert', :nbconvert\n end\n...
ruby
chosen
[ { "from": "human", "value": "Add a Rack Middleware, thanks blaines\n\nhttp://news.ycombinator.com/item?id=4439989\n" }, { "from": "gpt", "value": "require 'pry-rescue'\nclass PryRescue\n def initialize(app)\n @app = app\n end\n\n def call(env)\n Pry::rescue{ @app.call(env) }\n end\nend...
ruby
chosen
[ { "from": "system", "value": "Fix error in RetentionMagic config\n" }, { "from": "human", "value": "require \"retention_magic/engine\"\n\nmodule RetentionMagic\n mattr_accessor :user_class do\n \"User\"\n end\n mattr_accessor :activation_counter_columns do\n []\n mattr_accessor :retent...
ruby
chosen
[ { "from": "system", "value": "Return original response body when response body already exists\n" }, { "from": "human", "value": "module ErrorHandler\n def self.registered(app)\n app.error 404 do\n json message: 'Not Found'\n end\n app.error 500 do\n Log.error \"#{env['sinatra...
ruby
chosen
[ { "from": "system", "value": "Update gemspec dependency versions to be more lenient\n" }, { "from": "human", "value": "lib = File.join File.dirname(__FILE__), 'lib'\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nrequire 'fluffle/version'\n\nGem::Specification.new do |s|\n s.name ...
ruby
chosen
[ { "from": "system", "value": "Add Title of PR to output\n\nNeed the Title of the PR to figure out what might be able to go in the changelog.\n" }, { "from": "human", "value": "MILESTONE = 36\nACCESS_TOKEN = \"your github access token\"\n\nrequire 'octokit'\no = Octokit::Client.new(:access_token ...
ruby
chosen
[ { "from": "system", "value": "Allow HOST to be set by CANONICAL_HOST env var\n" }, { "from": "human", "value": "HOST = ENV['HOST'] || {\n 'development' => 'http://localhost:3000',\n 'test' => 'http://example.com',\n 'production' => 'http://clahub.com'\n}[Rails.env]\n" }, { "fr...
ruby
chosen
[ { "from": "system", "value": "Fix reset date format when rate limited\n" }, { "from": "human", "value": "class Rack::Attack\n # Rate limits for the API\n throttle('api', limit: 150, period: 5.minutes) do |req|\n req.ip if req.path.match(/\\A\\/api\\//)\n end\n\n self.throttled_response = ...
ruby
chosen
[ { "from": "system", "value": "Fix deprecation calling assert_equal nil\n\nFix the deprecation:\n```\nDEPRECATED: Use assert_nil if expecting nil from \ntest/unit/helpers/locations_options_helper_test.rb:17. This will fail in \nMinitest 6.\n```\n" }, { "from": "human", "value": "require \"test_he...
ruby
chosen
[ { "from": "system", "value": "Fix email expectation in smoke test\n\nTest was expecting subject with format 'CANCELLED: %s on %s' but email subject\nis 'CANCELLED: Visit for %s on %s'\n" }, { "from": "human", "value": "module SmokeTest\n module Steps\n class PrisonBookingCancelled < BaseStep...
ruby
chosen
[ { "from": "system", "value": "Remove formaggio tagging for production\n" }, { "from": "human", "value": "require 'formaggio/capistrano'\nset :app_title, 'getit'\nset :stages, ['staging', 'qa', 'production', 'reindex']\nset :rvm_ruby_string, \"ruby-2.5.5\"\nset :new_relic_environments, [\"none\"]...
ruby
chosen
[ { "from": "system", "value": "Fix the route after login.\n" }, { "from": "human", "value": "Rails.application.routes.draw do\n # Put this before Devise during the transition so the old tests still work.\n devise_for :users, controllers: { registrations: :registrations }\n # The following shou...
ruby
chosen
[ { "from": "system", "value": "Change roots for authed and non-authed users\n" }, { "from": "human", "value": "Issuet::Application.routes.draw do\n root 'home#index'\n\n devise_for :users\nend\n" }, { "from": "gpt", "value": "Issuet::Application.routes.draw do\n devise_for :users\n...
ruby
chosen
[ { "from": "system", "value": "Change from Time::mktime to Time::gm in test because .mktime uses the local timezone and the test fails if it runs on a machine configured with another timezone\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Acme::Client::Resources::Authorizati...
ruby
chosen
[ { "from": "system", "value": "Use actual type when defining param in sample api\n\nAs of grape v0.15.0 it seems the type is being checked and an actual\ntype is required. Using a string will cause a problem\n[here](https://github.com/ruby-grape/grape/blob/v0.15.0/lib/grape/validations/types.rb#L117-L123)\n"...
ruby
chosen
[ { "from": "system", "value": "Add '_' prefix to unused local variable\n\nThis can suppress following warnings\n\nspec/unix_listener_spec.rb:13: warning: assigned but unused variable - listener\n" }, { "from": "human", "value": "require File.expand_path('../spec_helper', __FILE__)\nrequire 'tempf...
ruby
chosen
[ { "from": "system", "value": "Add official\\? method and use try\n" }, { "from": "human", "value": "module PeopleHelper\n def administrator?\n current_person && current_person.administrator?\n end\n\n def promoter?\n current_person && current_person.promoter?\n end\nend\n" }, { ...
ruby
chosen
[ { "from": "system", "value": "Remove duplicate publish, and copy_audio calls\n" }, { "from": "human", "value": "require 'prx_access'\n\nclass StoryUpdateJob < ActiveJob::Base\n include Announce::Subscriber\n include PRXAccess\n\n queue_as :feeder_default\n\n subscribe_to :story, [:create, :u...
ruby
chosen
[ { "from": "system", "value": "Add first draft of peer 5.2\n" }, { "from": "human", "value": "# Pad an Array\n\n# I worked on this challenge [by myself, with: ]\n\n# I spent [] hours on this challenge.\n\n\n# Complete each step below according to the challenge directions and\n# include it in this...
ruby
chosen
[ { "from": "system", "value": "Check a different constant for Cucumber.\n" }, { "from": "human", "value": "require 'selenium/webdriver'\n\nclass Selenium::WebDriver::Firefox::Profile\n def enable_firebug(version = \"1.6.2\")\n add_extension(File.expand_path(\"../firebug-#{version}.xpi\", __FI...
ruby
chosen
[ { "from": "system", "value": "Set SVG width and height to 100%\n" }, { "from": "human", "value": "module EsriShapefile\n module Converter\n class Svg\n\n attr_reader :shapefile_path\n\n def initialize(shapefile_path)\n @shapefile_path = shapefile_path\n end\n\n def...
ruby
chosen
[ { "from": "system", "value": "Add dependencies and templates to code-gen package.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nGem::Specification.new do |spec|\n spec.name = 'aws-sdk-code-generator'\n spec.version = '0.2.0.pre'\n spec.summary = 'AWS...
ruby
chosen
[ { "from": "system", "value": "Allow POs to be marked as sent\n" }, { "from": "human", "value": "require 'ordoro/record/base'\n\nmodule Ordoro\n module Record\n class PurchaseOrder < Base\n\n attribute :status\n attribute :shipping_method\n attribute :items, Array[Ordoro::Recor...
ruby
chosen
[ { "from": "system", "value": "Add method for simplify response data\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule RubyRabbitmqJanus\n module Janus\n # Modules for manipulate responses sending by Janus\n module Responses\n # Response for events message\n ...
ruby
chosen
[ { "from": "system", "value": "Fix error in constant definition\n" }, { "from": "human", "value": "# Usage: \nrequire 'rubygems'\nrequire 'hpricot'\n\nmodule Javascript\n class Strip\n attr_reader :html\n \n HTML_EVENT_HANDLERS==%w{onload onunload onchange onsubmit onreset onselect onbl...
ruby
chosen
[ { "from": "human", "value": "Add acceptance test for validate_cmd parameter.\n" }, { "from": "gpt", "value": "require 'spec_helper_acceptance'\n\ndescribe 'concat validate_cmd parameter' do\n basedir = default.tmpdir('concat')\n context '=> \"/usr/bin/test -e %\"' do\n before(:all) do\n ...
ruby
chosen
[ { "from": "system", "value": "Extend the test recipe a bit\n" }, { "from": "human", "value": "tomcat_install 'helloworld' do\n version '8.0.32'\nend\n\ntomcat_service 'helloworld' do\n action :start\nend\n" }, { "from": "gpt", "value": "tomcat_install 'helloworld' do\n version '8....
ruby
chosen
[ { "from": "system", "value": "Handle bug for broken lookup\n\nIf a serialized_verb is not found, let's parse\nsome bogus JSON instead of blowing up with `nil`.\n" }, { "from": "human", "value": "module Linguistics\n module Latin\n module Verb\n class LatinVerb\n module QuerentMut...
ruby
chosen
[ { "from": "human", "value": "Add task to import legacy data into the application\n" }, { "from": "gpt", "value": "require 'open-uri'\n\nnamespace :db do\n desc 'Load the legacy data into the databse'\n task populate: :environment do\n [Medicine, Prescription, Diagnosis, Consultation, Anamne...
ruby
chosen
[ { "from": "system", "value": "Update inspect method and add alias methods for Country\n" }, { "from": "human", "value": "require 'singleton'\nrequire 'thailand/region'\n\nmodule Thailand\n class Country < Region\n include Singleton\n\n def name\n Thailand.i18n_backend.translate 'thai...
ruby
chosen
[ { "from": "human", "value": "Add a rake task to detect tags without propositions\n" }, { "from": "gpt", "value": "namespace :analysis do\n task :tags_without_propositions => :environment do\n\n Election.all.each do |election|\n puts \"=> #{election.name}\"\n election.election_tags....
ruby
chosen
[ { "from": "system", "value": "Fix field types and remove array defaults in fitness professional profiles migration\n" }, { "from": "human", "value": "class CreateFitnessProfessionalProfiles < ActiveRecord::Migration\n def change\n create_table :fitness_professional_profiles do |t|\n t.s...
ruby
chosen
[ { "from": "system", "value": "Add after filter for colour profiles afterwards\n\n\ngit-svn-id: 6d9b9a8f21f96071dc3ac7ff320f08f2a342ec80@68 daa9635f-4444-0410-9b3d-b8c75a019348\n" }, { "from": "human", "value": "require 'RMagick'\n\nmodule Airbrush\n module Processors\n module Image\n cl...
ruby
chosen
[ { "from": "system", "value": "Revert \"Set invalid username to ensure testing on circle ci\"\n\nThis reverts commit 4e085d93460c59448623b2b5025999e3993fc6a5.\n" }, { "from": "human", "value": "require 'application_system_test_case'\n\nclass UsersTest < ApplicationSystemTestCase\n test 'visiting...
ruby
chosen
[ { "from": "human", "value": "Use deterministic values for documentation module\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\n\nrequire 'spec_helper'\n\ndescribe Erlen::Schema::Documentation do\n describe '#to_markdown' do\n it 'looks like markdown' do\n allow(Kernel).t...
ruby
chosen
[ { "from": "system", "value": "Replace deprecated Config with RbConfig\n" }, { "from": "human", "value": "require \"jsminc/version\"\nrequire \"jsminc.#{Config::CONFIG['DLEXT']}\"\n" }, { "from": "gpt", "value": "require \"jsminc/version\"\nrequire \"jsminc.#{RbConfig::CONFIG['DLEXT']...
ruby
chosen
[ { "from": "system", "value": "Remove motion-yaml 1.4 lock. Allow >= 1.6.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/cdq/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"infinitered\", \"kemiller\"]\n gem.email ...
ruby
chosen
[ { "from": "system", "value": "Load spec_helper before cocoapods_plugin to fix code coverage.\nOtherwise slather gets required because coverage is started and the main libraries aren't covered." }, { "from": "human", "value": "require 'cocoapods'\nrequire File.join(File.dirname(__FILE__), '../../...
ruby
chosen
[ { "from": "system", "value": "Rename example variable to rspec_example\n" }, { "from": "human", "value": "require 'active_support/inflector'\nrequire 'rspec_api_docs/formatter/resource/example'\nrequire 'rspec_api_docs/formatter/resource/parameter'\nrequire 'rspec_api_docs/formatter/resource/res...
ruby
chosen
[ { "from": "system", "value": "Add Rails as a dependency for testing\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'paperclip_optimizer/version'\n\nGem::Specification.new do |spec|\n...
ruby
chosen
[ { "from": "system", "value": "Fix some types of crashes (such as infinite stack recursion) not being logged\n\nrelated to #62\n" }, { "from": "human", "value": "\nDEBUG = true\n\nrequire 'logger'\n\nbegin\n require 'Qt'\n require 'fileutils'\n require 'yaml'\n require 'pathname'\n\n require...
ruby
chosen
[ { "from": "system", "value": "Add to_s method for printing the name of the hashtag\n" }, { "from": "human", "value": "module Social\n class InstagramHashtag < ActiveRecord::Base\n attr_accessible :hashtag\n\n has_many :photos,\n :dependent => :d...
ruby
chosen
[ { "from": "system", "value": "Fix shipment fulfillment provider method to handle missing shipping method or calculator\n" }, { "from": "human", "value": "Spree::Shipment.class_eval do\n has_many :fulfillments\n\n def fulfillment_provider\n shipping_method.calculator.respond_to?(:fulfillment...
ruby
chosen
[ { "from": "system", "value": "Add explicit check of PathPatterns with cc-yaml\n\nThis is to ensure no regressions in this area. PathPatterns is coming to\nbecome our defacto glob handler and it must be solid.\n" }, { "from": "human", "value": "require \"spec_helper\"\n\nmodule CC::Analyzer\n de...
ruby
chosen
[ { "from": "system", "value": "Bump gem to include feedback widget\n" }, { "from": "human", "value": "# coding: utf-8\n\nGem::Specification.new do |spec|\n spec.name = \"dta_rapid\"\n spec.version = \"1.2.6\"\n spec.authors = [\"Gareth Rogers\", \"Andrew Carr\", \"Matt Cha...
ruby
chosen
[ { "from": "system", "value": "Add main gem module and DSL\n" }, { "from": "human", "value": "require \"announcr/version\"\n\nmodule Announcr\n # Your code goes here...\nend\n" }, { "from": "gpt", "value": "require \"announcr/version\"\n\nrequire \"announcr/prefix\"\nrequire \"announ...
ruby
chosen
[ { "from": "system", "value": "Refactor title manipulation out of instance_exec block\n" }, { "from": "human", "value": "require 'comma'\n\nmodule Beso\n class Job\n def initialize( name, options )\n @name = name\n @table = options.delete :table\n @props = { }\n end\n\n ...
ruby
chosen
[ { "from": "system", "value": "Apply patch by Lars from osm dev list with the typo\n\n" }, { "from": "human", "value": "class OldRelationController < ApplicationController\n require 'xml/libxml'\n\n session :off\n before_filter :check_api_readable\n after_filter :compress_output\n\n def hist...
ruby
chosen
[ { "from": "system", "value": "Fix parameter handling for API endpoint\n" }, { "from": "human", "value": "require 'api/generator'\n\nclass PublicationsController < ApplicationController\n respond_to :json\n before_filter :find_publication\n\n def show\n Rails.logger.info(\"pubctrl: enter #{...
ruby
chosen
[ { "from": "system", "value": "Revert \"Fix file controller bug\"\n\nThis reverts commit 32fb75345a2eaebfacccee25f12f6bfae4287d30.\n" }, { "from": "human", "value": "class WasabbiFileController < ApplicationController\n\n def send_file_data\n file_parts = params[:file_parts]\n if file_part...
ruby
chosen
[ { "from": "system", "value": "Remove whitespace and commented out code.\n" }, { "from": "human", "value": "require 'sinatra'\n\nclass ChefApp < Sinatra::Base\n\n get '/' do\n erb :index\n end\n \nend\n\n#ChefApp.run!\n\n" }, { "from": "gpt", "value": "require 'sinatra'\n\nclass...
ruby
chosen
[ { "from": "system", "value": "Save district before applying stack so that related resources are in-sync\n" }, { "from": "human", "value": "class DistrictsController < ApplicationController\n before_action :load_district, except: [:index, :create]\n before_action :authorize_district\n\n def in...
ruby
chosen
[ { "from": "system", "value": "Fix remove from watchlist bug.\n" }, { "from": "human", "value": "class WatchlistController < ApplicationController\n before_filter :authenticate_user!\n\n def add_to_watchlist\n @anime = Anime.find(params[:anime_id])\n @watch = Watchlist.find_or_create_by_a...
ruby
chosen