conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Change spec.license to MIT in gemspec\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'rbvppc/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Return Partial Updates to be purely opt in to prevent users from inadvertently corrupting data.\n" }, { "from": "human", "value": "# These settings change the behavior of Rails 2 apps and will be defaults\n# for Rails 3. You can remove this initializer when Rails 3 ...
ruby
chosen
[ { "from": "system", "value": "Check post author name during purging\n" }, { "from": "human", "value": "# Use Rails runner to execute this script:\n#\n# rails r scripts/purge_staging.rb\n\nposts_count = 0\n\nloop do\n puts \"loading posts\"\n\n result = RestClient::Request.execute(\n metho...
ruby
chosen
[ { "from": "system", "value": "Add sequel as a dependency\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/sequel/extensions/collation/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Jeremy Stephens\"]\n gem.email ...
ruby
chosen
[ { "from": "system", "value": "Add support for 64-bit Windows rubies.\n" }, { "from": "human", "value": "require 'rbconfig'\nrequire 'mkmf'\n\nif RbConfig::CONFIG['host_os'] =~ /darwin/ then\n $CFLAGS += \" -DUSE_INSTANT_OSX=1 -Wall\"\n $LDFLAGS += \" -framework CoreServices\"\nelsif RbConfig::...
ruby
chosen
[ { "from": "system", "value": "Remove obsolete override for GLib::Bytes.new\n" }, { "from": "human", "value": "GLib.load_class :Bytes\n\nmodule GLib\n # Overrides for GBytes, GLib's immutable array of bytes.\n class Bytes\n include Enumerable\n\n remove_method :get_data if method_defined?...
ruby
chosen
[ { "from": "system", "value": "Use Rack::URLMap to run either FirstApp or SecondApp\n" }, { "from": "human", "value": "run lambda{|env| [200, {'Content-Type' => 'text/plain'}, [\"heroku-modular\"]]}\n" }, { "from": "gpt", "value": "require 'first_app/app'\nrequire 'second_app/app'\n\n...
ruby
chosen
[ { "from": "system", "value": "Set Nesta root for local dev/testing.\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'bundler/setup'\n\nBundler.require(:default)\n\n$LOAD_PATH.unshift(::File.expand_path('lib', ::File.dirname(__FILE__)))\nrequire 'nesta/env'\nrequire 'nesta/app'\n\n...
ruby
chosen
[ { "from": "system", "value": "Change window size back to landscape\n" }, { "from": "human", "value": "module Poke\n\n module Dimensions\n GRID = 32\n HEIGHT = 15 * GRID\n WIDTH = 10 * GRID\n end\n\n module Color\n BLACK = Gosu::Color::BLACK\n WHITE = Gosu::Color:...
ruby
chosen
[ { "from": "system", "value": "Remove explicit PG gem version requirement\n" }, { "from": "human", "value": "# encoding: UTF-8\n\nGem::Specification.new do |s|\n\n s.name = 'ruote-postgres'\n\n s.version = File.read(\n File.expand_path('../lib/ruote/postgres/version.rb', __FILE__)\n ).match...
ruby
chosen
[ { "from": "system", "value": "Allow choosing of primary key for JSON API resource identifiers\n" }, { "from": "human", "value": "module Caprese\n module Adapter\n class JsonApi\n class ResourceIdentifier\n def self.type_for(class_name, serializer_type = nil, transform_options = {...
ruby
chosen
[ { "from": "system", "value": "Fix git proxy config with falsy values\n" }, { "from": "human", "value": "require_relative 'base'\n\nmodule VagrantPlugins\n module ProxyConf\n class Action\n # Action for configuring Git on the guest\n class ConfigureGitProxy < Base\n def confi...
ruby
chosen
[ { "from": "system", "value": "Remove redundant cucumber step definition\n" }, { "from": "human", "value": "Then /^Yacht should raise an error with message: \"([^\"]*)\"$/ do |message|\n @last_yacht.class.should be(YachtLoader::LoadError)\n @last_yacht.message.should == message\nend\n\nWhen /^I...
ruby
chosen
[ { "from": "system", "value": "Remove non-working and unnecessary file deletion\n\n[#134444111](https://www.pivotaltracker.com/story/show/134444111)\n\nSigned-off-by: Felix Riegger <9c2aa7530239a330bbac6ac4f56e0946781dfd29@sap.com>\n" }, { "from": "human", "value": "require_relative './spec_helpe...
ruby
chosen
[ { "from": "system", "value": "FIX BUILD : look for mailboxprefs.xml exactly, not a pattern match (was picking up subversion metadata files)\n\ngit-svn-id: f26ccc5efe72c2bd8e1c40f599fe313f2692e4de@9012 a612230a-c5fa-0310-af8b-88eea846685b\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\n\n...
ruby
chosen
[ { "from": "human", "value": "Add chefspec for the package / service\n" }, { "from": "gpt", "value": "require 'serverspec'\n\nset :backend, :exec\n\ndescribe service('sssd') do\n it { should be_enabled }\n it { should be_running }\nend\n\ndescribe package('sssd') do\n it { should be_installed ...
ruby
chosen
[ { "from": "human", "value": "Add data migration to resolve further 0% measure\n\nIt was reported that the Erga Omnes value for further cigarette\ncommodities was showing as 0%. Upon investigation we discovered an\nincorrect measures had been supplied in the CHIEF file on 28/11/2018,\nto resolve this we've i...
ruby
chosen
[ { "from": "system", "value": "Allow Rack version 1.4 or higher, to support Rails 5 upgrade\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'mobu/version'\n\nGem::Specification.new do ...
ruby
chosen
[ { "from": "system", "value": "Return GC stats after a GC.start.\n" }, { "from": "human", "value": "module Api\n module Presenters\n module StatusPresenter\n include Roar::JSON::HAL\n include Roar::Hypermedia\n include Grape::Roar::Representer\n\n link :self do |opts|\n ...
ruby
chosen
[ { "from": "system", "value": "Allow any version of Rails 3.x.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"voting_booth/version\"\n\nGem::Specification.new do |s|\n s.name = \"voting_booth\"\n s.version = VotingBooth::V...
ruby
chosen
[ { "from": "system", "value": "Add functional tests for ApplicationsController\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe ApplicationsController do\n\nend\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe ApplicationsController do\n render_v...
ruby
chosen
[ { "from": "system", "value": "Test that currency symbol position can be changed\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'spec_helper'\n\ndescribe \"General Settings\" do\n include AuthenticationHelper\n\n before do\n login_as_admin_and_visit spree.admin_d...
ruby
chosen
[ { "from": "system", "value": "Remove `MachO` check for `Executable`.\n" }, { "from": "human", "value": "require_relative \"uncompressed\"\n\nrequire \"vendor/macho/macho\"\n\nmodule UnpackStrategy\n class Executable < Uncompressed\n def self.can_extract?(path:, magic_number:)\n return t...
ruby
chosen
[ { "from": "system", "value": "Remove handler for unused options and unused file loading in directory\n" }, { "from": "human", "value": "require \"fog/core/collection\"\nrequire \"fog/google/models/storage_json/directory\"\n\nmodule Fog\n module Storage\n class GoogleJSON\n class Directo...
ruby
chosen
[ { "from": "system", "value": "Add abstract to sequence factory.\n" }, { "from": "human", "value": "# Read about factories at https://github.com/thoughtbot/factory_girl\n\nFactoryGirl.define do\n factory :sequence do\n title \"MyString\"\n description \"MyText\"\n end\nend\n" }, { ...
ruby
chosen
[ { "from": "system", "value": "Add spec draft for singular resources.\n" }, { "from": "human", "value": "\nAcfs.configure do\n locate :user_service, 'http://users.example.org'\n locate :comments, 'http://comments.example.org'\nend\n\nclass UserService < Acfs::Service\n use Acfs::Middleware::Me...
ruby
chosen
[ { "from": "system", "value": "Return delete result instead Arel object\n" }, { "from": "human", "value": "module Arel\n class Session\n class << self\n attr_accessor :instance\n alias_method :manufacture, :new\n\n def start\n if @started\n yield\n else\n...
ruby
chosen
[ { "from": "system", "value": "Convert inline if to block\n\nThis was the simplecov coverage is no longer 100%,\nbecause we don't test the railtie (see issue #14).\n" }, { "from": "human", "value": "require 'geo_redirect/middleware'\nrequire 'geo_redirect/version'\n\nmodule GeoRedirect\n\n # Loa...
ruby
chosen
[ { "from": "system", "value": "Change update_constantly back to every 5 minutes\n" }, { "from": "human", "value": "# Use this file to easily define all of your cron jobs.\n#\n# It's helpful, but not entirely necessary to understand cron before proceeding.\n# http://en.wikipedia.org/wiki/Cron\n\n#...
ruby
chosen
[ { "from": "system", "value": "Create post system using Slack Web API\n" }, { "from": "human", "value": "module Slatan\n class Mouth\n def initialize(heart)\n @heart = heart\n end\n\n # send message just as it is.\n def say(msg)\n end\n end\nend\n" }, { "from": "gpt"...
ruby
chosen
[ { "from": "system", "value": "Add bang methods and handle errors\n" }, { "from": "human", "value": "module Sorty\n class Params\n attr_reader :column, :direction, :declared\n\n DEFAULT_SORT_KEY = :updated_at\n DEFAULT_SORT_DIR = :desc\n\n # TODO: Maybe set some default sort columns\...
ruby
chosen
[ { "from": "system", "value": "Use unique temp file for log data (to allow multiple sessions)\n" }, { "from": "human", "value": "module Vimentor\n\n LOGFILE = \"/tmp/vimentor_keylog\"\n SAVEROOT = Dir.home + \"/vimentor\";\n\n class CLI < Thor\n desc \"vim ARGS\", \"launch Vim session\"\n ...
ruby
chosen
[ { "from": "system", "value": "Add test showing incorrect behaviour\n" }, { "from": "human", "value": "require 'unit_spec_helper'\n\ndescribe Rpush::Client::ActiveRecord::Notification do\n let(:notification) { Rpush::Client::ActiveRecord::Notification.new }\n\n it 'allows assignment of many reg...
ruby
chosen
[ { "from": "system", "value": "Use Thread.pass to spin while WEBrick is starting up\n" }, { "from": "human", "value": "require 'webrick'\n\nTEST_SERVER_PORT = 65432\n\nclass MockService < WEBrick::HTTPServlet::AbstractServlet\n class << self; attr_accessor :post_handler; end\n \n def do_GET(re...
ruby
chosen
[ { "from": "system", "value": "Update tests to use Puma\n" }, { "from": "human", "value": "# encoding: utf-8\nrequire 'sinatra/base'\nrequire 'nokogiri'\n\nclass TestServer < Sinatra::Base\n\tdisable :logging\n\tset :server, 'thin'\n\tset :public_folder, Proc.new { File.join(root, \"static\") }\n...
ruby
chosen
[ { "from": "system", "value": "Fix RSpec and Rake conflict\n\nAt 2.3.3 version specs are already failing.\n\n```\n$ bundle exec rake\nrake aborted!\nNoMethodError: undefined method `last_comment' for #<Rake::Application:0x007fcc8bbf3858>\n/Users/abinoam/.rvm/gems/ruby-2.3.3/gems/rspec-core-2.99.2/lib/rspec/c...
ruby
chosen
[ { "from": "system", "value": "Implement the article destroy action.\n" }, { "from": "human", "value": "class Backend::ArticlesController < Backend::BaseController\n include Concerns::Backend::TranslatableController\n include Concerns::PaginationController\n\n before_action :find_model, only: ...
ruby
chosen
[ { "from": "system", "value": "Work with null description now" }, { "from": "human", "value": "xml.instruct! :xml, :version=>\"1.0\", :encoding=>\"UTF-8\"\n\nxml.rss \"version\" => \"2.0\", \"xmlns:g\" => \"http://base.google.com/ns/1.0\" do\n xml.channel do\n xml.title Spree::GoogleMerchant:...
ruby
chosen
[ { "from": "system", "value": "Bring site back online in readonly mode on ramoth\n" }, { "from": "human", "value": "name \"web\"\ndescription \"Role applied to all web/api servers\"\n\ndefault_attributes(\n :accounts => {\n :users => {\n :rails => {\n :status => :role,\n :m...
ruby
chosen
[ { "from": "system", "value": "Include dependency in the gemspec" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 'mock_server'\n s.version = '0.1.0'\n s.summary = \"Mock you're entire application\"\n s.author = 'Charles Barbier'\n s.email =...
ruby
chosen
[ { "from": "system", "value": "Revert \"Enable request queuing tracking in Datadog\"\n\nThis reverts commit 91e527614002377e4dfcf360522a6244fa530a37.\n" }, { "from": "human", "value": "if ENV['DATADOG_RAILS_APM']\n Datadog.configure do |c|\n c.use :rails, service_name: 'rails'\n c.use :del...
ruby
chosen
[ { "from": "human", "value": "Add spec for generate_upload_url override.\n" }, { "from": "gpt", "value": "require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')\n\ndescribe AdminRequestController do\n\n describe 'POST generate_upload_url' do\n\n it 'creates a user for the author...
ruby
chosen
[ { "from": "system", "value": "Add rake to the bundle for travis\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'wallpapering/version'\n\nGem::Specification.new do |gem|\n ...
ruby
chosen
[ { "from": "system", "value": "Add the test for About page\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass StaticPagesControllerTest < ActionDispatch::IntegrationTest\n test \"should get home\" do\n get static_pages_home_url\n assert_response :success\n end\n\n test \"s...
ruby
chosen
[ { "from": "system", "value": "[core] Include Spree::Core::Engine.routes.url_helpers rather than use custom RoutesProxy\n" }, { "from": "human", "value": "module NavigationHelpers\n class RoutesProxy\n include Rails.application.routes.url_helpers\n end\n\n def spree_core\n ActionDispatch...
ruby
chosen
[ { "from": "system", "value": "Fix bad admin country spec.\n\nWasn't actually testing anything before.\n" }, { "from": "human", "value": "require 'spec_helper'\n\nmodule Spree\n describe \"Countries\", :type => :feature do\n stub_authorization!\n\n it \"deletes a state\", js: true do\n ...
ruby
chosen
[ { "from": "system", "value": "Check if the user still has changed records (save failed) instead of whether it has errors per @markijbema\n" }, { "from": "human", "value": "class Users::SetupController < ApplicationController\n\n before_filter :setup_step_in_process\n\n layout \"one_column_simp...
ruby
chosen
[ { "from": "system", "value": "Revert \"Added debugging calls to the events controller\"\n\nThis reverts commit 2bb44728bb179f4f95242b01464402e10a2f2d98.\n" }, { "from": "human", "value": "class EventsController < ApplicationController\n before_action :access_required\n before_action :limit_cou...
ruby
chosen
[ { "from": "system", "value": "Set different order of columns created for batch_jobs to hopefully ease ability of importing data from legacy database\n" }, { "from": "human", "value": "class CreateBatchJobs < ActiveRecord::Migration\n def change\n create_table :batch_jobs do |t|\n t.stri...
ruby
chosen
[ { "from": "system", "value": "Fix bug 'Unsupported ruby class used as database type: Bignum'\n" }, { "from": "human", "value": "Sequel.migration do\n\n up do\n add_column :orders, :amount_paid, Bignum\n end\n\n down do\n drop_column :orders, :amount_paid\n end\n\nend\n" }, { "f...
ruby
chosen
[ { "from": "system", "value": "Fix CloudVolume constantization issues by using try/safe_constantize\n" }, { "from": "human", "value": "class ApplicationHelper::Button::CloudVolumeNew < ApplicationHelper::Button::ButtonNewDiscover\n def calculate_properties\n super\n if disabled?\n sel...
ruby
chosen
[ { "from": "human", "value": "Add RSpec matchers for flash messages\n" }, { "from": "gpt", "value": "RSpec::Matchers.define :have_flash_message do |message|\n match do |node|\n @message, @node = message, node\n\n # Ignore leading and trailing whitespace. Later versions of Capybara have :ex...
ruby
chosen
[ { "from": "human", "value": "Revert \"Removing migration that failed on live\"\n\nThis reverts commit cca0269c7bb5ebbc0122b1e0a3777d46927686f3.\n" }, { "from": "gpt", "value": "class AddUniqueIndexToUserEmail < ActiveRecord::Migration[5.2]\n def change\n # remove duplicate emails\n query ...
ruby
chosen
[ { "from": "human", "value": "Update gps file with pseudocode\n" }, { "from": "gpt", "value": "# Method to create a list\n# create an empty hash\n# input: string of items separated by spaces (example: \"carrots apples cereal pizza\")\n# steps: \n # separate the string into individual items\n # ...
ruby
chosen
[ { "from": "system", "value": "Clean the checked out directory before re-applying stashed changes.\n" }, { "from": "human", "value": "module Heroku::Deploy::Task\n class StashGitChanges < Base\n include Heroku::Deploy::Shell\n\n def before_deploy\n output = git \"status --untracked-fi...
ruby
chosen
[ { "from": "system", "value": "Fix rubocop warnings in HostAggregateHelper::TextualSummary\n" }, { "from": "human", "value": "module HostAggregateHelper::TextualSummary\n include TextualMixins::TextualEmsCloud\n include TextualMixins::TextualGroupTags\n #\n # Groups\n #\n\n def textual_grou...
ruby
chosen
[ { "from": "system", "value": "Fix migration when Publicaiton is not defined.\n" }, { "from": "human", "value": "class UpdateAllStreamItems < ActiveRecord::Migration\n def self.up\n Site.each do\n Note.all.each { |o| o.create_as_stream_item }\n Picture.all.each { |o| o.cr...
ruby
chosen
[ { "from": "system", "value": "Fix down method to match up.\n" }, { "from": "human", "value": "class AddGenerationToStops < ActiveRecord::Migration\n def self.up\n add_column :stops, :generation_high, :integer\n add_column :stops, :generation_low, :integer\n end\n\n def self.down\n re...
ruby
chosen
[ { "from": "system", "value": "Rephrase the test description and expectations\n" }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.describe HeartbeatController, type: :controller do\n\n describe 'ping and heartbeat do not force ssl' do\n before do\n allow(Rails).to receive(...
ruby
chosen
[ { "from": "system", "value": "Write specs for specs command\n" }, { "from": "human", "value": "require 'delta_test/cli/specs_command'\n\ndescribe DeltaTest::CLI::SpecsCommand do\n\nend\n" }, { "from": "gpt", "value": "require 'delta_test/cli/specs_command'\nrequire 'delta_test/relate...
ruby
chosen
[ { "from": "system", "value": "Add an index to the demo app users.name\n" }, { "from": "human", "value": "# frozen_string_literal: true\nclass CreateUsers < ActiveRecord::Migration\n def change\n create_table :users do |t|\n t.string :name\n t.string :email\n\n t.timestamps nul...
ruby
chosen
[ { "from": "system", "value": "Remove dup tests (already in create), fill out issue scenario\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'spec_helper'\n\ndescribe 'editing incidents as a driver' do\n it 'allows editing reports' do\n end\n context 'admin deletes ...
ruby
chosen
[ { "from": "system", "value": "Use the text/ helper constants.\n" }, { "from": "human", "value": "require 'spec_helper'\nrequire 'helpers/wordlist'\n\nshared_examples_for \"a wordlist Builder\" do\n before(:all) do\n @words = ['dog', 'cat', 'catx', 'dat', 'dog', 'cat']\n @sentence = 'dog c...
ruby
chosen
[ { "from": "system", "value": "Add status to list specs.\n" }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.describe List, type: :model do\n before(:each) do\n @user = User.create(email: 'user@example.com', password: 'password', username: 'user123')\n @list = @user.lists.cr...
ruby
chosen
[ { "from": "system", "value": "Add some pseudo-live artifact output\n" }, { "from": "human", "value": "class BuildPartJob < JobBase\n attr_reader :build_part_result, :build_part, :build\n\n def initialize(build_part_result_id)\n @build_part_result = BuildPartResult.find(build_part_result_id)...
ruby
chosen
[ { "from": "system", "value": "Use Nori's built-in key transformations.\n" }, { "from": "human", "value": "#encoding: UTF-8\n\nrequire 'rubygems'\nrequire 'bundler'\nBundler.require(:default)\n\nclass Data < Thor\n include Mongo\n DIRECTORY = \"NYPD\"\n\n desc \"load_from_xml PATH\", \"Load XM...
ruby
chosen
[ { "from": "system", "value": "Copy resource files in buildjavaproject.rb\n" }, { "from": "human", "value": "#!/usr/bin/ruby\n\nputs \"Building project... don't forget to export CLASSPATH!\"\nputs \"\"\nsystem 'mkdir -p ./bin'\nsystem 'javac -cp `echo $CLASSPATH`:./bin -d bin `find . -name \"*.ja...
ruby
chosen
[ { "from": "system", "value": "Add dependent: :destroy to message task stuff.\n" }, { "from": "human", "value": "class MessageTask < Task\n title 'Message'\n role 'user'\n\n PERMITTED_ATTRIBUTES = [:body, {participant_ids: []}]\n\n has_many :comments, inverse_of: :message_task, foreign_key: '...
ruby
chosen
[ { "from": "system", "value": "Fix the Neighborhood API Service Call\n" }, { "from": "human", "value": "class Neighborhood < ActiveRecord::Base\n scope :search_by_name, -> (name) { where(\"name LIKE ?\", name) }\n\n has_many :registered_vacant_lots\n\n # reverse_geocoded_by :latitude, :longitu...
ruby
chosen
[ { "from": "system", "value": "Add user_id report at route to keep track of during build.\n" }, { "from": "human", "value": "get '/' do\n p \"user_id #{session[:user_id]}\"\n if !session[:user_id]\n erb :index\n else\n @user = User.find(session[:user_id])\n @page = @user.farthest_page...
ruby
chosen
[ { "from": "system", "value": "Replace 'BASIC' role with Convenor, Tutor, and Student system roles.\n" }, { "from": "human", "value": "class SystemRole\n BASIC = 'basic'\n ADMIN = 'admin'\n\n ROLES = [BASIC, ADMIN]\nend" }, { "from": "gpt", "value": "class SystemRole\n ADMIN = 'ad...
ruby
chosen
[ { "from": "system", "value": "Fix the capitalization of Yeppp./configure --with-pgconfig=/usr/local/pgsql/bin/pg_config && make && sudo make install\n" }, { "from": "human", "value": "require 'mkmf'\n\nhome_dir = `echo $HOME`.strip\ndirs = [\n File.join(home_dir, 'yeppp-1.0.0/library/headers'),...
ruby
chosen
[ { "from": "system", "value": "Add version to sqlite3 dependency\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"emcee/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |s|\n s....
ruby
chosen
[ { "from": "system", "value": "Remove allowed_push_host definition in gemspec\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'rubygems/xcodeproj_generator/version'\n\nGem::Specificati...
ruby
chosen
[ { "from": "system", "value": "Update httparty version to work around with Psyc\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/jenkins-capistrano/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"cynipe\"]\n gem.email...
ruby
chosen
[ { "from": "system", "value": "Update Nomis client for changed API\n" }, { "from": "human", "value": "module Nomis\n DisabledError = Class.new(StandardError)\n\n class Api\n class << self\n def enabled?\n Rails.configuration.nomis_api_host != nil\n end\n\n def instance\...
ruby
chosen
[ { "from": "system", "value": "Add `affix` to the list of Javascripts" }, { "from": "human", "value": "description \"Bootstrap for Sass\"\n\n# Stylesheet importing bootstrap\nstylesheet 'styles.scss'\n\n#\n# Other Bootstrap assets\nbasedir = '../../vendor/assets'\n\n# Glyphicons sprites\n%w(glyph...
ruby
chosen
[ { "from": "system", "value": "Fix typo in add_index line\n" }, { "from": "human", "value": "class CreateDuplicateTweets < ActiveRecord::Migration\n def self.up\n create_table :duplicate_tweets do |t|\n t.integer :orig_tweet_id # ID for the tweet in the tweets table\n t.string :twe...
ruby
chosen
[ { "from": "system", "value": "Enable to work copy button\n" }, { "from": "human", "value": "#\n# Copyright (c) 2013-2015 SKYARCH NETWORKS INC.\n#\n# This software is released under the MIT License.\n#\n# http://opensource.org/licenses/mit-license.php\n#\n\nmodule VueHelper\n def link_and_dropdo...
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-duplicate_class_parameters-check'\n spec.version = '1.0.1'\n spec.homepage = 'https://github....
ruby
chosen
[ { "from": "system", "value": "Change resolution for publisher's logo to 240x240\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'json'\n\nclass SiteBanner < ApplicationRecord\n include Rails.application.routes.url_helpers\n has_one_attached :logo\n has_one_attached :background_...
ruby
chosen
[ { "from": "system", "value": "Remove legacy method from Association::Reflection\n" }, { "from": "human", "value": "# frozen_string_literal: true\nmodule Pragma\n module Decorator\n module Association\n # Holds the information about an association.\n #\n # @author Alessandro De...
ruby
chosen
[ { "from": "human", "value": "Add QueryResultCollection class as this will have to be separate from the BatchResultCollection one since query results can be paginated (or rather in sets).\n" }, { "from": "gpt", "value": "module SalesforceBulk\n class QueryResultCollection < Array\n \n attr...
ruby
chosen
[ { "from": "system", "value": "Add /bin/docker to path list for installation verification\n" }, { "from": "human", "value": "module VagrantPlugins\n module DockerProvisioner\n module Cap\n module Linux\n module DockerInstalled\n def self.docker_installed(machine)\n ...
ruby
chosen
[ { "from": "system", "value": "Change conditional use of before_filter to suit Rails 3.2\n" }, { "from": "human", "value": "class ApplicationController < ActionController::Base\n \n before_filter :apipie_validations if Apipie.configuration.validate == :explicitly\n \n resource_description do\...
ruby
chosen
[ { "from": "system", "value": "Tests: Fix length calculator tests on < 1.9.3\n" }, { "from": "human", "value": "require 'rspectacular'\nrequire 'ruby-progressbar/calculators/running_average'\n\nclass ProgressBar\nmodule Calculators\nRSpec.describe Length do\n it 'can properly...
ruby
chosen
[ { "from": "system", "value": "Remove cookbooks other than duckpan\n" }, { "from": "human", "value": "#\n# Cookbook Name:: duckpan\n# Recipe:: default\n#\n\ninclude_recipe 'perl'\ninclude_recipe 'git'\n\nbash 'download and install duckpan' do\n code ::File.open('/vagrant/duckpan.sh').read\nend\...
ruby
chosen
[ { "from": "system", "value": "Move checking for the route to a before_filter\n" }, { "from": "human", "value": "#encoding: utf-8\nclass CalendarsController < ApplicationController\n\n def show\n raise ActionController::RoutingError.new('Not Found') if current_region.nil?\n\n @start_select...
ruby
chosen
[ { "from": "system", "value": "Update create action for employee\n" }, { "from": "human", "value": "class EmployeesController < ApplicationController\n def index\n @employees = Employee.all\n end\n\n def new\n end\n\n def create\n @employee = Employee.new(employee_params)\n @employe...
ruby
chosen
[ { "from": "system", "value": "Add warning when AUTOFEATURE is disabled.\n" }, { "from": "human", "value": "Autotest.add_discovery do\n \"cucumber\" if ENV['AUTOFEATURE'] == 'true' && File.directory?('features')\nend\n" }, { "from": "gpt", "value": "Autotest.add_discovery do\n if Fi...
ruby
chosen
[ { "from": "system", "value": "Change default tmp file path so it is preserved through deployments\n" }, { "from": "human", "value": "\nrequire 'paperclip'\n#require 'ruby-debug'\n\nmodule AvatarsForRails\n \n #autoload :AvatarsControllerConfig, 'avatars_for_rails/avatars_controller_config'\n ...
ruby
chosen
[ { "from": "system", "value": "Use CPU time in performance test.\n" }, { "from": "human", "value": "require 'spec_helper'\nrequire 'benchmark'\n\ndescribe Text::Table, 'performance' do\n it 'is linear relative to row count' do\n base = time_to_render_num_of_rows 30\n time = time_to_render_...
ruby
chosen
[ { "from": "system", "value": "Remove a deprecation warning on Rails 5.2\n" }, { "from": "human", "value": "require File.expand_path('../boot', __FILE__)\n\nrequire \"active_model/railtie\"\nrequire \"active_record/railtie\"\nrequire \"action_controller/railtie\"\nrequire \"action_view/railtie\"\...
ruby
chosen
[ { "from": "human", "value": "Add workaround to save failed LogEntries\n" }, { "from": "gpt", "value": "# workaround for issue https://github.com/spree/spree/issues/1767\n# based on http://stackoverflow.com/questions/10427365/need-to-write-to-db-from-validation\nSpree::LogEntry.class_eval do\n a...
ruby
chosen
[ { "from": "system", "value": "Add meta to cart resource\n" }, { "from": "human", "value": "module Shopping\n class CartResource < JSONAPI::Resource\n model_name 'Shopping::Cart'\n \n attributes :user_id, :purchased_at, :created_at, :updated_at, :origin\n has_many :line_items\n ha...
ruby
chosen
[ { "from": "human", "value": "Add solution for nested data\n" }, { "from": "gpt", "value": "# RELEASE 2: NESTED STRUCTURE GOLF\n# Hole 1\n# Target element: \"FORE\"\n\narray = [[1,2], [\"inner\", [\"eagle\", \"par\", [\"FORE\", \"hook\"]]]]\n\n# attempts:\n# ======================================...
ruby
chosen
[ { "from": "system", "value": "Fix due to comments, add suffix, use if non-null\n" }, { "from": "human", "value": "require 'migratio/worker/openstack_amazon_migrator'\nrequire 'migratio/worker/openstack_openstack_migrator'\n\nmodule Atmosphere\n class VmtMigrator\n def initialize(virtual_mach...
ruby
chosen
[ { "from": "system", "value": "Remove local storage and inherit Carrierwave config" }, { "from": "human", "value": "class Pulitzer::BaseUploader < CarrierWave::Uploader::Base\n include CarrierWave::MiniMagick\n storage :file\n\n def store_dir\n \"uploads/#{model.class.to_s.underscore}/#{mou...
ruby
chosen
[ { "from": "system", "value": "Update bunny requirement to >= 2.9, < 2.11\n\nUpdates the requirements on [bunny](https://github.com/ruby-amqp/bunny) to permit the latest version.\n- [Release notes](https://github.com/ruby-amqp/bunny/releases)\n- [Changelog](https://github.com/ruby-amqp/bunny/blob/master/Chan...
ruby
chosen
[ { "from": "system", "value": "Add debug logger for Sqlite3\n" }, { "from": "human", "value": "$KCODE = 'UTF8'\n\nrequire 'dm-core'\ndependency \"merb-assets\"\n\nuse_orm :datamapper\nuse_test :rspec\nuse_template_engine :haml\n\nMerb::Config.use do |c| \n c[:session_id_key] = 'saywhat'\n c[:s...
ruby
chosen