conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Remove if condition and fail fast if the provider is not recognized\n\nbegin block is no longer necessary\n" }, { "from": "human", "value": "module Fog\n module ServicesMixin\n def [](provider)\n new(:provider => provider)\n end\n\n def new(attributes...
ruby
chosen
[ { "from": "system", "value": "Update URL for Sketch 3.0\n" }, { "from": "human", "value": "class Sketch < Cask\n url 'http://www.bohemiancoding.com/download/sketch.zip'\n homepage 'http://www.bohemiancoding.com/sketch/'\n version 'latest'\n no_checksum\n link 'Sketch.app'\nend\n" }, { ...
ruby
chosen
[ { "from": "system", "value": "Use rspec 2.0 expect syntax instead of should\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Releaf::JavascriptHelper do\n\n describe \"#jquery_date_format\" do\n context 'when argument is not a String' do\n it \"raises ArgumentError\"...
ruby
chosen
[ { "from": "system", "value": "Make the index on sequence number unique for each target_repository_id\n" }, { "from": "human", "value": "class AddingIndexToSequenceNumbers < ActiveRecord::Migration\n def self.up\n add_index :merge_requests, :sequence_number\n end\n\n def self.down\n remo...
ruby
chosen
[ { "from": "system", "value": "Upgrade iSumbler.app v100 GM Candidate 5\n" }, { "from": "human", "value": "class Istumbler < Cask\n url 'http://istumbler.net/downloads/istumbler-99.zip'\n homepage 'http://istumbler.net/'\n version '99'\n sha1 '9dfdee3cc1405c4c01417ac0423473142c9b55c9'\n link...
ruby
chosen
[ { "from": "system", "value": "Remove unused and seemingly useless method.\n" }, { "from": "human", "value": "module QC\n class DurableArray\n\n def initialize(database)\n @database = database\n @table_name = @database.table_name\n @top_boundary = @database.top_boundary\n en...
ruby
chosen
[ { "from": "human", "value": "Add spec for timestamp stat\n" }, { "from": "gpt", "value": "# universe_timestamp stat tests\n#\n# Copyright (C) 2014 Mohammed Morsi <mo@morsi.org>\n# Licensed under the AGPLv3 http://www.gnu.org/licenses/agpl.txt\n\nrequire 'spec_helper'\nrequire 'stats/registry'\n\...
ruby
chosen
[ { "from": "system", "value": "Include ncurses to link with our readline extension\n" }, { "from": "human", "value": "extension do |e|\n e.name 'readline'\n e.files '*.c'\n e.includes '.', '..', '/usr/include'\n e.libs 'readline'\nend\n\n" }, { "from": "gpt", "value": "extension d...
ruby
chosen
[ { "from": "system", "value": "Update email subjects to include job titles\n" }, { "from": "human", "value": "class JobMailer < ApplicationMailer\n add_template_helper(JobsHelper)\n\n def new_job(job_id)\n @job = Job.find(job_id).decorate\n\n subject = \"MENAdevs - #{@job.user.try(:name)}...
ruby
chosen
[ { "from": "system", "value": "Add note about vendor/official homepage\n" }, { "from": "human", "value": "cask :v1 => 'mac2imgur' do\n version :latest\n sha256 :no_check\n\n url 'https://mac2imgur.mileswd.com/static/mac2imgur.zip'\n name 'mac2imgur'\n homepage 'https://github.com/mileswd/mac...
ruby
chosen
[ { "from": "human", "value": "Add spec testing CarrierWave without failing silently\n\nThis spec executes a cover photo upload without failing silently.\nThe options `:ignore_processing_errors` and `:ignore_integrity_errors`\nare set to `false` so that any problems with the installation of\n`ImageMagick` cau...
ruby
chosen
[ { "from": "system", "value": "Drop vat: prefix in VatRate seeds.\n" }, { "from": "human", "value": "# Master Data\n# ===========\n# Swiss (German)\n\n# Vat Rates\nVatRate.create!([\n {:code => 'vat:full', :title => \"MWSt. (Normaler Satz)\", :duration_from => '2011-01-01', :rate => 8},\n {:cod...
ruby
chosen
[ { "from": "system", "value": "Use `message` field instead of error\n" }, { "from": "human", "value": "module Committee::Middleware\n class Base\n def initialize(app, options={})\n @app = app\n\n @params_key = options[:params_key] || \"committee.params\"\n data = options[:schem...
ruby
chosen
[ { "from": "system", "value": "Make azure-armrest dependency less pessimistic.\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\nrequire \"manageiq/providers/azure/version\"\n\nGem::Specification.new do |s|\n s.name = \"manageiq-providers-azure\"\n s.ve...
ruby
chosen
[ { "from": "system", "value": "Fix spacing issue in @ comments\n" }, { "from": "human", "value": "module ApplicationHelper\n def markdown(text)\n raw(RDiscount.new(text).to_html)\n end\n\n def parse(text)\n text.gsub(/\\s@([a-f0-9]*)/) { link_to \" @#{$1}\", \"https://github.com/radar/ra...
ruby
chosen
[ { "from": "human", "value": "Add OnyX for Lion cask\n" }, { "from": "gpt", "value": "class OnyxLion < Cask\n url 'http://www.titanium.free.fr/download/107/OnyX.dmg'\n homepage 'http://www.titanium.free.fr/downloadonyx.php'\n version '2.4.8'\n sha1 '830c72d93494c4d77b1e216fda25d77b56660a0e'\n...
ruby
chosen
[ { "from": "system", "value": "Update podspec for 1.0.0 release.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'Valet'\n s.version = '0.9.9'\n s.license = 'Apache'\n s.summary = 'Valet lets you securely store data in the iOS or OS X Keychain without knowing a thing...
ruby
chosen
[ { "from": "system", "value": "Print a non-insanely-verbose output for Environments. This should resolve an issue where Bundler.setup used up insane amounts of RAM and never returned." }, { "from": "human", "value": "module Bundler\n class Environment\n attr_reader :root\n\n def initialize...
ruby
chosen
[ { "from": "system", "value": "Define the accessor method for diagnostic_info\n" }, { "from": "human", "value": "require './client'\n\nclass TelemetryDiagnostics\n DIAGNOSTIC_CHANNEL_CONNECTION_STRING = \"*111#\"\n\n def initialize\n @telemetry_client = TelemetryClient.new\n @diagnostic_i...
ruby
chosen
[ { "from": "system", "value": "Add overdue? checker method to Task\n" }, { "from": "human", "value": "class Task < ActiveRecord::Base\n has_many :taggings, dependent: :destroy\n has_many :tags, through: :taggings\n has_many :time_entries, dependent: :destroy\n belongs_to :user\n\n validates_...
ruby
chosen
[ { "from": "system", "value": "Add POST test for watering controller\n" }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe WateringsController do\n before(:each) do\n User.create(email: \"test@test.com\", password: \"testPassword\")\n controller.session[:user_id] = User.fir...
ruby
chosen
[ { "from": "system", "value": "Remove obsolete things in db:seed task\n" }, { "from": "human", "value": "# This file should contain all the record creation needed to seed the database with its default values.\n# The data can then be loaded with the rake db:seed (or created alongside the db with d...
ruby
chosen
[ { "from": "system", "value": "Clear seed users before trying to add them with `rake db:seed`\n" }, { "from": "human", "value": "# This file should contain all the record creation needed to seed the database with its default values.\n# The data can then be loaded with the rake db:seed (or created...
ruby
chosen
[ { "from": "system", "value": "Update Bit Slicer (quick 1.7.5 bug-fix)\n\nHad to fix a potential crash on startup." }, { "from": "human", "value": "cask :v1 => 'bit-slicer' do\n version '1.7.5'\n sha256 '286487687fbd9a46f3d7bfa943a912a3e05183af06ebfaef8f6820253d5f93e7'\n\n # bitbucket.org is t...
ruby
chosen
[ { "from": "human", "value": "Add Jive Chime.app latest version\n\nReal-time messaging for your team. http://jivechime.com/\n" }, { "from": "gpt", "value": "cask :v1 => 'jive-chime' do\n version :latest\n sha256 :no_check\n\n # amazonaws.com is the official download host per the vendor homepag...
ruby
chosen
[ { "from": "human", "value": "Convert csv report integration test to RSpec\n" }, { "from": "gpt", "value": "require 'spec_helper'\nrequire './features/step_definitions/testing_dsl'\n\ndescribe \"CSV report\" do\n # As a non-technical application product owner\n # I want license finder to genera...
ruby
chosen
[ { "from": "system", "value": "Hide login link from the menu if user is logged in or the plugin is disabled.\n" }, { "from": "human", "value": "require 'redmine'\nrequire 'dispatcher'\nrequire 'http_auth_patch'\n \nRedmine::Plugin.register :http_auth do\n name 'HTTP Authentication plugin'\n aut...
ruby
chosen
[ { "from": "system", "value": "Upgrade Default Folder X to v4.6.14\n" }, { "from": "human", "value": "cask :v1 => 'default-folder-x' do\n version '4.6.13'\n sha256 'bc33783b31ff0f6f38f489be03470ac1566eb8161dbf57f1670c5a0842fcf38d'\n\n url \"http://www.stclairsoft.com/download/DefaultFolderX-#{...
ruby
chosen
[ { "from": "system", "value": "Define blank tasks for backward compatibility\n" }, { "from": "human", "value": "require 'tachikoma/application'\n\nnamespace :tachikoma do\n desc 'run tachikoma'\n task :run do\n Tachikoma::Application.run\n end\nend\n" }, { "from": "gpt", "value"...
ruby
chosen
[ { "from": "system", "value": "Add legacy ProductScope model to fix_by_popularity migration\n" }, { "from": "human", "value": "class FixByPopularity < ActiveRecord::Migration\n def self.up\n ProductScope.update_all(\"name='descend_by_popularity'\", \"name='by_popularity'\")\n end\n\n def se...
ruby
chosen
[ { "from": "system", "value": "Revert \"Fixed migration failure for postgres > 8.0\"\n\nThis reverts commit 40bffa0909174b7e141bf717b138d74600096613.\n" }, { "from": "human", "value": "class ChangeTxnTypeToInt < ActiveRecord::Migration\n def self.up\n if postgresql_version > 80000\n exec...
ruby
chosen
[ { "from": "system", "value": "Change dependencies in gemspec: we support 2.2, 2.3 and 3.0 now, but stupid rubygems does not support version ranges\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path('../lib', __FILE__)\nrequire 'db_charmer/version'\n\nGem::Spec...
ruby
chosen
[ { "from": "system", "value": "Fix array slice that can return nil\n" }, { "from": "human", "value": "# encoding: utf-8\nrequire 'open3'\n\n\nmodule CartoDB\n module Importer2\n\n # This class is responsible for analyzing a file through ogrinfo.\n class OgrInfo\n DEFAULT_BINARY = `whi...
ruby
chosen
[ { "from": "human", "value": "Add a ruby client for receiving events\n" }, { "from": "gpt", "value": "# encoding: utf-8\n# To use this client install following gems\n# gem install msgpack\n# gem install rbczmq\n\nrequire 'zmq'\nrequire 'pp'\nrequire \"msgpack\"\n\n# PUB / SUB topology\n\nThread.a...
ruby
chosen
[ { "from": "system", "value": "Disable finalizers because threads don't work yet\n" }, { "from": "human", "value": "module ObjectSpace\n @thread = Thread.new do\n loop do\n Rubinius::ON_GC.receive\n ObjectSpace.run_finalizers\n end\n end\nend\n" }, { "from": "gpt", "...
ruby
chosen
[ { "from": "system", "value": "Update podspec, remove dependencies AFNetworking and iOS5.0\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"AdjustIO\"\n s.version = \"2.0\"\n s.summary = \"This is the iOS SDK of AdjustIo. You can read more about it at http...
ruby
chosen
[ { "from": "system", "value": "Add Apache 2.0 as the gem license" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'knife-whisk/version'\n\nGem::Specification.new do |gem|\n gem...
ruby
chosen
[ { "from": "system", "value": "Load factories from /factories at the Rails root, just like the default definition_file_paths.\n" }, { "from": "human", "value": "require 'factory_girl'\nrequire 'rails'\n\nmodule FactoryGirl\n class Railtie < Rails::Railtie\n config.after_initialize do\n F...
ruby
chosen
[ { "from": "system", "value": "Use draw to avoid mutliple declarations\n\nOtherwise the routes are declared three times.\nIn addition used the only option to avoid redraw of product resource\nlinks. Probably also solves #58\n\nFixes #71\n" }, { "from": "human", "value": "Spree::Core::Engine.route...
ruby
chosen
[ { "from": "system", "value": "Refactor source outdentation method to be simpler\n" }, { "from": "human", "value": "require 'unparser'\nrequire 'devtools/spec_helper'\n\nrequire 'parser/ruby21'\n\nmodule SpecHelper\n def s(type, *children)\n Parser::AST::Node.new(type, children)\n end\n\n d...
ruby
chosen
[ { "from": "system", "value": "Fix chef 11 compat check\n" }, { "from": "human", "value": "name 'sssd_ldap'\nmaintainer 'Tim Smith'\nmaintainer_email 'tsmith84@gmail.com'\nlicense 'Apache 2.0'\ndescription 'Installs/Configures LDAP on RHEL/Ubuntu using SSSD'\nlong_...
ruby
chosen
[ { "from": "system", "value": "Use 'group' rather than 'meetup'\n" }, { "from": "human", "value": "class EventFinder\n def get_events_for_meetups(meetup_url_names, api)\n ids = meetup_url_names.map { |name| api.get_meetup_id name }\n\n api.get_upcoming_events(ids)\n end\nend" }, { ...
ruby
chosen
[ { "from": "system", "value": "Verify that it's yelp.com for non-locale params\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Yelp::Endpoint::Business do\n include_context 'shared configuration'\n\n let(:api_keys) { real_api_keys }\n let(:business) { 'yelp-san-francisco' ...
ruby
chosen
[ { "from": "system", "value": "AntTweakBar: Remove patches and update MD5\n\nRemoving patch, since project maintainer incorporated fixes (but didn't\nincrement project version number)\n\nCloses #7702.\n\nSigned-off-by: Charlie Sharpsteen <828d338a9b04221c9cbe286f50cd389f68de4ecf@sharpsteen.net>\n" }, { ...
ruby
chosen
[ { "from": "system", "value": "Use stringio in spec logging\n" }, { "from": "human", "value": "if ENV[\"COVERAGE\"]\n require 'simplecov'\n\n SimpleCov.start do\n add_filter 'spec'\n\n add_group \"BSON\", 'lib/moped/bson'\n add_group \"Protocol\", 'lib/moped/protocol'\n add_group \"...
ruby
chosen
[ { "from": "system", "value": "Rename the section for the Code method\n" }, { "from": "human", "value": "require 'discordrb'\n\ndescribe Discordrb::Errors do\n describe 'the Code method' do\n it 'should create a class without errors' do\n Discordrb::Errors.Code(10_000)\n end\n\n de...
ruby
chosen
[ { "from": "system", "value": "Use a before_filter to find the Application in ApplicationsController\n\nThis makes overriding the default authorization much less code.\nIf you agree, I'll add a test.\n" }, { "from": "human", "value": "module Doorkeeper\n class ApplicationsController < Doorkeeper...
ruby
chosen
[ { "from": "system", "value": "Add CLI options to event machine\n" }, { "from": "human", "value": "require 'em-websocket'\nrequire 'json'\n\nEM.run {\n @channel = EM::Channel.new\n\n EM::WebSocket.run(:host => \"0.0.0.0\", :port => 8080) do |ws|\n ws.onopen {\n sid = @channel.subscribe ...
ruby
chosen
[ { "from": "system", "value": "Update podspec for version 1.0.6\n\nRequires a 1.0.6 tag.\n" }, { "from": "human", "value": "\nPod::Spec.new do |s|\n s.name = \"GrowthPush\"\n s.version = \"1.0.5\"\n s.summary = \"GrowthPush SDK for iPhone/iPad\"\n s.description = <<...
ruby
chosen
[ { "from": "system", "value": "Make focusing on certain specs easier.\n" }, { "from": "human", "value": "# encoding: UTF-8\n\n# Copyright 2012 Twitter, Inc\n# http://www.apache.org/licenses/LICENSE-2.0\n\nrequire 'rspec'\nrequire 'twitter_cldr'\n\nclass FastGettext\n class << self\n def local...
ruby
chosen
[ { "from": "system", "value": "Update Little Snitch to v3.5.3\n" }, { "from": "human", "value": "cask :v1 => 'little-snitch' do\n version '3.5.2'\n sha256 'bf88a0fe00550367e86acc7d02d508a45c3c5623eb75daadce32ddf74e14bec8'\n\n url \"https://www.obdev.at/downloads/littlesnitch/LittleSnitch-#{ver...
ruby
chosen
[ { "from": "system", "value": "Add some attributes to Connection\n" }, { "from": "human", "value": "module Discordrb::Light\n # A connection of your Discord account to a particular other service (currently, Twitch and YouTube)\n class Connection\n end\nend\n" }, { "from": "gpt", "v...
ruby
chosen
[ { "from": "system", "value": "Fix role building when creating a new User.\n" }, { "from": "human", "value": "class User < ActiveRecord::Base\n # Include default devise modules. Others available are:\n # :token_authenticatable, :confirmable, :lockable and :timeoutable\n devise :database_authen...
ruby
chosen
[ { "from": "system", "value": "Load plugin own controllers, helpers, views and models to isolate it from application when testing.\n" }, { "from": "human", "value": "\nENV['RAILS_ENV'] = \"test\"\n\nrequire File.expand_path(File.dirname(__FILE__) + \"/../../../../config/environment\")\n\nActiveRe...
ruby
chosen
[ { "from": "system", "value": "Add requires to split out classes.\n" }, { "from": "human", "value": "require 'cypress/agent'\nrequire 'cypress/logger'\nrequire 'cypress/configuration'\n\nmodule Cypress\n def self.configuration\n @configuration ||= Cypress::Configuration.new\n end\n\n def se...
ruby
chosen
[ { "from": "system", "value": "Update Selfcontrol.app cask to the latest version\n" }, { "from": "human", "value": "class Selfcontrol < Cask\n version '2.0'\n sha256 '8148b29d5c5bca08149b15ae1841bac87619624f8fbdebb071daa71ccb5a8efa'\n\n url \"http://downloads.selfcontrolapp.com/SelfControl-#{v...
ruby
chosen
[ { "from": "system", "value": "Fix query for importing all projects for member\n" }, { "from": "human", "value": "module Bitbucket\n class Client\n def initialize(options = {})\n @connection = Connection.new(options)\n end\n\n def issues(repo)\n path = \"/repositories/#{repo}/...
ruby
chosen
[ { "from": "system", "value": "Check auth for resque server\n" }, { "from": "human", "value": "require \"resque\"\nrequire \"resque/server\"\n\nmodule Integrity\n module ResqueBuilder\n def self.enqueue(build)\n Resque.enqueue BuildJob, build.id\n end\n\n module BuildJob\n @qu...
ruby
chosen
[ { "from": "system", "value": "Add json dependency (for Ruby 1.8.7).\n" }, { "from": "human", "value": "require File.join(File.dirname(__FILE__), \"lib\", \"version\")\n\nGem::Specification.new do |s|\n s.name = \"twitter_cldr\"\n s.version = ::TwitterCldr::VERSION\n s.authors = [\"Cameron Dut...
ruby
chosen
[ { "from": "system", "value": "Change RegisteredUser::TYPE to symbol for consistency\n" }, { "from": "human", "value": "# Users Registered User Event definition\n#\n# Copyright (C) 2013 Mohammed Morsi <mo@morsi.org>\n# Licensed under the AGPLv3+ http://www.gnu.org/licenses/agpl.txt\n\nrequire 'om...
ruby
chosen
[ { "from": "system", "value": "Add description to rake make_all_emails_private\n\nThis way it shows up when `rake -T` is caled.\n" }, { "from": "human", "value": "desc \"Notify Article Authors when articles are stale\"\ntask notify_of_staleness: :environment do\n User.author.to_a.each do |author...
ruby
chosen
[ { "from": "system", "value": "Specs: Simplify matcher by using RSpec3 syntax\n" }, { "from": "human", "value": "RSpec::Matchers.define :perform_queries do |expected|\n match do |block|\n query_count(&block) == expected\n end\n\n failure_message do |actual|\n \"Expected to run #{expected...
ruby
chosen
[ { "from": "system", "value": "Use save instead of save! for mass updates\n" }, { "from": "human", "value": "module Tolk\n class LocalesController < Tolk::ApplicationController\n before_filter :find_locale, :only => [:show, :all, :update, :updated]\n before_filter :ensure_no_primary_locale...
ruby
chosen
[ { "from": "system", "value": "Revert \"update cocoapods to 2.0.4\"\n\nThis reverts commit 2d34e0034d8794ca378fddf7d30b7a227dd8d49e.\n" }, { "from": "human", "value": "Pod::Spec.new do |spec|\n # Node was taken, so using NodeCocoapods here ... we'll see how that works\n # in code do `#if COCOAP...
ruby
chosen
[ { "from": "system", "value": "Make sure assets are precompiled on Heroku\n\nHeroku recommends that `config.assets.initialize_on_precompile = false`,\nwhich means that this initializer will not be invoked by\n`rake assets:precompile`, which forces developers deploying to Heroku\nto duplicate this initializer...
ruby
chosen
[ { "from": "system", "value": "Return the orig_system() return value\n" }, { "from": "human", "value": "require \"rubygems\" # for ruby 1.8\nrequire \"insist\" # gem \"insist\"\nrequire \"rush\" # gem \"rush\"\nrequire \"cabin\" # gem \"cabin\"\nrequire \"tmpdir\" # stdlib\nrequire \"tempfile\" #...
ruby
chosen
[ { "from": "system", "value": "Podspec: Fix URL to point to muzzkat repo.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"NMRangeSlider\"\n s.version = \"1.1.1\"\n s.summary = \"A custom range slider for iOS.\"\n s.homepage = \"https://github.com/muZ...
ruby
chosen
[ { "from": "human", "value": "Add specs for initial receipt parsing" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe Venice::Receipt do\n describe \"parsing the response\" do\n let(:response) {\n {\n \"receipt\" => {\n \"original_purchase_date_pst\" => \...
ruby
chosen
[ { "from": "system", "value": "Support using Easymon::Testing methods directly or by mixin\n\nMake `Easymon::Testing` a module instead of a class. Use the `extend self`\npattern to make its methods accessible directly, or by way of mixing in.\n\nDirect use:\n\n Easymon::Testing.stub_check(:redis)\n\nMixed i...
ruby
chosen
[ { "from": "system", "value": "Handle redirection of download url\n" }, { "from": "human", "value": "require 'curb'\nrequire 'digest'\nrequire 'tempfile'\n\nmodule Sufeed\n def self.checksum(url)\n file = Tempfile.new('sufeed')\n Curl::Easy.download(url, file.path)\n sha256 = Digest::SH...
ruby
chosen
[ { "from": "system", "value": ":anchor: Create a builder anew if none is given\n" }, { "from": "human", "value": "require 'rest-client'\nrequire 'json'\n\nmodule Discordrb::Webhooks\n # A client for a particular webhook added to a Discord channel.\n class Client\n # Create a new webhook\n ...
ruby
chosen
[ { "from": "system", "value": "Refactor hello world example to be more readable\n" }, { "from": "human", "value": "require 'gosu'\n\nclass GameWindow < Gosu::Window\n def initialize\n super(320, 240, false)\n self.caption = 'Hello'\n @message = Gosu::Image.from_text(\n self, 'Hello...
ruby
chosen
[ { "from": "system", "value": "Add uninstall directive for Electric Sheep\n" }, { "from": "human", "value": "class ElectricSheep < Cask\n url 'http://electricsheep.googlecode.com/files/electricsheep-2.7b35b.dmg'\n homepage 'http://www.electricsheep.org'\n version '2.7b35b'\n sha1 'fed402ee86b...
ruby
chosen
[ { "from": "human", "value": "Add test for checking interchangeability between KubernetesService and Clusters::Platform::Kubernetes\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\nfeature 'Interchangeability between KubernetesService and Platform::Kubernetes' do\n let!(:project) { crea...
ruby
chosen
[ { "from": "system", "value": "Exclude /lib/assets/ from coverage report\n" }, { "from": "human", "value": "# Must be placed at the beginning\n# @see https://github.com/colszowka/simplecov#getting-started\nunless ENV['PARALLEL']\n if ENV['RAILS_ENV'] =~ /^test(.*)?/\n require 'simplecov'\n ...
ruby
chosen
[ { "from": "system", "value": "Update to use full name.\n" }, { "from": "human", "value": "require_relative \"route\"\nrequire_relative \"passenger\"\n\nmodule Ellington\n class Conductor\n attr_reader :route\n\n def initialize(route)\n @route = route\n end\n\n # override this m...
ruby
chosen
[ { "from": "human", "value": "Test case for transport.close after auth failure\n\nThe code was totally untested.\n" }, { "from": "gpt", "value": "require 'common'\nrequire 'net/ssh'\n\nmodule NetSSH\n class TestStart < Test::Unit::TestCase\n attr_reader :transport_session\n attr_reader :au...
ruby
chosen
[ { "from": "human", "value": "Add a subdomain name validator\n" }, { "from": "gpt", "value": "class SubdomainValidator < ActiveModel::EachValidator\n def validate_each(object, attribute, value)\n return unless value.present?\n reserved_names = %w(www ftp mail pop smtp admin ssl sftp imap)\...
ruby
chosen
[ { "from": "system", "value": "Update factory to new master seed\n" }, { "from": "human", "value": "FactoryGirl.define do\n\n factory :key_pair, class: Stellar::KeyPair do\n sequence(:seed) {|n| n }\n initialize_with { Stellar::KeyPair.from_raw_seed(seed.to_s.ljust(32)) }\n\n skip_creat...
ruby
chosen
[ { "from": "system", "value": "Upgrade stripe-ruby gem to 1.14.0\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n\nrequire File.expand_path('../lib/stripe_mock/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = \"stripe-ruby-mock\"\n gem.version = S...
ruby
chosen
[ { "from": "system", "value": "Load rspec_tag_matchers gem before requiring it\n" }, { "from": "human", "value": "if Formtastic::Util.rails3?\n gem 'rspec', '~> 2.0.0.beta12'\n gem 'rspec-rails', '~> 2.0.0.beta12'\n \n require \"rubygems\"\n require \"action_controller/railtie\"\n require \...
ruby
chosen
[ { "from": "system", "value": "Load our adapters and extensions first.\n\nEnsure that our adapters and extensions are early in the load process.\nThis way we can be sure that all adjustments to the Rails libs are\navailable when we our code that depends on Rails.\n" }, { "from": "human", "value":...
ruby
chosen
[ { "from": "system", "value": "Correct the type of the `MergeRequestResolver`.\n\nThis was overridden in the fields where this resolver was used. So\nthis change is purely cosmetic.\n" }, { "from": "human", "value": "module Resolvers\n class MergeRequestResolver < BaseResolver\n prepend FullP...
ruby
chosen
[ { "from": "system", "value": "Use full constant name in ElementToPage join model\n\nWithout the full constant name Rails has problems to load the model. Leads to failures if the messages controller spec runs standalone.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule A...
ruby
chosen
[ { "from": "system", "value": "Reduce level of database stdout logging\n" }, { "from": "human", "value": "require 'data_mapper'\n\nmodule AccountBooks\n DataMapper::Logger.new($stdout, :debug)\n DataMapper.setup(:default, 'sqlite::memory:')\n\n class Account\n include DataMapper::Resource\n...
ruby
chosen
[ { "from": "system", "value": "Add comment about view context\n" }, { "from": "human", "value": "module Gretel\n class Crumb\n # Initializes a new crumb from the given +key+.\n # It finds the breadcrumb created in +Gretel::Crumbs.layout+ and renders the block using the arguments supplied i...
ruby
chosen
[ { "from": "system", "value": "Define string array with %w\n" }, { "from": "human", "value": "# Cookbook Name:: travis_docker\n# Recipe:: package\n# Copyright 2017 Travis CI GmbH\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated ...
ruby
chosen
[ { "from": "system", "value": "Remove useless comment, code is actually the comment\n" }, { "from": "human", "value": "class Hash\n\n # Remove nil and empty keys.\n def compact\n delete_if { |key, value| value.blank? }\n end\n\nend\n" }, { "from": "gpt", "value": "class Hash\n\n...
ruby
chosen
[ { "from": "system", "value": "Update seed: random password during install\n\nThis seems superior to the default password of `'password'`. Thoughts on this?\n" }, { "from": "human", "value": "puts \"Seeding database\"\nputs \"-------------------------------\"\n\n# Create an initial Admin User\nad...
ruby
chosen
[ { "from": "system", "value": "Move code from inspect_nested to nested_objects_string\n\nditch inspect_nested and add inspect_object\n" }, { "from": "human", "value": "module Fog\n # Fog::Formatador\n class Formatador\n attr_accessor :object, :thread, :string\n\n def initialize(obj, t)\n ...
ruby
chosen
[ { "from": "system", "value": "Fix typo in script to send out announcements\n" }, { "from": "human", "value": "User.job_alert_subscribers.each do |user|\n NotificationsMailer.announcement(self.id, \"MENA Devs Build Night #4 - get your tickets now!\").deliver_later\nend" }, { "from": "gpt...
ruby
chosen
[ { "from": "system", "value": "Update Screens Connect to v3.2.3\n\nScreens Connect v3.2.3 released 2014-11-04.\nPrevious URL was not the ':latest'.\nAlso added minimum OS X version (10.8)\n" }, { "from": "human", "value": "cask :v1 => 'screens-connect' do\n version :latest\n sha256 :no_check\n\...
ruby
chosen
[ { "from": "system", "value": "Discard any output to STDERR to silence any actual debug output\n" }, { "from": "human", "value": "require File.expand_path('../../spec_helper', __FILE__)\n\ndescribe \"The -d command line option\" do\n before :each do\n @script = fixture __FILE__, \"debug.rb\"\...
ruby
chosen
[ { "from": "human", "value": "Add REDCINE-X PROFESSIONAL BUILD 31 RELEASE\n\nIncludes the following apps in pkg:\n\n* REDCINE-X\\ Professional/RED\\ PLAYER.app\n\n* REDCINE-X\\ Professional/REDCINE-X\\ PRO.app\n\n* REDCINE-X\\ Professional/Utilities/RED\\ Launcher.app\n\n* REDCINE-X\\ Professional/Utilities/...
ruby
chosen
[ { "from": "system", "value": "Fix get-postgresql-primary command for Geo\n\nWill now return Geo PG primary as well\n\nChangelog: fixed\n" }, { "from": "human", "value": "require 'resolv'\n\nmodule GitlabCtl\n class PostgreSQL\n class EE\n class << self\n def get_primary\n ...
ruby
chosen
[ { "from": "system", "value": "Make engine check more explicit\n\nNot everything that responds to `routes` is a Rails engine - for example\na Grape API endpoint will have a `routes` method but can't be used with\n`assert_recognizes` as it doesn't respond to `recognize_path_with_request`.\n\nFixes #32312.\n" ...
ruby
chosen
[ { "from": "system", "value": "Update iTerm2 beta to 2.0.0.20141103\n" }, { "from": "human", "value": "class Iterm2Beta < Cask\n version '2.0.0.20141022'\n sha256 'd2e16b172548bd0f08b7b1fa42f0b42f5781f4e2a6452e6ad21a24301b38577c'\n\n url 'https://iterm2.com/downloads/beta/iTerm2-2_0_0_20141022...
ruby
chosen
[ { "from": "system", "value": "Break timestamp_cache_key out into method on model\n" }, { "from": "human", "value": "module ContentfulRails\n #A module to prepend into ContentfulModel::Base which will allow the model instance\n #to check the cache for its timestamp before making an expensive AP...
ruby
chosen
[ { "from": "system", "value": "Make most LodgingProperty columns numeric" }, { "from": "human", "value": "require 'earth/locality'\n# Copyright 2011 Brighter Planet, Inc.\nclass LodgingProperty < ActiveRecord::Base\n set_primary_key :northstar_id\n \n # So Lodging can look up LodgingClass from...
ruby
chosen
[ { "from": "system", "value": "Replace ObjectSpace crawling with AS::descendants\n" }, { "from": "human", "value": "require 'active_support'\nrequire 'active_support/core_ext/object/try'\nrequire \"rescue_from_duplicate/active_record/version\"\n\nmodule RescueFromDuplicate\n module ActiveRecord\...
ruby
chosen