conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add thin as dev dependency for redirection spec\n" }, { "from": "human", "value": "$:.unshift(File.dirname(__FILE__) + '/lib')\nrequire 'chef_fs/version'\n\nGem::Specification.new do |s|\n s.name = \"knife-essentials\"\n s.version = ChefFS::VERSION\n s.license = ...
ruby
chosen
[ { "from": "system", "value": "Use Mime::JSON as the default response type\n" }, { "from": "human", "value": "class JbuilderTemplate < Jbuilder\n def self.encode(context)\n new(context)._tap { |jbuilder| yield jbuilder }.target!\n end\n\n def initialize(context)\n @context = context\n ...
ruby
chosen
[ { "from": "human", "value": "Add tests for security groups.\n" }, { "from": "gpt", "value": "Shindo.tests('Fog::Compute[:hp] | security group requests', ['hp']) do\n\n @security_groups_format = {\n 'security_groups' => [{\n 'rules' => [{\n 'id' => Integer,\n 'fro...
ruby
chosen
[ { "from": "system", "value": "Use parentheses in CI/CD kubernetes policy specs\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Gitlab::Ci::Build::Policy::Kubernetes do\n let(:pipeline) { create(:ci_pipeline, project: project) }\n\n context 'when kubernetes service is activ...
ruby
chosen
[ { "from": "system", "value": "Move initializer for ActsAsGmappable from Rails::Engine to Rails::Railtie\nTo solve no method error when using RailsAdmin's history feature\n" }, { "from": "human", "value": "if defined?(Rails) && Rails::VERSION::MAJOR == 3\n module Gmaps4rails\n require 'rails'...
ruby
chosen
[ { "from": "system", "value": "Clear the template cache in development\n\nRails template caching is currently too aggressive for haml_coffee_assets.\nIn development wipe the cache when resolving template requests for html\ncontent types.\n" }, { "from": "human", "value": "require \"action_view\"\...
ruby
chosen
[ { "from": "human", "value": "Add support for Mention app\n" }, { "from": "gpt", "value": "class Mention < Cask\n version :latest\n sha256 :no_check\n\n url 'https://en.mention.com/downloads/mac/mention.dmg'\n homepage 'https://en.mention.com/'\n\n app 'Mention.app'\nend\n" } ]
ruby
chosen
[ { "from": "system", "value": "Remove unused foo.txt and bar.txt files\n" }, { "from": "human", "value": "# encoding: utf-8\n\nclass Nanoc::Extra::PiperTest < Nanoc::TestCase\n\n def test_basic\n stdout = StringIO.new\n stderr = StringIO.new\n\n cmd = %w( ls -l )\n\n File.open('foo.t...
ruby
chosen
[ { "from": "system", "value": "Fix subscribe in newer versions of Redis (thanks mikedemers)\n" }, { "from": "human", "value": "require \"redis\"\nrequire \"json\"\n\nmodule Juggernaut\n def redis_options\n @redis_options ||= {}\n end\n \n def publish(channels, data, options = {})\n mess...
ruby
chosen
[ { "from": "system", "value": "Add newline to end of file\n" }, { "from": "human", "value": "require 'formula'\n\nclass Groovy < Formula\n homepage 'http://groovy.codehaus.org/'\n url 'http://dist.groovy.codehaus.org/distributions/groovy-binary-1.8.3.zip'\n md5 '82dd3be3ab02ab0b4e763dfeba83487...
ruby
chosen
[ { "from": "system", "value": "Add license specification to gemspec.\n\n* Closes #148.\n" }, { "from": "human", "value": "$: << File.dirname(__FILE__) + \"/lib\"\nrequire \"vanity/version\"\n\nGem::Specification.new do |spec|\n spec.name = \"vanity\"\n spec.version = Vanity::VE...
ruby
chosen
[ { "from": "human", "value": "Add The Big Mean Folder Machine\n" }, { "from": "gpt", "value": "class BigMeanFolderMachine < Cask\n url 'http://www.publicspace.net/download/BMFM.dmg'\n homepage 'http://www.publicspace.net/BigMeanFolderMachine/'\n version 'latest'\n sha256 :no_check\n link 'Bi...
ruby
chosen
[ { "from": "system", "value": "Change from type=gauge to type=counter (ht @zakwilson)\n" }, { "from": "human", "value": "# encoding: utf-8\nclass Service::Datadog < Service\n def receive_logs\n raise_config_error 'Missing API Key' if settings[:api_key].to_s.empty?\n raise_config_error 'Mis...
ruby
chosen
[ { "from": "system", "value": "Add month_periods(count = 12) helper.\n" }, { "from": "human", "value": "module PagerHelper\n def month_title(date_or_range)\n if date_or_range.respond_to?(:first)\n date = date_or_range.first\n else\n date = date_or_range\n end\n\n month_name...
ruby
chosen
[ { "from": "system", "value": "Use built in validation on AboutMeValidator model\n" }, { "from": "human", "value": "# -*- encoding : utf-8 -*-\n# models/about_me_validator.rb:\n# Validates editing about me text on user profile pages.\n#\n# Copyright (c) 2010 UK Citizens Online Democracy. All righ...
ruby
chosen
[ { "from": "system", "value": "Change db credentials for generic connection test\n" }, { "from": "human", "value": "require 'jdbc/mysql'\n\nconfig = {\n :username => 'blog',\n :password => '',\n :adapter => 'jdbc',\n :driver => 'com.mysql.jdbc.Driver',\n :url => 'jdbc:mysql://localho...
ruby
chosen
[ { "from": "system", "value": "Tag message is frozen so avoid stripping destructively\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule Tags\n class CreateService < BaseService\n def execute(tag_name, target, message, release_description = nil)\n valid_tag = Gitl...
ruby
chosen
[ { "from": "human", "value": "Add seeds for protected branches.\n" }, { "from": "gpt", "value": "Gitlab::Seeder.quiet do\n admin_user = User.find(1)\n\n Project.all.each do |project|\n params = {\n name: 'master'\n }\n\n ProtectedBranches::CreateService.new(project, admin_user, pa...
ruby
chosen
[ { "from": "system", "value": "Load heroku values always if they are available, then override with config.yml\n" }, { "from": "human", "value": "require 'ostruct'\n\nconfig_file = Rails.root.join('config', Rails.env == \"test\" ? \"config.example.yml\" : \"config.yml\")\nErrbit::Config = nil # as...
ruby
chosen
[ { "from": "system", "value": "Order email tests already exist within core\n\nNo need to have them duplicated in auth as well\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Spree::Order do\n let(:order) { Spree::Order.new }\n\n context '#associate_user!' do\n let(:user)...
ruby
chosen
[ { "from": "system", "value": "Update formulae for version 0.7\n\n* Use new \"url\" features\n* Use keg_only DSL\n* Use \"skip_clean :all\" DSL\n* Whitespace and style cleanups\n* Make bash invocations less silly\n* Use new man2-man8 helpers\n* Remove \"FileUtils.\" since it is included in Formula\n* Use rea...
ruby
chosen
[ { "from": "system", "value": "JariBakken: Add missing wait to double/context click spec.\n\nr14055\n" }, { "from": "human", "value": "require File.expand_path(\"../spec_helper\", __FILE__)\n\nmodule Selenium\n module WebDriver\n describe Mouse do\n\n it \"clicks an element\" do\n ...
ruby
chosen
[ { "from": "system", "value": "Revert temporary change to collation tries dumper.\n" }, { "from": "human", "value": "# encoding: UTF-8\n\n# Copyright 2012 Twitter, Inc\n# http://www.apache.org/licenses/LICENSE-2.0\n\nmodule TwitterCldr\n module Resources\n\n module CollationTriesDumper\n\n ...
ruby
chosen
[ { "from": "system", "value": "Correct whitespace generated by factory template.\n\nCloses #36\n" }, { "from": "human", "value": "# Read about factories at http://github.com/thoughtbot/factory_girl\n\nFactoryGirl.define do\n factory :<%= singular_name %> do\n <% for attribute in attributes -%>\...
ruby
chosen
[ { "from": "human", "value": "Add specs for sanitize_hash helper.\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\nmodule Refinery\n describe PagesHelper do\n describe \"#sanitize_hash\" do\n context \"when hash value responds to html_safe\" do\n it \"returns hash with sa...
ruby
chosen
[ { "from": "system", "value": "Define the minute to run on the first minute of the hour only\n\n\nFormer-commit-id: 54d8cbfaa60951eb18b1f787e0c968b98d329100 [formerly 13f10dd83f17911e46a5871e1a08f35b2dafe861] [formerly 436054e333c925cbf302bd686741cfcb6b6cbc40 [formerly 006ecf01b269ed03d7081f515099b95874c02ed...
ruby
chosen
[ { "from": "system", "value": "Drop Iconv and use similar encoding logic in BookingImport as in Mt940Attachment.\n" }, { "from": "human", "value": "# encoding: utf-8\n\nclass BookingImport < Attachment\n # Transformation\n # ==============\n def rows\n csv = Iconv.iconv('utf-8', 'ISO-8859-1...
ruby
chosen
[ { "from": "system", "value": "Remove debugging output that was causing migration to fail\n" }, { "from": "human", "value": "require 'digest/sha1'\n\nclass AddHashToInfoRequest < ActiveRecord::Migration\n def self.up\n add_column :info_requests, :idhash, :string\n\n # Create the ...
ruby
chosen
[ { "from": "system", "value": "Remove unused options argument in LocalizedNumber methods.\n" }, { "from": "human", "value": "# encoding: UTF-8\n\n# Copyright 2012 Twitter, Inc\n# http://www.apache.org/licenses/LICENSE-2.0\n\nmodule TwitterCldr\n module LocalizedNumberMixin\n def localize(loca...
ruby
chosen
[ { "from": "system", "value": "Add version limit to omniauth-oauth2 gem\n\nVersion 1.4 sends the full url (including query string) when validating\ntokens. This incompatible with beeminder.com api.\n" }, { "from": "human", "value": "Gem::Specification.new do |gem|\n gem.name = 'omniauth-beeminde...
ruby
chosen
[ { "from": "system", "value": "Update gemspec to RubyParser 3.0.1\n" }, { "from": "human", "value": "require './lib/brakeman/version'\n\nGem::Specification.new do |s|\n s.name = %q{brakeman}\n s.version = Brakeman::Version\n s.authors = [\"Justin Collins\"]\n s.summary = \"Security vulnerabil...
ruby
chosen
[ { "from": "system", "value": "Call the correct method in the BlocksJsonSerialization spec\n" }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe BlocksJsonSerialization do\n DummyModel = Class.new do\n include BlocksJsonSerialization\n end\n\n it 'blocks as_json' do\n exp...
ruby
chosen
[ { "from": "system", "value": "Add support for collect operation\n" }, { "from": "human", "value": "module AQL\n class Node\n class Operation\n # Base class for nary operations\n class Nary < self\n include Composition.new(:body)\n\n private\n\n # Emit node\n ...
ruby
chosen
[ { "from": "system", "value": "Fix bad code causing errors\n\nIt appears a merge conflict wasn't properly cleaned up in\n1fbb3e97c66ba413e0fa294a5f56d1079eea957e and causes issues when calling knife.\nThis should fix the problem.\n\nSigned-off-by: Lance Albertson <3161cdc7bf197e4c3a35b9cbe358c79910f27e90@osu...
ruby
chosen
[ { "from": "system", "value": "Add a method to get the servers a LightBot is connected to\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'discordrb/api'\nrequire 'discordrb/light/data'\n\n# This module contains classes to allow connections to bots without a connection...
ruby
chosen
[ { "from": "system", "value": "Allow newlines, carriage return, and tabs\n" }, { "from": "human", "value": "Dir[File.dirname(__FILE__) + '/search/*.rb'].each {|file| require file }\n\nmodule DC\n\n # The Search module takes in a raw query string, processes it, queries\n # our backing stores for...
ruby
chosen
[ { "from": "system", "value": "[Sass] Convert Sass::Repl docs to YARD.\n" }, { "from": "human", "value": "require 'readline'\n\nmodule Sass\n class Repl\n def initialize(options = {})\n @options = options\n end\n\n def run\n environment = Environment.new\n environment.set...
ruby
chosen
[ { "from": "system", "value": "Fix case order in Rubinius::Type.coerce_to_float on 1.9\n\n* Float is a Numeric.\n* Removed `return` is an adjusted style to Numeric section.\n" }, { "from": "human", "value": "# -*- encoding: us-ascii -*-\n\nmodule Rubinius\n module Type\n def self.coerce_to_ar...
ruby
chosen
[ { "from": "system", "value": "Replace my incorrect comment with tomtt's great trick\n" }, { "from": "human", "value": "module NavigationHelpers\n # Maps a static name to a static route.\n #\n # This method is *not* designed to map from a dynamic name to a \n # dynamic route like <tt>post_com...
ruby
chosen
[ { "from": "system", "value": "Make the LOGGER fancy if a certain environment variable is set\n" }, { "from": "human", "value": "require 'discordrb/version'\nrequire 'discordrb/bot'\nrequire 'discordrb/commands/command_bot'\nrequire 'discordrb/logger'\n\n# All discordrb functionality, to be exten...
ruby
chosen
[ { "from": "system", "value": "Clean up documentation and a typo\n" }, { "from": "human", "value": "module Rake\n\n # The NameSpace class will lookup task names in the the scope\n # defined by a +namespace+ command.\n #\n class NameSpace\n\n # Create a namespace lookup object using the giv...
ruby
chosen
[ { "from": "human", "value": "Add Hot Shots 2.app version 2.2\n\nHot Shots 2! A Mac OS X Dribbble Client.\n" }, { "from": "gpt", "value": "cask :v1 => 'hot-shots' do\n version '2.2'\n sha256 '51f055625e3e5d7856e2aaf9a7f7559fd66b3acca51304bb8f29fac716530f88'\n\n url \"http://gngrwzrd.com/HotSho...
ruby
chosen
[ { "from": "system", "value": "Use token hash for redis key\n" }, { "from": "human", "value": "class CheckGcpProjectBillingWorker\n include ApplicationWorker\n\n LEASE_TIMEOUT = 15.seconds.to_i\n\n def self.redis_shared_state_key_for(token)\n \"gitlab:gcp:#{token}:billing_enabled\"\n end\n...
ruby
chosen
[ { "from": "system", "value": "Unshield: Add support for new Installshield versions\n\nUnsheild aborts when processing Installshield versions 12 and above.\nThis commit adds a patch which resolves this.\n\nCloses #17563.\n\nSigned-off-by: Adam Vandenberg <34c2b6407fd5a10249a15d699d40f9ed1782e98c@gmail.com>\n...
ruby
chosen
[ { "from": "system", "value": "Create an initializer for LightProfile\n" }, { "from": "human", "value": "module Discordrb::Light\n # Represents the bot account used for the light bot, but without any methods to change anything.\n class LightProfile\n end\nend\n" }, { "from": "gpt", ...
ruby
chosen
[ { "from": "system", "value": "Fix issue with named transforms\n\nTransform rules can contain a ::Null named transform that’s designed to\nreset the cursor.\n" }, { "from": "human", "value": "# encoding: UTF-8\n\n# Copyright 2012 Twitter, Inc\n# http://www.apache.org/licenses/LICENSE-2.0\n\nmodul...
ruby
chosen
[ { "from": "system", "value": "Create the directories before we try to download the tar and CD into a\ndirectory that might not exist\n\n\nFormer-commit-id: 9adbfba33e9f8ddeeb5eb2c28b58911e56fa92d4 [formerly 57554f6e8a52c05e1060ca88daecbcb79c87f5fe] [formerly 8b8359aacd9cdc7fc214713b5a54ab86d907eed4 [formerl...
ruby
chosen
[ { "from": "system", "value": "Fix path for gembins in specs\n" }, { "from": "human", "value": "module Spec\n module Rubygems\n def self.setup\n Gem.clear_paths\n\n ENV['BUNDLE_PATH'] = nil\n ENV['GEM_HOME'] = ENV['GEM_PATH'] = Path.base_system_gems.to_s\n ENV['PATH'] = \"...
ruby
chosen
[ { "from": "human", "value": "Add a task to enable ezine members state\n" }, { "from": "gpt", "value": "class SS::Migration20150408081234\n def change\n Ezine::Member.where(state: nil).each do |member|\n member.update state: 'enabled'\n end\n end\nend\n" } ]
ruby
chosen
[ { "from": "system", "value": "Upgrade rspec dependency for development\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/meta_inspector/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Jaime Iniesta\"]\n gem.email ...
ruby
chosen
[ { "from": "system", "value": "Fix implementation of resize_window for Selenium\n" }, { "from": "human", "value": "module MobileHelpers\n def resize_screen_xs\n resize_window(767, 768)\n end\n\n def resize_screen_sm\n resize_window(900, 768)\n end\n\n def restore_window_size\n resiz...
ruby
chosen
[ { "from": "system", "value": "Update SpotifyBeta.app to latest 1.0.0.797\n" }, { "from": "human", "value": "cask :v1 => 'spotifybeta' do\n version '1.0.0.588.g5dffdc66-3237'\n sha256 '918101254dd8177dc66e2642edf65500ce3f13ef4ce089925fef5f77529979ab'\n\n url \"http://download.spotify.com/beta/...
ruby
chosen
[ { "from": "system", "value": "Update optionable dependency to ~> 0.2.0\n" }, { "from": "human", "value": "# encoding: utf-8\nlib = File.expand_path('../lib/', __FILE__)\n$:.unshift lib unless $:.include?(lib)\n\nrequire \"moped/version\"\n\nGem::Specification.new do |s|\n s.name = \"mope...
ruby
chosen
[ { "from": "system", "value": "Fix object_attributes() ( i.e., was calling join within the block not on\nit )\n" }, { "from": "human", "value": "module Fog\n # Fog::Formatador\n class Formatador\n\n attr_accessor :object, :thread, :string\n\n def initialize(obj, t)\n raise ArgumentEr...
ruby
chosen
[ { "from": "system", "value": "Add alias_method to make login_user always available\n" }, { "from": "human", "value": "module DeviseControllerMacros # http://git.io/WHvARA\n extend ActiveSupport::Concern\n\n def login_user(user = nil)\n user ||= FactoryGirl.create(:user, :confirmed)\n @re...
ruby
chosen
[ { "from": "system", "value": "Raise error; return false is not enough.\n" }, { "from": "human", "value": "def wait_for(cmd, sleep_secs=20, max_wait_secs=15*60)\n ready = false\n total_time = 0\n until ready\n sh cmd do |ok, res|\n if ok\n puts \"...ready!\"\n ready = tru...
ruby
chosen
[ { "from": "system", "value": "Fix reporting :create to trogdir on update\n" }, { "from": "human", "value": "module Workers\n class UpdateGoogleAppsAccount\n include Sidekiq::Worker\n\n sidekiq_options retry: false\n\n def perform(email, first_name, last_name, department, title, privacy...
ruby
chosen
[ { "from": "system", "value": "Simplify the implementation of messages for the be matcher\n" }, { "from": "human", "value": "module RSpec\n module Matchers\n module BuiltIn\n class Equal < BaseMatcher\n def match(expected, actual)\n actual.equal? expected\n end\n\n...
ruby
chosen
[ { "from": "system", "value": "Write some more specs for APIMock\n" }, { "from": "human", "value": "require 'discordrb'\nrequire 'mock/api_mock'\nusing APIMock\n\ndescribe APIMock do\n it 'stores the used method' do\n Discordrb::API.raw_request(:get, [])\n\n Discordrb::API.last_method.shou...
ruby
chosen
[ { "from": "system", "value": "Upgrade Android Studio.app to v0.5.8 135.1155795\n" }, { "from": "human", "value": "class AndroidStudio < Cask\n url 'http://dl.google.com/dl/android/studio/ide-zips/0.5.5/android-studio-ide-135.1122749-mac.zip'\n homepage 'https://developer.android.com/sdk/instal...
ruby
chosen
[ { "from": "system", "value": "Test that configuration is correct\n" }, { "from": "human", "value": "require File.dirname(__FILE__) + '/../test_helper'\n\nclass AdminControllerTest < ActionController::TestCase\nend" }, { "from": "gpt", "value": "require File.dirname(__FILE__) + '/../t...
ruby
chosen
[ { "from": "system", "value": "Clear deliveries array after running spec.\n" }, { "from": "human", "value": "require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')\n\ndescribe HelpController, \"when using help\" do\n integrate_views\n \n it \"shows the about page\" do\n ...
ruby
chosen
[ { "from": "system", "value": "Sort languages by the name\n" }, { "from": "human", "value": "module Tolk\n module ApplicationHelper\n def format_i18n_value(value)\n h(yaml_value(value)).gsub(/\\n/, '<br />')\n end\n\n def format_i18n_text_area_value(value)\n yaml_value(value)\...
ruby
chosen
[ { "from": "system", "value": "Upgrade Bitwig Studio to 1.3.3\n" }, { "from": "human", "value": "cask :v1 => 'bitwig-studio' do\n version '1.1.8'\n sha256 '9500a6479055402febb12817c26af187706d2937a1c781c1a0147493ffdd7775'\n\n url \"https://downloads.bitwig.com/Bitwig%20Studio%20#{version}.dmg\...
ruby
chosen
[ { "from": "human", "value": "Rename activator translation table for spree 2-2-stable\n\nFixes #357\n" }, { "from": "gpt", "value": "class RenameActivatorTranslationsToPromotionTranslations < ActiveRecord::Migration\n def change\n if ActiveRecord::Base.connection.table_exists? 'spree_activato...
ruby
chosen
[ { "from": "system", "value": "Fix spec reference to Channel instead of Rubinius::Channel.\n" }, { "from": "human", "value": "require File.expand_path('../../../spec_helper', __FILE__)\nrequire 'actor'\n\ndescribe \"Actor.link\" do\n it \"sends an exit message to linked Actors\" do\n master =...
ruby
chosen
[ { "from": "system", "value": "Revert \"fix bundler development dependency version\"\n\nThis reverts commit b2b666f59bc74ec0b0d758ddb3e400cb7e7df352.\n\nConflicts:\n\tregressed.gemspec\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshi...
ruby
chosen
[ { "from": "system", "value": "Use @!attribute to document delegate attributes\n" }, { "from": "human", "value": "require 'discordrb/events/generic'\nrequire 'discordrb/await'\n\nmodule Discordrb::Events\n # @see Bot#await\n class AwaitEvent < Event\n # The await that was triggered.\n # @...
ruby
chosen
[ { "from": "system", "value": "Fix bug: User gets logged out if we've lost their session\n" }, { "from": "human", "value": "class GamesController < ApplicationController\n wrap_parameters format: %i(json xml url_encoded_form multipart_form)\n\n before_filter :lookup_user\n\n def new\n redir...
ruby
chosen
[ { "from": "system", "value": "Make it use actual /etc/hosts file instead of tempfile\n" }, { "from": "human", "value": "class << Ghost\n attr_accessor :store\nend\n\nrequire 'ghost/store/hosts_file_store'\nrequire 'ghost/store/dscl_store' # TODO: only load on OS X\n\nrequire 'tempfile'\nGhost.s...
ruby
chosen
[ { "from": "system", "value": "Fix failing migration for new price and currency columns of ticket\n" }, { "from": "human", "value": "class SplitTicketPriceInPriceAndCurrency < ActiveRecord::Migration\n class TempTicket < ActiveRecord::Base\n self.table_name = 'tickets'\n attr_accessible :t...
ruby
chosen
[ { "from": "system", "value": "Move package attributes to their own file\n" }, { "from": "human", "value": "#\n# Author:: Benjamin Black (<b@b3k.us>)\n# Cookbook Name:: riak\n#\n# Copyright (c) 2010 Basho Technologies, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n...
ruby
chosen
[ { "from": "system", "value": "Add explicit version dependency on tilt\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"sass/rails/version\"\n\nGem::Specification.new do |s|\n s.name = \"sass-rails\"\n s.version =...
ruby
chosen
[ { "from": "system", "value": "Reduce expected rate of date parses for now\n" }, { "from": "human", "value": "require \"test_utils\"\nrequire \"logstash/filters/date\"\n\ndescribe LogStash::Filters::Date do\n extend LogStash::RSpec\n\n describe \"performance test of java syntax parsing\" do\n\n...
ruby
chosen
[ { "from": "system", "value": "Fix assets precompilation in production\n" }, { "from": "human", "value": "require File.expand_path('../boot', __FILE__)\n\nrequire 'rails/all'\n\n# Require the gems listed in Gemfile, including any gems\n# you've limited to :test, :development, or :production.\nBun...
ruby
chosen
[ { "from": "system", "value": "Disable transaction for updating the table\n" }, { "from": "human", "value": "class EnableAutoCancelPendingPipelinesForAll < ActiveRecord::Migration\n include Gitlab::Database::MigrationHelpers\n\n DOWNTIME = false\n\n def up\n update_column_in_batches(:projec...
ruby
chosen
[ { "from": "system", "value": "Add runtime dependency to gemspec\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'mina/slack/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Add development dependencies: rspec (core, mock, expectations) and rake\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'tugboat/version'\n\nGe...
ruby
chosen
[ { "from": "human", "value": "Make knife diff work on roles, unify filesystem to use FS interface\n" }, { "from": "gpt", "value": "require 'chef_fs/file_system/base_fs_dir'\nrequire 'chef_fs/file_system/rest_list_dir'\n\nclass ChefFS\n module FileSystem\n class FileSystemEntry < BaseFSDir\n ...
ruby
chosen
[ { "from": "system", "value": "Fix linebreak before install complete message\n" }, { "from": "human", "value": "require 'rubygems/dependency_installer'\n\nmodule Bundler\n class Installer < Environment\n def self.install(root, definition, options = {})\n installer = new(root, definition)...
ruby
chosen
[ { "from": "system", "value": "Use correct bank database file path relative to the class location\n" }, { "from": "human", "value": "require_relative '../errors/invalid_bank_code_error'\nrequire_relative '../errors/bank_not_found_error'\n\nmodule SwiftBic\n class BankDb\n\n BANKS = {}.tap do ...
ruby
chosen
[ { "from": "system", "value": "Add the 'verbose' and 'simulate' settings." }, { "from": "human", "value": "# This file is invoked from Rake.\n\n$:.unshift File.expand_path('../../', __FILE__)\nrequire File.expand_path('../../van_helsing', __FILE__)\n\nextend VanHelsing::Helpers\nextend VanHelsing...
ruby
chosen
[ { "from": "system", "value": "Add comment about why using `first`\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule BitbucketServer\n module Representation\n class Repo < Representation::Base\n def initialize(raw)\n super(raw)\n end\n\n def proj...
ruby
chosen
[ { "from": "system", "value": "Update spec for new recipe\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'nagios::server' do\n let(:chef_run) { runner.converge 'nagios::server' }\n subject { chef_run }\n before do\n stub_search(:users, 'groups:sysadmin NOT action:remov...
ruby
chosen
[ { "from": "system", "value": "Remove mass assignment config flag\n" }, { "from": "human", "value": "Dummy::Application.configure do\n # Settings specified here will take precedence over those in config/application.rb\n config.eager_load = false\n\n # The test environment is used exclusively t...
ruby
chosen
[ { "from": "system", "value": "Clarify tests around track! helper in non-controller contexts.\n" }, { "from": "human", "value": "require \"test_helper\"\n\ndescribe Object do\n describe \"#track!\" do\n it \"identity option sets identity\" do\n metric \"Coolness\"\n new_ab_test :foo...
ruby
chosen
[ { "from": "system", "value": "Set default codec to 'line' as this keeps old backwards-compatible behavior\n" }, { "from": "human", "value": "require \"logstash/outputs/base\"\nrequire \"logstash/namespace\"\n\nclass LogStash::Outputs::Stdout < LogStash::Outputs::Base\n begin\n require \"ap\...
ruby
chosen
[ { "from": "system", "value": "Add python as a dependency.\n" }, { "from": "human", "value": "default['logstash']['beaver']['pip_package'] = \"beaver==22\"\ndefault['logstash']['beaver']['server_role'] = 'logstash-server'\ndefault['logstash']['beaver']['server_ipaddress'] = nil\ndefault['logstash...
ruby
chosen
[ { "from": "system", "value": "Fix `WhitelistKeys` for Ruby 1.8.7\n" }, { "from": "human", "value": "module Fog\n module WhitelistKeys\n def self.whitelist(hash, valid_keys)\n valid_hash = StringifyKeys.stringify(hash)\n valid_hash.select { |k, _v| valid_keys.include?(k) }\n end\...
ruby
chosen
[ { "from": "system", "value": "examplles/rails: Add a controller action which purposefully generates an exception\n" }, { "from": "human", "value": "class SnoopController < ApplicationController\n def index\n @snoop = {}\n @snoop[:env] = request.env\n @snoop[:remote_addr] ...
ruby
chosen
[ { "from": "system", "value": "Revert \"bump buard and listen\"\n\nThis reverts commit 1d06836be56e9eb97ac642a4b9d12d1a6378b841.\n" }, { "from": "human", "value": "group :development do\n gem 'guard', '2.14.0'\n gem 'listen', '2.10.1', require: false\n gem 'guard-gulp', '~>0.0.2', require: f...
ruby
chosen
[ { "from": "system", "value": "Downgrade RSpec to 2.99.x; specs aren't compatible with the now-released 3.0." }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"postrank-uri/version\"\n\nGem::Specification.new do |s|\n s.name ...
ruby
chosen
[ { "from": "system", "value": "Update jQuery documentation (up to 2.2.3)\n" }, { "from": "human", "value": "module Docs\n class JqueryCore < Jquery\n self.name = 'jQuery'\n self.release = 'up to 2.2.0'\n self.base_url = 'https://api.jquery.com/'\n self.initial_paths = %w(/index/index...
ruby
chosen
[ { "from": "human", "value": "Write basic tests for Bucket\n" }, { "from": "gpt", "value": "require 'discordrb'\n\n# alias so I don't have to type it out every time...\nBUCKET = Discordrb::Commands::Bucket\nRATELIMITER = Discordrb::Commands::RateLimiter\n\ndescribe Discordrb::Commands::Bucket do\...
ruby
chosen
[ { "from": "human", "value": "Create shared example for create operation\n" }, { "from": "gpt", "value": "shared_examples \"a create operation\" do\n\n let(:resource_name) { described_class.to_s.gsub(/^.*::/, '').downcase }\n\n it 'with valid params' do\n VCR.use_cassette(\"#{resource_name}/...
ruby
chosen
[ { "from": "system", "value": "Adjust specs for parsing module names\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe \"The module keyword\" do\n it \"returns an empty s(:block) when given an empty body\" do\n opal_parse('module A; end').should == [:module, :A, [:block]]\n...
ruby
chosen
[ { "from": "system", "value": "Add specs for required Role arguments.\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe AccessGranted::Role do\n subject { AccessGranted::Role }\n\n it \"creates a default role without conditions\" do\n subject.new(:member, 1).conditions.sho...
ruby
chosen
[ { "from": "system", "value": "Include MTFontManager.h in public API.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"iosMath\"\n s.version = \"0.6.2\"\n s.summary = \"Math equation rendering for iOS.\"\n s.description = <<-DESC\niosMath is a library fo...
ruby
chosen
[ { "from": "system", "value": "Modify has_many :responses in Post model to return responses ordered by created_at in descending order\n" }, { "from": "human", "value": "class Post < ActiveRecord::Base\n\n validates :title, :body, :user_id, presence: true\n\n belongs_to :user\n has_many :taggin...
ruby
chosen
[ { "from": "system", "value": "Add icon class to library item list.\n" }, { "from": "human", "value": "class Library::ItemDecorator < ApplicationDecorator\n def item\n @model\n end\n\n def link\n h.link_to item.title, h.url_for(item.component)\n end\n\n def icon\n h.content_tag(:spa...
ruby
chosen