conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add new attributes to RegionalSweden, remove duplicates\n"
},
{
"from": "human",
"value": "module Billogram\n class RegionalSweden < Resource\n attr_accessor :rotavdrag, :rotavdrag_personal_number, :rotavdrag_description,\n :reversed_vat, :rotavdrag_account... | ruby | chosen |
[
{
"from": "system",
"value": "Resolve Cucumber v4 deprecation warning\n\nhttps://github.com/cucumber/cucumber-ruby/blob/v4.0.0/lib/cucumber/glue/proto_world.rb#L100-L108\n"
},
{
"from": "human",
"value": "require 'capybara-inline-screenshot'\nrequire 'capybara-screenshot'\n\nBefore do |scenario|... | ruby | chosen |
[
{
"from": "system",
"value": "Allow feature detection on DefinedObjectProxy\n"
},
{
"from": "human",
"value": "module GraphQL\n module Define\n class DefinedObjectProxy\n def initialize(target)\n @target = target\n @dictionary = target.class.dictionary\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Raise NoMachines if the user cancels waiting for spot requests\n"
},
{
"from": "human",
"value": "module Rudy; module Routines; module Handlers;\n module SpotRequest\n include Rudy::Routines::Handlers::Base\n extend self\n\n def needed?\n current_mach... | ruby | chosen |
[
{
"from": "human",
"value": "Add missing foreign key indexes as suggested by rake db:indexes:missing\n"
},
{
"from": "gpt",
"value": "class AddMissingForeignKeyIndexes < ActiveRecord::Migration\n def self.up\n add_index :punishments, :member_id\n add_index :items, :member_id\n add_inde... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration to convert filter_parameters in searches table\n"
},
{
"from": "gpt",
"value": "require 'common'\nrequire 'lims-core/helpers'\n\n::Sequel.migration do\n up do\n self[:searches].each do |search|\n search[:filter_parameters].andtap do |value|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Package version increased from 0.16.0.2 to 0.17.0.0\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'evt-messaging'\n s.version = '0.16.0.2'\n s.summary = 'Common primitives for platform-specific messaging im... | ruby | chosen |
[
{
"from": "human",
"value": "Add unit tests for widow_and_new_pension? calculator method\n\nI want to refactor this method and so I've elected to add fairly exhaustive\nunit test coverage.\n"
},
{
"from": "gpt",
"value": "require_relative '../../test_helper'\n\nmodule SmartAnswer::Calculators\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make unescape tests work on windows.\n"
},
{
"from": "human",
"value": "require File.expand_path('../helper', __FILE__)\nrequire 'mini_portile'\n\nclass TestUnescapingCommands < TestCase\n class << self\n def startup\n FileUtils.rm_rf \"tmp\" # remove any p... | ruby | chosen |
[
{
"from": "system",
"value": "Exclude config files from gem.\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"middleman-breadcrumbs/version\"\n\nGem::Specification.new do |s|\n s.name = \"middleman-breadcrumbs\"\n s.version = BreadcrumbsVe... | ruby | chosen |
[
{
"from": "system",
"value": "Use single quotes in main module file\n"
},
{
"from": "human",
"value": "require \"messagemedia/soap/version\"\nrequire \"messagemedia/soap/recipient\"\nrequire \"messagemedia/soap/message\"\nrequire \"messagemedia/soap/client\"\n"
},
{
"from": "gpt",
"v... | ruby | chosen |
[
{
"from": "system",
"value": "Set value and timeout with SETEX\n"
},
{
"from": "human",
"value": "module Prorate\n module BlockFor\n def self.block!(redis:, id:, duration:)\n k = \"bl:%s\" % id\n redis.multi do |txn|\n txn.set(k, 1)\n txn.expire(k, duration.to_i)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add support for Rails 6\n\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\n\nmodule PryRails\n class Railtie < Rails::Railtie\n console do\n require 'pry'\n require 'pry-rails/commands'\n\n if Rails::VERSION::MAJOR == 3\n Rails::Consol... | ruby | chosen |
[
{
"from": "system",
"value": "Replace temp variable with tap\n"
},
{
"from": "human",
"value": "class Drill\n include Commands\n\n def initialize\n @context = Pry.binding_for(self)\n end\n\n def expected\n eval(reference)\n end\n\n def done?(input)\n quit if input == 'exit'\n r... | ruby | chosen |
[
{
"from": "human",
"value": "Add tests for the response parser.\n"
},
{
"from": "gpt",
"value": "require_relative '../../../test_helper'\nrequire 'smartsheet/api/middleware/response_parser'\nrequire 'mocha'\n\ndescribe Smartsheet::API::Middleware::ResponseParser do\n def build_response_parser(e... | ruby | chosen |
[
{
"from": "system",
"value": "Add url as a rake task parameter\n"
},
{
"from": "human",
"value": "namespace :proposals do\n desc \"Updates all proposals by recalculating their hot_score\"\n task touch: :environment do\n Proposal.find_in_batches do |proposals|\n proposals.each(&:save)\n... | ruby | chosen |
[
{
"from": "system",
"value": "Remove :environment from rake tasks\n"
},
{
"from": "human",
"value": "require 'yaml'\nrequire 'open-uri'\nrequire_relative '../spice'\nrequire_relative '../spicerack_usage'\n\nnamespace :spicerack do\n\n def generate_rake_tasks\n spice_file = File.expand_path('... | ruby | chosen |
[
{
"from": "human",
"value": "Add task for update t6 srpms\n"
},
{
"from": "gpt",
"value": "namespace :t6 do\n desc \"Update t6 stuff\"\n task :update => :environment do\n require 'rpm'\n require 'open-uri'\n\n branch = Branch.where(:name => 't6', :vendor => 'ALT Linux').first\n\n A... | ruby | chosen |
[
{
"from": "system",
"value": "Drop version to 0.0.1 for placeholder on rubygems\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |gem|\n gem.name = 'tent-schemas'\n gem.version = '0.1.0'\n gem.authors = ['Jonathan Rudenberg']\n ge... | ruby | chosen |
[
{
"from": "system",
"value": "Set a limit on the second page\n"
},
{
"from": "human",
"value": "# Copyright (c) 2010, Diaspora Inc. This file is\n# licensed under the Affero General Public License version 3 or later. See\n# the COPYRIGHT file.\n\nrequire 'spec_helper'\n\ndescribe Notific... | ruby | chosen |
[
{
"from": "human",
"value": "Add high level feature spec as example usage.\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe \"Acfs\" do\n let(:client) { MyClient.new(base_url: 'http://api.example.com') }\n\n before do\n stub_request(:get, \"api.example.com/users\").with(:b... | ruby | chosen |
[
{
"from": "system",
"value": "Add a factory or the Vote model.\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n factory :group do\n primary_number { Faker::Number.number(3) }\n street_name { Faker::Address.street_name }\n city_name { Faker::Address.city }\... | ruby | chosen |
[
{
"from": "human",
"value": "Add a simple test for moves\n"
},
{
"from": "gpt",
"value": "require File.expand_path('../../lib/move.rb', __FILE__)\nrequire File.expand_path('../../lib/square.rb', __FILE__)\n\n\ndescribe Move, \"0,0 to 0,1\" do\n\n fs = Square.new(0,0)\n ts = Square.new(0,1)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add should allow team's nameto be set test\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire_relative '../src/team.rb'\n\ndescribe Team do\n\tdescribe 'Team#name' do\n\t\tit \"Should return team's name.\" do\n\t\t\tt = Team.new 'Devils'\n\t\t\t\n\t\... | ruby | chosen |
[
{
"from": "system",
"value": "Put RDoc tasks in their own namespace.\n"
},
{
"from": "human",
"value": "require \"rdoc/task\"\n\nRDoc::Task.new do |rdoc|\n rdoc.main = \"README.rdoc\"\n rdoc.rdoc_files.include \"README.rdoc\", \"DESIGN.rdoc\", \"TODO.rdoc\", \"lib/**/*.rb\"\nend\n"
},
{
... | ruby | chosen |
[
{
"from": "human",
"value": "Remove invalid ACCESS assessment subjects\n\n+ Subject 'ELL' came from an earlier data dump before we had linked with X2\n+ Subject 'Overall' is duplicative of 'Composite'\n+ #16\n"
},
{
"from": "gpt",
"value": "class RemoveInvalidAccessAssessments < ActiveRecord::Mi... | ruby | chosen |
[
{
"from": "system",
"value": "WIP: Update customer information on balanced and update profile on neighborly\n"
},
{
"from": "human",
"value": "module Neighborly::Balanced::Creditcard\n class PaymentsController < ActionController::Base\n def new\n if current_user.balanced_contributor\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add fragments scope to Wheelhouse::Page model"
},
{
"from": "human",
"value": "module PageFragments::PageMethods\n def path\n fragment? ? \"##{dom_id}\" : super\n end\n \n def path_before_type_cast\n path\n end\n \n def icon\n fragment? ? \"page-frag... | ruby | chosen |
[
{
"from": "system",
"value": "Add tests for recent serializer changes.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Api::DevicesController do\n\n include Devise::Test::ControllerHelpers\n\n let(:user) { FactoryGirl.create(:user) }\n\n describe '#show' do\n it 'handl... | ruby | chosen |
[
{
"from": "system",
"value": "Add flag to curation_concerns install command\n\nThis will avoid confirmation question during curation_concerns install when generating test app.\n"
},
{
"from": "human",
"value": " require 'rails/generators'\n\n class TestAppGenerator < Rails::Generat... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Tweak application-wide config. Set include_all_helpers to false\"\n\nThis reverts commit 2a286ddb9f0355b93aff510e4be4eff61c113d75.\n"
},
{
"from": "human",
"value": "Rails.application.instance_eval do\n # because including all helpers, all the time is a ba... | ruby | chosen |
[
{
"from": "system",
"value": "Add simplecov as development dependency\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'data_maps/version'\n\nGem::Specification.new do |spec|\n spec.n... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing version guard and improve description\n"
},
{
"from": "human",
"value": "require File.expand_path('../../../spec_helper', __FILE__)\n\ndescribe \"Integer\" do\n it \"includes Comparable\" do\n Integer.include?(Comparable).should == true\n end\n\n i... | ruby | chosen |
[
{
"from": "system",
"value": "Update migration for compatibility with older Rails versions\n\nAligning with the version used in the existing `versions` table migration to allow for this migration / related tests to be used in the 2.x stable branch (that supports older Rails versions)\n"
},
{
"from":... | ruby | chosen |
[
{
"from": "system",
"value": "Fix uninitialized constant error raised in Rails 4"
},
{
"from": "human",
"value": "require 'rails/generators'\nrequire 'rails/generators/migration'\nrequire 'rails/generators/active_record'\n\nmodule Feature\n class InstallGenerator < Rails::Generators::Base\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add `sudo: required` note to container-based infra header\n"
},
{
"from": "human",
"value": "require 'travis/build/appliances/base'\n\nmodule Travis\n module Build\n module Appliances\n class DisableSudo < Base\n MSG1 = \"\\nThis job is running on co... | ruby | chosen |
[
{
"from": "system",
"value": "Update budget line configuration to use gobierto data\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule GobiertoBudgets\n module SearchEngineConfiguration\n class BudgetLine\n\n def self.all_indices\n [index_forecast, index_e... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for the new behavior for MatchData.allocate\n"
},
{
"from": "gpt",
"value": "require_relative '../../spec_helper'\n\ndescribe \"MatchData.allocate\" do\n ruby_version_is \"2.7\" do\n it \"is undefined\" do\n # https://bugs.ruby-lang.org/issues/16294... | ruby | chosen |
[
{
"from": "system",
"value": "Update path and add puts.\n"
},
{
"from": "human",
"value": "class GitcoinBlockchainExplorerGenerator < Rails::Generators::NamedBase\n source_root File.expand_path('../templates', __FILE__)\n\n def copy_files\n puts 'inject routes'\n prepend_file 'config/env... | ruby | chosen |
[
{
"from": "system",
"value": "Set parent_id when creating Slider, Featured, and Latest\n\nSince parent_id wasn't set to Tags taxonomy root id,\nthese Taxons were not appearing in the admin, and\nwere not being destroyed when the Tags taxonomy was\ndestroyed.\n\nFixes #112\n"
},
{
"from": "human",
... | ruby | chosen |
[
{
"from": "system",
"value": "Use a more accurate parameter name\n"
},
{
"from": "human",
"value": "module JSONApi\n module Request\n class Builder\n\n attr_reader :fragments\n\n def initialize(connection)\n @connection = connection\n @fragments = []\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add fourth digit to version number.\n"
},
{
"from": "human",
"value": "module TravisBuildTools\n module Build\n RELEASE_VERSION = case\n #Builds of pull requests\n when ['TRAVIS_PULL_REQUEST'] && !ENV['TRAVIS_PULL_REQUEST'].match(/false/i) then \"0.#{E... | ruby | chosen |
[
{
"from": "system",
"value": "Test that OpenVPN service started and is enabled\n"
},
{
"from": "human",
"value": "# Encoding: utf-8\nrequire 'spec_helper'\n\ncontext 'Config' do\n describe file('/etc/openvpn/server.conf') do\n describe '#content' do\n subject { super().content }\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove broken call to require 'vcloud'\n"
},
{
"from": "human",
"value": "require 'vcloud'\n\nmodule Vcloud\n module EdgeGateway\n class LoadBalancerConfigurationDiffer\n\n def initialize local, remote\n @local = local\n @remote = remote... | ruby | chosen |
[
{
"from": "human",
"value": "Write Page specs that pass.\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe Page do\n let(:valid_page){Page.find(1)}\n let(:test_challenge_page){Page.all.find{|p| p.has_challenge?} }\n\n it \"can return whether or not it has a challenge\" do\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for rate struct\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe SalesTax::RateStore do\n ATTRIBUTES = [\n [:region_name, 'A SUNNY SOCIALIST WORLD' ],\n [:region_code, 'ABCD' ],\n [:combined_rate, 0.03 ... | ruby | chosen |
[
{
"from": "system",
"value": "Add tests for verb and languages lists in both plaintext and json format (on request, defaulting to plaintext).\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\nrequire_relative 'spec_helper'\n\ndescribe \"Grokily\" do\n\n it \"redirects to Github on root\" do... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for generic toolbar button\n"
},
{
"from": "gpt",
"value": "require \"spec_helper\"\n\ndescribe ApplicationHelper::Button::GenericFeatureButton do\n describe '#skip?' do\n [:pause].each do |feature|\n context \"when instance supports feature #{featu... | ruby | chosen |
[
{
"from": "system",
"value": "Add directory existing check before cloning repository\n"
},
{
"from": "human",
"value": "node ||= {\n \"rbenv\" => {\n \"versions\" => [ \"2.2.1\", \"2.2.2\" ],\n \"local\" => \"2.2.2\",\n \"gems\" => [ \"bundler\", \"rake\" ],\n \"user\" => \"vagrant\... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade mail dependency to 2.5.0\n"
},
{
"from": "human",
"value": "version = File.read(File.expand_path('../../RAILS_VERSION', __FILE__)).strip\n\nGem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s.name = 'actionmailer'\n s.version ... | ruby | chosen |
[
{
"from": "system",
"value": "Use sentence for zone factory's name\n\nwords returned an array\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n factory :global_zone, :class => Spree::Zone do\n name 'GlobalZone'\n description { Faker::Lorem.sentence }\n zone_members do |proxy|\... | ruby | chosen |
[
{
"from": "human",
"value": "Add some integration test for plans data nodes creation\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nrequire \"test_helper\"\n\nmodule GobiertoAdmin\n module GobiertoPlans\n class PlanDataTest < ActionDispatch::IntegrationTest\n def setu... | ruby | chosen |
[
{
"from": "system",
"value": "Adjust migration to fix deployment issue\n\nApparently the 'reset_password_token' index does not exist in the\nusers table on the production stack. This was failing the deployment.\n"
},
{
"from": "human",
"value": "class RemoveUnneededColumnsFromUsers < ActiveRecor... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo in build stages reference migration\n"
},
{
"from": "human",
"value": "class MigrateBuildStageReference < ActiveRecord::Migration\n include Gitlab::Database::MigrationHelpers\n\n DOWNTIME = false\n\n def up\n disable_statement_timeout\n\n stage_id ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove name uniqueness validation from stock\n"
},
{
"from": "human",
"value": "class StockPlugin::Place < ActiveRecord::Base\n\n belongs_to :profile\n\n validates_presence_of :profile\n validates_presence_of :name\n validates_uniqueness_of :name\n\n protected\... | ruby | chosen |
[
{
"from": "system",
"value": "Remove controls from gemspec entirely\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'event_store-client-http'\n s.summary = 'HTTP Client for EventStore'\n s.version = '0.1.1'\n s.authors = ['']\n s.requir... | ruby | chosen |
[
{
"from": "system",
"value": "Fix fail on feature element text_length\n"
},
{
"from": "human",
"value": "require File.dirname(__FILE__) + '/../../spec_helper'\nrequire 'cucumber/step_mother'\nrequire 'cucumber/ast'\n\nmodule Cucumber\n describe FeatureElement do\n include FeatureElement\n\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add some tests for single sign on class\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe Discourse::SingleSignOn do\n let(:secret) { \"this is my test secret\" }\n\n describe \".parse\" do\n it \"should raise an error if the signature is invali... | ruby | chosen |
[
{
"from": "human",
"value": "Add specs for dotpay confirmation\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\ndef post_params\n {\"id\"=>\"767542\", \"operation_number\"=>\"M9283-8213\", \"operation_type\"=>\"payment\", \"operation_status\"=>\"completed\", \"operation_amount\"=>\"10... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec for not-mutating passed configuration\n"
},
{
"from": "human",
"value": "require 'logstash-logger'\n\ndescribe LogStashLogger::Device do\n include_context 'device'\n\n context \"when port is specified\" do\n it \"defaults type to UDP\" do\n expect... | ruby | chosen |
[
{
"from": "system",
"value": "Remove obsolete load paths for specs"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift(File.dirname(__FILE__))\n$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), \"..\", \"lib\"))\n\nrequire \"rubygems\"\nrequire \"rspec\"\nrequire \"rr\"\nrequire \"vidibus-gem... | ruby | chosen |
[
{
"from": "system",
"value": "Add environment option for rspec aws paid tests.\n"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))\n$LOAD_PATH.unshift(File.dirname(__FILE__))\n\nif RUBY_VERSION =~ /^1\\.9/\n require 'simplecov'\n\n module Simpl... | ruby | chosen |
[
{
"from": "system",
"value": "Use load in specs so we can reload Phony.\n"
},
{
"from": "human",
"value": "begin\n require 'bundler'\nrescue LoadError\n require 'rubygems'\n require 'bundler'\nend\nBundler.setup :test\nBundler.require\n\n# Pippi.\n#\nif ENV['PIPPI']\n require 'pippi'\n Pipp... | ruby | chosen |
[
{
"from": "system",
"value": "Add RSpec setup to allow focus.\n"
},
{
"from": "human",
"value": "require 'sparql/grammar'\nrequire 'rdf/spec'\nrequire 'rdf/ntriples'\n\nRSpec.configure do |config|\n config.include(RDF::Spec::Matchers)\nend\n\nDAWG = RDF::Vocabulary.new('http://www.w3.org/2001/s... | ruby | chosen |
[
{
"from": "system",
"value": "Remove previously introduced debug code"
},
{
"from": "human",
"value": "require 'dm-mapper'\n\nbegin\n require 'rspec' # try for RSpec 2\nrescue LoadError\n require 'spec' # try for RSpec 1\n RSpec = Spec::Runner\nend\n\nRSpec.configure do |config|\n config.... | ruby | chosen |
[
{
"from": "system",
"value": "Add rspec options for favorable output\n"
},
{
"from": "human",
"value": "require \"bundler/setup\"\nrequire 'capybara/mechanize'\nrequire 'capybara/rspec'\nrequire 'factory_girl'\nrequire 'rspec'\n\nRSpec.configure do |config|\n config.include Capybara::DSL\n\n c... | ruby | chosen |
[
{
"from": "system",
"value": "Move concat basedir for tests to /var/tmp\n"
},
{
"from": "human",
"value": "require 'puppetlabs_spec_helper/module_spec_helper'\n\nRSpec.configure do |c|\n # :id and :osfamily facts are needed for concat module\n c.default_facts = {\n :id => 'stm'... | ruby | chosen |
[
{
"from": "system",
"value": "Clear inner body on initialize\n"
},
{
"from": "human",
"value": "require 'hyalite'\n\nmodule RenderingHelper\n def self.included(mod)\n mod.before do\n @mount_at = DOM(\"<div class='root'></div>\")\n @mount_at.append_to($document.body)\n end\n end... | ruby | chosen |
[
{
"from": "system",
"value": "Swap OpenStruct with Virtus in specs\n\nForgot that OpenStruct behaves differently on jruby and rbx...\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\n# this is needed for guard to work, not sure why :(\nrequire \"bundler\"\nBundler.setup\n\nif RUBY_ENGINE =... | ruby | chosen |
[
{
"from": "system",
"value": "Fix tmp/spec folder issue while test run\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\n$:.push(File.expand_path(\"../../lib\", __FILE__))\n\nrequire \"fakeweb\"\nrequire \"uri\"\nrequire \"ryodo\"\n\nRSpec::Matchers.define :include_hash do |expected|\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update apache version and dist site location in rails example\n"
},
{
"from": "human",
"value": "package :mongrel do\n description 'Mongrel Application Server'\n gem 'mongrel'\n version '1.1.4'\nend\n\npackage :mongrel_cluster, :provides => :appserver do\n descr... | ruby | chosen |
[
{
"from": "system",
"value": "Remove national measurement unit factory.\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n factory :measurement_unit do\n measurement_unit_code { Forgery(:basic).text(exactly: 3) }\n validity_start_date { Date.today.ago(3.years) }\n validity_end_... | ruby | chosen |
[
{
"from": "human",
"value": "Add code wars (7) javascript filter\n"
},
{
"from": "gpt",
"value": "# http://www.codewars.com/kata/525d9b1a037b7a9da7000905\n# --- iteration 1 ---\ndef search_names(logins)\n logins.select{ |(name, email)| name[-1] == \"_\" }\nend\n\n"
}
] | ruby | chosen |
[
{
"from": "system",
"value": "Substitute name of the domain class consistently\n\nThe name of the domain-object is configurable. By default, it is just\nUser. If you pass an option to the generator, you can change it, to\nsay, Admin.\n"
},
{
"from": "human",
"value": "require 'active_support/con... | ruby | chosen |
[
{
"from": "system",
"value": "Make the image load the crop view rather than the edit title window\n"
},
{
"from": "human",
"value": "module Tenon\n module AssetHelper\n def asset_icon(asset)\n if asset.attachment.exists?(:thumbnail)\n i = image_tag(asset.attachment.url(:thumbnail... | ruby | chosen |
[
{
"from": "system",
"value": "Fix CarnivalEnumInput default nil parameter value in input method\n"
},
{
"from": "human",
"value": "class CarnivalEnumInput < SimpleForm::Inputs::CollectionSelectInput\n\n def input(wrapper_options = nil)\n options[:collection] ||= get_collection\n super\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix dependent destroy channel settings\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n#\n# This file is a part of Redmine ChattyCrow notifictation\n#\n# @author Strnadj <jan.strnadek@gmail.com>\n\n# Usable channel in redmine\nclass ChattyCrowChannel < ActiveR... | ruby | chosen |
[
{
"from": "system",
"value": "Use attr_reader for trivial accessor method\n\nRubocop rule: Style/TrivialAccessors: Use attr_reader to define trivial reader methods.\nPlus: move attr_reader to the top\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass VagrantfileBinding\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update instrument policy to allow managers to write\n"
},
{
"from": "human",
"value": "class InstrumentPolicy \n attr_reader :user, :record\n\n def initialize(user, record)\n @user = user\n @record = record\n end\n\n def index?\n read_access\n end\n \... | ruby | chosen |
[
{
"from": "human",
"value": "Use snail case for fk, not camel case\n"
},
{
"from": "gpt",
"value": "class RenameCamelCasedColumnsInLabs < ActiveRecord::Migration\n def up\n rename_column :labs, :GivenCourse_id, :given_course_id\n rename_column :labs, :LabDescription_id, :lab_description_i... | ruby | chosen |
[
{
"from": "system",
"value": "Remove extra references to self\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe OrchestrationStackHelper::TextualSummary do\n before { @record = FactoryGirl.build(:orchestration_stack) }\n\n it \"#textual_group_lifecycle should includes reti... | ruby | chosen |
[
{
"from": "system",
"value": "Add empty it calls for untested outgoing commands\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe CollectAllCards do\n describe \"#call\" do\n subject(:service) { CollectAllCards.new(game) }\n\n let(:game) { Game.new }\n\n it \"... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test suite when mysqld is not installed\n\nThe fact being confined, no value was returned when mysqld was not\nfound. Also stub the which method to fix the problem.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Facter::Util::Fact.to_s do\... | ruby | chosen |
[
{
"from": "human",
"value": "Remove old AMR warning data\n"
},
{
"from": "gpt",
"value": "namespace :after_party do\n desc 'Deployment task: remove_old_amr_reading_warnings'\n task remove_old_amr_reading_warnings: :environment do\n puts \"Running deploy task 'remove_old_amr_reading_warnings... | ruby | chosen |
[
{
"from": "system",
"value": "Add ece as development dependency\n\nAdd ece as development dependency\n\nUpdate 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 'webpush/version... | ruby | chosen |
[
{
"from": "system",
"value": "Copy the object_daddy exemplars over to the main application so the cucumber features aren't as angry\n"
},
{
"from": "human",
"value": "class AuthenticationFeaturesGenerator < Rails::Generator::Base\n def manifest\n record do |m|\n m.dependency 'cucumber',... | ruby | chosen |
[
{
"from": "system",
"value": "Change 'json' and 'error' to local variables\n\nThey were instance variables before, but they don't need to be."
},
{
"from": "human",
"value": "class Winds\n API_URL = \"http://winds-aloft.mohawkapps.com/winds\"\n # API_URL = \"http://winds-aloft-dev.mohawkapps.c... | ruby | chosen |
[
{
"from": "system",
"value": "Add metadata import to global import task\n"
},
{
"from": "human",
"value": "namespace :db do\n desc 'Imports all data in correct order, replaces non-dictionary data'\n task import: [\n 'locations:import',\n 'location_members:import',\n 'ndcs:full:import'... | ruby | chosen |
[
{
"from": "system",
"value": "Add days ago filter in map-reduce\n"
},
{
"from": "human",
"value": "module StatusCounter\n\n class UserCounter\n def map_command\n <<-EOS\n function() {\n emit(this.user.id_str, 1);\n }\n EOS\n end\n\n def reduce_command\n... | ruby | chosen |
[
{
"from": "system",
"value": "Use 32px for a default Gravatar"
},
{
"from": "human",
"value": "module ApplicationHelper\n def gravatar_url user = nil\n user ||= current_user\n gravatar_id = Digest::MD5::hexdigest(user.email).downcase\n \"http://gravatar.com/avatar/#{gravatar_id}.png\"\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix render not found problem\n"
},
{
"from": "human",
"value": "# This file is used by Rack-based servers to start the application.\n\nrequire_relative 'config/environment'\n\nuse Rack::Cors do\n allow do\n origins '*'\n resource '/api/*', :headers => :any, :... | ruby | chosen |
[
{
"from": "system",
"value": "Fix issue with non-vehicular assets when MMS is loaded\n"
},
{
"from": "human",
"value": "module TransamMmsHelper\n\n # formats an icon if services are requried\n def format_as_service_required(asset)\n if asset.service_required?\n return \"<i class='fa fa... | ruby | chosen |
[
{
"from": "system",
"value": "Fix tests broken due to zero-length window\n\nWithout this, the range is based on a date, without a time. Assuming both dates are the same, for example Jan 1, 1970, when sent to the database, this means that the `start_time` ends up being `Jan 1 1970 00:00:00` and the `end_time... | ruby | chosen |
[
{
"from": "system",
"value": "Fix variable precedence to match Auditable's, and add additional comments\n"
},
{
"from": "human",
"value": "class ApplicationRecord < ActiveRecord::Base\n self.abstract_class = true\n\n def audited_user_id\n user = ::Audited.store[:current_user].call if ::Audi... | ruby | chosen |
[
{
"from": "system",
"value": "Fix application responder to use request format for response\n"
},
{
"from": "human",
"value": "class ApplicationResponder < ActionController::Responder\n # Redirects resources to the collection path (index action) instead\n # of the resource path (show action) fo... | ruby | chosen |
[
{
"from": "system",
"value": "Change apply_url in jooble XML feed\n"
},
{
"from": "human",
"value": "xml.instruct!\nxml.jobs do\n @offers.each do |offer|\n xml.job do\n xml.id offer.id\n xml.link { xml.cdata! offer_url(offer) }\n xml.name { xml.cdata! offer.title }\n xml.... | ruby | chosen |
[
{
"from": "system",
"value": "Add additional config values, which are not used yet\n"
},
{
"from": "human",
"value": "module ThorTropo\n class Configuration < Thor\n\n no_commands {\n\n require 'pathname'\n require 'yaml'\n\n attr_reader :bucket_name, :aws_secret, :aws_key, :project_n... | ruby | chosen |
[
{
"from": "system",
"value": "Make RSpec emit colored output no matter what\n\nWe thought concourse-filter was swallowing color codes.\n\nIt was not. Instead, they were not emitted on CI.\n\n[#133046105]\n"
},
{
"from": "human",
"value": "require 'bundler/setup'\nrequire 'machete'\nrequire 'mach... | ruby | chosen |
[
{
"from": "system",
"value": "Use VERSION from the sources directly\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'chef-handler-mail'\n s.version = '0.1'\n s.platform = Gem::Platform::RUBY\n s.summary = \"Chef report handler that uses pony to send an email\"\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for id bug.\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass DeckTest < Minitest::Test\n def test_construct_deck\n deck = Anki::Deck.new 'TestDeck'\n\n assert(deck, 'deck should exist')\n assert_equal('TestDeck', deck.name, 'name ... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.