conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Make Carrierwave's S3 region configurable\n" }, { "from": "human", "value": "CarrierWave.configure do |config|\n config.fog_credentials = {\n :provider => 'AWS',\n :aws_access_key_id => ENV['AWS_ACCESS_KEY_ID'] || \"none\",\n :aws_...
ruby
chosen
[ { "from": "system", "value": "Remove asset directory for development\n" }, { "from": "human", "value": "CarrierWave.configure do |config|\n config.asset_host = \"http://assets.devcon.ph\"\nend\n" }, { "from": "gpt", "value": "CarrierWave.configure do |config|\n if Rails.env.product...
ruby
chosen
[ { "from": "system", "value": "Add rocket and vanilla app\n" }, { "from": "human", "value": "cask '1password'\ncask 'alfred'\ncask 'appcleaner'\ncask 'bartender'\ncask 'docker'\ncask 'gitify'\ncask 'gitter'\ncask 'google-chrome'\ncask 'gyazo'\ncask 'postman'\ncask 'quitter'\ncask 'skype'\ncask 's...
ruby
chosen
[ { "from": "system", "value": "Test doesn't couple to the no_stream symbol\n" }, { "from": "human", "value": "require_relative './database_integration_init'\n\ndescribe \"The :no_stream Expected Version Number\" do\n context \"Events have not yet been written to the stream\" do\n stream_name ...
ruby
chosen
[ { "from": "human", "value": "Change intouch_telegram_chat_subscriptions.chat_id type to bigint\n" }, { "from": "gpt", "value": "class ChangeIntouchTelegramChatSubscriptionsChatIdType < Rails.version < '5.0' ? ActiveRecord::Migration : ActiveRecord::Migration[[Rails::VERSION::MAJOR, Rails::VERSIO...
ruby
chosen
[ { "from": "human", "value": "Add index to gateway_payments transaction_id\n" }, { "from": "gpt", "value": "class AddsIndexToGatewayPaymentsTransactionid < ActiveRecord::Migration\n def up\n execute <<-SQL\n CREATE INDEX idx_transactionid_gp\n ON public.gateway_payments\n USING btre...
ruby
chosen
[ { "from": "system", "value": "Create a published category in the specs\n\nOkay, nothing to see here, we don't do failing specs ever. No, move along.\n" }, { "from": "human", "value": "require 'spec_helper'\n\nmodule KnowledgeBase\n describe CategoriesController do\n routes { KnowledgeBase::E...
ruby
chosen
[ { "from": "system", "value": "Make it more explicit that we expect to see the policy\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass TopicsControllerTest < ActionController::TestCase\n test \"should only see published policies\" do\n published_edition = build(:published_edi...
ruby
chosen
[ { "from": "human", "value": "Add dark sky and solar for highlands\n" }, { "from": "gpt", "value": "namespace :after_party do\n desc 'Deployment task: add_dark_sky_solar_for_highlands'\n task add_dark_sky_solar_for_highlands: :environment do\n puts \"Running deploy task 'add_dark_sky_solar_f...
ruby
chosen
[ { "from": "human", "value": "Add event note revision educator ID foreign key\n" }, { "from": "gpt", "value": "class AddEventNoteRevisionKey < ActiveRecord::Migration[5.1]\n def change\n add_foreign_key \"event_note_revisions\", \"educators\", name: \"event_note_revisions_educator_id_fk\"\n ...
ruby
chosen
[ { "from": "system", "value": "Use prepend inspead of alias_method_chain\n\nfor DEPRECATION WARNING on activesupport 5+\n\nDEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead.\nFrom module, you can access the original method using super. (called from <module:SchemaStatem...
ruby
chosen
[ { "from": "system", "value": "Allow root to be identified by .env.test as well\n" }, { "from": "human", "value": "module Pliny::Commands\n module Common\n def chroot!\n loop do\n if File.exists?(File.expand_path(\".env\", Dir.pwd))\n break\n else\n Dir.ch...
ruby
chosen
[ { "from": "system", "value": "Initialize response instead of creating\n" }, { "from": "human", "value": "class UsersQuestionnairesController < ApplicationController\n def edit\n @questionnaire = Questionnaire.find(questionnaire_params)\n end\n\n def update\n response_params['questions']...
ruby
chosen
[ { "from": "human", "value": "Add a maintenance task for migrate legacy commit statuses\n" }, { "from": "gpt", "value": "class LegacyCommitStatusesMaintenanceJob < BackgroundJob\n\n def perform(_ = nil)\n Commit.preload(:statuses).find_each do |commit|\n if commit.statuses.empty? && comm...
ruby
chosen
[ { "from": "system", "value": "Convert encoding of invalid string to utf-8 in service description\n" }, { "from": "human", "value": "require 'umakadata/data_format'\n\nmodule Umakadata\n\n class ServiceDescription\n\n include Umakadata::DataFormat\n ##\n # return the type of service des...
ruby
chosen
[ { "from": "system", "value": "Update TimeMachineScheduler to beta 3\n" }, { "from": "human", "value": "class TimemachineschedulerBeta < Cask\n url 'http://www.klieme.com/Downloads/TimeMachineScheduler/TimeMachineScheduler_4.0b2Full.zip'\n homepage 'http://www.klieme.com/TimeMachineScheduler.ht...
ruby
chosen
[ { "from": "human", "value": "Remove optimistic lock from inventory units.\n\nFixes #3238\nFixes #3367\n" }, { "from": "gpt", "value": "class RemoveLockVersionFromInventoryUnits < ActiveRecord::Migration\n def change\n # we are moving to pessimistic locking on stock_items\n remove_column :...
ruby
chosen
[ { "from": "system", "value": "Add ODI hot drinks example\n" }, { "from": "human", "value": "class RepositoriesController < ApplicationController\n \n def index\n @repositories = %w{\n git://github.com/datasets/population.git\n git://github.com/datasets/house-prices-uk.git\n g...
ruby
chosen
[ { "from": "system", "value": "Fix for applications that have already run prefix migration that was renamed.\n" }, { "from": "human", "value": "class PrefixVolumePricingTableNames < ActiveRecord::Migration\n def change\n rename_table :volume_prices, :spree_volume_prices\n end\nend\n\n" }, ...
ruby
chosen
[ { "from": "system", "value": "Revert \"Fix when input is a symbol\"\n\nThis reverts commit 56ec5e0f0b080a3d1d08fdc51b5a3ddb540fa086.\n" }, { "from": "human", "value": "# frozen_string_literal: true\nmodule VagrantBindfs\n module Vagrant\n module Capabilities\n module Linux\n modu...
ruby
chosen
[ { "from": "system", "value": "Add low level cacheing for card balance and name\n" }, { "from": "human", "value": "class HomeController < ApplicationController\n\n def index\n @posts = policy_scope(Post).ordered.limit(10)\n @events = Event.today\n end\n\n def card_balance\n begin\n ...
ruby
chosen
[ { "from": "human", "value": "Add placeholder network destroy action for docker\n" }, { "from": "gpt", "value": "require 'log4r'\n\nmodule VagrantPlugins\n module DockerProvider\n module Action\n class DestroyNetwork\n def initialize(app, env)\n @app = app\n @log...
ruby
chosen
[ { "from": "system", "value": "Add accessor methods for all icon rarities in MtgSet\n" }, { "from": "human", "value": "class MtgSet < ActiveRecord::Base\n require 'mtg_helpers'\n include MtgHelpers\n\n has_many :mtg_cards\n validates :name, :uniqueness => true, :presence => true\n\n alias_me...
ruby
chosen
[ { "from": "human", "value": "Add a spec for QueueingRabbit::Client::Callbacks module.\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe QueueingRabbit::Client::Callbacks do\n let!(:klass) { Class.new { extend QueueingRabbit::Client::Callbacks } }\n\n subject { klass }\n\n it ...
ruby
chosen
[ { "from": "system", "value": "Add config for Devise mailer\n" }, { "from": "human", "value": "Rails.application.configure do\n # Settings specified here will take precedence over those in config/application.rb.\n\n # In the development environment your application's code is reloaded on\n # ev...
ruby
chosen
[ { "from": "system", "value": "Refactor mdTranslator html writer module 'allocation'\n" }, { "from": "human", "value": "# HTML writer\n# allocation\n\n# History:\n# Stan Smith 2017-04-04 original script\n\nmodule ADIWG\n module Mdtranslator\n module Writers\n module Html\n\n ...
ruby
chosen
[ { "from": "system", "value": "Fix BX Thailand orderbook typo\n" }, { "from": "human", "value": "module Cryptoexchange::Exchanges\n module BxThailand\n module Services\n class OrderBook < Cryptoexchange::Services::Market\n class << self\n def supports_individual_ticker_qu...
ruby
chosen
[ { "from": "system", "value": "Increase console version to 1.2.4\n\nFixes https://bugzilla.redhat.com/show_bug.cgi?id=1534999\n" }, { "from": "human", "value": "# Add gems here, in Gemfile syntax, which are dependencies of the appliance itself rather than a part of the ManageIQ application\ngem \...
ruby
chosen
[ { "from": "system", "value": "Add the recommended license field\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = \"lumberjack-dsl\"\n s.version = \"0.0.2\"\n s.authors = [\"Ryan Allen\", \"Steve Hodgkiss\", \"John Barton\", ...
ruby
chosen
[ { "from": "human", "value": "Add a test that causes messages to be framed\n" }, { "from": "gpt", "value": "# encoding: utf-8\n\nrequire 'spec_helper'\nrequire 'integration/eventmachine/spec_helper'\n\nrequire \"multi_json\"\n\ndescribe AMQ::Client::EventMachineClient, \"Basic.Publish\" do\n inc...
ruby
chosen
[ { "from": "system", "value": "Fix string literal usage in test suite.\n" }, { "from": "human", "value": "require 'acceptance/spec_helper'\n\nRSpec.describe 'Connections', :live => true do\n let(:maximum) { (2 ** 23) - 5 }\n let(:query) { \"SELECT * FROM book_core WHERE MATCH('')\" }\n ...
ruby
chosen
[ { "from": "human", "value": "Add an ohai timing test to find busted DNS on CI testers\n\nSigned-off-by: Lamont Granquist <0ab8dc438f73addc98d9ad5925ec8f2b97991703@scriptkiddie.org>\n" }, { "from": "gpt", "value": "require \"spec_helper\"\nrequire \"chef/mixin/shell_out\"\nrequire \"benchmark\" u...
ruby
chosen
[ { "from": "system", "value": "Fix test for redis data\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe PullRequest do\n \n it \"should update pull requests on demand\" do\n pr = PullRequest.update_from_github!(43)\n pr.state.should == 'passed'\n redis.get(\"PullReq...
ruby
chosen
[ { "from": "system", "value": "Fix request specs for users profile.\n" }, { "from": "human", "value": "require 'spec_helper'\n\nfeature 'User profile' do\n let!(:user) { create(:user, :email => 'user@email.com') }\n\n background do\n login_with(user)\n visit root_path\n click_link 'Pro...
ruby
chosen
[ { "from": "system", "value": "Set config.eager_load to false explicitly\n" }, { "from": "human", "value": "require 'test_helper'\nrequire 'tmpdir'\n\nclass Slim::Rails::AssetsTest < ActiveSupport::TestCase\n def with_app(use_sprockets, code)\n Dir.mktmpdir do |dir|\n app_path = File.joi...
ruby
chosen
[ { "from": "system", "value": "Return value if not string\n" }, { "from": "human", "value": "require 'remote_factory_girl_home_rails/serializer'\n\nmodule RemoteFactoryGirlHomeRails\n class HomeController < ApplicationController\n\n skip_before_filter *RemoteFactoryGirlHomeRails.skip_before_f...
ruby
chosen
[ { "from": "system", "value": "Update spec helper to reference proper library\n" }, { "from": "human", "value": "# encoding: utf-8\n\nrequire 'backports'\nrequire 'backports/basic_object' unless defined?(::BasicObject)\nrequire 'devtools/spec_helper'\nrequire 'ice_nine'\n\nif ENV['COVERAGE'] == '...
ruby
chosen
[ { "from": "system", "value": "Make sure that Bundler's load paths are properly set up ahead of time\n" }, { "from": "human", "value": "if ENV[\"COVERAGE\"]\n require \"codeclimate-test-reporter\"\n CodeClimate::TestReporter.start\nend\n\nrequire \"figaro\"\n\nrequire \"bundler\"\nBundler.requi...
ruby
chosen
[ { "from": "system", "value": "Move spec reporter to the beginning to report something\n" }, { "from": "human", "value": "require 'bundler/setup'\nBundler.require\n\nrequire 'codeclimate-test-reporter'\nCodeClimate::TestReporter.start\n\nrequire 'data_maps'\n" }, { "from": "gpt", "val...
ruby
chosen
[ { "from": "human", "value": "Add max_label and min_label to questions table.\n" }, { "from": "gpt", "value": "class AddMinMaxLableToQuestions < ActiveRecord::Migration\n def self.up\n add_column :questions, :max_label, :string\n add_column :questions, :min_label, :string\n end\nend\n" ...
ruby
chosen
[ { "from": "system", "value": "Fix checking invalid affix pattern\n" }, { "from": "human", "value": "module Sastrawi\n module Morphology\n class InvalidAffixPairSpecification\n def satisfied_by?(word)\n return false if /^me(.*)kan$/.match(word)\n\n return false if word == '...
ruby
chosen
[ { "from": "system", "value": "Create user model tests validating presence of name, email, and password.\n* also validating association with projects.\n" }, { "from": "human", "value": "# require 'rails_helper'\n\n# describe User do\n# \tlet!(:user) {create :user}\n# end" }, { "from": "gp...
ruby
chosen
[ { "from": "system", "value": "Remove invalid characters from the label name\n" }, { "from": "human", "value": "class MigrateTaggableLabels < ActiveRecord::Migration\n def up\n taggings = ActsAsTaggableOn::Tagging.where(taggable_type: ['Issue', 'MergeRequest'], context: 'labels')\n tagging...
ruby
chosen
[ { "from": "human", "value": "Create spec examples for IsoDatastoreNew button class\n" }, { "from": "gpt", "value": "describe ApplicationHelper::Button::IsoDatastoreNew do\n let(:view_context) { setup_view_context_with_sandbox({}) }\n let(:button) { described_class.new(view_context, {}, {}, {})...
ruby
chosen
[ { "from": "system", "value": "Check if puppet is running before raise error\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\nrequire 'yaml'\n\npuppet_last_run_summary = \"/var/lib/puppet/state/last_run_summary.yaml\"\nif File.exist?(puppet_last_run_summary) then\n puppet_report = YAML.lo...
ruby
chosen
[ { "from": "system", "value": "Add a first to sample\n" }, { "from": "human", "value": "get '/rounds/:id' do\n\n # @guesses = Guess.where(round_id: params[:round_id]).where(is_correct: false)\n round = Round.find(session[:round_id])\n @guesses = round.guesses.where(is_correct: false)\n bindin...
ruby
chosen
[ { "from": "system", "value": "Update update method in users_conroller to render a new edit page upon failure of an edit.\n" }, { "from": "human", "value": "class UserController < ApplicationController\n\n def index\n @users = User.all\n end\n\n def create\n user = User.new(user_params)\...
ruby
chosen
[ { "from": "system", "value": "Add optional :return_url param for Alipay\n" }, { "from": "human", "value": "require 'digest/md5'\n\nmodule PayFu\n module AlipayHelper\n def redirect_to_alipay_gateway(options={})\n query_string = query_params(options).sort.map { |key, value| \"#{key}=#{CG...
ruby
chosen
[ { "from": "system", "value": "Include ranks in hero pool response\n" }, { "from": "human", "value": "json.heroPool do\n json.heroes @heroes do |hero|\n json.id hero.id\n json.name hero.name\n json.slug hero.slug\n json.image image_path(hero.image_name)\n json.confidence @confiden...
ruby
chosen
[ { "from": "system", "value": "Remove preference assigns in GeneralSettings\n\nWe no longer assign to global preferences here, or anywhere else in the\nadmin. As the global config can be stored in memory that does not work\non all configurations (including the default).\n" }, { "from": "human", "...
ruby
chosen
[ { "from": "system", "value": "Remove model specific code from migration so that it runs.\n" }, { "from": "human", "value": "class AddCacheColumnsForVotingOnGames < ActiveRecord::Migration\n def self.up\n add_column :games, :cached_votes_total, :integer, :default => 0\n add_column :games, ...
ruby
chosen
[ { "from": "system", "value": "Create database tables using JPA module\n" }, { "from": "human", "value": "#\n# Copyright:: Copyright (c) 2015.\n# License:: Apache License, Version 2.0\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in co...
ruby
chosen
[ { "from": "system", "value": "Change module name to LockFacebook\n\nCloses #2\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"Lock-Facebook\"\n s.version = \"2.0.0\"\n s.summary = \"Facebook Native Integration for Auth0 Lock\"\n s.descriptio...
ruby
chosen
[ { "from": "system", "value": "Fix typo on spec matcher\n" }, { "from": "human", "value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\ndescribe CapeCod do\n it 'has a version' do\n expect(CapeCod::VERSION).to be_a(String)\n end\n\n it 'generates proper escape sequences' do\n expect(Cap...
ruby
chosen
[ { "from": "system", "value": "Refactor specs to use let, less verbose\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe RML::Document do\n context \"#create\" do\n context \"simple element\" do\n specify do\n RML::Document.string {\n mytag\n }.s...
ruby
chosen
[ { "from": "system", "value": "Set swift version in podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"RichEditorView\"\n s.version = \"5.0.0\"\n s.summary = \"Rich Text Editor for iOS written in Swift\"\n s.homepage = \"https://...
ruby
chosen
[ { "from": "system", "value": "Modify subject for confirmation email when the user has an OpenID. [Story1996681]\n" }, { "from": "human", "value": "class Notifier < ActionMailer::Base\n \n def confirmation_instructions(user)\n subject \"Please confirm your account\"\n from ...
ruby
chosen
[ { "from": "system", "value": "Fix gradle path/home setup on buildserver\n" }, { "from": "human", "value": "\n%w{ant ant-contrib autoconf autopoint bison cmake expect libtool libssl1.0.0 libssl-dev maven openjdk-7-jdk javacc python git-core mercurial subversion bzr git-svn make perlmagick pkg-con...
ruby
chosen
[ { "from": "system", "value": "Fix saving/updating the model with :oauth namespace\n" }, { "from": "human", "value": "module Doorkeeper\n class ApplicationsController < Doorkeeper::ApplicationController\n respond_to :html\n\n before_filter :authenticate_admin!\n\n def index\n @appl...
ruby
chosen
[ { "from": "system", "value": "Remove test/unit monkeypatch that test output really noisy\n" }, { "from": "human", "value": "#! /usr/local/bin/ruby -w\nrequire 'RMagick'\nrequire 'test/unit'\nrequire 'test/unit/ui/console/testrunner' if !RUBY_VERSION[/^1\\.9|^2/]\n\nputs RUBY_VERSION\nputs RUBY_...
ruby
chosen
[ { "from": "human", "value": "Set unpublished `DetailedGuide` state to `draft`\n\nThese three detailed guides are in rejected/submitted and thus can't be\ncorrectly migrated as they have an unpublishing.\n" }, { "from": "gpt", "value": "#These are detailed guides that have been unpublished and th...
ruby
chosen
[ { "from": "human", "value": "Add implementation of fourth rule of disambiguator prefix\n" }, { "from": "gpt", "value": "module Sastrawi\n module Morphology\n module Disambiguator\n class DisambiguatorPrefixRule4\n def disambiguate(word)\n return 'ajar' if word == 'belaja...
ruby
chosen
[ { "from": "human", "value": "Add a variety validator to check if a record is not set to the same value as it was before.\n" }, { "from": "gpt", "value": "# encoding: utf-8\n\nclass VarietyValidator < ActiveModel::EachValidator\n\n def validate_each(record, attribute, value)\n\n previous_valu...
ruby
chosen
[ { "from": "system", "value": "Fix invalid multibyte char (US-ASCII)\n" }, { "from": "human", "value": "class AddCourseCategoryData < ActiveRecord::Migration\n tag :predeploy\n\n def self.up\n down\n CourseCategory.create([\n {\n :name => '中小学'\n ...
ruby
chosen
[ { "from": "system", "value": "Add association-filtered faceting to CollectionProxy\n" }, { "from": "human", "value": "module ThinkingSphinx\n module ActiveRecord\n module CollectionProxy\n def search(*args)\n options = args.extract_options!\n options[:with] ||= {}\n ...
ruby
chosen
[ { "from": "human", "value": "Add scenario for getting all received messages\n" }, { "from": "gpt", "value": "require 'helper'\n\ndescribe 'getting all of my received messages' do\n let(:username) { String.generate }\n let(:password) { String.generate }\n subject { Esendex.new(username, passwo...
ruby
chosen
[ { "from": "system", "value": "Use correct 'filters' property in key json\n" }, { "from": "human", "value": "require 'minitest/spec'\nrequire 'minitest/autorun'\nrequire 'connect_client/security/filtered_key_generation'\n\ndescribe ConnectClient::Security do\n it \"should generate a symmetrical ...
ruby
chosen
[ { "from": "system", "value": "Add validation to ensure API hostnames are valid.\n" }, { "from": "human", "value": "class Api::Server\n include Mongoid::Document\n\n # Fields\n field :_id, :type => String, :default => lambda { UUIDTools::UUID.random_create.to_s }\n field :host, :type => Strin...
ruby
chosen
[ { "from": "system", "value": "Add a spec of beginless range for Ruby 2.7\n\nThis PR adds a spec of beginless range for Ruby 2.7.\n\nhttps://bugs.ruby-lang.org/issues/14799\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nRSpec.describe RuboCop::AST::RangeNode do\n let(:range_...
ruby
chosen
[ { "from": "system", "value": "Add integration test for home search box\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire \"test_helper\"\n\nclass SearchBoxTest < ActionDispatch::IntegrationTest\n\n def site\n @site ||= sites(:madrid)\n end\n\n def test_search_box_...
ruby
chosen
[ { "from": "system", "value": "Add unroutable tests for waterings\n" }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe WateringsController do\n it 'routes GET /plants/1/waterings/new' do\n expect(get: '/plants/1/waterings/new').to route_to('waterings#new', plant_id: \"1\")\n ...
ruby
chosen
[ { "from": "human", "value": "Add ZipCode to Institutions Table\n" }, { "from": "gpt", "value": "class AddZipcodeToInstitutions < ActiveRecord::Migration\n def self.up\n add_column :institutions, :zipcode, :integer\n end\n\n def self.down\n remove_column :institutions, :zipcode\n end\ne...
ruby
chosen
[ { "from": "system", "value": "Use [] as default for .tld list\n" }, { "from": "human", "value": "require 'logger'\n\nmodule VagrantDNS\n class Config < Vagrant::Config::Base\n class << self\n attr_accessor :listen, :logger, :ipv4only, :auto_run\n\n def listen\n @listen ||= [...
ruby
chosen
[ { "from": "system", "value": "Support for retrieving a non-default Stash configuration and deletion support\n" }, { "from": "human", "value": "class Stash\n # Configuration error\n class ConfigError < StandardError; end\n \n module ClassMethods\n def [](key)\n default[key]\n end\n...
ruby
chosen
[ { "from": "system", "value": "Update for dynamic schema member\n" }, { "from": "human", "value": "# frozen_string_literal: true\nmodule GraphQL\n module StaticValidation\n module RequiredArgumentsArePresent\n def on_field(node, _parent)\n assert_required_args(node, field_definiti...
ruby
chosen
[ { "from": "system", "value": "Remove reference to nonexistent layout.\n" }, { "from": "human", "value": "class EditorController < ApplicationController\n before_action :require_login\n\n def editor\n @repos = github.repos.list\n @repo_names = []\n @repos.each { |repo| @repo_names << r...
ruby
chosen
[ { "from": "system", "value": "Revert \"Preload the last_run so rest will run faster\"\n\nSure enough looking at an owner with lots of runs the performance\nproblem mentioned in the original commit is in fact a problem. So,\nreverting this until we come up with a better way of preloading\nthe last_runs which...
ruby
chosen
[ { "from": "system", "value": "Add spec for reuse of an Exception's backtrace.\n" }, { "from": "human", "value": "require File.expand_path('../../../spec_helper', __FILE__)\n\ndescribe \"Exception#set_backtrace\" do\n it \"allows the user to set the backtrace to any array\" do\n err = Runtime...
ruby
chosen
[ { "from": "system", "value": "Choose smaller blog to screenshot\n" }, { "from": "human", "value": "require 'acceptance_helper'\n\ndescribe \"Static pages:\", type: :feature do\n include ScreenshotTest\n include FeedHelper\n\n describe \"Homepage\" do\n it do\n create_default_activitie...
ruby
chosen
[ { "from": "system", "value": "Add ActiveModel::Naming to respond_with can be used\n" }, { "from": "human", "value": "class ResquePoll::Job\n attr_reader :klass, :params, :job_id\n\n def initialize(klass, params)\n @klass = klass\n @params = params\n end\n\n def self.create(*args)\n ...
ruby
chosen
[ { "from": "system", "value": "Add a test for AdminSetSearchBuilder\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe CurationConcerns::AdminSetSearchBuilder do\n let(:processor_chain) { [:filter_models] }\n let(:context) { double('context') }\n let(:user) { double('user') }...
ruby
chosen
[ { "from": "system", "value": "Revert \"Register ERBTracker as DependencyTracker for .coffee files to support…\"\n" }, { "from": "human", "value": "module Coffee\n module Rails\n class TemplateHandler\n def self.erb_handler\n @@erb_handler ||= ActionView::Template.registered_templ...
ruby
chosen
[ { "from": "system", "value": "Upgrade OpenSSL to 1.0.2g for Git installer\n" }, { "from": "human", "value": "module Luban\n module Deployment\n module Packages\n class Git < Luban::Deployment::Package::Binary\n apply_to :all do\n before_install do\n depend_on ...
ruby
chosen
[ { "from": "system", "value": "Make it clear this is an IO, not a String\n" }, { "from": "human", "value": "##\n# Raised when Mechanize encounters an error while reading the response body\n# from the server. Contains the response headers and the response body up to\n# the error along with the in...
ruby
chosen
[ { "from": "system", "value": "Refactor timing and increment operations\n" }, { "from": "human", "value": "module Resque\n module Plugins\n module StatsdMetrics\n def after_perform_statsd(*args)\n Client.client.increment(\"#{prefix}.#{self}.success\")\n Client.client.increm...
ruby
chosen
[ { "from": "human", "value": "Reset the content id for an HtmlAttachment...\n\nThis HtmlAttachment has a different content_id in the Publishing API\nthere's only one Edition of the attachable relation so it's safe enough\nto correct the content_id without polluting the document history.\n" }, { "from...
ruby
chosen
[ { "from": "system", "value": "Add description to analysis alert\n" }, { "from": "human", "value": "namespace :after_party do\n desc 'Deployment task: first_adult_analysis_alert_type'\n task first_adult_analysis_alert_type: :environment do\n puts \"Running deploy task 'first_adult_analysis_a...
ruby
chosen
[ { "from": "system", "value": "Update search spec for terminal helper\n" }, { "from": "human", "value": "require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')\nrequire File.expand_path(\"../command_helper\", __FILE__)\n\ndescribe \"github search\" do\n include CommandHelper\n \n ...
ruby
chosen
[ { "from": "human", "value": "Test the behaviour of the ThreadRecorder worker.\n" }, { "from": "gpt", "value": "require \"spec_helper\"\n\ndescribe ThreadRecorder do\n subject { ThreadRecorder }\n\n # Queuing interface\n it { subject.queue.should == :thread_views}\n it { subject.should respon...
ruby
chosen
[ { "from": "system", "value": "Fix HTTP status codes for errors\n\nProblem: Errors (i.e., 404, 422, 500) returned 200 by mistake\n\nSolution: Return the right error code by calling the right helper method\n" }, { "from": "human", "value": "class ErrorsController < ApplicationController\n skip_be...
ruby
chosen
[ { "from": "system", "value": "Make scenes controller reflect unnested route\n" }, { "from": "human", "value": "class ScenesController < ApplicationController\n def show\n @script = Script.find(:script_id)\n @scene = Scene.find(:id)\n end\n\n\n\n\nend" }, { "from": "gpt", "val...
ruby
chosen
[ { "from": "system", "value": "Add bubble text to stocks list\n" }, { "from": "human", "value": "class StocksController < MyplaceonlineController\n protected\n def sorts\n [\"stocks.updated_at DESC\"]\n end\n\n def obj_params\n params.require(:stock).permit(\n :num_shar...
ruby
chosen
[ { "from": "system", "value": "Improve error message for unknown effect names\n" }, { "from": "human", "value": "# History::EffectFactory is a simple helper factory, used to construct the\n# skeleton of a History::Effect that will then be filled out by the actual\n# import job code.\n#\n# TODO: f...
ruby
chosen
[ { "from": "system", "value": "Use bang methods, god the errors are awful without it...\n" }, { "from": "human", "value": "module Keymail\n module Authentication\n def self.request(email)\n # TODO: initializers for expires_at\n raise ArgumentError, 'Email cannot be nil' if email.nil...
ruby
chosen
[ { "from": "system", "value": "Fix release notes for first tag\n" }, { "from": "human", "value": "module Git\n class ReleaseNotes\n require 'enumerator'\n include CLI\n include Commands\n\n def annotate!\n tags = get_tags.reverse\n\n start_tag = ask \"Start at which tag?\",...
ruby
chosen
[ { "from": "system", "value": "Transform minimum confidence setting to a float" }, { "from": "human", "value": "module AdhearsionASR\n class Plugin < Adhearsion::Plugin\n config :adhearsion_asr do\n min_confidence 0.5, desc: 'The default minimum confidence level used for all recognizer i...
ruby
chosen
[ { "from": "system", "value": "Debug when not loading New Relic\n" }, { "from": "human", "value": "module Cequel\n module Record\n # @private\n # @since 0.1.0\n class Railtie < Rails::Railtie\n config.cequel = Record\n\n def self.app_name\n Rails.application.railtie_nam...
ruby
chosen
[ { "from": "system", "value": "Add basics for the transaction method, including namespacing (looks like it's inspired by java...)\n" }, { "from": "human", "value": "class Api::BraintreeController < ApplicationController\n def token\n render json: {token: Braintree::ClientToken.generate}\n en...
ruby
chosen
[ { "from": "human", "value": "Add (temporary) specs for RelationNode.new\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\n# TODO remove this once abstract_class supports\n# classes with different superclass from ::Object\ndescribe RelationRegistry::RelationNode, '.new' do\n subject { ob...
ruby
chosen
[ { "from": "system", "value": "Set the title on creation page to when validation fails\n" }, { "from": "human", "value": "class RegistrationsController < Devise::RegistrationsController\n before_filter :check_product_name, :only => 'new'\n helper_method :individual?\n\n def new\n if %w{part...
ruby
chosen