conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix RaiseErrorMatcher to fail when exceptions are not raised\n" }, { "from": "human", "value": "class RaiseErrorMatcher\n def initialize(exception, message)\n @exception = exception\n @message = message\n end\n \n def matches?(proc)\n begin\n proc....
ruby
chosen
[ { "from": "system", "value": "Fix homepage to use SSL in Node.js Cask\n\nThe HTTP URL is already getting redirected to HTTPS. Using the HTTPS URL directly\nmakes it more secure and saves a HTTP round-trip.\n" }, { "from": "human", "value": "cask :v1 => 'node' do\n version '0.12.4'\n sha256 'ca...
ruby
chosen
[ { "from": "human", "value": "Add new cask for Plug\n" }, { "from": "gpt", "value": "class Plug < Cask\n url 'http://www.plugformac.com/files/Plug-latest.dmg'\n homepage 'http://www.plugformac.com/'\n version 'latest'\n no_checksum\n link 'Plug.app'\nend\n" } ]
ruby
chosen
[ { "from": "system", "value": "Fix the call of engine\n" }, { "from": "human", "value": "require \"datetimepicker-rails/version\"\n\nmodule Datetimepicker\n module Rails\n # Your code goes here...\n end\nend\n" }, { "from": "gpt", "value": "require \"datetimepicker-rails/version\...
ruby
chosen
[ { "from": "system", "value": ":anchor: Fix the gemspec path concatenation\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'discordrb/webhooks/version'\n\nGem::Specification.new do |sp...
ruby
chosen
[ { "from": "system", "value": "Revert back to manual delegation ( i.e., no forwardable )\n" }, { "from": "human", "value": "module Fog\n # Fog::Formatador\n class Formatador\n extend Forwardable\n\n attr_accessor :object, :thread, :string, :formatador\n def_delegator :formatador, :inde...
ruby
chosen
[ { "from": "system", "value": "Downgrade thrift so it doesn't require thin\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'rbhive/version'\n\nGem::Specification.new do |spec|\n spec....
ruby
chosen
[ { "from": "system", "value": "Correct the docs for the ssh_public_key option" }, { "from": "human", "value": "module Fog\n module Compute\n class Bluebox\n class Real\n\n # Create a new block\n #\n # ==== Parameters\n # * product_id<~String> - ID of block p...
ruby
chosen
[ { "from": "system", "value": "Add a spec for fixture_property\n" }, { "from": "human", "value": "require 'helpers'\n\nRSpec.configure do |c|\n c.include Helpers\nend\n\ndescribe 'an example group' do\n it 'has access to the helper methods defined in the module' do\n expect(help).to be(:avai...
ruby
chosen
[ { "from": "human", "value": "Add cask for MySQL Workbench\n\nAdd cask for MySQL Workbench 5.2.47 (http://www.mysql.com/products/workbench)\n" }, { "from": "gpt", "value": "class MysqlWorkbench < Cask\n url 'http://cdn.mysql.com/Downloads/MySQLGUITools/mysql-workbench-gpl-5.2.47-osx-i686.dmg'\n ...
ruby
chosen
[ { "from": "system", "value": "Update Opera to latest version" }, { "from": "human", "value": "class Opera < Cask\n url 'http://get.geo.opera.com/pub/opera/mac/1215/Opera_12.15_Setup_Intel.dmg'\n homepage 'http://www.opera.com/'\n version '12.15'\n sha1 '5889d940e3c61eb92ea4045909e6def50e1839...
ruby
chosen
[ { "from": "system", "value": "Add PagesController test to detect bug, occured when page updated with changed body and not changed name.\n" }, { "from": "human", "value": "require File.dirname(__FILE__) + '/../test_helper'\n\nclass PagesControllerTest < ActionController::TestCase\n\n context \"a...
ruby
chosen
[ { "from": "system", "value": "Add action_button_title Core status method\n" }, { "from": "human", "value": "module Gitlab\n module Ci\n module Status\n # Base abstract class fore core status\n #\n class Core\n include Gitlab::Routing\n include Gitlab::Allowable\n...
ruby
chosen
[ { "from": "system", "value": "Update Launch Control to version 1.10.2\n" }, { "from": "human", "value": "class Launchcontrol < Cask\n url 'http://www.soma-zone.com/download/files/LaunchControl_1.10.tar.bz2'\n homepage 'http://www.soma-zone.com/LaunchControl/'\n version '1.10'\n sha1 'ce17ecd...
ruby
chosen
[ { "from": "system", "value": "Add some more complex custom code for correctly incrementally updating jndi configurations\n" }, { "from": "human", "value": "#\n# Copyright Peter Donald\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in c...
ruby
chosen
[ { "from": "system", "value": "Remove long description from podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"UAProgressView\"\n s.version = \"0.1.0\"\n s.summary = \"UAProgressView is a simple and lightweight, yet powerfu...
ruby
chosen
[ { "from": "system", "value": "Define BootstrapForm before loading classes.\n" }, { "from": "human", "value": "require 'action_view'\nrequire 'bootstrap_form/builder'\nrequire 'bootstrap_form/group'\nrequire 'bootstrap_form/version'\n\nmodule BootstrapForm\nend\n" }, { "from": "gpt", ...
ruby
chosen
[ { "from": "system", "value": "Add plugin type metadata and bump version to 0.0.2.\n" }, { "from": "human", "value": "Gem::Specification.new do |spec|\n spec.name = \"lita-literally-lita\"\n spec.version = \"0.0.1\"\n spec.authors = [\"Jimmy Cuadra\"]\n spec.email ...
ruby
chosen
[ { "from": "system", "value": "Add some documentation to play_mp3\n" }, { "from": "human", "value": "require 'discordrb'\n\nbot = Discordrb::Commands::CommandBot.new token: 'B0T.T0KEN.here', application_id: 160123456789876543, prefix: '!'\n\nbot.command(:connect) do |event|\n # The `voice_channe...
ruby
chosen
[ { "from": "system", "value": "Use key? instead of has_key? method\n" }, { "from": "human", "value": "module Gitlab\n module HealthChecks\n class PrometheusTextFormat\n def marshal(metrics)\n \"#{metrics_with_type_declarations(metrics).join(\"\\n\")}\\n\"\n end\n\n priva...
ruby
chosen
[ { "from": "system", "value": "Update the feature test to check for the correct service\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "from": "human", "value": "describe windows_feature('TFTP-Client') do\n it { should be_installed }\nend\n\ndescribe windo...
ruby
chosen
[ { "from": "system", "value": "Update LyX from 2.1.2.1 to 2.1.3\n\n* updated version and checksum\n" }, { "from": "human", "value": "cask :v1 => 'lyx' do\n version '2.1.2.2'\n sha256 '82047ac2aec85f422d94e3f3ea88ffb911264499c09fe9eee341f10537495990'\n\n url \"ftp://ftp.lyx.org/pub/lyx/bin/#{ve...
ruby
chosen
[ { "from": "system", "value": "Add a documentation comment to the VERSION\n" }, { "from": "human", "value": "# Discordrb and all its functionality, in this case only the version.\nmodule Discordrb\n VERSION = '1.5.4'.freeze\nend\n" }, { "from": "gpt", "value": "# Discordrb and all it...
ruby
chosen
[ { "from": "system", "value": "Put Erased empty state at the beginning\n" }, { "from": "human", "value": "module Gitlab\n module Ci\n module Status\n module Build\n class Factory < Status::Factory\n def self.extended_statuses\n [[Status::Build::Manual,\n ...
ruby
chosen
[ { "from": "system", "value": "Add pending spec for locked GemCache sources\n" }, { "from": "human", "value": "require \"spec_helper\"\n\ndescribe \"bundle lock with gems\" do\n before :each do\n system_gems \"rack-0.9.1\"\n gemfile <<-G\n source \"file://#{gem_repo1}\"\n gem \"r...
ruby
chosen
[ { "from": "system", "value": "Add verification_token field to Ezine::Entry\n" }, { "from": "human", "value": "class Ezine::Entry\n include SS::Document\n include SS::Reference::Site\n\n field :email, type: String, metadata: { from: :email }\n field :email_type, type: String\n field :entry_t...
ruby
chosen
[ { "from": "system", "value": "Fix the way we generate filenames for ruby artifacts\n" }, { "from": "human", "value": "module Domgen\n module Ruby\n class RubyAttribute < Domgen.ParentedElement(:attribute)\n attr_writer :validate\n\n def validate?\n @validate.nil? ? true : @v...
ruby
chosen
[ { "from": "system", "value": "Use the load path instead of absolute paths\n" }, { "from": "human", "value": "require 'pathname'\nrequire 'rubygems'\n\ngem 'activesupport'\ngem 'mongodb-mongo'\ngem 'jnunemaker-validatable'\n\nrequire 'activesupport'\nrequire 'mongo'\nrequire 'validatable'\n\ndir ...
ruby
chosen
[ { "from": "system", "value": "Kill a mutation in Relation::Aliases::rename specs\n\n@@ -1,4 +1,4 @@\n def rename(aliases)\n- new(attribute_index.rename_attributes(aliases), relation_index, aliases)\n+ new(attribute_index.rename_attributes(aliases), aliases)\n end\n" }, { "from": "human", "valu...
ruby
chosen
[ { "from": "system", "value": "Fix class comment. Thanks @AlfonsoUceda\n" }, { "from": "human", "value": "require 'lotus/helpers/numbers/number_formatter'\n\nmodule Lotus\n module Helpers\n # Number formatter\n #\n # You can include this module inside your view and\n # the view will ...
ruby
chosen
[ { "from": "system", "value": "Add back load code lost in require_relative commit.\n" }, { "from": "human", "value": "module Rubinius\n class CodeLoader\n\n # Searches $LOAD_PATH for a file named +name+. Does not append any file\n # extension to +name+ while searching. Used by #load to res...
ruby
chosen
[ { "from": "system", "value": "Update Vivaldi to a newer release\n" }, { "from": "human", "value": "cask :v1 => 'vivaldi' do\n version '1.0.219.50'\n sha256 :no_check # required as upstream package is updated in-place\n\n url \"https://vivaldi.com/download/Vivaldi_TP4.#{version}.dmg\"\n name ...
ruby
chosen
[ { "from": "system", "value": "Load unicorn worker killer only in production\n" }, { "from": "human", "value": "# This file is used by Rack-based servers to start the application.\n\nrequire 'unicorn/worker_killer'\nuse Unicorn::WorkerKiller::Oom, (160*(1024**2)), (180*(1024**2))\n\nrequire ::Fil...
ruby
chosen
[ { "from": "system", "value": "Use RVM sudo rather than sudo\n" }, { "from": "human", "value": "namespace :rvm do\n\n desc \"Install rvm\"\n task :install, :roles => :web do\n install_deps\n\n run \"if ! (which rvm); then sudo curl -L http://bit.ly/rvm-install-system-wide | sudo bash; fi\...
ruby
chosen
[ { "from": "system", "value": "Add doc_url to gobierto investments module\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule GobiertoInvestments\n def self.table_name_prefix\n \"ginv_\"\n end\n\n def self.classes_with_custom_fields\n [GobiertoInvestments::Project]...
ruby
chosen
[ { "from": "system", "value": "Use File.join the right way (more than one sub-path argument).\n" }, { "from": "human", "value": "# encoding: UTF-8\n\nmodule TwitterCldr\n module Normalizers\n class Base\n def unicode_data\n data_path = File.join(\"#{File.dirname(__FILE__)}/data/\"...
ruby
chosen
[ { "from": "human", "value": "Add a test to make sure there's no XSS for hook logs\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\nfeature 'Hook logs' do\n given(:web_hook_log) { create(:web_hook_log, response_body: '<script>') }\n given(:project) { web_hook_log.web_hook.project }\n ...
ruby
chosen
[ { "from": "system", "value": "Fix up rake task to use spec/fixtures over test/fixtures if it exists\n" }, { "from": "human", "value": "namespace :db do\n namespace :scenario do\n desc 'Build scenarios' \n task :build => :environment do\n require 'active_record/fixtures'\n requir...
ruby
chosen
[ { "from": "system", "value": "Change language for testing colour fallback\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Projects::GraphsController do\n let(:project) { create(:project, :repository) }\n let(:user) { create(:user) }\n\n before do\n sign_in(user)\n ...
ruby
chosen
[ { "from": "system", "value": "Change expected status to be 204 instead of 200.\n" }, { "from": "human", "value": "module Fog\n module Compute\n class HP\n class Real\n\n # Update an existing server\n #\n # ==== Parameters\n # # server_id<~Integer> - Id of ser...
ruby
chosen
[ { "from": "system", "value": "Replace delegate calls with standard method defs.\n\nSpares a to_sym call by aliasing to_sym to ref.\n\nThen the delegate felt meager for one method; ditch and define method ourselves.\n" }, { "from": "human", "value": "require 'set'\nrequire 'active_support/core_ex...
ruby
chosen
[ { "from": "system", "value": "Add preferred_amount and preferred_operator to accessible attributes for item total\n" }, { "from": "human", "value": "# A rule to limit a promotion to a specific user.\nmodule Spree\n class Promotion::Rules::ItemTotal < PromotionRule\n preference :amount, :deci...
ruby
chosen
[ { "from": "system", "value": "Update Node.js documentation (5.10.0, 4.4.2)\n" }, { "from": "human", "value": "module Docs\n class Node < UrlScraper\n self.name = 'Node.js'\n self.slug = 'node'\n self.type = 'node'\n self.links = {\n home: 'https://nodejs.org/',\n code: 'ht...
ruby
chosen
[ { "from": "system", "value": "Use cover image in game API response.\n" }, { "from": "human", "value": "json.title game.title\njson.slug game.title.parameterize\njson.min_players game.min_players\njson.max_players game.max_players\njson.description game.descriptio...
ruby
chosen
[ { "from": "system", "value": "Fix this so it installs PE appropriately.\n" }, { "from": "human", "value": "require 'beaker-rspec'\n\nhosts.each do |host|\n # Install Puppet\n install_package host, 'rubygems'\n on host, 'gem install puppet --no-ri --no-rdoc'\n on host, \"mkdir -p #{host['dist...
ruby
chosen
[ { "from": "system", "value": "Update current version to SunVox 1.8.1\n" }, { "from": "human", "value": "cask :v1 => 'sunvox' do\n version '1.8'\n sha256 'c69c7e8e849c29139be61a6b82a5a9fa7c396fba84ec749d2f4531bb5550ca37'\n\n url \"http://www.warmplace.ru/soft/sunvox/sunvox-#{version}.zip\"\n ...
ruby
chosen
[ { "from": "system", "value": "Remove empty resources in podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"RFduino-library\"\n s.version = \"1.0.1\"\n s.summary = \"RFduino-library is a few classes to manage & communicate with RFduino boards over Bl...
ruby
chosen
[ { "from": "system", "value": "Use leep year for date compare\n" }, { "from": "human", "value": "require 'age/version'\nrequire 'date'\n\nclass Age\n attr_accessor :birth, :end\n\n def initialize(options)\n @birth = options[:birth] || DateTime.now.offset(0)\n @end = options[:end] || DateT...
ruby
chosen
[ { "from": "human", "value": "Define track things constraint correctly\n\n> The constraint fk_track_request_public_body on\n> track_things_sent_emails is defined incorrectly, referring to user_id\n> rather than public_body_id.\n\nVia Robin Houston\n" }, { "from": "gpt", "value": "class UpdateTrac...
ruby
chosen
[ { "from": "system", "value": "Set gem version to non dev.\n" }, { "from": "human", "value": "# Encoding: UTF-8\n\nGem::Specification.new do |s|\n s.name = %q{refinerycms-news}\n s.version = %q{2.1.0.dev}\n s.description = %q{A really straightforward open source Ru...
ruby
chosen
[ { "from": "human", "value": "Add tests for pagination module extracted from API\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe API::Helpers::Pagination do\n let(:resource) { Project.all }\n\n subject do\n Class.new.include(described_class).new\n end\n\n describe '#pagi...
ruby
chosen
[ { "from": "human", "value": "Fix for CSRF protection bug\n" }, { "from": "gpt", "value": "# Fix for CSRF protection bug.\n# See http://weblog.rubyonrails.org/2008/11/18/potential-circumvention-of-csrf-protection-in-rails-2-1\nMime::Type.unverifiable_types.delete(:text)" } ]
ruby
chosen
[ { "from": "system", "value": "Remove order_id reference from MailMethodsController spec\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Spree::Admin::MailMethodsController do\n stub_authorization!\n\n let(:order) { mock_model(Spree::Order, :complete? => true).as_null_objec...
ruby
chosen
[ { "from": "system", "value": "Move application setting to separate variable.\n" }, { "from": "human", "value": "# Gitlab::VisibilityLevel module\n#\n# Define allowed public modes that can be used for\n# GitLab projects to determine project public mode\n#\nmodule Gitlab\n module VisibilityLevel\...
ruby
chosen
[ { "from": "human", "value": "Add a spec for relation inheritance and setup\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\nRSpec.describe 'Inheritance relation hierarchy' do\n before do\n ROM.setup(:memory)\n\n module Test\n class Users < ROM::Relation[:memory]\n dat...
ruby
chosen
[ { "from": "system", "value": "Set DateTime primitive class to Time\n" }, { "from": "human", "value": "module DataMapper\n module Mongo\n module Types\n class DateTime < DataMapper::Type\n primitive ::DateTime\n\n def self.load(value, property)\n self.typecast(valu...
ruby
chosen
[ { "from": "system", "value": "Upgrade Sinatra example to work with rack-test 0.3.0 and aslakhellesoy-webrat 0.4.4.1\n" }, { "from": "human", "value": "# See http://wiki.github.com/aslakhellesoy/cucumber/sinatra\n# for more details about Sinatra with Cucumber\n\n# Sinatra\napp_file = File.join(Fi...
ruby
chosen
[ { "from": "system", "value": "Remove tests for examples state from scenario outline\n" }, { "from": "human", "value": "require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')\nrequire File.expand_path(File.dirname(__FILE__) + '/spec_helper')\n\nmodule Gherkin\n module SyntaxPoli...
ruby
chosen
[ { "from": "system", "value": "Add model test to verify role is not deleted on removing all of its users\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Role do\n let(:conference) { create(:conference) }\n let!(:organizer_role) { Role.find_by(name: 'organizer', resource: co...
ruby
chosen
[ { "from": "system", "value": "Add scientific and amazon to the metdata\n" }, { "from": "human", "value": "name \"nscd\"\nmaintainer \"Opscode, Inc.\"\nmaintainer_email \"cookbooks@opscode.com\"\nlicense \"Apache 2.0\"\ndescription \"Installs and configures ns...
ruby
chosen
[ { "from": "system", "value": "Create correct path on sample product bootstrap script\n" }, { "from": "human", "value": "require 'find'\n# make sure the product images directory exists\nFileUtils.mkdir_p \"#{RAILS_ROOT}/public/images/products/\"\n\n# make product images available to the app\ntarg...
ruby
chosen
[ { "from": "system", "value": "Update contact email in Gemspec\n" }, { "from": "human", "value": "# encoding: utf-8\n\nGem::Specification.new do |s|\n s.name = \"jekyll-theme-cayman\"\n s.version = \"0.0.1\"\n s.authors = [\"Jason Long\"]\n s.email = [\"support@gi...
ruby
chosen
[ { "from": "system", "value": "Make it a oneliner like it should have been.\n" }, { "from": "human", "value": "Autotest.add_discovery do\n if File.directory?('features')\n if ENV['AUTOFEATURE'] =~ /true/i\n \"cucumber\"\n elsif\n ENV['AUTOFEATURE'] =~ /false/i\n else\n pu...
ruby
chosen
[ { "from": "system", "value": "Update Navicat Premium to 11.0.15\n" }, { "from": "human", "value": "class NavicatPremium < Cask\n url 'http://download.navicat.com/download/navicat110_premium_en.dmg'\n homepage 'http://www.navicat.com/products/navicat-premium'\n version '11.0.14'\n sha1 '5c337...
ruby
chosen
[ { "from": "system", "value": "Upgrade Navicat Premium to 11.1.17.\n" }, { "from": "human", "value": "cask :v1 => 'navicat-premium' do\n version '11.1.16'\n sha256 '940a7c343e9b0fd97141411e871c540b8ddf48cf2afbfd7c531cbfccc17c5a72'\n\n url \"http://download.navicat.com/download/navicat#{version...
ruby
chosen
[ { "from": "system", "value": "Allow arrays to be received for custom ransacker\n" }, { "from": "human", "value": "module Ransack\n module Nodes\n class Condition\n\n def arel_predicate\n predicates = attributes.map do |attr|\n attr.attr.send(\n arel_predicate_...
ruby
chosen
[ { "from": "system", "value": "Fix calculator association with promotion action\n" }, { "from": "human", "value": "module Spree\n class Promotion::Actions::CreateAdjustment < PromotionAction\n calculated_adjustments\n\n delegate :eligible?, :to => :promotion\n\n before_create do |a|\n ...
ruby
chosen
[ { "from": "system", "value": "Add `rake` gem as development dependency." }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 'resque-lock-timeout'\n s.version = '0.3.1'\n s.date = Time.now.strftime('%Y-%m-%d')\n s.summary = '...
ruby
chosen
[ { "from": "system", "value": "Fix update minitest when installing VS 2015\n" }, { "from": "human", "value": "require 'minitest/spec'\nrequire_relative 'spec_helper'\n\nclass InstallUpdateSpec < MiniTest::Chef::Spec\n\n describe_recipe 'visualstudio::install_update' do\n describe 'packages' d...
ruby
chosen
[ { "from": "system", "value": "Return permissions for orders within the API results\n\nThis allows us to determine what information / buttons to display on the interface for an order\n" }, { "from": "human", "value": "object @order\nextends \"spree/api/orders/order\"\n\nif lookup_context.find_all...
ruby
chosen
[ { "from": "system", "value": "Put Berkshelf 2 cookbooks inside a `cookbooks` directory" }, { "from": "human", "value": "begin\n require 'berkshelf'\nrescue LoadError\n raise ChefSpec::Error::GemLoadError.new(gem: 'berkshelf', name: 'Berkshelf')\nend\n\nmodule ChefSpec\n class Berkshelf\n c...
ruby
chosen
[ { "from": "human", "value": "Add code wars 6 playing with digits\n" }, { "from": "gpt", "value": "# http://www.codewars.com/kata/5552101f47fc5178b1000050/\n# --- iteration 1 ---\ndef dig_pow(n, p)\n n_digs = n.to_s.chars.map(&:to_i)\n p_digs = (p...(p + n_digs.count)).to_a\n x = n_digs.each_w...
ruby
chosen
[ { "from": "system", "value": "Add comment to the TrieWithFallback.\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 Collation\n\n class TrieWithFallback < TwitterCldr::Collation:...
ruby
chosen
[ { "from": "human", "value": "Add FreeShipping calculator back to ease migration from earlier Spree versions\n" }, { "from": "gpt", "value": "# TODO: Deprecate this class.\n# This calculator will be removed in future versions of Spree.\n# The only case where it was used was for Free Shipping Prom...
ruby
chosen
[ { "from": "system", "value": "Add back project_id index for MySQL if reverting\n" }, { "from": "human", "value": "class AddUniqueConstraintToCiVariables < ActiveRecord::Migration\n include Gitlab::Database::MigrationHelpers\n\n DOWNTIME = false\n\n disable_ddl_transaction!\n\n def up\n un...
ruby
chosen
[ { "from": "system", "value": "Deal with AR 3.0 and 3.1 bug that cattr_accessor + :instance_accessor => false still creates an instance_accessor\n" }, { "from": "human", "value": "module ActiveRecord\n class Base\n # Future subclasses will pick up the model extension\n class << self\n ...
ruby
chosen
[ { "from": "human", "value": "Add request spec for asciicast upload\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe \"Asciicast upload\" do\n it 'returns the URL to the uploaded asciicast' do\n post '/api/asciicasts', :asciicast => {\n :meta => fixture_file_up...
ruby
chosen
[ { "from": "system", "value": "Fix - Nettoie le test sur la page d'intro\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass PagesControllerTest < ActionController::TestCase\n def setup\n @base_title = \"Perchons\"\n end\n\n test \"should get intro\" do\n get :intro\n as...
ruby
chosen
[ { "from": "system", "value": "[stormondemand|dns] Add DNS Service to StormOnDemand\n" }, { "from": "human", "value": "require 'fog/core'\n\nmodule Fog\n module StormOnDemand\n\n extend Fog::Provider\n\n service(:compute, 'storm_on_demand/compute', 'Compute')\n service(:storage, 'storm_...
ruby
chosen
[ { "from": "human", "value": "Add QLRest, a quicklook generator for restructuredtext.\n" }, { "from": "gpt", "value": "class Qlrest < Cask\n url 'https://github.com/downloads/cluther/qlrest/QLRest.qlgenerator.zip'\n homepage 'https://github.com/cluther/qlrest'\n version '2.0'\n sha256 '7800e1...
ruby
chosen
[ { "from": "human", "value": "Add tests for parallel update\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe \"updating dependencies parallely\", :realworld => true do\n before :each do\n install_gemfile <<-G\n source \"https://rubygems.org\"\n gem 'activesupport',...
ruby
chosen
[ { "from": "system", "value": "Fix Rabl::Tracker to match paths with numbers\n" }, { "from": "human", "value": "module Rabl\n # DependencyTracker for ActionView to support cache digest\n class Tracker\n # Matches:\n # extends \"categories/show\"\n EXTENDS_DEPENDENCY = /\n extend...
ruby
chosen
[ { "from": "system", "value": "Fix CLI tool installation in GitHub for Mac\n\nSymlinks the 'github' CLI binary that enables opening GitHub for Mac\nfrom the command line. As per the defaults for the application, the\ninternal `github_cli` binary is symlinked simply as `github`.\n\nNote this intetionally does...
ruby
chosen
[ { "from": "system", "value": "Upgrade Dash Beta to v2.2.1\n" }, { "from": "human", "value": "class DashBeta < Cask\n version '2.2.0'\n sha256 'e294b7f40436893b02a3d01739169fa2a2eed93945f91ca3233b439fd343ae40'\n\n url 'https://dl0tgz6ee3upo.cloudfront.net/production/app/builds/002/042/895/orig...
ruby
chosen
[ { "from": "system", "value": "Improve specs for abstract remote `include` file\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'fast_spec_helper'\n\ndescribe Gitlab::Ci::Config::External::File::Base do\n subject { described_class.new(location) }\n\n before do\n a...
ruby
chosen
[ { "from": "system", "value": "Fix veritas integration specs for \"finding one object\"\n" }, { "from": "human", "value": "require 'spec_helper_integration'\n\ndescribe 'Finding One Object' do\n include_context 'Models and Mappers'\n\n before(:all) do\n setup_db\n\n insert_user 1, 'John',...
ruby
chosen
[ { "from": "system", "value": "Write a test for token redaction\n" }, { "from": "human", "value": "require 'discordrb'\n\ndescribe Discordrb::Logger do\n it 'should log messages' do\n stream = spy\n logger = Discordrb::Logger.new(false, [stream])\n\n logger.error('Testing')\n\n expec...
ruby
chosen
[ { "from": "system", "value": "Make the Opal::Environment warning more visible\n" }, { "from": "human", "value": "require 'sprockets'\nrequire 'opal/sprockets/processor'\nrequire 'opal/sprockets/erb'\n\nmodule Opal\n # Proccess using Sprockets\n #\n # Opal.process('opal-jquery') # => Strin...
ruby
chosen
[ { "from": "human", "value": "Add test for the Tender service\n" }, { "from": "gpt", "value": "require File.expand_path('../helper', __FILE__)\n\nclass TenderTest < Service::TestCase\n def setup\n @stubs = Faraday::Adapter::Test::Stubs.new\n\n @options = {\n 'domain' => 'some.tenderap...
ruby
chosen
[ { "from": "system", "value": "[promo] Convert UpdateCalculableTypeForPromotions migration to use SQL\n" }, { "from": "human", "value": "class UpdateCalculableTypeForPromotions < ActiveRecord::Migration\n def up\n Spree::Calculator.where(:calculable_type => 'Coupon').update_all(:calculable_ty...
ruby
chosen
[ { "from": "system", "value": "Use cache directly instead of cache[:data].\n" }, { "from": "human", "value": "# encoding: UTF-8\n\nmodule TwitterCldr\n module Shared\n class UnicodeData\n @@blocks = TwitterCldr.resources.resource_for(\"unicode_data\", \"blocks\")\n @@cache = { :data...
ruby
chosen
[ { "from": "system", "value": "Use '==' for assertions against true and false\n\nThis fixes tests breaking with non-monkey-patched 'true' and 'false' objects.\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Cocaine::CommandLine::FakeRunner do\n it 'records commands' do\n ...
ruby
chosen
[ { "from": "system", "value": "Add filter and group for simple coverage\n" }, { "from": "human", "value": "require 'simplecov'\nSimpleCov.minimum_coverage 51\nSimpleCov.start do\n add_filter \"/spec/\"\nend if ENV[\"COVERAGE\"]\n\nrequire 'rspec'\nrequire 'eligible'\n\nRSpec.configure do |config...
ruby
chosen
[ { "from": "human", "value": "Add index for project_statuses to speed up rendering.\n" }, { "from": "gpt", "value": "class AddIndexesToProjectStatuses < ActiveRecord::Migration\n def self.up\n add_index :project_statuses, [:project_id, :online, :published_at]\n end\n\n def self.down\n re...
ruby
chosen
[ { "from": "system", "value": "Add a request spec for visiting /settlements/new when you have any credit card account.\n" }, { "from": "human", "value": "# -*- encoding : utf-8 -*-\nrequire 'spec_helper'\n\ndescribe SettlementsController do\n fixtures :users, :accounts, :account_links, :account_...
ruby
chosen
[ { "from": "system", "value": "Update generator to produce classes with new namespacing\n" }, { "from": "human", "value": "class <%= class_name %> < ClassyEnum::Base\n enum_classes <%= values.map {|a| \":#{a}\"}.join(\", \") %>\nend\n<% values.each do |arg| %>\nclass <%= class_name + arg.cameliz...
ruby
chosen
[ { "from": "system", "value": "Support multiple comma separated values.\n" }, { "from": "human", "value": "require 'http/security/parsers/parser'\n\nmodule HTTP\n module Security\n module Parsers\n class XFrameOptions < Parser\n # X-Frame-Options\n # Syntax:\n # X-Fr...
ruby
chosen
[ { "from": "system", "value": "Remove superfluous check for pluralize_table_names (use table_name which does this check when it's set).\n\ngit-svn-id: afc9fed30c1a09d8801d1e4fbe6e01c29c67d11f@3159 5ecf4fe2-1ee6-0310-87b1-e25e094e27de\n" }, { "from": "human", "value": "class ModelGenerator < Rails...
ruby
chosen
[ { "from": "system", "value": "Verify that accept header is 'application/json'\n" }, { "from": "human", "value": "require File.expand_path('../helper', __FILE__)\n\nclass AppHarborTest < Service::TestCase\n def setup\n @stubs = Faraday::Adapter::Test::Stubs.new\n end\n\n def test_push\n ...
ruby
chosen
[ { "from": "system", "value": "Include the Location object in the Client" }, { "from": "human", "value": "require 'multi_json'\n\nrequire \"automatic/client/version\"\nrequire \"automatic/client/trips\"\nrequire \"automatic/client/trip\"\nrequire \"automatic/client/vehicle\"\nrequire \"automatic/...
ruby
chosen