conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add a shutdown method to Resque instrumentation to ensure data is saved\n\nSigned-off-by: Justin George <26962c8b46ccf1e15704afec3ad512e5c5878696@gmail.com>\n"
},
{
"from": "human",
"value": "module Resque\n module Plugins\n module NewRelicInstrumentation\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix destination path for database.yml for gitlab\n"
},
{
"from": "human",
"value": "require \"rails/generators\"\n\nmodule Suspenders\n class CiGenerator < Rails::Generators::Base\n source_root File.expand_path(\n File.join(\"..\", \"..\", \"..\", \"templat... | ruby | chosen |
[
{
"from": "system",
"value": "Add one more assertion to StringTest\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass StringTest < Minitest::Test\n def test_set_param_positive\n url = 'https://www.example.com/$[name]/intro'\n assert_equal('https://www.example.com/acme/intro... | ruby | chosen |
[
{
"from": "human",
"value": "Add test for existing server hostname parsing\n"
},
{
"from": "gpt",
"value": "require 'helper'\nrequire 'memcached_mock'\n\ndescribe Dalli::Server do\n describe 'hostname parsing' do\n it 'handles no port or weight' do\n s = Dalli::Server.new('localhost')\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix dummy test app path\n"
},
{
"from": "human",
"value": "ENV['RAILS_ENV'] ||= 'test'\n\nbegin\n require File.expand_path(\"../dummy/config/environment\", __FILE__)\nrescue LoadError\n puts \"Could not load dummy application. Please ensure you have run `bundle ex... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Rubocop lints in IdWithExtraneousSelector\n\nChange-Id: Ib06958a78c715c01349fa38db793565fdfa771d9\nReviewed-on: http://gerrit.causes.com/36710\nTested-by: jenkins <d95b56ce41a2e1ac4cecdd398defd7414407cc08@causes.com>\nReviewed-by: Shane da Silva <6f6e68d1df92f30cb4b3ce35260... | ruby | chosen |
[
{
"from": "system",
"value": "Set default role for new user to \"user\".\n\n"
},
{
"from": "human",
"value": "module Spree\n User.class_eval do\n has_many :devices, class_name: \"Devices\"\n end\nend\n"
},
{
"from": "gpt",
"value": "module Spree\n User.class_eval do\n after_... | ruby | chosen |
[
{
"from": "system",
"value": "Delete pictures, when galleries are deleted.\n"
},
{
"from": "human",
"value": "class Gallery < ActiveRecord::Base\n has_many :pictures\n\n after_initialize do\n if new_record?\n self.slug ||= Base64.encode64(UUIDTools::UUID.random_create)[0..7]\n end\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix overriding of an on call shift"
},
{
"from": "human",
"value": "class OnCall < ActiveRecord::Base\n\n def self.update_period(start_date, end_date)\n Time.zone = \"Asia/Jerusalem\"\n start_time = Time.zone.parse(start_date.to_s) + (10.5).hours\n end_tim... | ruby | chosen |
[
{
"from": "human",
"value": "Fix memory leak when queuing jobs inside a job\n\nActive Job uses a single log subscriber class[1] for both perform and\nenqueue events. The consequence of this is that any queue events that\nhappen inside a perform event are treated as child events[2] and so get\nadded to the e... | ruby | chosen |
[
{
"from": "system",
"value": "Use an ordinary HttpCheck until the upstream SolrCheck is updated to support solr 7\n"
},
{
"from": "human",
"value": "require 'okcomputer'\nrequire 'uri'\n\nOkComputer.mount_at = 'status' # use /status or /status/all or /status/<name-of-check>\nOkComputer.check_in_... | ruby | chosen |
[
{
"from": "system",
"value": "Change order of methods, add options attribute."
},
{
"from": "human",
"value": "module Ctrlo\n class ExternalBoard\n include Helpers\n\n def initialize(external_id = nil)\n @external_id = external_id\n end\n\n def self.fetch_all\n new.fetch_a... | ruby | chosen |
[
{
"from": "system",
"value": "Add after_reposition_location method to ResourcesController::ActsAsListConcern.\n"
},
{
"from": "human",
"value": "module ResourcesController\n module ActsAsListConcern\n extend ActiveSupport::Concern\n\n def reposition\n @resource = load_resource\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Stop etags fresh_when development_hack is true\n"
},
{
"from": "human",
"value": "class Ettu\n class Railtie < Rails::Railtie\n config.ettu = ActiveSupport::OrderedOptions.new\n\n initializer 'load' do |app|\n\n unless app.config.ettu.disabled\n r... | ruby | chosen |
[
{
"from": "system",
"value": "Add methods to check which environment we are running in\n"
},
{
"from": "human",
"value": "require \"instana/version\"\nrequire 'instana/logger'\nrequire \"instana/util\"\n\nmodule Instana\n class << self\n attr_accessor :agent\n attr_accessor :collectors\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add Red Amber Green stats to Sidekiq endpoint"
},
{
"from": "human",
"value": "require 'sidekiq/web'\n\nif ENV['SIDEKIQ_USERNAME'] && ENV['SIDEKIQ_PASSWORD']\n Sidekiq::Web.use Rack::Auth::Basic do |username, password|\n username == ENV['SIDEKIQ_USERNAME'] && pa... | ruby | chosen |
[
{
"from": "system",
"value": "Configure route for error page.\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n root 'home#show'\n\n scope '/:locale' do\n resource :styleguide,\n controller: 'styleguide',\n only: 'show',\n cons... | ruby | chosen |
[
{
"from": "system",
"value": "Hide :destination option from table summary\n"
},
{
"from": "human",
"value": "module Scan\n class Manager\n def work(options)\n Scan.config = options\n\n FastlaneCore::PrintTable.print_values(config: options, hide_keys: [], title: \"Summary\")\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add five more labels (see comment)\n\nFormal, technical, then three children of technical: medical, legal, scientific\n"
},
{
"from": "human",
"value": "\nnamespace :data do\n task :run => [:clean, :make_labels]\n\n task :clean => [\"db:mongoid:remove_undefined_in... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Yajl backend discovery in ActiveSupport::JSON\n\n[#4897 state:committed]\n\nSigned-off-by: Jeremy Kemper <b3f594e10a9edcf5413cf1190121d45078c62290@bitsweat.net>\n"
},
{
"from": "human",
"value": "require 'yajl-ruby' unless defined?(Yajl)\n\nmodule ActiveSupport\... | ruby | chosen |
[
{
"from": "system",
"value": "Use actual true/false for toggle switch\n"
},
{
"from": "human",
"value": "module Motion\n module Settings\n class Configuration\n attr_reader :preferences\n\n def initialize(&block)\n @preferences = []\n block.call(self)\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use config digest to fingerprint assets\n"
},
{
"from": "human",
"value": "RacingOnRails::Application.configure do\n config.action_controller.perform_caching = true\n config.action_dispatch.x_sendfile_header = \"X-Accel-Redirect\"\n config.active_support.deprecat... | ruby | chosen |
[
{
"from": "system",
"value": "Fix link for XRoxy provider\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule ProxyFetcher\n module Providers\n # XRoxy provider class.\n class XRoxy < Base\n # Provider URL to fetch proxy list\n def provider_url\n \"... | ruby | chosen |
[
{
"from": "system",
"value": "Add a comment to the memory cache documentation."
},
{
"from": "human",
"value": "module Pseudocephalopod\n class MemoryCache\n \n def self.write(key, value, options = {})\n cache[key.to_s] = value\n end\n \n def self.read(key)\n cache[key.... | ruby | chosen |
[
{
"from": "system",
"value": "Encoding: Expand fixtures file for InvalidByteSequenceError\n"
},
{
"from": "human",
"value": "module EncodingSpecs\n class UndefinedConversionError\n def self.exception\n ec = Encoding::Converter.new('utf-8','ascii')\n begin\n ec.convert(\"\\u{... | ruby | chosen |
[
{
"from": "system",
"value": "Update ownCloud detector to also cover 6.*"
},
{
"from": "human",
"value": "\nmodule Versionator\n module Detector\n # Detects {ownCloud}[http://owncloud.org/].\n class Owncloud < Base\n set :app_name, \"ownCloud\"\n set :project_url, \"https://ownc... | ruby | chosen |
[
{
"from": "system",
"value": "Include Localizable.strings file in podspec\n\nWithout this, accessibility labels aren't being set with properly formatted localized strings"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\ns.name = 'ESTabBarController-swift'\ns.version ... | ruby | chosen |
[
{
"from": "system",
"value": "Add a real gem description\n\nSigned-off-by: Steven Hoffman <46f1a0bd5592a2f9244ca321b129902a06b53e03@fustrate.com>\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec to pull in SSZipArchive directly\n\nThis also eliminate the need to manually add libiconv and Security.framework.\n"
},
{
"from": "human",
"value": "require 'json'\n\npackage = JSON.parse(File.read(File.join(__dir__, 'package.json')))\n\nPod::Spec.new... | ruby | chosen |
[
{
"from": "system",
"value": "Add Search::Index.index in explcitly to import as a result of\n\nthe search refactor that has index creation and index indexing as two\nseparate steps now\n"
},
{
"from": "human",
"value": "class ImportWorkers::FinaliserWorker\n include Sidekiq::Worker\n sidekiq_o... | ruby | chosen |
[
{
"from": "system",
"value": "Access node attributes in a consistent manner\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: drupal-codeception\n# Attributes:: default\n#\n# Copyright (C) 2014 Alex Knoll Alex@AlexKnoll.com\n#\n# Licensed under the Apache License, Version 2.0 (the \"Licens... | ruby | chosen |
[
{
"from": "system",
"value": "Drop a temporary table before end of a test case\n"
},
{
"from": "human",
"value": "require \"abstract_unit\"\nrequire \"action_dispatch\"\nrequire \"active_record\"\n\nclass JsonParamsParsingTest < ActionDispatch::IntegrationTest\n test \"prevent null query\" do\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add column information reload to fix migration path.\n"
},
{
"from": "human",
"value": "class SeedAssetBookingTemplates < ActiveRecord::Migration\n def self.up\n BookingTemplate.create!([\n {:code => \"asset:activate\", :title => \"Aktivierung\", :debit_acc... | ruby | chosen |
[
{
"from": "system",
"value": "Raise exception in dev if there are unpermitted attributes\n"
},
{
"from": "human",
"value": "RacingOnRails::Application.configure do\n config.action_controller.perform_caching = false\n config.action_mailer.raise_delivery_errors = false\n config.ac... | ruby | chosen |
[
{
"from": "human",
"value": "Fix the TOTAL stats... but not dupes :\\"
},
{
"from": "gpt",
"value": "require 'rubygems'\nrequire 'time'\nrequire 'sqlite3'\n\ndb = SQLite3::Database.new('data.sqlite3')\n\nlinks_hash = {}\nlinks = []\nusers = {}\n\n# Clear the stats\ndb.execute(\"update stats set ... | ruby | chosen |
[
{
"from": "human",
"value": "Add local links for Test and Trace scheme\n\nWhat\n\nWe need to add the local authority links for the test and trace scheme\nself isolation payments.\n\nThe rake task takes 3 params: LGSL code, LGIL code and a filename. The\nfile to which the filename points to must be a CSV fil... | ruby | chosen |
[
{
"from": "system",
"value": "Test `ShareWorker`'s handling of unhandled exceptions\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'rails_helper'\n\ndescribe ShareWorker do\n let(:user) { FactoryBot.create(:user) }\n let(:answer) { FactoryBot.create(:answer, user: ... | ruby | chosen |
[
{
"from": "human",
"value": "Add the podspec file for cocoapods\n"
},
{
"from": "gpt",
"value": "Pod::Spec.new do |s|\n s.name = 'TGLStackedViewController'\n s.version = '0.0.1'\n s.license = 'MIT'\n s.summary = 'A stacked view layout with gesture-based reordering using a UICollection... | ruby | chosen |
[
{
"from": "system",
"value": "Add home page to gemspec\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = \"tinymce-rails-langs\"\n s.version = \"4.20130625\"\n s.summary = \"Additional language packs for tinymce-rails.\"\n s.description = \"Additional language packs... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade dependencies by removing version restrictions\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'html-conditional-comment/version'\n\nGem::Specific... | ruby | chosen |
[
{
"from": "system",
"value": "Use factory bot to make a harvest.plant_part\n"
},
{
"from": "human",
"value": "# Read about factories at https://github.com/thoughtbot/factory_bot\n\nFactoryBot.define do\n factory :harvest do\n crop { planting.present? ? planting.crop : FactoryBot.create(:crop... | ruby | chosen |
[
{
"from": "system",
"value": "Stop using 'track_id' in sample data for test\n"
},
{
"from": "human",
"value": "FactoryBot.define do\n factory :podcast, class: Podcast do\n track_id { 123 }\n title { 'title' }\n description { 'description' }\n content_size { 0 }\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix up feedback table name in migration 067.\n"
},
{
"from": "human",
"value": "class RemoveBlogIds < ActiveRecord::Migration\n class Content < ActiveRecord::Base\n set_inheritance_column :bogustype\n end\n\n class Feedback < ActiveRecord::Base\n end\n\n cla... | ruby | chosen |
[
{
"from": "human",
"value": "Add validation tests to Rating model spec\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\nRSpec.describe Rating, type: :model do\n let(:rating) { Rating.new(stars: 4, user_id: User.first.id, film_id: Film.last.id) }\n\n describe 'validations' do\n it ... | ruby | chosen |
[
{
"from": "human",
"value": "Test if a review belongs to a user\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\nRSpec.describe Review, type: :model do\n before(:each) do\n @stub_post = build_stubbed(:post)\n @stub_review = build_stubbed(:review)\n end\n\n it \"belongs to a us... | ruby | chosen |
[
{
"from": "system",
"value": "Add test to check rspec matcher can fail\n"
},
{
"from": "human",
"value": "require 'spec_helper'\ninclude Capybara::DSL\n\ndescribe 'rspec matcher' do\n\n before(:all) do\n @black_box = 'black.png'\n @ref_path = Gatling::Configuration.reference_image_path = ... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor test for more redability\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe Sara::Callback do\n let(:instance) do\n mod = described_class\n Class.new { include mod }.new\n end\n\n describe \".on_xxx\" do\n it \"should store g... | ruby | chosen |
[
{
"from": "system",
"value": "Stop keywords from fluttering about\n"
},
{
"from": "human",
"value": "module KeywordingHelper\n\n def manage_keywording(keywording, on_parent = false)\n link = link_to keywording.keyword.name, keywording.keyword\n link += ' '\n unless on_parent\n lin... | ruby | chosen |
[
{
"from": "system",
"value": "Add param to control rescheduling the same job\n"
},
{
"from": "human",
"value": "class ReleaseEpisodesJob < ActiveJob::Base\n\n queue_as :feeder_default\n\n def perform\n ActiveRecord::Base.connection_pool.with_connection do\n begin\n podcasts_to_r... | ruby | chosen |
[
{
"from": "system",
"value": "Include feeds_count into user presenter\n"
},
{
"from": "human",
"value": "class UserPresenter < Presenter\n attribute :id, :name, :email, :api_token, :created_at\nend"
},
{
"from": "gpt",
"value": "class UserPresenter < Presenter\n attribute :id, :nam... | ruby | chosen |
[
{
"from": "system",
"value": "Include user email data in /me resource.\n"
},
{
"from": "human",
"value": "class MeSerializer < UserSerializer\n\n attributes :total_clouds, :read_terms, :using_default_avatar, :notifications\n\n def total_clouds\n object.cloud_ids.try(:size) || 0\n end\n\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add a spec for php analyzer\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\nrequire 'cc/engine/analyzers/php/main'\nrequire 'flay'\nrequire 'tmpdir'\n\nmodule CC::Engine::Analyzers::Javascript\n describe Main do\n before { @code = Dir.mktmpdir }\n\n de... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for pages studio\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe PagesController, type: :controller do\n describe \"GET #index\" do\n\t\tbefore { get :index }\n\n\t\tit { should respond_with(200) }\n\t\tit { should render_templa... | ruby | chosen |
[
{
"from": "system",
"value": "Fix capybara waits for ajax\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nfeature 'User creates a post' do\n background do\n visit root_path\n click_i18n 'posts.new'\n end\n\n scenario 'with valid inputs' do\n fill_model_field(Tingui::Post... | ruby | chosen |
[
{
"from": "human",
"value": "Add test ASYNC with create\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nrequire 'spec_helper'\n\ndescribe 'RubyRabbitmqJanus::RRJ' do\n describe '.response', type: :request_async, name: :create do\n let(:transaction) { RubyRabbitmqJanus::RRJ.... | ruby | chosen |
[
{
"from": "system",
"value": "Add if and unless conditional procs to touch options.\n"
},
{
"from": "human",
"value": "module ActiveTouch\n class DefineTouch\n\n def self.on(klass, association, options)\n new(klass, association, options).define\n end\n\n def initialize(klass, asso... | ruby | chosen |
[
{
"from": "system",
"value": "Add a bit of readability\n"
},
{
"from": "human",
"value": "module Checkout\n class PricingStrategy\n\n def initialize(rules = RULES)\n @rules = rules\n end\n\n def calculate_price(product, quantity)\n product_rules = @rules.fetch(product) do\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add the necessary profile steps\n"
},
{
"from": "gpt",
"value": "Given /^the following profiles? (?:are|is) defined:$/ do |profiles|\n create_file('cucumber.yml', profiles)\nend\n\nThen /^the (.*) profile should be used$/ do |profile|\n last_stdout.should =~ /Using... | ruby | chosen |
[
{
"from": "system",
"value": "Add DATABASE_URL environment variable processing\n"
},
{
"from": "human",
"value": "case @config['db_adapter']\nwhen 'sqlite3'\n DataMapper.setup(:default, \"sqlite:///#{APP_PATH}/#{@config['database']}\")\nwhen 'mysql'\n DataMapper.setup(:default, \"mysql://#{@co... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for items index\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\nfeature 'Items Index' do\n scenario 'visitor visits the items index page' do\n item_1 = create(:item)\n item_2 = create(:item)\n # Our factories will have to create unique i... | ruby | chosen |
[
{
"from": "system",
"value": "Remove emails validation for Worktimes\n"
},
{
"from": "human",
"value": "require 'valid_email/email_validator'\n\nclass Record < ActiveRecord::Base\n belongs_to :user\n has_many :comments\n\n validate :date_from_lesser_than_date_to\n validate :dates_cannot_be_i... | ruby | chosen |
[
{
"from": "system",
"value": "Configure Git username and email on the cucumber's working repo to unclutter console output.\n"
},
{
"from": "human",
"value": "Given /^nothing in particular$/ do\n nil # NOP\nend\n\nWhen /^nothing happens$/ do\n nil # NOP\nend\n\nGiven /^a repository with followi... | ruby | chosen |
[
{
"from": "system",
"value": "Update AppCode EAP to version 2016.1-RC2\n\nThis commit updates the version and sha256 stanzas. It also changes\nthe app name, as the RC versions drop the EAP from the app name.\n\nAlso updated the zap stanza.\n"
},
{
"from": "human",
"value": "cask 'appcode-eap' do... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade iTerm2 Beta to 2.9.20160102\n\nupdate version\nadd version substitution for the url\n"
},
{
"from": "human",
"value": "cask 'iterm2-beta' do\n version '2.9.20151111'\n sha256 'fb1c566412656c4e9f5cfdc892a1ea960d0b3124479fd4c60dc65ce48ee37c2e'\n\n url 'http... | ruby | chosen |
[
{
"from": "system",
"value": "Fix styling error and possible error when dealing with DST.\n"
},
{
"from": "human",
"value": "\nmodule Dizby\n class TimedState\n def initialize(timeout)\n @timeout = timeout\n revive\n end\n\n def update\n previous = @last_update\n @l... | ruby | chosen |
[
{
"from": "system",
"value": "Add YARD for type constructores [skip ci]\n"
},
{
"from": "human",
"value": "module Dry\n module Types\n module BuilderMethods\n def Array(type)\n self::Array.of(type)\n end\n\n def Hash(schema, type_map)\n self::Hash.public_send(sch... | ruby | chosen |
[
{
"from": "system",
"value": "Move extraction of AMQP config to separate method\n\nMove the logic that extracts the AMQP connection options into its own\nmethod for readability.\n"
},
{
"from": "human",
"value": "module GovukSeedCrawler\n class Seeder\n def self.seed(options = {})\n amq... | ruby | chosen |
[
{
"from": "system",
"value": "Make php-redis depend upon redis\n"
},
{
"from": "human",
"value": "require 'formula'\n\nclass RedisPhp < Formula\n homepage 'https://github.com/nicolasff/phpredis'\n url 'https://github.com/nicolasff/phpredis/tarball/2.2.0'\n md5 '9a89b0aeae1906bcfdc8a80d14d6240... | ruby | chosen |
[
{
"from": "system",
"value": "Remove deprecated render nothing: true\n"
},
{
"from": "human",
"value": "class ::Admin::SettingsController < ::Admin::BaseController\n authorize_resource class: Settings\n\n defaults resource_class: Settings\n\n def update\n Settings.instance.save(params.requ... | ruby | chosen |
[
{
"from": "human",
"value": "Add my solution for Challenge 6.4 - Accessing Attributes\n"
},
{
"from": "gpt",
"value": "#Attr Methods\r\n\r\n# I worked on this challenge by myself.\r\n\r\n# I spent [#] hours on this challenge.\r\n\r\n# NameData will initialize a @name variable with your name.\r\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug of uninitialized constant RSpec::Expectations\n"
},
{
"from": "human",
"value": "require 'rspec/collection_matchers/version'\nrequire 'rspec/collection_matchers/matchers'\nrequire 'rspec/collection_matchers/have'\nrequire 'rspec/collection_matchers/rails_ext... | ruby | chosen |
[
{
"from": "system",
"value": "Add tls flag to stream:features if forcing encryption\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\n\nmodule Vines\n class Stream\n class Server\n class Start < State\n FROM = \"from\".freeze\n\n def initialize(stream, success=AuthMeth... | ruby | chosen |
[
{
"from": "human",
"value": "Add rake task for resolve support shape error\n"
},
{
"from": "gpt",
"value": "# Tenant tasks\nnamespace :shapes do\n desc 'Find invalid productions support shapes (resolve GEOSUnaryUnion: TopologyException error)'\n task find_invalid_productions: :environment do\n... | ruby | chosen |
[
{
"from": "system",
"value": "Remove redundant call to undef_method\n"
},
{
"from": "human",
"value": "require 'dry/types/decorator'\n\nmodule Dry\n module Types\n class Constructor < Definition\n include Dry::Equalizer(:type)\n\n undef_method :primitive\n\n attr_reader :fn\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix gem.license setting in the gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |gem|\n gem.name = 'ducktrap'\n gem.version = '0.0.2'\n gem.authors = [ 'Markus Schirp' ]\n gem.email = [ 'mbj@s... | ruby | chosen |
[
{
"from": "system",
"value": "Remove middleman-sprocket's file cache (pre-3.3.2) before building to ensure any erb assets use correct environment's frizz.yml values\n"
},
{
"from": "human",
"value": "require \"frizz\"\n\nmodule Frizz\n module Middleman\n module CmdHelper\n def self.run_... | ruby | chosen |
[
{
"from": "system",
"value": "Update rake requirement from ~> 10.0 to ~> 13.0\n\nUpdates the requirements on [rake](https://github.com/ruby/rake) to permit the latest version.\n- [Release notes](https://github.com/ruby/rake/releases)\n- [Changelog](https://github.com/ruby/rake/blob/master/History.rdoc)\n- [... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade Mapbox Studio to v0.1.5\n\nThe latest version addresses bugs\nrelated to atom-shell integration.\n\nFor a full list of changes, see\nhttps://github.com/mapbox/mapbox-studio/blob/mb-pages/CHANGELOG.md#changelog\n"
},
{
"from": "human",
"value": "class MapboxS... | ruby | chosen |
[
{
"from": "system",
"value": "Work around Dir.mktmpdir problems on Windows\n"
},
{
"from": "human",
"value": "require \"minitest_helper\"\nrequire \"airbrussh/log_file_formatter\"\nrequire \"tempfile\"\n\nclass Airbrussh::LogFileFormatterTest < Minitest::Test\n def setup\n @file = Tempfile.n... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up Sources::Github.new by adding a helper method.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire \"how_is/version\"\nrequire \"how_is/sources\"\nrequire \"okay/graphql\"\n\nmodule HowIs\n module Sources\n # Contains configurati... | ruby | chosen |
[
{
"from": "system",
"value": "Write test for clicking on a new item link\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass ItemsControllerTest < ActionDispatch::IntegrationTest\n # test \"the truth\" do\n # assert true\n # end\nend\n"
},
{
"from": "gpt",
"value":... | ruby | chosen |
[
{
"from": "system",
"value": "Edit message when set the iTunes playlist\n"
},
{
"from": "human",
"value": "module PlaylistManager\n def self.playlist\n @temp_playlist || default_user_playlist || music_master_library\n end\n\n def self.set_playlist\n loop do\n playlist = HighLine.ne... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing hash key in call to super"
},
{
"from": "human",
"value": "module TwentyFourSevenOffice\n module Services\n class Authentication\n extend Savon::Model\n\n client wsdl: \"https://webservices.24sevenoffice.com/authenticate/authenticate.asmx?w... | ruby | chosen |
[
{
"from": "human",
"value": "Add a test for rendering from the controller context.\n"
},
{
"from": "gpt",
"value": "require 'abstract_unit'\n\nmodule RenderContext\n class BasicController < ActionController::Base\n self.view_paths = [ActionView::FixtureResolver.new(\n \"render_context/b... | ruby | chosen |
[
{
"from": "system",
"value": "Fix call to changed method name.\n"
},
{
"from": "human",
"value": "class RequestThrottle\n alias_method :whitelisted_original?, :whitelisted?\n def whitelisted?(request)\n if request.fullpath.to_s.start_with?(\"/health_check\") &&\n request.headers['Use... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for Spellcheck commit-msg hook\n"
},
{
"from": "gpt",
"value": "# encoding: utf-8\nrequire 'spec_helper'\n\ndescribe Overcommit::Hook::CommitMsg::Spellcheck do\n let(:config) { Overcommit::ConfigurationLoader.default_configuration }\n let(:context) { doub... | ruby | chosen |
[
{
"from": "system",
"value": "Remove default text to display in parameters\n"
},
{
"from": "human",
"value": "module Volunteermatch\n module API\n module SearchOrganizations\n def search_organizations(parameters = {})\n raise ArgumentError, 'location needs to be defined' if param... | ruby | chosen |
[
{
"from": "system",
"value": "Remove nonexistent requires from sidekiq_init\n"
},
{
"from": "human",
"value": "require \"./app/boot\"\nrequire \"./app/workers/dependency_file_fetcher\"\nrequire \"./app/workers/dependency_file_parser\"\nrequire \"./app/workers/update_checker\"\nrequire \"./app/wo... | ruby | chosen |
[
{
"from": "system",
"value": "Rename app from Opencampground to OpenCampground\n"
},
{
"from": "human",
"value": "require File.expand_path('../boot', __FILE__)\n\n# Pick the frameworks you want:\nrequire \"active_model/railtie\"\nrequire \"active_record/railtie\"\nrequire \"action_controller/rai... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure that $ORBIT_KEY is set\n"
},
{
"from": "human",
"value": "# Apache 2.0 License\n#\n# Copyright (c) 2016 Sebastian Katzer, appPlant GmbH\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated do... | ruby | chosen |
[
{
"from": "system",
"value": "Fix `podspec` to not include Info.plist\n\nFixes building via CocoaPods in Xcode 10"
},
{
"from": "human",
"value": "#\n# Be sure to run `pod lib lint StringStylizer.podspec' to ensure this is a\n# valid spec before submitting.\n#\n# Any lines starting with a # are ... | ruby | chosen |
[
{
"from": "human",
"value": "Add post_id index to topic_links\n"
},
{
"from": "gpt",
"value": "class AddPostIdIndexOnTopicLinks < ActiveRecord::Migration\n def up\n add_index :topic_links, :post_id\n end\n\n def down\n remove_index :topic_links, :post_id\n end\nend\n"
}
] | ruby | chosen |
[
{
"from": "system",
"value": "Add missing ensure in FileSpecs.socket\n"
},
{
"from": "human",
"value": "module FileSpecs\n def self.configure_types\n return if @configured\n\n @file = tmp(\"test.txt\")\n @dir = Dir.pwd\n @fifo = tmp(\"test_fifo\")\n @link = tmp(\"test_li... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade serverspec helper to latets notation\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: ratpoison\n#\n# Copyright 2014, Shuberg Philis B.V.\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": "Add specs for ObjectSpace._id2ref and immediates\n"
},
{
"from": "human",
"value": "require File.expand_path('../../../spec_helper', __FILE__)\n\ndescribe \"ObjectSpace._id2ref\" do\n it \"converts an object id to a reference to the object\" do\n s = \"I am a st... | ruby | chosen |
[
{
"from": "system",
"value": "Create class with methods to output the number of sides on a die and a random position in an array, corresponding to a side on the die.\n"
},
{
"from": "human",
"value": "# Die Class 2: Arbitrary Symbols\n\n\n# I worked on this challenge [by myself, with: ].\n# I sp... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration to delete three RPA specialist sectors\n\nThis migration deletes three specialist sector tags if they exist. \nThese have never been populated on GOV.UK, nor are they currently \nlinked to, so it is not necessary to add redirects for these."
},
{
"from": "g... | ruby | chosen |
[
{
"from": "system",
"value": "Redefine scope property of i18n options from devise.failure to devise_jwt.failure\n"
},
{
"from": "human",
"value": "# coding: utf-8\n\nrequire 'devise/failure_app'\n\nmodule DeviseJwt\n class JwtFailureApp < Devise::FailureApp\n def http_auth\n self.status... | ruby | chosen |
[
{
"from": "system",
"value": "Add endpoint for a customer's orders\n"
},
{
"from": "human",
"value": "module Shopt\n class API < Grape::API\n version 'v1', using: :header, vendor: 'shopt'\n format :json\n\n resource :customers do\n desc 'Returns all customers.'\n get do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Include all Errnos as failures\n"
},
{
"from": "human",
"value": "class Notifier < Struct.new(:url, :host_with_port, :rubygem, :version, :api_key)\n\n def payload\n rubygem.payload(version, host_with_port).to_json\n end\n\n def authorization\n Digest::SHA2.... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.