conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix for Ruby < 2.1.0.\n" }, { "from": "human", "value": "class Metybur::Collection\n def initialize(collection_name, websocket)\n @callbacks = {}\n\n websocket.on(:message) do |event|\n attributes = JSON.parse(event.data, symbolize_names: true)\n ha...
ruby
chosen
[ { "from": "human", "value": "Add Rake task to run Shellcheck\n\nOnly consider added or modified scripts by using `git diff\n--name-status` and selecting files with status A or M. This avoids\ntrying to run shellcheck on a file that's been deleted.\n\nSkip running shellcheck if no files are matched.\n" }, ...
ruby
chosen
[ { "from": "system", "value": "Revert \"Specify locale when registering a user\"\n\nThis reverts commit 5ee41eabf8c991ad76f34a14cc97aeea876250c9.\n" }, { "from": "human", "value": "# coding: utf-8\n\nmodule GeneralSystemSpecHelpers\n def register_a_new_account\n I18n.with_locale(:bg) do\n ...
ruby
chosen
[ { "from": "system", "value": "Add uninstall stanza for TrueCrypt\n" }, { "from": "human", "value": "class Truecrypt < Cask\n url 'http://downloads.sourceforge.net/sourceforge/truecrypt/TrueCrypt-7.2-Mac-OS-X.dmg'\n homepage 'http://truecrypt.org/'\n version '7.2'\n sha256 '01acf85be9b23a1c71...
ruby
chosen
[ { "from": "system", "value": "Update homepage and issues URLs\n" }, { "from": "human", "value": "module Almanack\n CODENAME = \"Garlick\"\n VERSION = \"1.0.4\"\n HOMEPAGE = \"https://github.com/Aupajo/sinatra-gcal\"\n ISSUES = \"https://github.com/Aupajo/sinatra-gcal/issues\"\nend\n" },...
ruby
chosen
[ { "from": "system", "value": "Check if property responds to protected methods\n" }, { "from": "human", "value": "module ClientData\n class Builder\n attr_accessor :controller\n attr_reader :options\n\n def initialize(controller = nil, options = {})\n @controller = controller\n ...
ruby
chosen
[ { "from": "system", "value": "Fix article_file_path lookup and git invocation\n" }, { "from": "human", "value": "module Jekyll\n class LastModifiedAtTag < Liquid::Tag\n def render(context)\n article_file = context.environments.first[\"page\"][\"path\"]\n article_file_path = File.jo...
ruby
chosen
[ { "from": "system", "value": "Fix wording on connection error\n" }, { "from": "human", "value": "# Internal: Asynchronsoly downloads urls and returns Array of responses.\nrequire 'eventmachine'\nrequire 'em-http-request'\n\nmodule HLSpider\n module Downloader\n class ConnectionError < Standa...
ruby
chosen
[ { "from": "system", "value": "Change podspec version -> 2.2.1\n" }, { "from": "human", "value": "Pod::Spec.new do |spec|\n spec.name = \"Framezilla\"\n spec.version = \"2.2.0\"\n spec.summary = \"Comfortable syntax for working with frames.\"\n\n spec.homepage ...
ruby
chosen
[ { "from": "system", "value": "Revert accidental commit that broke stuff\n\nThis reverts commit dd5736802eadca86537734f4f63dc17dc4e2cf95.\n" }, { "from": "human", "value": "module Regexpert\n class Generator\n attr_accessor :regex\n\n def initialize(regex)\n @regex = Regexpert::Regex....
ruby
chosen
[ { "from": "system", "value": "Move authentication into its own method\n" }, { "from": "human", "value": "require \"walmart_open/config\"\nrequire \"walmart_open/connection_manager\"\nrequire \"walmart_open/requests/search\"\nrequire \"walmart_open/requests/lookup\"\nrequire \"walmart_open/reques...
ruby
chosen
[ { "from": "system", "value": "Remove superfluous line from serverspec spec helper\n" }, { "from": "human", "value": "require \"serverspec\"\n\ninclude Serverspec::Helper::Exec\ninclude Serverspec::Helper::DetectOS\n\nRSpec.configure do |c|\n c.before :all do\n c.os = backend(Serverspec::Comm...
ruby
chosen
[ { "from": "system", "value": "Make sure deflater is inserted into the right place\n" }, { "from": "human", "value": "require 'rack/deflater'\nrequire 'heroku_rails_deflate/serve_zipped_assets'\n\nmodule HerokuRailsDeflate\n class Railtie < Rails::Railtie\n initializer \"heroku_rails_deflate....
ruby
chosen
[ { "from": "system", "value": "Remove completely untested stop nodes list\n" }, { "from": "human", "value": "# frozen_string_literal: true\nmodule Reek\n module AST\n #\n # Locates references to the current object within a portion\n # of an abstract syntax tree.\n #\n class Refere...
ruby
chosen
[ { "from": "system", "value": "Fix license statement for single license only\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'rack/honeytoken/version'\n\nGem::Specification.new do |spe...
ruby
chosen
[ { "from": "system", "value": "Remove pry-byebug from gemspec since it's not compatible with all rubies\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"rails-footnotes/version\"\n\nGem::Specification.new do |s|\n s.name ...
ruby
chosen
[ { "from": "human", "value": "Add migration to drop issues and scopes tables\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\n\nclass DropIssuesAndScopes < ActiveRecord::Migration[5.2]\n def up\n [:issues, :scopes].each do |table|\n drop_table table\n end\n end\n\n de...
ruby
chosen
[ { "from": "human", "value": "Add `secret` column to Settings\n\nIn a subsequent commit, this will allow a setting to be marked as\n\"secret\", and its value redacted in the forthcoming Settings UI.\n\nrefs DE-1138\nflag=none\n\ntest plan:\n- verify the column is added, and `setting=` is successful\n\nChange...
ruby
chosen
[ { "from": "system", "value": "Add docs for feature check context methods\n" }, { "from": "human", "value": "module Flipper\n class FeatureCheckContext\n attr_reader :feature_name\n attr_reader :values\n\n def initialize(feature_name:, values:)\n @feature_name = feature_name\n ...
ruby
chosen
[ { "from": "system", "value": "Implement the back_to method for full time travel experience\n" }, { "from": "human", "value": "require 'git_time_machine/delorean'\nrequire 'git_time_machine/flux_capacitor'\n\nmodule GitTimeMachine\n class TimeMachine\n extend Forwardable\n\n def_delegators...
ruby
chosen
[ { "from": "system", "value": "Use temporary model in migration\n" }, { "from": "human", "value": "class ChangeCommunityCenterToCommunityCentre < ActiveRecord::Migration\n def up\n node_type = NodeType.find_by_identifier('community_center')\n if node_type.nil?\n return\n else\n ...
ruby
chosen
[ { "from": "system", "value": "Install ifupdown2 inside the test instance\n" }, { "from": "human", "value": "#\n# Cookbook Name:: cumulus-test\n# Recipe:: default\n#\n# Copyright 2015, Cumulus Networks\n#\n# All rights reserved - Do Not Redistribute\n#\n\n# Setup a skeleton fake Cumulus Linux env...
ruby
chosen
[ { "from": "system", "value": "Add a test for options argument\n" }, { "from": "human", "value": "describe Utusemi::Configuration do\n before do\n Utusemi.configure do\n map :sample do\n name :title\n end\n end\n class Product < ActiveRecord::Base; end\n end\n\n subje...
ruby
chosen
[ { "from": "system", "value": "Fix LinterRegistry specs to not pollute actual registry\n\nIn the process of writing some other specs, there was a problem where\nthe linters inserted into the registry by this spec were breaking other\nspecs.\n\nFix by modifying the specs to not modify the global linter regist...
ruby
chosen
[ { "from": "system", "value": "Use real objects for view test\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'batch/edit.html.erb' do\n let(:batch) { stub_model(Batch, id: '123') }\n let(:generic_file) { stub_model(GenericFile, id: nil, depositor: 'bob', rights: ['']) }\n ...
ruby
chosen
[ { "from": "system", "value": "Save the default translated values for publicbody entities.\n" }, { "from": "human", "value": "class CreateTranslationTables < ActiveRecord::Migration\n def self.up\n fields = {:name => :text, \n :short_name => :text,\n :request_email => :text,\n ...
ruby
chosen
[ { "from": "system", "value": "Add default for BSD and Solaris to gmake\n" }, { "from": "human", "value": "require 'mkmf'\n\nRbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC']\n\nhiredis_dir = File.join(File.dirname(__FILE__), %w{.. .. vendor hiredis})\nunless File.directory?(hiredis_dir)\n...
ruby
chosen
[ { "from": "human", "value": "Add task to simplify Valgrind run.\n" }, { "from": "gpt", "value": "task :valgrind do\n `valgrind --suppressions=gir_ffi-ruby1.9.1.supp --leak-check=full ruby1.9.1 -Ilib -e \"require 'ffi-gobject_introspection'\"`\nend\n" } ]
ruby
chosen
[ { "from": "system", "value": "Remove high-byte emoji from post-install message\n\nSince @jnunemaker will never remove the message (even though he never sees it because he runs with `--quiet`), at least make it so that the regular output is ASCII." }, { "from": "human", "value": "# -*- encoding: ...
ruby
chosen
[ { "from": "system", "value": "Fix duplicate suggestions in the character name typeahead.\n" }, { "from": "human", "value": "class CastsController < ApplicationController\n def index\n @anime = Anime.find(params[:anime_id])\n @casting = @anime.castings.includes(:character)\n respond_to ...
ruby
chosen
[ { "from": "system", "value": "Add Includes User Votes When Getting Items\n" }, { "from": "human", "value": "class ItemsController < ApplicationController\n\thelper_method :display_user_votes_for, :new_item_for_current_user\n\n\tdef index\n\t\t@items = Item.all.page params[:page]\n\tend\n\n\tdef ...
ruby
chosen
[ { "from": "system", "value": "Revert rspec as runtime dependency\n\nWithout rspec gem tests are failing with LoadError:\n\n cannot load such file -- rspec\n\nRegression fix #115\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(...
ruby
chosen
[ { "from": "system", "value": "Add initial Api handling with respond_to\n" }, { "from": "human", "value": "class UsersController < ApplicationController\n\n before_action :set_user, only: [:show, :edit, :update, :destroy]\n\n def new\n @user = User.new\n end\n\n def create\n @user = Use...
ruby
chosen
[ { "from": "system", "value": "Modify podspec file to pass lint.\n" }, { "from": "human", "value": "\nPod::Spec.new do |s|\n s.name = \"GrowthPush\"\n s.version = \"1.1.1\"\n s.summary = \"GrowthPush SDK for iPhone/iPad\"\n s.description = <<-DESC\n ...
ruby
chosen
[ { "from": "system", "value": "Fix case insensitive match for reply detection.\n" }, { "from": "human", "value": "module Forums::ForumsHelper\n def topic_latest_post_path(course, forum, topic)\n course_forum_topic_path(course, forum, topic, anchor: \"post-#{topic.posts.last.id}\")\n end\n\n ...
ruby
chosen
[ { "from": "system", "value": "Add 2015 to previous archived years\n" }, { "from": "human", "value": "class ArchivedPullRequest < ApplicationRecord\n PAST_YEARS = [2014, 2013, 2012]\n\n belongs_to :user\n scope :year, -> (year) { where('EXTRACT(year FROM \"created_at\") = ?', year) }\nend\n" ...
ruby
chosen
[ { "from": "system", "value": "Update ico-guidance-for-authorities link to point to new pdf\n" }, { "from": "human", "value": "# Here you can override or add to the pages in the core website\n\nRails.application.routes.draw do\n # Add a route for the survey\n scope '/profile/survey' do\n roo...
ruby
chosen
[ { "from": "system", "value": "Add license to gemspec and bump version.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = \"capistrano-jenkins\"\n s.version = \"0.1.3\"\n s.authors = [\"Martin Jonsson\"]\n s.email = [\"...
ruby
chosen
[ { "from": "system", "value": "Remove unused accessor from the AuthenticationMediator\n" }, { "from": "human", "value": "module OAuth2::Provider::Rack\n class AuthenticationMediator\n attr_reader :response\n attr_accessor :authorization\n\n delegate :has_scope?, :to => :authorization\n\...
ruby
chosen
[ { "from": "system", "value": "Add a minitest fun colors\n" }, { "from": "human", "value": "# Configure Rails Environment\nENV[\"RAILS_ENV\"] = \"test\"\n\nrequire File.expand_path(\"../../test/dummy/config/environment.rb\", __FILE__)\nActiveRecord::Migrator.migrations_paths = [File.expand_path(...
ruby
chosen
[ { "from": "system", "value": "Revert \"also query oxidized when updating\"\n\nThis reverts commit 89e9cf6e9aaa0f9cde58ffbdfc1caadaafa94032.\n" }, { "from": "human", "value": "class ScheduledMachineUpdateWorker\n include Sidekiq::Worker\n\n def perform\n if IDB.config.puppetdb\n IDB.con...
ruby
chosen
[ { "from": "system", "value": "Allow use array as an argument of .matches method\n" }, { "from": "human", "value": "module Arel\n module Ltree\n module Predications\n def ancestor_of(other)\n Arel::Ltree::Nodes::AncestorOf.new(self, other)\n end\n\n def descendant_of(oth...
ruby
chosen
[ { "from": "system", "value": "Add Rack::CommonLogger to the app's middleware\n" }, { "from": "human", "value": "module Conjur\n module Appliance\n module Logging\n class Railtie < Rails::Railtie\n # This initializer needs to run before anybody else has\n # initialized the ...
ruby
chosen
[ { "from": "system", "value": "Remove cruft from initial development\n" }, { "from": "human", "value": "require 'net/http'\nrequire 'uri'\nrequire 'pry'\nrequire 'rexml/document'\nrequire 'json'\n\n\n\nmodule Lita\n module Handlers\n class Wotd < Handler\n route(/wotd/, :wotd, command: t...
ruby
chosen
[ { "from": "system", "value": "Fix a CarrierWave 0.5.8 problem." }, { "from": "human", "value": "require 'active_support/concern'\nrequire 'carrierwave/mongoid'\nrequire 'media_magick/attachment_uploader'\nrequire 'mongoid'\n\nmodule MediaMagick\n module Model\n extend ActiveSupport::Concern\...
ruby
chosen
[ { "from": "human", "value": "[Sass] Add the StringInterpolation file. Blah.\n" }, { "from": "gpt", "value": "module Sass::Script\n class StringInterpolation < Node\n def initialize(before, mid, after)\n @before = before\n @mid = mid\n @after = after\n end\n\n def inspect...
ruby
chosen
[ { "from": "system", "value": "Change homepage to correct one.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"timeline_fu/version\"\n\nGem::Specification.new do |s|\n s.name = \"timeline_fu\"\n s.version = TimelineFu::VERS...
ruby
chosen
[ { "from": "human", "value": "Add module FiveColors for 五色百人一首\n" }, { "from": "gpt", "value": "module FiveColors\n YELLOW = [2, 7, 10, 18, 32, 33, 37, 39, 46, 47, 55, 60, 78, 79, 81, 85, 87, 89, 94, 96]\n PINK = [1, 4, 13, 16, 22, 28, 34, 40, 48, 51, 58, 65, 66, 72, 73, 80, 83, 84, 86, 97]\n...
ruby
chosen
[ { "from": "system", "value": "Make data integrity check more verbose\n\n+ We get a stack trace and error message if there's a data problem ...\n+ ... but we also need some output if there are no errors\n" }, { "from": "human", "value": "class IntegrityCheck\n\n def check!\n has_data?\n ha...
ruby
chosen
[ { "from": "system", "value": "Allow diff version to be customized\n" }, { "from": "human", "value": "require 'grit'\n\nmodule Matron\n class Git\n attr_reader :repo\n\n def self.from_path( path )\n new Grit::Repo.new( path )\n end\n\n def initialize( repository )\n @repo =...
ruby
chosen
[ { "from": "system", "value": "Add redis and rspec gems as dependencies.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/abfab/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Chris Hanks\"]\n gem.email = [\"c...
ruby
chosen
[ { "from": "system", "value": "Append \"Kickstarter-\" to package name\n\nFriendlier than just the number jumble\n" }, { "from": "human", "value": "module Origami\n class S3Package\n attr_reader :variant, :version, :file_path\n\n def initialize(variant:, version:, file_path:)\n @varia...
ruby
chosen
[ { "from": "system", "value": "Support second argument of install command\n\n$ dcenv install rust schickling/rust\n" }, { "from": "human", "value": "require 'dcenv'\nrequire 'thor'\n\nmodule Dcenv\n class Cli < Thor\n def self.exit_on_failure?\n true\n end\n\n class_option :help, :...
ruby
chosen
[ { "from": "system", "value": "Fix bug causing Rake task failure when no DB config\n\nThe entire `rake` command should not fail because some introspection\nfailed due to a missing file. This was a pretty glaring bug.\n" }, { "from": "human", "value": "module WCC\n module RakeHelpers\n\n def s...
ruby
chosen
[ { "from": "system", "value": "Add wb_extra import task to the main import task\n" }, { "from": "human", "value": "namespace :db do\n desc 'Imports all data in correct order, replaces non-dictionary data'\n task import: [\n 'locations:import',\n 'location_members:import',\n 'ndcs:full:...
ruby
chosen
[ { "from": "system", "value": "Add require yaml library for parsing configuration files\n" }, { "from": "human", "value": "require 'ostruct'\n\nmodule SimpleConf\n class Loader\n attr_reader :klass\n\n def initialize(klass)\n @klass = klass\n end\n\n def run\n yaml_file.eac...
ruby
chosen
[ { "from": "system", "value": "Add --version option to cli\n" }, { "from": "human", "value": "require 'optparse'\n\nmodule Snapme\n module CLI\n class Options\n DEFAULT_HOST = 'http://snapme.herokuapp.com'\n DEFAULT_INTERVAL = 30 #seconds\n\n attr_reader :daemon, :host, :in...
ruby
chosen
[ { "from": "system", "value": "Fix bug in defining income vs expenditure\n" }, { "from": "human", "value": "require 'transaction_service'\n\n# Methods for formatting data for use in tables\nmodule TableDataService\n def self.transactions_by_week\n transactions_by_week = []\n\n # Collect tr...
ruby
chosen
[ { "from": "system", "value": "Include the Scotland module in the gem entry point.\n" }, { "from": "human", "value": "require 'date'\nrequire \"timetress/version\"\nrequire \"timetress/easter\"\nrequire \"timetress/holiday\"\nrequire \"timetress/workday\"\n\nrequire 'timetress/norway'\nrequire 't...
ruby
chosen
[ { "from": "system", "value": "Fix OmniAuth auth failure proc\n\nCurrently we configure OmniAuth so that if the authorization step fails,\nthe `failure` action in Spree::OmniauthCallbacksController is called.\nThis controller is obtained by taking the configured Spree user class\n(Spree::User), asking for it...
ruby
chosen
[ { "from": "system", "value": "Add length constraints to title in Post model factory\n\nSigned-off-by: Max Fierke <0706025b2bbcec1ed8d64822f4eccd96314938d0@maxfierke.com>\n" }, { "from": "human", "value": "FactoryGirl.define do\n factory :post do\n title { Faker::Lorem.sentence(2) }\n end\ne...
ruby
chosen
[ { "from": "system", "value": "Rename ActionView::Helpers::AssetTagHelper.stylesheet_link_tag to print_stylesheet_link_tag (stringify_keys doesn't work for rails3)\n" }, { "from": "human", "value": "module ActionView\n \n module Helpers\n module AssetTagHelper\n \n alias_method :ol...
ruby
chosen
[ { "from": "system", "value": "Support autoprefixer.yml's provided by engines\n" }, { "from": "human", "value": "require 'yaml'\n\nbegin\n module AutoprefixedRails\n class Railtie < ::Rails::Railtie\n rake_tasks do |app|\n require 'rake/autoprefixer_tasks'\n Rake::Autoprefi...
ruby
chosen
[ { "from": "system", "value": "Set a default endpoint in the constructor if one isn't set.\n" }, { "from": "human", "value": "class Subscription\n attr_accessor :subscription_id\n attr_accessor :subscription_name\n attr_accessor :management_certificate\n attr_accessor :default\n attr_accesso...
ruby
chosen
[ { "from": "system", "value": "Make it possible to [optionally] annotate Bunny::Concurrent::Condition for ease of debugging\n" }, { "from": "human", "value": "require \"thread\"\n\nmodule Bunny\n module Concurrent\n # Akin to java.util.concurrent.Condition and intrinsic object monitors (Objec...
ruby
chosen
[ { "from": "system", "value": "Update git tag in podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'libPusher'\n s.version = '1.6.1'\n s.license = 'MIT'\n s.summary = 'An Objective-C client for the Pusher.com service'\n s.homepage ...
ruby
chosen
[ { "from": "system", "value": "Write last result of template.\n" }, { "from": "human", "value": "module JRB\n module Rails\n class TemplateHandler\n class << self\n def call(template)\n helper = JRB.const_get(template.mime_type.to_sym.to_s.upcase)\n\n [ \"class_e...
ruby
chosen
[ { "from": "system", "value": "Remove peridicity on log_memory_consumption job\n" }, { "from": "human", "value": "class LogMemoryConsumptionJob < Struct.new(:last_stat)\n # Number of entries do display\n N = 20\n # In seconds\n PERIOD = 10\n\n def perform\n logpath = File.join(Rails.root,...
ruby
chosen
[ { "from": "system", "value": "Fix cache key not called\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire \"redis\"\n\nmodule MetalArchives\n module Cache\n ##\n # Redis-backed cache\n #\n class Redis < Base\n def initialize(options = {})\n super...
ruby
chosen
[ { "from": "system", "value": "Add default query (api key and timestamp) to yahoo buy\n" }, { "from": "human", "value": "\nrequire 'rest-core'\n\nmodule RestCore\n module YahooBuy\n autoload :Signature, 'rest-core/client/yahoo_buy/signature'\n Client = Builder.client(:api_key) do\n us...
ruby
chosen
[ { "from": "system", "value": "Resolve Chef 13 deprecation warning\n" }, { "from": "human", "value": "require 'chef/provider/lwrp_base'\nrequire_relative 'helpers'\n\nclass Chef\n class Provider\n # Provider for cpan_module lwrp\n class CpanModule < Chef::Provider::LWRPBase\n use_inli...
ruby
chosen
[ { "from": "system", "value": "Fix the name of the license file\n\nCloses #296" }, { "from": "human", "value": "$:.unshift File.expand_path(\"../lib\", __FILE__)\nrequire \"sprockets/rails/version\"\n\nGem::Specification.new do |s|\n s.name = \"sprockets-rails\"\n s.version = Sprockets::Rails::...
ruby
chosen
[ { "from": "system", "value": "Use Hydra 10 style datastream declaration\n" }, { "from": "human", "value": "# --- BEGIN LICENSE_HEADER BLOCK ---\n# Copyright 2011-2013, The Trustees of Indiana University and Northwestern\n# University. Licensed under the Apache License, Version 2.0 (the \"Lice...
ruby
chosen
[ { "from": "system", "value": "Remove debug puts for post-receive.\n" }, { "from": "human", "value": "module CaptainHook\n module DSL\n class HandlePostReceive\n def initialize(post_receive_event)\n @post_receive_event = post_receive_event\n end\n\n def message\n ...
ruby
chosen
[ { "from": "system", "value": "Clean up memory used during chrome js executions\n" }, { "from": "human", "value": "module Perus::Pinger\n class ChromeExecute < ChromeCommand\n description 'Executes JavaScript in the top Chrome window. The result\n of the execution is...
ruby
chosen
[ { "from": "system", "value": "Use a recent version of overcommit, otherwise --sign is broken\n" }, { "from": "human", "value": "require_relative \"base\"\n\nmodule Suspenders\n class LintGenerator < Generators::Base\n def add_linters_gems\n gem 'rubocop', require: false, group: :develop...
ruby
chosen
[ { "from": "system", "value": "Remove unused Faraday stubbing method\n" }, { "from": "human", "value": "require 'linkedin2'\n\nrequire 'rspec'\nrequire 'vcr'\nrequire 'pry'\nrequire 'byebug'\n\nrequire 'simplecov'\nSimpleCov.start do\n add_group 'API', 'lib/evertrue/api'\nend\n\nVCR.configure do...
ruby
chosen
[ { "from": "system", "value": "Disable code coverage for JRuby\n" }, { "from": "human", "value": "# coding: utf-8\n\nrequire 'coveralls'\nCoveralls.wear!\n\nrequire 'i18n'\nif I18n.config.respond_to?(:enforce_available_locales)\n I18n.config.enforce_available_locales = true\nend\n\nrequire 'acti...
ruby
chosen
[ { "from": "system", "value": "Configure RSpec 3.x to support the old RSpec syntax" }, { "from": "human", "value": "# encoding: utf-8\n\nrequire 'jara'" }, { "from": "gpt", "value": "# encoding: utf-8\n\nrequire 'jara'\n\nRSpec.configure do |config|\n config.expect_with :rspec do |c|...
ruby
chosen
[ { "from": "system", "value": "[WIP] Update to new transproc API\n" }, { "from": "human", "value": "# encoding: utf-8\n\n# this is needed for guard to work, not sure why :(\nrequire \"bundler\"\nBundler.setup\n\nif RUBY_ENGINE == \"rbx\"\n require \"codeclimate-test-reporter\"\n CodeClimate::Te...
ruby
chosen
[ { "from": "system", "value": "Enforce locale to get rid of deprecation warning\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'rspec'\nrequire 'active_zuora'\n\nActiveZuora.configure(\n :log => ENV['DEBUG'],\n :username => ENV['ZUORA_USER'],\n :password => ENV['ZUORA_PASS']\n)...
ruby
chosen
[ { "from": "system", "value": "Add missing String methods to make all specs pass with Ruby 1.8.6\n" }, { "from": "human", "value": "# Copyright (c) 2010-2011 Michael Dvorkin\n#\n# Awesome Print is freely distributable under the terms of MIT license.\n# See LICENSE file or http://www.opensource.or...
ruby
chosen
[ { "from": "human", "value": "Add the spec helper file\n" }, { "from": "gpt", "value": "$:.unshift File.expand_path('..', __FILE__)\n$:.unshift File.expand_path('../../lib', __FILE__)\nrequire 'coveralls'\nCoveralls.wear!\nrequire 'rspec'\nrequire 'pry'\n" } ]
ruby
chosen
[ { "from": "system", "value": "Add safe index name prefix and after suite index deletion\n\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'bundler'\nrequire 'timeout'\n\nBundler.setup :test\n\n$LOAD_PATH.unshift(File.dirname(__FILE__))\n$LOAD_PATH.unshift(File.join(File.dirname(__...
ruby
chosen
[ { "from": "system", "value": "Set up test class on every spec run to ensure clean slate\n" }, { "from": "human", "value": "# Configure Rails Envinronment\nENV[\"RAILS_ENV\"] = \"test\"\nrequire File.expand_path(\"../dummy/config/environment.rb\", __FILE__)\n\nrequire 'rspec/rails'\n\nENGINE_RAI...
ruby
chosen
[ { "from": "system", "value": "Add context alias for describe.\n" }, { "from": "human", "value": "require 'minitest/autorun'\nrequire 'minitest/pride'\n" }, { "from": "gpt", "value": "require 'minitest/autorun'\nrequire 'minitest/pride'\n\n# For my rspec poisoned brain. ;)\nmodule Ker...
ruby
chosen
[ { "from": "system", "value": "Configure VCR to allow sending Code Climate reports\n" }, { "from": "human", "value": "VCR.configure do |config|\n config.cassette_library_dir = \"spec/cassettes\"\n config.hook_into :webmock\nend\n" }, { "from": "gpt", "value": "VCR.configure do |conf...
ruby
chosen
[ { "from": "system", "value": "Add license and platform to the gemspec\n\nThis commit adds the MIT license and platform to the gemspec. The missing license added due to a warning when building the gem. The platform was added on a whim by noticing it was missing.\n" }, { "from": "human", "value"...
ruby
chosen
[ { "from": "system", "value": "Remove reference to Capybara in gemspec(I started with a copy from that\nprocject)\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib/', __FILE__)\n$:.unshift lib unless $:.include?(lib)\n\nrequire 'capybara/version'\n\nGem:...
ruby
chosen
[ { "from": "system", "value": "Switch Reader/Editor loading so redirect works\n" }, { "from": "human", "value": "require \"sinatra/base\"\nrequire \"sinatra/nedry\"\n\nrequire \"sequel\"\nrequire \"redcarpet\"\nrequire \"pharrell\"\n\nrequire \"./lib/all\"\nrequire \"./config\"\n\nrequire \"./app...
ruby
chosen
[ { "from": "system", "value": "Package version is increased from 0.8.0.1 to 0.8.1.0\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'evt-messaging'\n s.version = '0.8.0.1'\n s.summary = 'Messaging primitives for Eventide'\n s.description ...
ruby
chosen
[ { "from": "system", "value": "Scale scores by 10 to match point system\n" }, { "from": "human", "value": "class Distance\n # absents have low weighting, except where it is a strong vote\n STRONG_WEIGHT = 5.0\n ABSENT_WEIGHT = 0.2\n\n attr_reader :same, :samestrong, :differ, :differstrong, :a...
ruby
chosen
[ { "from": "system", "value": "Change `require_relative` to `require` in base Gem include\n" }, { "from": "human", "value": "require_relative 'mementus/graph'\nrequire_relative 'mementus/structure/adjacency_list'\nrequire_relative 'mementus/structure/incidence_list'\nrequire_relative 'mementus/no...
ruby
chosen
[ { "from": "system", "value": "Make gem description consistent with Github.\n" }, { "from": "human", "value": "$:.unshift File.expand_path('lib', File.dirname(__FILE__))\nrequire 'looksee/version'\n\nGem::Specification.new do |s|\n s.name = 'looksee'\n s.version = Looksee::VERSION\n s.authors ...
ruby
chosen
[ { "from": "system", "value": "Remove unnecessary function of push\n" }, { "from": "human", "value": "require 'json'\n\nmodule Umakadata\n\n module Logging\n\n class CriteriaLog < Log\n\n attr_writer :result\n\n def initialize\n @list = Array.new\n @result = nil\n ...
ruby
chosen
[ { "from": "system", "value": "Raise if exit code is not 0\n" }, { "from": "human", "value": "module Hdo\n module WebhookDeployer\n class Deployer\n include Celluloid\n\n def initialize(config, commit)\n @commit = commit\n @timeout = config.fetch('timeout', 60)\n ...
ruby
chosen
[ { "from": "system", "value": "Fix FixPageFileIds again for postgres\n" }, { "from": "human", "value": "class FixPageFileIds < ActiveRecord::Migration[5.0]\n def change\n attachment_id = max_id(:attachment_id, :page_files)\n pf_id = max_id(:id, :page_files)\n\n if attachment_id && pf_id...
ruby
chosen
[ { "from": "system", "value": "Disable Sidekiq inline testing in development\n" }, { "from": "human", "value": "if Rails.env.development?\n require 'sidekiq/testing'\n Sidekiq::Testing.inline!\nend\n\n# Old behaviour, we should look at moving to ActiveJob instead probably to get this\n# https:/...
ruby
chosen
[ { "from": "system", "value": "Add task to publish datasets on migration to add visibility_level\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nclass AddVisibilityLevelToGdataDatasets < ActiveRecord::Migration[5.2]\n def change\n add_column :gdata_datasets, :visibility_le...
ruby
chosen
[ { "from": "system", "value": "Update gem order to be alphabetical\n" }, { "from": "human", "value": "# encoding: utf-8\n\nrequire File.expand_path('../lib/axiom/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = 'axiom'\n gem.version = Axiom::VERSION.dup\n gem.auth...
ruby
chosen