conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add workaround for broken s3cmd\n" }, { "from": "human", "value": "require 'shellwords'\n\nrequire 'pxcbackup/backup'\nrequire 'pxcbackup/command'\nrequire 'pxcbackup/repo'\n\nmodule PXCBackup\n class RemoteRepo < Repo\n def initialize(path, options = {})\n ...
ruby
chosen
[ { "from": "system", "value": "Use Ruby 1.8's hash syntax\n\nConsistency is important\n" }, { "from": "human", "value": "require \"rubycritic/analysers/churn\"\nrequire \"rubycritic/analysers/flog\"\nrequire \"rubycritic/quality_adapters/flog\"\n\nmodule Rubycritic\n\n class Turbulence\n def ...
ruby
chosen
[ { "from": "system", "value": "Fix bug: encode uri query\n" }, { "from": "human", "value": "module SyoboiCalendar\n module Agent\n extend self\n\n # These CONSTANTS will create method\n # such as Agent.base, Agent.search, Agent.json\n BASE_URL = \"http://cal.syoboi.jp\"\n SEAR...
ruby
chosen
[ { "from": "system", "value": "Set default value in-case url can not be parsed\n" }, { "from": "human", "value": "require 'uri'\n\nclass Feed < ActiveRecord::Base\n store :meta, accessors: [:title, :etag]\n\n belongs_to :category\n has_many :newsitems\n\n validates :url, presence: true\n\n d...
ruby
chosen
[ { "from": "system", "value": "Fix wrong inverse_of resulting in wrongly preloaded data\n\nThe wrong inverse_of resulted in the following issue when preloaded\nrelations on spans:\n\n irb(main):005:0> t.spans.map(&:trace_id).uniq\n => [<UUID4:3b25610a-145c-49d6-bedf-b0e10b86b174>]\n\n irb(main):006:...
ruby
chosen
[ { "from": "system", "value": "Add validations to User model\n" }, { "from": "human", "value": "class User < ActiveRecord::Base\n # Include default devise modules. Others available are:\n # :confirmable, :lockable, :timeoutable, :omniauthable\n # :recoverable, :rememberable and :trackable\n d...
ruby
chosen
[ { "from": "system", "value": "Switch test_configuration to return a hash with symbols.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'simplecov'\nSimpleCov.start\n\nrequire 'minitest/autorun'\nrequire 'usesthis'\nrequire 'little-fixtures'\nrequire 'yaml'\n\ndef test...
ruby
chosen
[ { "from": "system", "value": "Reset state at the start of the run\n" }, { "from": "human", "value": "$:.unshift File.expand_path('../../lib', __FILE__)\n\nbegin\n gem 'minitest'\nrescue Gem::LoadError\nend\n\nrequire 'minitest/autorun'\nrequire 'dbt'\nrequire 'tmpdir'\n\nclass Dbt::TestCase < M...
ruby
chosen
[ { "from": "system", "value": "Add a print for assert_response success.\n" }, { "from": "human", "value": "$:.unshift(File.expand_path(\"../lib\", File.dirname(__FILE__)))\nrequire \"cuba\"\n\nprepare { Cuba.reset! }\n\ndef assert_response(body, expected)\n arr = []\n body.each { |line| arr << ...
ruby
chosen
[ { "from": "system", "value": "Fix the category name configuration, change render_template to read_fixture.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'simplecov'\nSimpleCov.start\n\nrequire 'minitest/autorun'\nrequire 'tilt/redcarpet'\nrequire 'tilt/erubis'\nrequ...
ruby
chosen
[ { "from": "system", "value": "Add attributes to store information endpoint\n" }, { "from": "human", "value": "# Store Information\n# Metadata that describes the store.\n# https://developer.bigcommerce.com/api/stores/v2/store_information\n\nmodule Bigcommerce\n class StoreInfo < Resource\n in...
ruby
chosen
[ { "from": "system", "value": "Make sure generator hooks get run\n\nUse Rails::Engine#load_generators instead of require +\nRails::Generators::configure!.\n" }, { "from": "human", "value": "module ActiveModel\n class Railtie < Rails::Railtie\n initializer 'generators' do |app|\n require ...
ruby
chosen
[ { "from": "system", "value": "Use composition instead of inheritance for base ActsAsNotifiable::Notification\n" }, { "from": "human", "value": "module ActsAsNotifiable\n class Notification < ActiveRecord::Base\n include ActsAsNotifiable::DeliveryMethods\n\n before_create :notifiable_befor...
ruby
chosen
[ { "from": "system", "value": "Update for latest version of serverspec\n" }, { "from": "human", "value": "require 'spec_helper'\n\n# Files that should be installed\n\ndescribe file('/etc/product') do\n it { should be_file }\n it { should contain \"Base Image: #{attr[:base_name]} #{attr[:base_ve...
ruby
chosen
[ { "from": "human", "value": "Add feature scenario for Newsletter admin section, including email zip download\n" }, { "from": "gpt", "value": "require 'rails_helper'\n\nfeature 'Admin newsletters emails' do\n\n let(:download_button_text) { 'Download zip with users list' }\n\n background do\n ...
ruby
chosen
[ { "from": "human", "value": "Test that markdown helper works\n" }, { "from": "gpt", "value": "require 'rails_helper'\n\nRSpec.describe ApplicationHelper do\n describe 'markdown' do\n it 'converts the provided markdown source to html' do\n expect(markdown('# hello')).to eql(\"<h1 id=\\\"...
ruby
chosen
[ { "from": "system", "value": "Use the coreOS style configuration for systemd-based Ubuntu/Deb hosts.\n" }, { "from": "human", "value": "require_relative '../util'\n\nmodule VagrantPlugins\n module ProxyConf\n module Cap\n module Linux\n # Capability for docker proxy configuration...
ruby
chosen
[ { "from": "human", "value": "Convert configuration test to spec\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe 'Configuring Locotimezone' do\n let :default_attributes do\n {\n latitude: :latitude,\n longitude: :longitude,\n timezone_id: :timezone_id\n }\...
ruby
chosen
[ { "from": "human", "value": "Add Order of Twilight cask\n" }, { "from": "gpt", "value": "class OrderOfTwilight < Cask\n version :latest\n sha256 :no_check\n\n url 'http://stabyourself.net/dl.php?file=orderoftwilight/orderoftwilight-osx.zip'\n homepage 'http://stabyourself.net/orderoftwilight...
ruby
chosen
[ { "from": "human", "value": "Add You Need A Budget\n" }, { "from": "gpt", "value": "class YouNeedABudget < Cask\n url 'http://www.youneedabudget.com/CDNOrigin/download/ynab4/liveCaptive/Mac/YNAB4_LiveCaptive_4.1.553.dmg'\n homepage 'http://www.youneedabudget.com/'\n version '4.1.553'\n sha1 ...
ruby
chosen
[ { "from": "system", "value": "Update cocoa pod version for release.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'UPnAtom'\n s.version = '0.0.1.beta.2'\n s.license = { :type => 'MIT', :file => 'LICENSE' }\n s.summary = 'An open source Universal Pl...
ruby
chosen
[ { "from": "human", "value": "Add GOG.com Galaxy Client v1.0.0.836\n\nFix trailing whitespace in GOG.com Galaxy Client Cask\n" }, { "from": "gpt", "value": "cask :v1 => 'gog-galaxy' do\n version '1.0.0.836'\n sha256 '878319173e0f157981fd3d5009e451653024bdb8e3b4f0ff5565c491ba815f4d'\n\n url \"h...
ruby
chosen
[ { "from": "system", "value": "Upgrade Opera Beta.app to v29.0.1795.41\n" }, { "from": "human", "value": "cask :v1 => 'opera-beta' do\n version '29.0.1795.35'\n sha256 '0b6ee1cad2b335bd95c1c77c24e13fabad80419f430a91e10ea62a4574064cac'\n\n url \"http://get.geo.opera.com/pub/opera-beta/#{version...
ruby
chosen
[ { "from": "system", "value": "Add support for Amazon Linux\n" }, { "from": "human", "value": "name 'statsd'\nmaintainer 'Mike Heffner'\nmaintainer_email 'mike@librato.com'\nlicense 'Apache 2.0'\ndescription 'Installs/Configures statsd'\nlong_description IO.read(Fi...
ruby
chosen
[ { "from": "system", "value": "Use new version of CLImageEditor\n\nOption to set black theme\n\nSigned-off-by: Ross Gallagher <43dae9a5c38ae5bc7931494ec65ea7b344ce97f5@rossgallagher.co.uk>\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'DBCamera'\n s.version ...
ruby
chosen
[ { "from": "system", "value": "[1.1.0] Allow hashes as values/input to config parameters\n" }, { "from": "human", "value": "name 'rabbitmq'\nmaintainer 'Simple Finance'\nmaintainer_email 'ops@simple.com'\nlicense 'Apache 2.0'\ndescription 'Installs RabbitMQ, a...
ruby
chosen
[ { "from": "system", "value": "Convert the timestamp to a Time object\n" }, { "from": "human", "value": "module Kafka\n module Protocol\n class ProduceResponse\n class TopicInfo\n attr_reader :topic, :partitions\n\n def initialize(topic:, partitions:)\n @topic = to...
ruby
chosen
[ { "from": "system", "value": "Use new quickbooks-ruby api for booleans\n" }, { "from": "human", "value": "require \"spec_helper\"\n\ndescribe QBIntegration::Service::Account do\n let(:config) { Factories.config }\n\n subject do\n described_class.new config\n end\n\n it \"finds account by ...
ruby
chosen
[ { "from": "system", "value": "Stop the progress indicator when the webview posts a \"done loading\" notification.\n\ngit-svn-id: f20da03e3c54bdd0425edde46a83a0733af7cd3b@18 7a99d2f0-d533-0410-96fe-f25cb2755c1e\n" }, { "from": "human", "value": "#\n# AppController.rb\n# Kari\n#\n# Created by E...
ruby
chosen
[ { "from": "system", "value": "Test if element is empty\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule SwaggerDocsGenerator\n # # Metadata generated\n #\n # Metadata generated in swagger json file\n class Metadata\n attr_reader :config\n\n def initialize\n ...
ruby
chosen
[ { "from": "system", "value": "Fix typo in gem description and summary.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/form_object_model/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Sean Geoghegan\", \"Aaron Becke...
ruby
chosen
[ { "from": "system", "value": "Fix path method for promoted links preformance report\n" }, { "from": "human", "value": "require 'outbrain/api/report'\n\nmodule Outbrain\n module Api\n class PromotedLinkPerformanceReport < Report\n PATH = 'performanceByPromotedLink'\n \n def sel...
ruby
chosen
[ { "from": "system", "value": "Set the version number to 0.4.0.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'Folklore'\n s.version = '0.3.0'\n s.license = 'MIT'\n s.summary = 'League of Legends chat service library for iOS and OS X.'\n s.homepage = 'https://gith...
ruby
chosen
[ { "from": "system", "value": "Update Exult and use vorbis.\n" }, { "from": "human", "value": "require 'formula'\n\n# TODO we shouldn't be installing .apps if there is an option\n\nclass Exult <Formula\n # Use a specific revision that is known to compile (on Snow Leopard too.)\n head 'http://ex...
ruby
chosen
[ { "from": "system", "value": "Use the backup Apache mirrors instead of another mirror that might go down unnoticed.\n\nSigned-off-by: Adam Vandenberg <34c2b6407fd5a10249a15d699d40f9ed1782e98c@gmail.com>\n" }, { "from": "human", "value": "require 'formula'\n\nclass Maven <Formula\n @url='http://...
ruby
chosen
[ { "from": "system", "value": "Add vendored JSON to gemspec\n" }, { "from": "human", "value": "$:.unshift(File.join(File.dirname(__FILE__), 'lib'))\n\nrequire File.expand_path('../lib/stripe/version', __FILE__)\n\nspec = Gem::Specification.new do |s|\n s.name = 'stripe'\n s.version = Stripe::VE...
ruby
chosen
[ { "from": "human", "value": "Make sure that kaminari works inside a Grape app\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\nfeature 'Users' do\n background do\n 1.upto(100) {|i| User.create! :name => \"user#{'%03d' % i}\" }\n end\n scenario 'Basic API pagination' do\n visit ...
ruby
chosen
[ { "from": "human", "value": "Add test for inclusion of coffee-script.js in asset pipeline\n" }, { "from": "gpt", "value": "require 'test_helper'\nrequire 'coffee-rails'\n\nclass AssetsTest < ActiveSupport::TestCase\n def setup\n require \"rails\"\n require \"action_controller/railtie\"\n ...
ruby
chosen
[ { "from": "system", "value": "Use `__dir__` instead of `File.dirname(__FILE__)`\n" }, { "from": "human", "value": "require 'bundler/setup'\nrequire 'test/unit'\n\n$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))\n$LOAD_PATH.unshift(File.dirname(__FILE__))\nrequire 'fluent/test'...
ruby
chosen
[ { "from": "system", "value": "Switch back to using /tmp.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'simplecov'\nSimpleCov.start\n\nrequire 'minitest/autorun'\nrequire 'tilt/redcarpet'\nrequire 'tilt/erubis'\nrequire 'dimples'\n\ndef test_site\n @site ||= Dimple...
ruby
chosen
[ { "from": "system", "value": "Add queue mode hooks to minitest test helper\n" }, { "from": "human", "value": "ENV['RAILS_ENV'] ||= 'test'\nrequire File.expand_path('../../config/environment', __FILE__)\nrequire 'rails/test_help'\nrequire 'minitest/spec'\n\nrequire 'knapsack_pro'\n\n# CUSTOM_CONF...
ruby
chosen
[ { "from": "system", "value": "Print out the version of did you mean to test against\n" }, { "from": "human", "value": "require 'minitest/autorun'\nrequire 'minitest/unit'\nrequire 'purdytest'\nrequire 'did_you_mean'\n\nmodule DidYouMean::TestHelper\n def assert_correction(expected, array)\n ...
ruby
chosen
[ { "from": "system", "value": "Clear AssetHat.html_cache after every test" }, { "from": "human", "value": "require 'rubygems'\nrequire 'test/unit'\nrequire 'active_support'\nrequire 'action_controller'\nrequire 'action_view/test_case'\n\nrequire 'shoulda'\nrequire 'asset_hat'\nrequire 'flexmock/t...
ruby
chosen
[ { "from": "system", "value": "Make sure the shoulda macro is checking the entire 'actual' array, not just the bytes that appear in the 'expected' value\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'test/unit'\nrequire 'shoulda'\nrequire 'mocha'\nrequire 'treetop'\n\n$LOAD_PATH....
ruby
chosen
[ { "from": "system", "value": "[TEST] Fix test for the Nginx proxy failing on Elasticsearch 1.0\n" }, { "from": "human", "value": "describe_recipe 'elasticsearch::proxy' do\n\n include MiniTest::Chef::Assertions\n include MiniTest::Chef::Context\n include MiniTest::Chef::Resources\n\n cluster...
ruby
chosen
[ { "from": "system", "value": "Remove updated_at column from heartbeats table\n" }, { "from": "human", "value": "class CreateHeartbeats < ActiveRecord::Migration\n def change\n create_table :heartbeats do |t|\n t.integer :device_id\n t.integer :reporting_device_id\n\n t.timesta...
ruby
chosen
[ { "from": "system", "value": "Add index to tags table in InitialMigration\n" }, { "from": "human", "value": "class InitialMigration < ActiveRecord::Migration\n def change\n create_table :links do |t|\n t.string :uri\n t.integer :upvote_count\n t.integer :downvote_count\n\n ...
ruby
chosen
[ { "from": "system", "value": "Use `dir` method intead to get fixture path.\n" }, { "from": "human", "value": "MRuby::Gem::Specification.new('mruby-maxminddb') do |spec|\n spec.license = 'MIT'\n spec.authors = 'Kenichi Mitsugi'\n spec.add_test_dependency 'mruby-io', :mgem => 'mruby-io'\n\n de...
ruby
chosen
[ { "from": "system", "value": "Make sure to add all the source files\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"Kickflip\"\n s.version = \"0.9\"\n s.summary = \"The Kickflip platform provides a complete video broadcasting solution for your iOS applic...
ruby
chosen
[ { "from": "system", "value": "Reduce size of the package file\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrootdir = File.expand_path(File.dirname(__FILE__))\n\nrequire \"#{rootdir}/lib/thinreports/version\"\n\nGem::Specification.new do |s|\n s.name = 'thinreports'...
ruby
chosen
[ { "from": "system", "value": "Add a missing Route spec" }, { "from": "human", "value": "describe Rory::Route do\n describe '#name' do\n it 'returns concatenated controller and action' do\n route = described_class.new('/whatever', :to => 'pigeons#index')\n expect(route.name).to eq '...
ruby
chosen
[ { "from": "human", "value": "Write specs of Contact model\n" }, { "from": "gpt", "value": "require \"spec_helper\"\n\ndescribe Contact do\n it \"is valid with a firstname, lastname and email\" do\n contact = Contact.new(\n firstname: \"Aaron\",\n ...
ruby
chosen
[ { "from": "system", "value": "Return yield result if block was given\n" }, { "from": "human", "value": "class Brain\n\n require \"net/http\"\n\n def self.request(path:, method: :get, payload: nil, access_token: nil)\n uri = URI(\"#{ENV[\"BRAIN_URL\"]}#{path}\")\n http = Net::HTTP.new(uri...
ruby
chosen
[ { "from": "system", "value": "Update rubocop requirement from ~> 0.83.0 to ~> 0.84.0\n\nUpdates the requirements on [rubocop](https://github.com/rubocop-hq/rubocop) to permit the latest version.\n- [Release notes](https://github.com/rubocop-hq/rubocop/releases)\n- [Changelog](https://github.com/rubocop-hq/r...
ruby
chosen
[ { "from": "system", "value": "Change default per page to something sensible other than 2... lol\n" }, { "from": "human", "value": "Kaminari.configure do |config|\n config.default_per_page = 2\n # config.max_per_page = nil\n # config.window = 4\n # config.outer_window = 0\n # config.left = 0...
ruby
chosen
[ { "from": "system", "value": "Set up default expense types" }, { "from": "human", "value": "ExpenseType.find_or_create_by(name: 'Travel')\nExpenseType.find_or_create_by(name: 'Hotel')\n" }, { "from": "gpt", "value": "[\n 'Conference and View - Car',\n 'Conference and View - Hotel s...
ruby
chosen
[ { "from": "system", "value": "Implement failing tests that demonstrate the desired behaviour\n" }, { "from": "human", "value": "require \"spec_helper\"\n\nmodule Refinery\n describe Pages do\n describe \".valid_templates\" do\n before do\n File.open(File.join(subject.root, \"spec...
ruby
chosen
[ { "from": "human", "value": "Add in photoscontroller spec for as\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe ActivityStreams::PhotosController do\n describe '#create' do\n before do\n @json = JSON.parse <<JSON\n {\"activity\":{\"actor\":{\"url\":\"http://cu...
ruby
chosen
[ { "from": "system", "value": "Update homebrew script to download version 0.5" }, { "from": "human", "value": "class TerraformInventory < Formula\n homepage \"https://github.com/adammck/terraform-inventory\"\n head \"https://github.com/adammck/terraform-inventory.git\"\n\n # Update these when ...
ruby
chosen
[ { "from": "system", "value": "Use URI::regexp for validating WebHook urls\n" }, { "from": "human", "value": "class WebHook < ActiveRecord::Base\n include HTTParty\n\n # HTTParty timeout\n default_timeout 10\n\n belongs_to :project\n\n validates :url,\n presence: true,\n ...
ruby
chosen
[ { "from": "system", "value": "Swap service_url and entry_url to play nice with ActiveMerchant's payment_service_for view helper" }, { "from": "human", "value": "module ActiveMerchant #:nodoc:\n module Billing #:nodoc:\n module Integrations #:nodoc:\n module Ipay88\n autoload :Ret...
ruby
chosen
[ { "from": "system", "value": "Remove no longer necessary rescue Snappy::Error.\n" }, { "from": "human", "value": "module ActiveSupport\n module Cache\n class MemcachedSnappyStore < Cache::MemCacheStore\n class UnsupportedOperation < StandardError; end\n\n def increment(*args)\n ...
ruby
chosen
[ { "from": "system", "value": "Write the detail of gemspec\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'guideline/version'\n\nGem::Specification.new do |gem|\n gem.name ...
ruby
chosen
[ { "from": "system", "value": "[hp|compute_v2] Add filter options to query for servers.\n" }, { "from": "human", "value": "module Fog\n module Compute\n class HPV2\n class Real\n\n # List all servers (IDs and names only)\n #\n # ==== Returns\n # * response<~Ex...
ruby
chosen
[ { "from": "system", "value": "Use `pattern` instead of `match`\n\nSigned-off-by: Kenji Okimoto <7a4b90a0a1e6fc688adec907898b6822ce215e6c@clear-code.com>\n" }, { "from": "human", "value": "require \"spec_helper\"\n\ndescribe \"out_stdout\", stub: :daemon do\n before { login_with exists_user }\n ...
ruby
chosen
[ { "from": "system", "value": "Make the version check more liberal\n" }, { "from": "human", "value": "require_relative \"lib/cocoaseeds/version\"\nrequire \"date\"\n\nGem::Specification.new do |s|\n s.name = \"cocoaseeds\"\n s.version = Seeds::VERSION\n s.date = Date.today\n ...
ruby
chosen
[ { "from": "system", "value": "Add even more sleepies to the mongo specs\n" }, { "from": "human", "value": "def mongodb_service_name\n return 'mongod' if `lsb_release -sc 2>/dev/null`.strip == 'trusty'\n 'mongodb'\nend\n\ndescribe 'mongodb installation' do\n describe service(mongodb_service_na...
ruby
chosen
[ { "from": "system", "value": "Refactor order mailer for code reuse\n\nConflicts:\n\tcore/app/mailers/spree/order_mailer.rb\n" }, { "from": "human", "value": "module Spree\n class OrderMailer < BaseMailer\n def confirm_email(order, resend = false)\n @order = order.respond_to?(:id) ? orde...
ruby
chosen
[ { "from": "system", "value": "Simplify exception handling in Job\n" }, { "from": "human", "value": "class BulkProcessor\n class Job < ActiveJob::Base\n queue_as 'bulk_processor'\n\n def perform(records, item_proccessor, handler, payload)\n item_proccessor_class = item_proccessor.cons...
ruby
chosen
[ { "from": "system", "value": "Use new accessor for failure predicate\n" }, { "from": "human", "value": "module Cooperator\n class Context\n def initialize(attributes = {})\n @_attributes = {_failure: false}\n\n attributes.each do |k, v|\n self[k] = v\n end\n end\n\n ...
ruby
chosen
[ { "from": "system", "value": "Make sure we load the rspec above, not the gem\n\ngit-svn-id: f1a1267e29db6ed751edc5bdb54cf7d87c16124a@852 410327ef-2207-0410-a325-f78bbcb22a5a\n" }, { "from": "human", "value": "task :pre_commit => [:clobber_sqlite, :migrate, :generate_rspec, :specs, :spec]\n\ntask...
ruby
chosen
[ { "from": "system", "value": "Change route to share application\n" }, { "from": "human", "value": "#module CatarseStripe\n #class Engine < ::Rails::Engine\n #isolate_namespace CatarseStripe\n #end\n#end\nmodule ActionDispatch::Routing\n class Mapper\n def mount_catarse_stripe_at(catarse...
ruby
chosen
[ { "from": "system", "value": "Fix recursion error in JRuby and RBX\n" }, { "from": "human", "value": "class Ettu\n class Configuration < ActiveSupport::OrderedOptions\n def initialize\n super\n set_defaults\n end\n\n def reset\n set_defaults\n end\n\n\n private\n\n...
ruby
chosen
[ { "from": "system", "value": "Add a little bit of explanation for the Object class (and whitespace)\n" }, { "from": "human", "value": "# lib/frecon/base/object.rb\n#\n# Copyright (C) 2014 Christopher Cooper, Sam Craig, Tiger Huang, Vincent Mai, Sam Mercier, and Kristofer Rye\n#\n# This file is p...
ruby
chosen
[ { "from": "system", "value": "Use % string interpolation for translations\n\nInstead of traversing the string to replace multiple options, use built-in ruby\nmethods to interpolate string templates in a single pass.\n" }, { "from": "human", "value": "require 'yaml'\n\nmodule IceCube\n module Nu...
ruby
chosen
[ { "from": "system", "value": "Use rack lint campat in dev\n" }, { "from": "human", "value": "require \"rack/server\"\nrequire \"rake-pipeline/middleware\"\n\nmodule Iridium\n class DevServer < Rack::Server\n class NotFound\n def call(env)\n [404, { \"Content-Type\" => \"text/plai...
ruby
chosen
[ { "from": "system", "value": "Remove comment since the behavior it describes has been moved\n" }, { "from": "human", "value": "require \"active_support/core_ext/hash/except\"\nrequire \"factory_girl/strategy/build\"\nrequire \"factory_girl/strategy/create\"\nrequire \"factory_girl/strategy/attri...
ruby
chosen
[ { "from": "system", "value": "Upgrade bundler version to \"~> 1.12\"\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'rubicure_fuzzy_match/version'\n\nGem::Specification.new do |spec|...
ruby
chosen
[ { "from": "human", "value": "Add detailed guidance categories for defra\n" }, { "from": "gpt", "value": "defra_categories = [\n {\n parent_title: \"Businesses and self-employed\",\n parent_tag: \"business/waste-environment\",\n title: \"Climate change planning and preparation\",\n d...
ruby
chosen
[ { "from": "human", "value": "Remove RA id FK constraint on asset_user_accesses\n\nAlthough we're not sure why, there are lots of asset_user_accesses with\na cross-shard context and thus would have a cross-shard root account ID.\n\nflag=none\ncloses INTEROP-6042\n\nTest plan:\n- run migration and make sure y...
ruby
chosen
[ { "from": "system", "value": "Update CCMenu: version number in url stanza\n\nUpdated to [facilitate future updates][ref].\n\n [ref]: https://github.com/caskroom/homebrew-cask/pull/4910" }, { "from": "human", "value": "class Ccmenu < Cask\n version '1.7'\n sha256 '974a2022dbc9494958334ee8f02e0...
ruby
chosen
[ { "from": "human", "value": "Add iTrash.app v3.0.2 and versions for older OS X versions\n" }, { "from": "gpt", "value": "cask :v1 => 'itrash' do\n\n if MacOS.version <= :leopard\n version '1.5.5'\n sha256 'e45ba193c93e3ddf7ac439d035a82f0e9fde5630a308a490d456f0eef6277e6b'\n\n url \"http...
ruby
chosen
[ { "from": "system", "value": "Update TG Pro.app to v2.8\n" }, { "from": "human", "value": "cask :v1 => 'tg-pro' do\n version '2.7.4'\n sha256 '94df19f67316c900929542445d7d0b86a97c6605bb353b492b12306663d0cd58'\n\n url \"http://www.tunabellysoftware.com/resources/TGPro_#{version.gsub('.','_')}....
ruby
chosen
[ { "from": "system", "value": "Use accessor instead of instance variable" }, { "from": "human", "value": "module Vidibus\n module Fileinfo\n class Base\n attr_accessor :path, :processor\n\n def initialize(path)\n @path = path\n check_file\n load_processor\n ...
ruby
chosen
[ { "from": "system", "value": "Use the (working) v2 API.\n" }, { "from": "human", "value": "module Lita\n module Handlers\n class Time < Handler\n URL = \"http://api.worldweatheronline.com/free/v1/tz.ashx\"\n\n route(/(?:what\\s)?time(?:\\sis\\sit)?(?:\\sin)?\\s([^\\?]+)(?:\\?)?/, :...
ruby
chosen
[ { "from": "system", "value": "Rake: Deploy task pushed to github, too\n" }, { "from": "human", "value": "# Deployment Rake Tasks\n\ndesc 'Deploy, migrate and restart processes'\ntask :deploy => 'knight:deploy_and_migrate'\n\ndesc 'Simple deploy without migration'\ntask 'deploy:simple' => 'knight...
ruby
chosen
[ { "from": "system", "value": "Add YARD docs for Faker::Fillmurray.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule Faker\n class Fillmurray < Base\n class << self\n # rubocop:disable Metrics/ParameterLists\n def image(legacy_grayscale = NOT_GIVEN, legacy_...
ruby
chosen
[ { "from": "system", "value": "Modify associations in Timeslot model\n\nCorrect student_id association to User model (belongs_to)\n" }, { "from": "human", "value": "class Timeslot < ActiveRecord::Base\n belongs_to :tutor, class_name: 'User'\n has_one :student, class_name: 'User'\n\n validat...
ruby
chosen
[ { "from": "system", "value": "Remove old reference to subjects.\n" }, { "from": "human", "value": "# encoding: UTF-8\n\nclass Norsk < Language\n def initialize\n @subjects = [\"Jeg\", \"Du\", \"Han\", \"Hun\", \"Vi\", \"De\", \"Den\", \"Det\", \"Dere\"]\n super __FILE__\n end\nend\n" }...
ruby
chosen
[ { "from": "system", "value": "Handle phone number from omniauth params.\n" }, { "from": "human", "value": "class OmniauthClerk\n\n # Returns a hash of account attributes from auth data as provided by\n # omniauth, intended for use with Account.declare!\n # The options param is a convenient sl...
ruby
chosen
[ { "from": "system", "value": "Delete done portion of a todo.\n" }, { "from": "human", "value": "# TODO: learn about ruby documentation format and add one here, to eliminate rubocop warning\n# as well as how to turn it off for Internal:: classes\nmodule PortableBridgeNotation\n autoload :Importe...
ruby
chosen
[ { "from": "system", "value": "Remove unused groups from simplecov's profile\n" }, { "from": "human", "value": "require 'simplecov'\n\nSimpleCov.profiles.define 'gem' do\n add_filter '/test/'\n add_filter '/features/'\n add_filter '/spec/'\n add_filter '/autotest/'\n\n add_group 'Binaries', ...
ruby
chosen
[ { "from": "human", "value": "Add a rake task to migrate the homepage\n\nBecause the service manual base path was previously ‘owned’ by a different application, we can’t publish to /service-manual without first explicitly claiming that path reservation using the paths endpoint.\n\nNote that running this rake...
ruby
chosen
[ { "from": "system", "value": "Remove unnecessary begin/end from Transaction.run\n" }, { "from": "human", "value": "module Oriented\n module Core\n #\n # Class to encapsulate the transaction for OrientDB\n #\n # Currently, if anything fails, it will rollback the connection\n # and...
ruby
chosen
[ { "from": "system", "value": "Store the href when we create a new CatalogItem\n" }, { "from": "human", "value": "module VCloud\n class CatalogItem\n include ParsesXml\n include RestApi\n \n has_links\n has_reference :entity_references, VCloud::Constants::Xpath::ENTITY_REFERENCE\n...
ruby
chosen
[ { "from": "system", "value": "Use wget to download Vagrant base box\n" }, { "from": "human", "value": "require 'thor'\nrequire 'yaml'\nrequire 'json'\nrequire 'travis/worker'\n\nmodule Travis\n module Worker\n module Cli\n class Vagrant < Thor\n class << self\n def confi...
ruby
chosen
[ { "from": "system", "value": "Update pod version to 1.2.1\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'LLRegex'\n s.version = '1.2.0'\n s.summary = 'Regular expression library in Swift, wrapping NSRegularExpression.'\n s.homepage =...
ruby
chosen
[ { "from": "system", "value": "Add readline dependency to Ruby\n" }, { "from": "human", "value": "require 'formula'\n\n# TODO de-version the include and lib directories\n\nclass Ruby <Formula\n @url='ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p243.tar.gz'\n @homepage='http://www.ruby-lang....
ruby
chosen
[ { "from": "human", "value": "Add unti test for foil queries\n" }, { "from": "gpt", "value": "describe \"Foil queries\" do\n include_context \"db\"\n let(:nonfoil) { db.printings.select{|c| c.foiling == \"nonfoil\" } }\n let(:foilonly) { db.printings.select{|c| c.foiling == \"foilonly\" } }\n ...
ruby
chosen
[ { "from": "system", "value": "Revert \"customize rake job definition in whenever\"\n\nThis reverts commit acae3a3b10b52f3734800d2fb239312363d7c6ba.\n" }, { "from": "human", "value": "# Customize the rake job to source user profile for environment variables\njob_type :rake, \". $HOME/.profile; cd...
ruby
chosen