conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Use core's config validator instead of local\n"
},
{
"from": "human",
"value": "require 'vcloud'\n\nmodule Vcloud\n class ConfigLoader\n\n def load_config(config_file, schema = nil)\n input_config = YAML::load(File.open(config_file))\n\n # There is no ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix license setting in gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'poseidon/version'\n\nGem::Specification.new do |gem|\n gem.nam... | ruby | chosen |
[
{
"from": "system",
"value": "Allow specifying the path to libgit2, but fallback to the included version.\n"
},
{
"from": "human",
"value": "require 'mkmf'\n\nRbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC']\n\n$CFLAGS << \" #{ENV[\"CFLAGS\"]}\"\n$CFLAGS << \" -g\"\n\nif RbConfig::MAKEFI... | ruby | chosen |
[
{
"from": "system",
"value": "Fix calling the callback block\n\nexecute_block_on_receiver was all that was missing to make it work ^^ @tarcieri"
},
{
"from": "human",
"value": "module Celluloid\n module DNS\n class Server\n # Maximum UDP packet we'll accept\n MAX_PACKET_SIZE = 512\... | ruby | chosen |
[
{
"from": "human",
"value": "Add script for making a CSV of data about submitted courses\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\n# This can be run in the rails console to get a CSV for evaluating unsubmitted courses\n\nrequire 'csv'\n\nCSV.open(\"/home/sage/unsubmitted-... | ruby | chosen |
[
{
"from": "human",
"value": "Add console script used to mass-change content expert for courses\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\n# This can be used to shift all of one Content Expert's courses to another,\n# for a certain campaign.\nold_id = User.find_by(username:... | ruby | chosen |
[
{
"from": "system",
"value": "Record: Remove old associations with matches and teams.\n"
},
{
"from": "human",
"value": "# lib/frecon/models/record.rb\n#\n# Copyright (C) 2014 Christopher Cooper, Sam Craig, Tiger Huang, Vincent Mai, Sam Mercier, and Kristofer Rye\n#\n# This file is part of FReCo... | ruby | chosen |
[
{
"from": "system",
"value": "Check for GCC before adding GCC-specific flags\n"
},
{
"from": "human",
"value": "require 'mkmf'\n\nif RUBY_VERSION < \"2.0\"\n STDERR.print(\"Ruby version is too old\\n\")\n exit(1)\nend\n\n$CFLAGS = '-Wall -Werror'\n$CFLAGS += ' -g3' if ENV['debug']\n\ndir_confi... | ruby | chosen |
[
{
"from": "human",
"value": "Add script to import May 2014 local election results\n"
},
{
"from": "gpt",
"value": "# load 2014 council results\n\nrequire './models'\nrequire 'csv'\nrequire 'pp'\n\nDataMapper::Model.raise_on_save_failure = true\n\n@found = 0\n\nCSV.foreach(ARGV.shift, :headers =>... | ruby | chosen |
[
{
"from": "human",
"value": "Add test script for preshrink accuracy testing\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env ruby\n\n`convert --version`\n`./imageflow_tool --version`\n\n`./fetch_images.sh`\n\n`mkdir -p preshrink`\nEXEPATH = \"./\"\nIMAGEPATH = \"./source_images/\"\nOUTPATH =\"./p... | ruby | chosen |
[
{
"from": "system",
"value": "Use our own email regex\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nmodule Pragma\n module Devise\n module Token\n module Contract\n class Create < Pragma::Contract::Base\n property :email\n property :password\... | ruby | chosen |
[
{
"from": "system",
"value": "Check connection options for correct collation\n"
},
{
"from": "human",
"value": "RSpec.shared_examples 'Database Schema' do\n context 'AAF shared implementation' do\n RSpec::Matchers.define :have_collation do |expected|\n match { |actual| actual[:Collation... | ruby | chosen |
[
{
"from": "system",
"value": "Update initialize method and add new attr_readers to pass new tests.\n"
},
{
"from": "human",
"value": "module SalesforceBulk\n class QueryResultCollection < Array\n \n attr_reader :client\n attr_reader :currentIndex\n attr_reader :batchId\n attr_rea... | ruby | chosen |
[
{
"from": "system",
"value": "Update to clearup ruby deprecation warning\n"
},
{
"from": "human",
"value": "\nSfnRegistry.register(:block_mapping) do |_config|\n _config = _config.dup\n _config[:device_name] ||= nil\n _config[:no_device] ||= nil\n _config[:virtual_name] ||= nil\n _co... | ruby | chosen |
[
{
"from": "system",
"value": "Check for HTTP_SPREE_STORE instead of SPREE_STORE\n"
},
{
"from": "human",
"value": "module SpreeMultiDomain\n module MultiDomainHelpers\n def self.included(receiver)\n receiver.send :helper, 'spree/products'\n receiver.send :helper, 'spree/taxons'\n\n... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for custom step adapters"
},
{
"from": "gpt",
"value": "RSpec.describe \"Custom step adapters\" do\n let(:transaction) {\n Dry.Transaction(container: container, step_adapters: Test::CustomStepAdapters) do\n map :process\n tee :persist\n en... | ruby | chosen |
[
{
"from": "system",
"value": "Make the single failing spec pending for now to see whether the auto deploy script does anything.\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe ChampaignQueue::Clients::Sqs do\n context \"with SQS_QUEUE_URL\" do\n it \"delivers payload to... | ruby | chosen |
[
{
"from": "system",
"value": "Change example descriptions to be more consistent\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nshared_examples 'IceNine::Freezer::Range.deep_freeze' do\n it 'returns the object' do\n should be(value)\n end\n\n it 'freezes the object' do\n expect ... | ruby | chosen |
[
{
"from": "system",
"value": "Add ask for rails version\n"
},
{
"from": "human",
"value": "envrc = <<-EOL\n RED='\\033[0;31m'\n NC='\\033[0m'\n WHITE='\\033[1;37m'\n CYAN='\\033[0;36m'\n\n export ENABLE_LIVE_RELOAD=true\n export PROJECT_RUBY_VERSION=`cat ./.ruby-version`\n\n printf \"${WH... | ruby | chosen |
[
{
"from": "human",
"value": "Add basic sync check for Consultations\n"
},
{
"from": "gpt",
"value": "module SyncChecker::Formats\n class ConsultationCheck < EditionBase\n def rendering_app\n Whitehall::RenderingApp::WHITEHALL_FRONTEND\n end\n\n def root_path\n '/government/co... | ruby | chosen |
[
{
"from": "system",
"value": "Package version is increased from 1.2.0.0 to 1.2.0.1\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'evt-schema'\n s.summary = \"Primitives for schema and data structure\"\n s.version = '1.2.0.0'\n s.descri... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor masquerade! method to remove duplication\n"
},
{
"from": "human",
"value": "module Devise\n module Models\n module Masqueradable\n def self.included(base)\n base.class_eval do\n attr_reader :masquerade_key\n\n include Insta... | ruby | chosen |
[
{
"from": "system",
"value": "Update to create a name for a schema from repo\n"
},
{
"from": "human",
"value": "class PopulateExistingSchemaData < ActiveRecord::Migration[5.0]\n def up\n\n Dataset.skip_callback(:update, :after, :update_in_github)\n\n Dataset.all.each do |dataset|\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Add basic validators to the Tag model.\n"
},
{
"from": "human",
"value": "class Tag\n include Mongoid::Document\n field :tag_id, :type => String\n field :title, :type => String\n field :tag_type, :type => String #TODO: list of accepted types?\n\n index :tag_id,... | ruby | chosen |
[
{
"from": "system",
"value": "Change age comparison to include AGE_OF_ADULTHOOD itself\n"
},
{
"from": "human",
"value": "module OrphanHelper\n def child_or_adult?(orphan)\n orphan.age_in_years > Orphan::AGE_OF_ADULTHOOD ? \"adult\" : \"child\"\n end\nend\n"
},
{
"from": "gpt",
... | ruby | chosen |
[
{
"from": "system",
"value": "Stop trying to save new Event before EventInstance validation\n\nBy building the `Event` but not saving it, we’re now allowing it to get\nautosaved when the `EventInstance` is successfully saved in future,\nrather than pre-emptively trying to save it during the\n`before_validat... | ruby | chosen |
[
{
"from": "system",
"value": "Change sudo to full path to ifconfig binary\n"
},
{
"from": "human",
"value": "# lib/vagrant-ip-show/command.rb\nmodule Vagrant\n module IpShow\n class Command < Vagrant.plugin('2', :command)\n\n def execute\n # Execute the actual... | ruby | chosen |
[
{
"from": "system",
"value": "Support for retrieving commits on project update"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n\nrequire 'ghtorrent'\n\n# Update repos en masse\nclass GHTUpdateRepos < MultiprocessQueueClient\n def clazz\n GHTRepoUpdater\n end\nend\n\n# Initialize a rep... | ruby | chosen |
[
{
"from": "human",
"value": "Add task to reset Orders inside a specific Order Cycle by repeating the\nplacement job\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nnamespace :ofn do\n namespace :subs do\n desc \"Repeat placement job for a specific Order Cycle\"\n task re... | ruby | chosen |
[
{
"from": "system",
"value": "Clear the current double after each test.\n"
},
{
"from": "human",
"value": "RSpec.configure do |config|\n config.include VerifiedDouble::Matchers\n\n config.before do\n self.extend VerifiedDouble::RSpecMocksSyntaxOverrides\n end\n\n config.after do\n Veri... | ruby | chosen |
[
{
"from": "system",
"value": "Enable memcached in acceptance tests\n\n... because it is required as cache backend.\n\nChange-Id: I24fd3f0bcb7d230a8397ae9539840379330dbb30\n"
},
{
"from": "human",
"value": "require 'spec_helper_acceptance'\n\ndescribe 'basic neutron' do\n\n context 'default para... | ruby | chosen |
[
{
"from": "system",
"value": "Revert Home controller test to upstream\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe HomeController, type: :controller do\n render_views\n\n describe 'GET #index' do\n subject { get :index }\n\n context 'when not signed in' do\... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec file for S3Site\n"
},
{
"from": "gpt",
"value": "require 'pp' # Helps prevent an error like: 'superclass mismatch for class File'\nrequire 'bundler/setup'\nBundler.require(:default)\nrequire 'spec_helper'\nrequire './lib/everything/blog/s3_site'\n\ndescribe ... | ruby | chosen |
[
{
"from": "system",
"value": "Use path instead of url, no work with no request."
},
{
"from": "human",
"value": "module Locomotive\n module Steam\n module Middlewares\n\n class WysihtmlCss\n\n def initialize(app, opts = {})\n @app = app\n end\n\n def call(e... | ruby | chosen |
[
{
"from": "system",
"value": "Fix authenticated? with block to only evaluate content when logged_in?\n"
},
{
"from": "human",
"value": "module SinatraMore\n module WardenHelpers\n # Returns the current authenticated user\n def current_user\n warden_handler.user\n end\n\n # Logi... | ruby | chosen |
[
{
"from": "system",
"value": "Increase curl timeout to two minutes\n\nIn #165, a few users are getting time outs.\r\n\r\n```\r\n Compiling Ruby\r\n !\r\n ERROR: Command: 'set -o pipefail; curl --fail --retry 3 --retry-delay 1 --connect-timeout 3 --max-time 20 https://s3-external-1.amazonaws.com/heroku-b... | ruby | chosen |
[
{
"from": "system",
"value": "Return newspaper's sections as objects instead of a string array\n"
},
{
"from": "human",
"value": "class Liquid::NewspaperDrop < Liquid::BaseDrop\n \n def initialize(account, options = {})\n @account = account\n end\n\n def sections\n @account.sections.co... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify method arguments in Null backend\n"
},
{
"from": "human",
"value": "module Mobility\n module Backend\n class Null\n include Base\n\n def read(locale, **options); end\n def write(locale, value, **options); end\n def self.configure!(op... | ruby | chosen |
[
{
"from": "human",
"value": "Add the THrift::Metrics module to the thrift gem\n"
},
{
"from": "gpt",
"value": "require 'statsd'\n\nclass NullStatsd\n def method_missing(*)\n end\nend\n\nmodule Thrift\n module Metrics\n module Middleware\n class Timing\n class << self\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the client dependency on initialize and remove the attr_reader for it.\n"
},
{
"from": "human",
"value": "module SalesforceBulk\n class Batch\n \n attr_reader :client\n attr_accessor :data\n attr_accessor :id\n attr_accessor :jobId\n attr_a... | ruby | chosen |
[
{
"from": "system",
"value": "Remove class from method call\n"
},
{
"from": "human",
"value": "module SimCtl\n class Command\n module Create\n COMMAND = %w[xcrun simctl create]\n\n # Creates a device\n #\n # @param name [String] name of the new device\n # @param devi... | ruby | chosen |
[
{
"from": "system",
"value": "Use master branch in podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n\n s.name = \"Matcha\"\n s.version = \"0.0.1\"\n s.summary = \"A DSL for automated UI tests using EarlGrey\"\n\n s.description = <<-DESC\n\t\t\t\tA DSL for a... | ruby | chosen |
[
{
"from": "system",
"value": "Reformat max key spec for consistency\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nrequire \"spec_helper\"\n\ndescribe BSON::MaxKey do\n\n describe \"#as_json\" do\n\n let(:object) do\n described_class.new\n end\n\n it \"returns the binary da... | ruby | chosen |
[
{
"from": "human",
"value": "Add null sink, a sometimes useful sink.\n"
},
{
"from": "gpt",
"value": "require 'arc-furnace/sink'\n\nmodule ArcFurnace\n # This sink does nothing, nothing!\n class NullSink < Sink\n\n def row(row)\n #nothing\n end\n\n end\nend\n"
}
] | ruby | chosen |
[
{
"from": "system",
"value": "Add enclosing_chef_server to work with cheffish\n"
},
{
"from": "human",
"value": "require 'chef/resource/lwrp_base'\nrequire 'cheffish'\nrequire 'chef_metal'\n\nclass Chef::Resource::Machine < Chef::Resource::LWRPBase\n self.resource_name = 'machine'\n\n def init... | ruby | chosen |
[
{
"from": "system",
"value": "Add method to extract ELB names\n"
},
{
"from": "human",
"value": "require 'aws-sdk'\nrequire 'contracts'\nrequire_relative 'service'\n\nmodule Cloudstrap\n module Amazon\n class ELB < Service\n include ::Contracts::Core\n include ::Contracts::Builtin\... | ruby | chosen |
[
{
"from": "system",
"value": "Use tap instead of local variable\n"
},
{
"from": "human",
"value": "module Loady\n class AttributeArray < Array\n\n # usage:\n # aa = Loady::AttributeArray.new(['john', 'doe'])\n # aa.to_attributes([:first, :last])\n # => { first: 'john', last: 'doe' }... | ruby | chosen |
[
{
"from": "system",
"value": "Fix tiny issue with camel_case\n"
},
{
"from": "human",
"value": "# Copyright 2008 Dag Odenhall <dag.odenhall@gmail.com>\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# Yo... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor the class - break final droplist generation into two methods\n"
},
{
"from": "human",
"value": "module Archloot\n class Chest\n attr_accessor :drops_limit\n attr_reader :potential_droplist\n\n def initialize\n @drops_limit = 1\n @potenti... | ruby | chosen |
[
{
"from": "system",
"value": "Update after testing with cucumber\n"
},
{
"from": "human",
"value": "module Nexpose\n # SharedSecret class for pairing engines\n class SharedSecret\n attr_accessor :key_string\n attr_accessor :ttl\n\n def initialize(console, time_to_live)\n uri = \"... | ruby | chosen |
[
{
"from": "system",
"value": "Rename Rails initializers to useful names so they can be hooked into by external initializers.\n"
},
{
"from": "human",
"value": "require 'oauth2/provider'\n\nmodule OAuth2::Provider::Rails\n autoload :ControllerAuthentication, 'oauth2/provider/rails/controller_aut... | ruby | chosen |
[
{
"from": "system",
"value": "Update to use new method\n"
},
{
"from": "human",
"value": "require 'puppet'\nrequire 'puppet/reportallthethings/scribe_reporter'\n\nPuppet::Reports.register_report(:scribe) do\n def process\n scribe = Puppet::ReportAllTheThings::ScribeReporter.new\n scribe.l... | ruby | chosen |
[
{
"from": "system",
"value": "Fix throttled_response by redefining it on the class\n"
},
{
"from": "human",
"value": "require \"rack/attack\"\nrequire \"rack/attack/recaptcha/version\"\nrequire \"rack/attack/recaptcha/client_helper\"\nrequire \"rack/attack/recaptcha/verification_helper\"\nrequir... | ruby | chosen |
[
{
"from": "system",
"value": "Remove a bit of debug code\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nmodule Rubocop\n module Cop\n class OpMethod < Cop\n ERROR_MESSAGE = 'When defining the %s operator, name its argument other.'\n\n def inspect(file, source, tokens, sexp... | ruby | chosen |
[
{
"from": "system",
"value": "Add more flags to open command\n"
},
{
"from": "human",
"value": "module SimCtl\n class Command\n module Launch\n XCODE_HOME = `xcode-select -p`.chomp\n SUPPORTED_SCALE = [1.0, 0.75, 0.5, 0.25]\n\n # Launches a Simulator instance with the given de... | ruby | chosen |
[
{
"from": "system",
"value": "Set the default version to 4.7.1\n"
},
{
"from": "human",
"value": "require 'fcrepo_wrapper/version'\nrequire 'fcrepo_wrapper/configuration'\nrequire 'fcrepo_wrapper/settings'\nrequire 'fcrepo_wrapper/downloader'\nrequire 'fcrepo_wrapper/md5'\nrequire 'fcrepo_wrappe... | ruby | chosen |
[
{
"from": "system",
"value": "Make redis key less obscure\n"
},
{
"from": "human",
"value": "require 'redis'\n\nmodule Travis\n module Logs\n class Existence\n attr_reader :redis\n\n def initialize\n @redis = Redis.new(url: Logs.config.redis.url)\n end\n\n def occ... | ruby | chosen |
[
{
"from": "system",
"value": "Define '?' as a suffix\n"
},
{
"from": "human",
"value": "module MailForm\n\tclass Base\n\t\tinclude ActiveModel::AttributeMethods\n\t\tattribute_method_prefix 'clear_'\n\n\t\tdef self.attributes(*names)\n\t\t\tattr_accessor(*names)\n\t\t\tdefine_attribute_methods(n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix file arguments without TTY\n\nWhen using reek as part of a build process, there might not be a TTY.\nThis does not necessarily mean Ruby code is piped into reek via $stdin,\nbut reek ignores file arguments in this case. This leads to unexpected\nbehavior as the build script... | ruby | chosen |
[
{
"from": "system",
"value": "Remove incorrect plural from constant name"
},
{
"from": "human",
"value": "require 'sneakers'\nrequire 'sneakers/runner'\n\ntask :environment\n\nnamespace :sneakers do\n desc \"Start work (set $WORKERS=Klass1,Klass2)\"\n task :run do\n Sneakers.server = true\n... | ruby | chosen |
[
{
"from": "human",
"value": "Add example of problem that really can't be solved well\n"
},
{
"from": "gpt",
"value": "require 'gps3'\nrequire 'pp'\n\ngps = GPS2.new([:son_at_home, \n :have_money, \n :have_works],\n GPS::SCHOOL_OPS + \n [\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for empty Engine stats\n"
},
{
"from": "human",
"value": "class ExecJS::Xtrn::Engine\n\n Run=nil # Abstract class\n\n @@stats={c: 0}\n\n def exec(code)\n return if (code=code.to_s.strip).length==0\n result=child.say code\n result={'err'=>'Invalid JS ... | ruby | chosen |
[
{
"from": "system",
"value": "TECH-4409: Use a unique aliased method name to avoid collisions with hobosupport aliasing\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire_relative './multi_sender'\n\n# Invoca ::Array extensions\n# TODO: Once the hobo_support gem is no lo... | ruby | chosen |
[
{
"from": "system",
"value": "Allow configuration of redis connection.\n"
},
{
"from": "human",
"value": "require \"printer\"\nrequire \"redis\"\nrequire \"redis/namespace\"\n\nmodule Printer::DataStore\n def self.redis\n @redis ||= Redis::Namespace.new(:printer, redis: Redis.new)\n end\nen... | ruby | chosen |
[
{
"from": "system",
"value": "Fix readable validator on nil value case\n"
},
{
"from": "human",
"value": "require \"active_model\"\n\nclass ReadableValidator < ActiveModel::EachValidator\n def validate_each(record, attribute, value)\n unless File.readable?(value)\n record.errors.add(att... | ruby | chosen |
[
{
"from": "system",
"value": "Print human readable error messages.\n"
},
{
"from": "human",
"value": "class SettingsValidator\n class SettingsValidator::ValidationError < ::StandardError; end\n\n def validate!\n settings_validations_wrapper = SettingsValidationWrapper.new\n unless settin... | ruby | chosen |
[
{
"from": "system",
"value": "Document weekly_commits as default task\n"
},
{
"from": "human",
"value": "require 'thor'\nrequire 'colorize'\nrequire 'active_support/all'\n\nmodule WeeklyCommits\n class CLI < Thor\n package_name 'Weekly Commits'\n default_task :weekly_commits\n\n desc '... | ruby | chosen |
[
{
"from": "system",
"value": "Store the locale in a permanent cookie\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nrequire 'active_support/concern'\n\nmodule MultiLingualizable\n extend ActiveSupport::Concern\n\n included { before_action :set_locale }\n\n class_methods do\... | ruby | chosen |
[
{
"from": "system",
"value": "Add factories for different types of unpublishing\n\nThis makes it a bit clearer what the main variations of an unpublishing are.\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n factory :unpublishing do\n unpublishing_reason_id UnpublishingReason::Pub... | ruby | chosen |
[
{
"from": "system",
"value": "Enable simultaneous test runs by interpolating TEST_ENV_NUMBER into simplecov's dir name\n\nOtherwise, the test runners overwrite each other's coverage data, producing false negatives.\n\nTEST_ENV_NUMBER is the variable used in parallel_tests for database names, etc.\n"
},
... | ruby | chosen |
[
{
"from": "system",
"value": "Add GreenListImport in import test\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass TestWdpaImporter < ActiveSupport::TestCase\n test '.import creates a WDPA Release, imports the protected areas from\n it, generates downloads for the imported PAs... | ruby | chosen |
[
{
"from": "human",
"value": "Add missing specs for UPDATE\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nrequire 'spec_helper'\n\n# rubocop:disable RSpec/RepeatedExampleGroupBody\ndescribe Gql::Runtime::Functions::Update, :etsource_fixture do\n let(:gql) { Scenario.default.gq... | ruby | chosen |
[
{
"from": "system",
"value": "Rename variable to represent type\n\nper comments from CR\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire_relative \"../../test_helper\"\n\nclass ApplicationMailbox < ActionMailbox::Base\n routing \"replies@example.com\" => :replies\nend... | ruby | chosen |
[
{
"from": "system",
"value": "Order games in admin by creation date\n"
},
{
"from": "human",
"value": "class Tournaments::GamesController < ApplicationController\n before_filter :find_tournament_and_games\n before_filter :require_owner!\n\n layout 'tournament_title', :only => [:index]\n\n de... | ruby | chosen |
[
{
"from": "system",
"value": "Add contact details to api_subjects table\n\nAn API user needs a contactable person in the event that we need to get\nin touch about something.\n"
},
{
"from": "human",
"value": "class CreateAPISubjects < ActiveRecord::Migration\n def change\n create_table :api_... | ruby | chosen |
[
{
"from": "system",
"value": "Add upload field configuration options."
},
{
"from": "human",
"value": "require \"formalist/element\"\nrequire \"formalist/elements\"\nrequire \"formalist/types\"\n\nmodule Formalist\n class Elements\n class UploadField < Field\n attribute :presign_url, Ty... | ruby | chosen |
[
{
"from": "system",
"value": "Raise error correctly on database timeout\n"
},
{
"from": "human",
"value": "Puppet::Type.type(:mongodb_database).provide(:mongodb) do\n\n desc \"Manages MongoDB database.\"\n\n defaultfor :kernel => 'Linux'\n\n commands :mongo => 'mongo'\n\n def block_until_mon... | ruby | chosen |
[
{
"from": "system",
"value": "Make mutant happy but me unhappy\n\nI considered using `prepend` to initialize\n@unpublished_events = []\ninstead of using the lazy load pattern:\n\n def unpublished_events\n @unpublished_events ||= []\n end\n\nbut I decided the overhead is not worth it.\nAlthough we coud ... | ruby | chosen |
[
{
"from": "system",
"value": "Add comments to the MemoryKiller middleware\n"
},
{
"from": "human",
"value": "module Gitlab\n module SidekiqMiddleware\n class MemoryKiller\n # Wait 30 seconds for running jobs to finish during graceful shutdown\n GRACEFUL_SHUTDOWN_WAIT = 30\n\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add the styles to the head of every pages\n"
},
{
"from": "gpt",
"value": "module Jekyll\n class SocialIconsStyles\n HEAD_END_TAG = %r!</.*head>!\n\n class << self\n def add_styles(doc)\n @config = doc.site.config\n if doc.output =~ HEAD_END... | ruby | chosen |
[
{
"from": "system",
"value": "Use attributes before fetching endpoint for HasOne association\n"
},
{
"from": "human",
"value": "module ObjectJSONMapper\n module Associations\n class HasOne < Association\n # @param object [ObjectJSONMapper::Base]\n # @return [ObjectJSONMapper::Base]... | ruby | chosen |
[
{
"from": "human",
"value": "Add KDEBase Runtime 4.4.2 package.\n"
},
{
"from": "gpt",
"value": "require 'formula'\n\nclass KdebaseRuntime <Formula\n url 'ftp://ftp.kde.org/pub/kde/stable/4.4.2/src/kdebase-runtime-4.4.2.tar.bz2'\n homepage ''\n md5 'd46fca58103624c28fcdf3fbd63262eb'\n\n depe... | ruby | chosen |
[
{
"from": "human",
"value": "[COOK-3520] Add support for nginx spdy module\n\nSigned-off-by: Seth Vargo <81550dbf04dfd8537ff7b3c014c6fbf86e0889dc@gmail.com>\n"
},
{
"from": "gpt",
"value": "#\n# Cookbook Name:: nginx\n# Recipe:: http_spdy_module\n#\n# Author:: Christoph Buente (<christoph@meinek... | ruby | chosen |
[
{
"from": "system",
"value": "Add model to three_photos decent exposure definition"
},
{
"from": "human",
"value": "# -*- encoding : utf-8 -*-\nclass PhotosController < ApplicationController\n\n before_filter :authenticate_user!, :only => [:edit, :create, :update, :destroy]\n before_filter :en... | ruby | chosen |
[
{
"from": "system",
"value": "Deal with Travis CI's out-of-date bundler\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path(\"../lib\", __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire \"contribution-checker/version\"\n\nGem::Specification.new do... | ruby | chosen |
[
{
"from": "system",
"value": "Use LocalizedURI factory for MDUI::Logo\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n factory :mdui_logo, class: 'MDUI::Logo' do\n uri { Faker::Internet.url }\n width { Faker::Number.number(3).to_i + 1 }\n height { Faker::Number.number(3).to_i... | ruby | chosen |
[
{
"from": "system",
"value": "Fix spec for single send\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Notifiable::Mpns::Nverinaud::SingleNotifier do\n \n let(:m) { Notifiable::Mpns::Nverinaud::SingleNotifier.new }\n let(:n) { Notifiable::Notification.create(:message => \... | ruby | chosen |
[
{
"from": "system",
"value": "Remove aequitas dependency and replace with active_model\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'sirius/version'\n\nGem::Specification.new do |s... | ruby | chosen |
[
{
"from": "system",
"value": "Extend the contacts filtering specs to include filter by topic\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe \"Contacts\" do\n include Public::ContactSteps\n\n let!(:contact) { create(:phone_number).contact }\n let!(:contact2) { create(:p... | ruby | chosen |
[
{
"from": "human",
"value": "Add specs for pull request commands.\n"
},
{
"from": "gpt",
"value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\ndescribe GithubCLI::Commands::PullRequests do\n let(:format) { 'table' }\n let(:user) { 'peter-murach' }\n let(:repo) { 'github_cli' }\n let(:n... | ruby | chosen |
[
{
"from": "human",
"value": "Add init test for ProjectSearchResults\n\nSee: https://github.com/gitlabhq/gitlabhq/pull/9368#issuecomment-110350335\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe Gitlab::ProjectSearchResults do\n let(:project) { create(:project) }\n let(:query... | ruby | chosen |
[
{
"from": "human",
"value": "Add a task to update the javascripts, stylesheets, and images.\n\ngit-svn-id: 7d09e6df4b9423bb20f6c573f7d9e22c4bc008cb@36 d0c04531-ac40-0410-8933-672d1753f5b6\n"
},
{
"from": "gpt",
"value": "namespace :datepicker do\n require 'fileutils'\n \n desc \"Replace th... | ruby | chosen |
[
{
"from": "system",
"value": "Remove recursion and turn Factory into an iterator"
},
{
"from": "human",
"value": "module CertificateFactory\n\n class Factory\n include HTTParty\n format :xml\n\n attr_reader :count\n\n def initialize(options)\n @url = options[:feed]\n @limi... | ruby | chosen |
[
{
"from": "system",
"value": "Add config to gemspec files, specify mongoid version.\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = \"mongoid_alize\"\n s.version = \"0.2.0\"\n s.author = \"Josh Dzielak\"\n s.email = \"github_public@dz.oib.com... | ruby | chosen |
[
{
"from": "system",
"value": "Change the output of Exif.creation_date to be a DateTime rather than a raw string\n"
},
{
"from": "human",
"value": "require_relative 'exif_reader'\nrequire_relative 'exif_jpeg'\n\nmodule FileData\n # Convenience class for extracting exif data from a file or stream... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary utf-8 encoding comment\n"
},
{
"from": "human",
"value": "#!/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -W0 -EUTF-8:UTF-8\n# encoding: UTF-8\n\n#: * `cu` [`options`]\n#: Upgrade every outdated app installed by `brew cas... | ruby | chosen |
[
{
"from": "system",
"value": "Allow template variables to be set as nil\n\nThis is needed so that erb files do not have :blocks set sometimes but\nnil at other times. Without this change if an erb file is processed\nbefore a documentation page, blocks will (and other related vars) will be\nnil while after d... | ruby | chosen |
[
{
"from": "human",
"value": "Add test for 'week_range' dashboards helper method\n"
},
{
"from": "gpt",
"value": "require 'test_helper'\n\nclass DashboardsHelperTest < ActionView::TestCase\n\n describe 'week_range method' do\n it 'should return current date range' do \n first_day_of_week... | ruby | chosen |
[
{
"from": "system",
"value": "Use multiple lines for complex guard\n"
},
{
"from": "human",
"value": "module Mutant\n class Mutator\n class Node\n # Generic mutator\n class Generic < self\n\n handle(:self)\n\n # These nodes still need a dedicated mutator, your contrib... | ruby | chosen |
[
{
"from": "system",
"value": "Send activation email to the right address\n"
},
{
"from": "human",
"value": "class OnboardingMailer < ApplicationMailer\n def onboarding_email\n @school_onboarding = params[:school_onboarding]\n make_bootstrap_mail(to: @school_onboarding.contact_email, subje... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.