conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Set assets debug to false by default\n\nWe should enable this only when we need it, as it adds minutes to the start\nup time in development\n" }, { "from": "human", "value": "FinderFrontend::Application.configure do\n # Settings specified here will take precedence ...
ruby
chosen
[ { "from": "system", "value": "Update rubocop v0.52.0 and rubocop-rspec v1.21.0\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path(\"../lib\", __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire \"onkcop/version\"\n\nGem::Specification.new do |spec|...
ruby
chosen
[ { "from": "system", "value": "Fix cookbook name to be an underscore instead of a hyphen\n\nSigned-off-by: Adam Stegman <273feac92b2340f1b220e388d385f8f310f7fcea@pivotallabs.com>\n" }, { "from": "human", "value": "name 'stemcell-builder'\nlicense 'Apache 2.0'\nversion ...
ruby
chosen
[ { "from": "human", "value": "Add back in this migration\n" }, { "from": "gpt", "value": "class AddDefaultPadToUserEvent < ActiveRecord::Migration[5.0]\n def up\n change_column_default :user_events, :paid, false\n UserEvent.find_each do |ue|\n if ue.paid.nil?\n ue.paid = false\...
ruby
chosen
[ { "from": "system", "value": "Build extension files before testing\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\n\nrequire \"test-unit\"\nrequire \"test/unit/notify\"\nrequire \"test/unit/rr\"\n\nbase_dir = File.expand_path(File.join(File.dirname(__FILE__), \"..\"))\n$LOAD_PATH.unshift...
ruby
chosen
[ { "from": "system", "value": "Add tests for getting and setting attributes" }, { "from": "human", "value": "require \"obix\"\nrequire \"minitest/unit\"\nrequire \"minitest/autorun\"\nrequire \"nokogiri\"\nrequire \"active_support/all\"\n\nrequire \"test_helper\"\n\nclass TagTest < MiniTest::Unit...
ruby
chosen
[ { "from": "system", "value": "Drop NewRelic sysmond until a license is obtained\n" }, { "from": "human", "value": "name \"monitoring\"\ndescription \"The role with system monitoring recipes for all nodes\"\nrun_list(\n \"recipe[htop]\",\n \"recipe[iftop]\",\n \"recipe[monit]\",\n \"recipe[mu...
ruby
chosen
[ { "from": "system", "value": "Fix intermittently-failing spec based on local timezone offset from UTC\n" }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe QuotaEvent do\n let!(:quota_definition) { create :quota_definition }\n let!(:balance_event) {\n create :quota_balanc...
ruby
chosen
[ { "from": "system", "value": "Improve touchfile path construction for Windows.\n" }, { "from": "human", "value": "\nclass SimpleService \n\n def start() \n @should_run = true\n spawn_thread()\n end\n\n def spawn_thread()\n @thread = Thread.new do\n while @should_run \n lo...
ruby
chosen
[ { "from": "system", "value": "Include funids for script tokens.\n" }, { "from": "human", "value": "module Furnace::AVM2::Tokens\n class ScriptToken < Furnace::Code::NonterminalToken\n include TokenWithTraits\n\n def initialize(origin, options={})\n options = options.merge(environment...
ruby
chosen
[ { "from": "system", "value": "Set up fixture before each OutputSettings spec\n" }, { "from": "human", "value": "require 'spec_helper'\nrequire 'tempfile'\n\nclass MockedBase\n def enter(state = :A)\n end\n\n def move_right\n end\n\n def move_left\n end\n\n def tape\n \"test tape\"\n e...
ruby
chosen
[ { "from": "human", "value": "Revert \"Deprecate the ContextFilter: use context.apply(..) instead on relations\"\n\nThis reverts commit c6d00a5c8c7c573b403698a3a3509cfc19bf625b.\n" }, { "from": "gpt", "value": "module ESA\n module Filters\n module ContextFilter\n extend ActiveSupport::Co...
ruby
chosen
[ { "from": "system", "value": "Work out which session store class to use automatically.\n\n\n" }, { "from": "human", "value": "# Use the MySQL interface for SqlSessionStore\nSqlSessionStore.session_class = MysqlSession\n" }, { "from": "gpt", "value": "# Work out which session store ad...
ruby
chosen
[ { "from": "human", "value": "Add spec for dice roll service\n" }, { "from": "gpt", "value": "require 'rails_helper'\n\nRSpec.describe RollDice, type: :service do\n let(:game_params) { { number_of_players: 2 } }\n let(:game) { Game.create!(game_params) }\n\n let(:user) { User.create!(username:...
ruby
chosen
[ { "from": "system", "value": "Configure to include ext/whitesimilarity/lib dir for libwhite_similarity\n" }, { "from": "human", "value": "require 'mkmf'\n\nextension_name = 'whitesimilarity'\n\ndir_config(extension_name)\n\ncreate_makefile(extension_name)\n" }, { "from": "gpt", "valu...
ruby
chosen
[ { "from": "human", "value": "Add script to calculate efficiency gap\n" }, { "from": "gpt", "value": "require 'json'\n\nARGV.each do |file_name|\n puts 'Processing file: ' + file_name\n election_votes = wasted_republican = wasted_democrat = republican_wins = democrat_wins = 0\n File.open(file_...
ruby
chosen
[ { "from": "system", "value": "Allow acceptance test files to be ran individually.\n" }, { "from": "human", "value": "require \"#{Rails.root}/test/test_helper\"\n\nDir[\"#{Rails.root}/test/acceptance/support/**/*\"].each { |file| require file }\n\nclass AcceptanceTest < ActionDispatch::Integratio...
ruby
chosen
[ { "from": "human", "value": "Add test for import definition\n" }, { "from": "gpt", "value": "require File.expand_path('../helper', __FILE__)\n\nclass TestImportDefinition < Dbt::TestCase\n\n def test_defaults\n definition = Dbt::DatabaseDefinition.new(:default,\n ...
ruby
chosen
[ { "from": "system", "value": "Add correct classname to log_items relation\n" }, { "from": "human", "value": "module Clerk::Logger\n extend ActiveSupport::Concern\n\n module ClassMethods\n\n def default_fields\n @default_fields ||= {}\n end\n\n def clerk_always_include(*new_defaul...
ruby
chosen
[ { "from": "system", "value": "Use nokogiri + URI - much simpler now.\n" }, { "from": "human", "value": "require 'hpricot'\n\nmodule ExtractUrls\n # Extract image URLs from HTML.\n def extract_image_urls(url, body)\n relative_url = url.gsub(/(https?:\\/\\/[^?]*)(\\?.*)$*/, '\\1');\n if re...
ruby
chosen
[ { "from": "system", "value": "Verify that bundler and rake get installed properly" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'ruby' do\n describe command('ruby -v') do\n it { should return_stdout /ruby 2.1/ }\n end\nend\n" }, { "from": "gpt", "value": "re...
ruby
chosen
[ { "from": "system", "value": "Extend example to reproduce error\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\nrequire_relative \"config\"\n\nclient = PipelineDealers::Client.new(api_key: YOUR_API_KEY)\ncompany = client.companies.create(name: \"Awesome Company\")\ncompany.destroy\n" }...
ruby
chosen
[ { "from": "system", "value": "Allow for modern Chef and Ohai\n\nSigned-off-by: Tom Duffield <96835dd8bfa718bd6447ccc87af89ae1675daeca@chef.io>\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/pushy_client/version', __FILE__)\n\nGem::Specification.new...
ruby
chosen
[ { "from": "human", "value": "Add metrics script to collect overall health data\n\nCollects the data required to power [ceph-dash][0]\n\n[0]: https://github.com/Crapworks/ceph-dash\n" }, { "from": "gpt", "value": "#! /usr/bin/env ruby\n#\n# metrics-ceph\n#\n# DESCRIPTION:\n# Overall ceph throug...
ruby
chosen
[ { "from": "system", "value": "Update selector for Deface override\n" }, { "from": "human", "value": "Deface::Override.new(:virtual_path => \"spree/shared/_order_details\",\n :name => \"add_extra_order_details_line_item_description\",\n :insert_bottom => \"...
ruby
chosen
[ { "from": "human", "value": "Add Cask for Sickbeard Anime version 13.05.25\n" }, { "from": "gpt", "value": "class SickbeardAnime < Cask\n url 'http://sickbeard.lad1337.de/download.php?f=SickBeard-OSX-anime-13.05.25.dmg'\n homepage 'http://sickbeard.lad1337.de/'\n version '13.05.25'\n sha1 '9...
ruby
chosen
[ { "from": "system", "value": "Hide the banner for SDC\n\nThis has been updated for a while now so we can remove the banner\nmessage.\n" }, { "from": "human", "value": "module MortgageCalculator\n class StampDutiesController < ::MortgageCalculator::PropertyTaxCalculatorController\n def calcu...
ruby
chosen
[ { "from": "system", "value": "Fix speed skydiving average score calculation\n" }, { "from": "human", "value": "class SpeedSkydivingCompetition::Scoreboard::Standings\n def self.build(*args)\n new(*args).build\n end\n\n def initialize(competitors, completed_rounds, results)\n @competitor...
ruby
chosen
[ { "from": "system", "value": "migration: Change syntax for users index\n" }, { "from": "human", "value": "class DeviseCreatePotetiUsers < ActiveRecord::Migration\n def change\n create_table(:poteti_users) do |t|\n t.string :name, null: false\n\n ## Database authenticatable\n t...
ruby
chosen
[ { "from": "system", "value": "Update Shortcat to v. 0.5.1\n" }, { "from": "human", "value": "class Shortcat < Cask\n url 'http://files.shortcatapp.com/v0.4.3.1/Shortcat.zip'\n homepage 'http://shortcatapp.com/'\n version '0.4.3.1'\n sha1 'f9362886edd9e5f7f8879f5d1b3031aea9126ae4'\n link 'Sh...
ruby
chosen
[ { "from": "system", "value": "Remove resource bundle from podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"Whisper\"\n s.summary = \"Whisper is a component that will make the task of display messages and in-app notifications simple.\"\n s.versi...
ruby
chosen
[ { "from": "system", "value": "Fix request_forgery_protection to work with API requests.\n\nThe default settings raise an error if not given a valid\nauthenticity_token for all HTML and JSON requests.\n" }, { "from": "human", "value": "class ApplicationController < ActionController::Base\n # Pre...
ruby
chosen
[ { "from": "system", "value": "Sort recently changed formulae by commit date\n" }, { "from": "human", "value": "# This code is free software; you can redistribute it and/or modify it under\n# the terms of the new BSD License.\n#\n# Copyright (c) 2012, Sebastian Staudt\n\nclass ApplicationControll...
ruby
chosen
[ { "from": "system", "value": "Remove paper trail integration from AppController\n" }, { "from": "human", "value": "class ApplicationController < ActionController::Base\n # Prevent CSRF attacks by raising an exception.\n # For APIs, you may want to use :null_session instead.\n protect_from_for...
ruby
chosen
[ { "from": "system", "value": "Add htaccess authentication while site is under development\n" }, { "from": "human", "value": "class ApplicationController < ActionController::Base\n protect_from_forgery\n\n before_filter :ref_to_cookie\n\n def mobile_device?\n if session[:mobile_pa...
ruby
chosen
[ { "from": "system", "value": "Fix order experience cucumber test to find position select on page\n" }, { "from": "human", "value": "When(/^he saves experiences$/) do\n click_button('Save experiences')\nend\n\nThen(/^the first experience should be \"(.*?)\"$/) do |experience|\n expect(\n pag...
ruby
chosen
[ { "from": "human", "value": "Index published to improve blog posts fetch\n" }, { "from": "gpt", "value": "class AddIndexToBlogPostsSort < ActiveRecord::Migration\n def self.up\n %w[articles article_versions].each do |table|\n add_index table, [:published_at, :id]\n end\n end\n\n de...
ruby
chosen
[ { "from": "system", "value": "Remove ugly fail-safe step by keeping the riff-raff out of the collection\n" }, { "from": "human", "value": "module BaseballStats\n module Calculators\n class ImprovedBattingAverage\n attr_accessor :csv, :year\n\n def initialize(raw_data, year)\n ...
ruby
chosen
[ { "from": "system", "value": "Disable transaction in log_parts(created_at) index migration\n\nCREATE INDEX CONCURRENTLY does not support being run in a transaction.\n" }, { "from": "human", "value": "Sequel.migration do\n change do\n alter_table(:log_parts) do\n add_index :created_at, c...
ruby
chosen
[ { "from": "human", "value": "Add specs for subject prefix matching\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe Mutant::Matcher::Compiler::SubjectPrefix do\n let(:object) { described_class.new(Mutant::Expression.parse('Foo*')) }\n\n let(:_subject) { double('Subject', expr...
ruby
chosen
[ { "from": "system", "value": "Correct selector in feature step\n" }, { "from": "human", "value": "# encoding: UTF-8\nGiven(/^there is a publicly visible CSV attachment on the site$/) do\n @attachment = create(:csv_attachment)\n @publication = create(:published_publication, :with_file_attachme...
ruby
chosen
[ { "from": "system", "value": "Fix missing matilda dependency :blush:\n" }, { "from": "human", "value": "lib = File.expand_path('../lib/', __FILE__)\n$:.unshift lib unless $:.include?(lib)\n\nGem::Specification.new do |s|\n s.name = \"pharrell\"\n s.version = \"0.4.1\"\n s.platform = Gem::Plat...
ruby
chosen
[ { "from": "system", "value": "Replace endash by ASCII7 so gem tool doesn't barf when running on JRuby\n" }, { "from": "human", "value": "# encoding: utf-8\n\nGem::Specification.new do |s|\n s.name = 'visibilityjs'\n s.version = '0.4.3'\n s.platform = Gem::Platform::RUBY\n s.aut...
ruby
chosen
[ { "from": "system", "value": "Make sure there are any examples to pass.\n" }, { "from": "human", "value": "Then /^the example(s)? should( all)? pass$/ do |_, _|\n step %q{the output should contain \"0 failures\"}\n step %q{the exit status should be 0}\nend\n" }, { "from": "gpt", "v...
ruby
chosen
[ { "from": "system", "value": "Make CreditCard expiryMonth and expiryYear optional\n\nThese are about to become numbers, null is not a number.\n" }, { "from": "human", "value": "require 'active_model/serializer'\n\nmodule SpreeSignifyd\n class CreditCardSerializer < ActiveModel::Serializer\n ...
ruby
chosen
[ { "from": "human", "value": "Complete 6.5 challenge and add reflection\n" }, { "from": "gpt", "value": "# RELEASE 2: NESTED STRUCTURE GOLF\n# Hole 1\n# Target element: \"FORE\"\n\narray = [[1,2], [\"inner\", [\"eagle\", \"par\", [\"FORE\", \"hook\"]]]]\n\n# attempts:\np array[1][1][2][0]\n# ====...
ruby
chosen
[ { "from": "system", "value": "Install haskell platform with GHC 7 from a PPA\n" }, { "from": "human", "value": "#\n# Cookbook Name:: haskell\n# Recipe:: default\n# Copyright 2012, Travis CI development team\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of ...
ruby
chosen
[ { "from": "system", "value": "Add projects factory, edit users factory\n" }, { "from": "human", "value": "FactoryGirl.define do\n\tfactory :user do\n\t\temail \"example@example.com\"\n\t\tname \"Example\"\n\t\tpassword \"12345678\"\n\t\tpassword_confirmation \"12345678\"\n\t\tbirth_date Date.tod...
ruby
chosen
[ { "from": "human", "value": "Clear the BOSH Director's certificates\n\nVery useful when they expire\n" }, { "from": "gpt", "value": "#!/usr/bin/env ruby\n#\n# Run the following if your BOSH certs have expired. Then redeploy\n# (`create-env`) your BOSH Director.\n#\n# It clears out the certificat...
ruby
chosen
[ { "from": "system", "value": ":bug: Fix unco pre load doesn't work issue\n\nNeed to set CMAKE_INSTALL_PREFIX to run cmake to set library path.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\ngit File.join(Chef::Config['file_cache_path'], 'unco') do\n repository node['unco'][...
ruby
chosen
[ { "from": "system", "value": "Check for asset pipeline presence\n\nCloses #145" }, { "from": "human", "value": "class Premailer\n module Rails\n module CSSLoaders\n module AssetPipelineLoader\n extend self\n\n def load(url)\n if asset_pipeline_present?\n ...
ruby
chosen
[ { "from": "system", "value": "Include posts count into feed presenter\n" }, { "from": "human", "value": "class FeedPresenter < Presenter\n attribute :id, :title, :description\n attribute :url, :site_url\n attribute :last_modified_at, :status\n attribute :created_at, :updated_at\nend" }, ...
ruby
chosen
[ { "from": "human", "value": "Add validation for timestamp skew\n" }, { "from": "gpt", "value": "module TentValidator\n class TimestampSkewValidator < TentValidator::Spec\n\n require 'tent-validator/validators/support/post_generators'\n include Support::PostGenerators\n\n require 'tent-...
ruby
chosen
[ { "from": "system", "value": "Fix spec to call a method twice\n\nTo make sure that a method is memoized, I think the method should\nbe called twice under conditions where it normally returns a\ndifferent value.\n\nOtherwise, we can't know if the result is memoized or the original\nmethod is invoked every ti...
ruby
chosen
[ { "from": "system", "value": "Make sure the blocks are not optimized out.\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\n\nroot_dir = File.expand_path(File.join(File.dirname(__FILE__),'..'))\nlib_dir = File.join(root_dir,'lib')\n$LOAD_PATH << lib_dir unless $LOAD_PATH.include?(lib_dir)\...
ruby
chosen
[ { "from": "system", "value": "Correct set completed_at in cancelling_and_resuming spec\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe \"Cancelling + Resuming\" do\n stub_authorization!\n\n let(:order) do \n order = create(:order)\n order.update_column(:state, 'compl...
ruby
chosen
[ { "from": "human", "value": "Add Fiery Software Manager.app v2.0.0.15\n\nDownload latest at URL.\nManual install probably necessary but may review at later date.\n" }, { "from": "gpt", "value": "class FierySoftwareManager < Cask\n version :latest\n sha256 :no_check\n\n url 'https://d1umxs9ckz...
ruby
chosen
[ { "from": "system", "value": "Fix typo in ClassMethods.const_missing spec description." }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Virtus::ClassMethods, '.const_missing' do\n after do\n Object.send(:remove_const, :User)\n end\n\n context \"with an existing attribute ...
ruby
chosen
[ { "from": "system", "value": "Revert using memcache on prod\n" }, { "from": "human", "value": "require 'sprockets'\nrequire 'stylus/sprockets'\n\nmodule Blog\n module Extensions\n module Assets extend self\n class UnknownAsset < StandardError; end\n\n module Helpers\n def as...
ruby
chosen
[ { "from": "system", "value": "Improve likes.positive = 1 query if PostgreSQL adapter.\n" }, { "from": "human", "value": "module Likeable\n extend ActiveSupport::Concern\n \n included do\n belongs_to :target, polymorphic: true\n \n has_many :likes, -> { where(positive: true) }...
ruby
chosen
[ { "from": "system", "value": "Use describe correctly in dashboard spec\n\ndescribe is used for methods\n" }, { "from": "human", "value": "describe ReportController do\n context \"::Dashboards\" do\n let(:miq_widget_set) { FactoryGirl.create(:miq_widget_set, :owner => user.current_group, :set...
ruby
chosen
[ { "from": "system", "value": "Update syllabus user if only record exists." }, { "from": "human", "value": "# Classroom syllabus controller\nclass SyllabusesController < ApplicationController\n\n # Abilities checking for our nested resource\n skip_authorize_resource :only => :create\n\n before...
ruby
chosen
[ { "from": "system", "value": "Add extra filtering for fields\n" }, { "from": "human", "value": "require 'pry'\n\nRedmine::Plugin.register :list_issues do\n name 'List Issues'\n author 'Grzegorz Łuszczek'\n #description 'Thisggplugin overrides default include in Wiki'\n version '1.0.0'\n\n m...
ruby
chosen
[ { "from": "system", "value": "Use begin-end instead of proc\n" }, { "from": "human", "value": "module PostDecorator\n def short_text_body\n truncate(plain_text_body, length: 140)\n end\n\n def to_meta_description\n short_text_body\n end\n\n def to_og_params\n {\n locale: 'ja_J...
ruby
chosen
[ { "from": "system", "value": "Change LinkCrawlWorker retry count to 5\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nclass LinkCrawlWorker\n include Sidekiq::Worker\n\n sidekiq_options queue: 'pull', retry: false\n\n def perform(status_id)\n FetchLinkCardService.new.ca...
ruby
chosen
[ { "from": "system", "value": "Update the gem description + a homepage in the gemspec" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'artwork/version'\n\nGem::Specification.new do |spec...
ruby
chosen
[ { "from": "system", "value": "Connect Stomp client after Passenger worker forks\n" }, { "from": "human", "value": "require 'messenger'\n\nunless Rails.env.test?\n host = Rails.env.production? ? 'support.cluster' : 'localhost'\n uri = URI::Generic.build scheme: 'stomp', host: host, port: 61613\...
ruby
chosen
[ { "from": "system", "value": "Add provider_account-filtered 'provider images' method to build model\n" }, { "from": "human", "value": "# Copyright 2011 Red Hat, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance wi...
ruby
chosen
[ { "from": "system", "value": "Include the appointment reference for debugging\n\nWe currently have no way of knowing which actual appointment this\nrefers to so when these occur in production we are at a loss.\n" }, { "from": "human", "value": "require 'notifications/client'\n\nclass CreateTapAc...
ruby
chosen
[ { "from": "system", "value": "Use RSpec::Core::Version instead of RSpec::Version\nbecause capybara/rspec requires rspec-core, but not rspec.\n" }, { "from": "human", "value": "if RSpec::Version::STRING.to_f >= 3.0\n RSpec.shared_context \"Capybara Features\", :capybara_feature => true do\n i...
ruby
chosen
[ { "from": "system", "value": "Add the badass of the week to the authors\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.dirname(__FILE__) + '/lib/temple/version'\nrequire 'date'\n\nGem::Specification.new do |s|\n s.name = 'temple'\n s.version = Temple:...
ruby
chosen
[ { "from": "system", "value": "Add lib to test coverage.\n" }, { "from": "human", "value": "require 'action_controller'\nrequire 'active_model'\nrequire 'active_record'\nrequire 'database_cleaner'\nrequire 'logger'\nrequire 'faker'\nrequire 'factory_girl_rails'\nrequire 'codeclimate-test-reporter...
ruby
chosen
[ { "from": "system", "value": "Format and comment helper method\n" }, { "from": "human", "value": "require \"middleman\"\nrequire \"capybara/rspec\"\nrequire 'capybara/poltergeist'\nrequire 'capybara/angular'\n\n# Need to reload Middleman plugins\nrequire 'middleman-blog'\nrequire 'middleman-spro...
ruby
chosen
[ { "from": "system", "value": "Remove :chef_gem_compile_time flag from chefspec\n" }, { "from": "human", "value": "require 'chefspec'\nrequire 'chefspec/berkshelf'\n\nChef::Config[:chef_gem_compile_time] = false\nChef::Config[:ssl_verify_mode] = :verify_none\n\nCACHE = Chef::Config[:file_cache_pa...
ruby
chosen
[ { "from": "system", "value": "Exclude specs themselves from coverage check\n" }, { "from": "human", "value": "require 'simplecov'\nrequire 'simplecov-console'\n\nSimpleCov.minimum_coverage 100\n\nSimpleCov.start do\n SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[\n SimpleCov::...
ruby
chosen
[ { "from": "system", "value": "Add license info to gemspec\n\nclose #20\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'bb-ruby/version'\n\nGem::Specification.new do |gem|\n...
ruby
chosen
[ { "from": "system", "value": "Remove unnecessary Compass compilation settings\n" }, { "from": "human", "value": "# File system locations\nsass_dir = 'sass'\ncss_dir = 'test'\nimages_dir = 'images'\njavascripts_dir = 'js'\nadd_import_path '../styl...
ruby
chosen
[ { "from": "system", "value": "Update sqlite connection to eliminate deprecation warning\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'mocha'\nrequire 'spec'\n\nrequire File.join(File.dirname(__FILE__), %w[.. lib quality_assignable])\n\nSpec::Runner.configure do |config|\n conf...
ruby
chosen
[ { "from": "system", "value": "Clarify wording of coverage threshold\n" }, { "from": "human", "value": "# This file was generated by the `rspec --init` command. Conventionally, all\n# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.\n# Require this file using `require \"...
ruby
chosen
[ { "from": "system", "value": "Add auto_updates flag to Sidekick\n" }, { "from": "human", "value": "cask 'sidekick' do\n version '4.2.8'\n sha256 'ecba54e6c19e510d4655c8afb5fb79616f75ff352a92e142c9b52291a3664fe1'\n\n url \"http://releases.oomphalot.com/Sidekick/Sidekick_#{version}.zip\"\n app...
ruby
chosen
[ { "from": "system", "value": "Set container utsname to configured hostname per default\n\nPreviously, the utsname of a machine was set to the vagrant machine ID.\nAs the utsname represents the hostname of the machine and is independent\nfrom the name of the actual LXC container, the hostname that was\nspeci...
ruby
chosen
[ { "from": "system", "value": "Make BSON::ObjectId to_store and from_store work the same.\n" }, { "from": "human", "value": "require 'bson'\n\nmodule Toy\n module Identity\n class ObjectIdKeyFactory < AbstractKeyFactory\n def key_type\n BSON::ObjectId\n end\n\n def next_...
ruby
chosen
[ { "from": "system", "value": "Clear worker jobs after examples\n" }, { "from": "human", "value": "RSpec.shared_context \"worker class\", worker_class: true do\n let(:worker_options) { { key: -> (args) { \"key\" } } }\n let(:worker_class) do\n local_options = worker_options\n Class.new do...
ruby
chosen
[ { "from": "system", "value": "Fix podspec regression caused by ab94d1d\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'IntentKit'\n s.version = '0.2.0'\n s.license = { :type => 'MIT', :file => \"LICENSE\" }\n s.summary = \"An easier way to handle third-party UR...
ruby
chosen
[ { "from": "human", "value": "Patch Rails 4.2 tests to work with Ruby 2.6.\n\nAn issue with reusing the `TestResponse` object occurs with Ruby 2.6 and\ncauses `already initialized` exceptions to be thrown.\n\nThis monkey-patch fixes this for Rails 4.2.\n\nIt's expected that Rails 4.2 will be dropped by admin...
ruby
chosen
[ { "from": "system", "value": "Enable javascript_driver on checkout address page\n" }, { "from": "human", "value": "require 'spec_helper'\n\nRSpec.describe SolidusPageObjects::Pages::Checkout::Address do\n let(:order) { OrderWalkthrough.up_to(:address) }\n let(:user) { create(:user) }\n\n befo...
ruby
chosen
[ { "from": "system", "value": "Exclude test for 1.9 ordered hash properties\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe AQL::Node::Literal::Composed::Document, '#aql' do\n let(:object) { AQL::Node::Literal.build(input) }\n\n examples = {\n {} => '{...
ruby
chosen
[ { "from": "human", "value": "Add spec for order confirmation view\n" }, { "from": "gpt", "value": "require \"spec_helper\"\n\ndescribe \"spree/shared/_order_details.html.haml\" do\n include AuthenticationWorkflow\n helper Spree::BaseHelper\n\n let(:order) { create(:completed_order_with_fees) ...
ruby
chosen
[ { "from": "system", "value": "Split into separate creation methods.\n" }, { "from": "human", "value": "module ActsAsExecutor\r\n module Executor\r\n class Factory\r\n def self.create kind, size = nil\r\n case kind\r\n when ActsAsExecutor::Executor::Kinds::CACHED\r\n ...
ruby
chosen
[ { "from": "human", "value": "Add create urls table migration\n" }, { "from": "gpt", "value": "class CreateUrls < ActiveRecord::Migration[5.1]\n def change\n create_table :urls do |t|\n t.column :path, :string, limit: 500\n t.column :code, :string, limit: 8\n t.timestamps\n ...
ruby
chosen
[ { "from": "system", "value": "Add Content-Type header from JSON API spec\n" }, { "from": "human", "value": "module HubbleApiClient\n # @api private\n module Connection\n class Base\n\n private\n\n def self.get_http_request(uri)\n request = Net::HTTP::Get.new(uri.request_uri)\...
ruby
chosen
[ { "from": "human", "value": "Add a package for Infernal Robotics.\n" }, { "from": "gpt", "value": "class InfernalRobotics < Kosmos::Package\n title 'Infernal Robotics'\n url 'http://download873.mediafire.com/84o0x1260xxg/34ct48puesp1xfb/InfernalRobotics0.15b.zip'\n\n def install\n merge_di...
ruby
chosen
[ { "from": "system", "value": "Fix bug for before filter\n" }, { "from": "human", "value": "module Rnotifier\n module BenchmarkFilters\n def self.included(base)\n base.extend ClassMethods\n end\n\n module ClassMethods\n def rnotifier_benchmarking(*args)\n time_condition...
ruby
chosen
[ { "from": "system", "value": "Increase timeout for regex queries from 2 to 30 seconds\n" }, { "from": "human", "value": "require \"timeout\"\n\n# This would be ConditionSimple, except user-provided regular expressions\n# can very easily be exponentially slow\nclass ConditionRegexp < Condition\n ...
ruby
chosen
[ { "from": "system", "value": "package: Use alias to access poise reverse options\n" }, { "from": "human", "value": "#\n# Cookbook: consul\n# License: Apache 2.0\n#\n# Copyright 2014-2016, Bloomberg Finance L.P.\n#\nrequire 'poise'\n\nmodule ConsulCookbook\n module Provider\n # A `consul_inst...
ruby
chosen
[ { "from": "system", "value": "Remove build-only dependency on curl / libzip\n\nUnfortunately, due to dynamic linking, both curl and libzip are required at runtime.\r\nSee https://bot.brew.sh/job/Homebrew%20Core%20Pull%20Requests/7439/version=el_capitan/testReport/brew-test-bot/el_capitan/test_tldr/ for a fa...
ruby
chosen
[ { "from": "system", "value": "Refactor - removed blank line.\n" }, { "from": "human", "value": "class Router\n attr_reader :channels\n\n def initialize(channels)\n @channels = channels\n end\n\n def route(message)\n puts \"Msg: #{message}\"\n puts \"Channel name: #{message.channel}\...
ruby
chosen
[ { "from": "system", "value": "Remove the support of watchOS\n\nI'm not sure about the settings of Xcode for watchOS 2.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"Timepiece\"\n s.version = `git describe --tags --abbrev=0`\n s.summary = \"Intuitive NS...
ruby
chosen
[ { "from": "system", "value": "Tweak PostGIS 3.x compat fix.\n\nIn d0c2e54c1a07aa935a905a30e5be2dc443eb1a7f, we added a fix for PostGIS 3.x. This fix was still failing if the CollectionExtract returned a Multi* geometry since we weren’t removing empty Multis.\n\nOne example of this is when refreshing the agg...
ruby
chosen
[ { "from": "system", "value": "Rename the china_regions migration file\n" }, { "from": "human", "value": "module ChinaRegionFu\n class InstallGenerator < Rails::Generators::Base\n include Rails::Generators::Migration\n source_root File.expand_path('../templates', __FILE__)\n\n def copy_...
ruby
chosen