conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Remove action plan read permission\n" }, { "from": "human", "value": "module Abilities\n class Everyone\n include CanCan::Ability\n\n def initialize(user)\n can :read, Debate\n can :read, Proposal\n can :read, Meeting\n can :read, Comment\...
ruby
chosen
[ { "from": "system", "value": "FIX: Replace not equal with greater than in max one tute enrolment\n" }, { "from": "human", "value": "class TutorialEnrolment < ActiveRecord::Base\n belongs_to :tutorial\n belongs_to :project\n\n validates :tutorial, presence: true\n validates :project, presenc...
ruby
chosen
[ { "from": "system", "value": "Add a convenience accessor for getting statemetn objects\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule CubeDataModel\n # Concern that encapsulates an RDF resource in a DataCube model\n class CubeResource\n attr_reader :resource, :gr...
ruby
chosen
[ { "from": "human", "value": "Make sure MetaTags.config/configuration work as expected\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe MetaTags::Configuration do\n it 'should be returned by MetaTags.config' do\n expect(MetaTags.config).to be_instance_of(MetaTags::Configurat...
ruby
chosen
[ { "from": "system", "value": "Update mutable specs to use etc_file helper\n" }, { "from": "human", "value": "require File.join(File.dirname(__FILE__), 'spec_helper')\nrequire 'rdf/ntriples'\n\ndescribe RDF::Mutable do\n before :each do\n @filename = \"etc/doap.nt\"\n # Possible referenc...
ruby
chosen
[ { "from": "system", "value": "Add voided_amount method to BraspagRest::Payment.\n" }, { "from": "human", "value": "module BraspagRest\n class Payment < Hashie::IUTrash\n include Hashie::Extensions::Coercion\n\n STATUS_AUTHORIZED = 1\n STATUS_CONFIRMED = 2\n STATUS_VOIDED = 10\n\n ...
ruby
chosen
[ { "from": "system", "value": "Drop special handling for CF IP header\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule Castle\n module Extractors\n # used for extraction of ip from the request\n class IP\n def initialize(request)\n @request = request\n...
ruby
chosen
[ { "from": "system", "value": "Use HTTP methods for custom routes\n" }, { "from": "human", "value": "# -*- encoding : utf-8 -*-\n# Here you can override or add to the pages in the core website\n\nRails.application.routes.draw do\n # brand new controller example\n # match '/mycontroller' => 'gen...
ruby
chosen
[ { "from": "system", "value": "Update gemspec for spree 2.0.\n" }, { "from": "human", "value": "# encoding: UTF-8\nGem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s.name = 'spree_zipzones_070'\n s.version = '0.2.0'\n s.summary = 'Enables zipcode zones.'\n ...
ruby
chosen
[ { "from": "system", "value": "Check if ::Berkshelf::VERSION is defined\n" }, { "from": "human", "value": "require 'digest/sha1'\nrequire 'fileutils'\nrequire 'knife-solo/cookbook_manager'\nrequire 'knife-solo/tools'\n\nmodule KnifeSolo\n class Berkshelf\n include CookbookManager\n\n def s...
ruby
chosen
[ { "from": "system", "value": "Refactor several `method_missing`s to use `fetch`\n" }, { "from": "human", "value": "module ROM\n # @api private\n class Registry\n include Enumerable\n include Equalizer.new(:elements)\n\n class ElementNotFoundError < KeyError\n def initialize(key, ...
ruby
chosen
[ { "from": "system", "value": "Change by_pass param to bypass\n" }, { "from": "human", "value": "module SimpleFilter\n module Filter\n attr_accessor :filters\n\n def filter(name, options = {})\n method_module = ModuleHelper.module_for 'Filter', name, self\n value_param = options....
ruby
chosen
[ { "from": "system", "value": "Stop using class_inheritable_accessor as it is deprecated in Rails 3.1.x.\n" }, { "from": "human", "value": "module SortItOut\n module Sortable\n\n def self.included( base )\n base.extend( ActMethods )\n end\n\n module ActMethods\n def sortable( ...
ruby
chosen
[ { "from": "system", "value": "Add a gem description and summary" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'activeadmin/blog/version'\n\nGem::Specification.new do |spec|\n spec.na...
ruby
chosen
[ { "from": "system", "value": "Add a sleep before reattempting to renown process\n" }, { "from": "human", "value": "module TiyoHw\n module Runners\n class Ruby < Base\n def rails?\n file?(\"bin\", \"rails\")\n end\n\n def gemfile?\n file?(\"Gemfile\")\n end\n...
ruby
chosen
[ { "from": "system", "value": "Implement ContinuationQueue more efficiently with lower-level primitives.\n" }, { "from": "human", "value": "require \"thread\"\n\nmodule Bunny\n module Concurrent\n # Continuation queue implementation for MRI and Rubinius\n #\n # @private\n class Conti...
ruby
chosen
[ { "from": "system", "value": "Set TriSano version to 3.5.5\n" }, { "from": "human", "value": "module Trisano\n VERSION = %w(3 5 4).freeze\nend\n\nrequire 'trisano/application'\nrequire 'trisano/deployment'\n" }, { "from": "gpt", "value": "module Trisano\n VERSION = %w(3 5 5).freeze...
ruby
chosen
[ { "from": "system", "value": "Fix the gemspec executables prefix\n" }, { "from": "human", "value": "# frozen-string-literal: true\n# encoding: utf-8\n\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'statsd/instrument/version'\n\nGem:...
ruby
chosen
[ { "from": "system", "value": "Set a version for the nokogiri dependency.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/ontrac/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Brian Abreu\"]\n gem.email = [\...
ruby
chosen
[ { "from": "system", "value": "Fix variables collection item sequence specs\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Gitlab::Ci::Variables::Collection::Item do\n let(:variable) do\n { key: 'VAR', value: 'something', public: true }\n end\n\n describe '.fabricate' ...
ruby
chosen
[ { "from": "system", "value": "Fix NotificationRecipientService spec for EE\n\nEE checks a license, which needs RequestStore enabled to avoid N+1\nqueries. However, enabling RequestStore causes Gitaly to complain about N+1\ninvocations, which we really don't care about here.\n" }, { "from": "human", ...
ruby
chosen
[ { "from": "system", "value": "Unify no acas reasons for all respondent types" }, { "from": "human", "value": "class AdditionalRespondentsForm\n class AdditionalRespondent < CollectionForm::Resource\n NAME_LENGTH = 100\n NO_ACAS_REASON = %w<joint_claimant_has_acas_number acas_has_no_jur...
ruby
chosen
[ { "from": "system", "value": "Change in comments to refelect new behavior\n" }, { "from": "human", "value": "# useful tools\nrequire 'digest/md5'\nrequire 'multi_json'\n\n# include expedia modules\nrequire 'expedia/errors'\nrequire 'expedia/api'\n\n# HTTP module so we can communicate with Expedi...
ruby
chosen
[ { "from": "system", "value": "Migrate to the correct version.\n" }, { "from": "human", "value": "# Since we've designed metrics/docs tables to revolve around\n# the pods table, but be independent of each other, we can\n# run all trunk migrations first, then all others.\n#\n\n# Helper method\n#\n...
ruby
chosen
[ { "from": "system", "value": "Revert \"Re-fix RCE issue in ExportController\"\n\nThis reverts commit 2367ff36fdfdfcd344d37e6fc117045ecb3260a7.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\n######### Exports\nclass ExportController < ApplicationController\n EXPORTABLE_MODEL...
ruby
chosen
[ { "from": "system", "value": "Replace current_user with temporary fix\n" }, { "from": "human", "value": "class SkillsController < ApplicationController\n def index\n @new_skill = Skill.new\n end\n\n def new\n end\n\n def create\n skill = current_user.skills.build(skills_params)\n i...
ruby
chosen
[ { "from": "system", "value": "Fix element image type rendering" }, { "from": "human", "value": "module Pulitzer\n module PostsHelper\n\n def link_to_posts(post_type, plural_label, singular_label)\n if post_type.plural?\n link_to plural_label, posts_path(post_type_id: post_type.id...
ruby
chosen
[ { "from": "system", "value": "Test with newer versons of gems\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'script_relocator/version'\n\nGem::Specification.new do |spec|\n spec.na...
ruby
chosen
[ { "from": "system", "value": "Add comments explaining the XPath queries\n" }, { "from": "human", "value": "# Extracts data from an HTML document and returns plain text. Essentially, this\n# file is a container for XPath queries.\nclass NHLScraper\n\n def initialize(document:)\n @document = N...
ruby
chosen
[ { "from": "system", "value": "Update sample to work with all information in DescribeAddresses\n" }, { "from": "human", "value": "$: << File.expand_path(\"../../lib\", __FILE__)\n\nrequire 'aws/ec2'\n\n##\n# Expects your Amazon keys to be in the environment, something like\n#\n# export AWS_KEY=\"...
ruby
chosen
[ { "from": "system", "value": "Package version is increased from 0.6.0.3 to 0.6.1.0\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'evt-schema'\n s.summary = \"Primitives for schema and structure\"\n s.version = '0.6.0.3'\n s.description...
ruby
chosen
[ { "from": "system", "value": "Package version is increased from 2.2.7.1 to 2.2.7.2\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'evt-schema'\n s.summary = \"Primitives for schema and data structure\"\n s.version = '2.2.7.1'\n s.descri...
ruby
chosen
[ { "from": "system", "value": "Add UIFonts to the Podspec" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"Artsy+UILabels\"\n s.version = \"2.0.0\"\n s.summary = \"UILabels subclasses and related categories.\"\n s.homepage = \"https://gi...
ruby
chosen
[ { "from": "human", "value": "Add partial index to clinic_clinics\n\n Replace index on clinic_clinics.code so that it's unique\n only when deleted_at is null, so that it's possible to add a clinic with the same\n code as one that has been soft deleted. The alternative is to allow a user\nto reinstate a delet...
ruby
chosen
[ { "from": "system", "value": "Add multiattach parameter to volume creation\n" }, { "from": "human", "value": "module Fog\n module OpenStack\n class Volume\n module Real\n private\n\n def _create_volume(data, options = {})\n vanilla_options = [:snapshot_id, :imageR...
ruby
chosen
[ { "from": "system", "value": "Fix install generator (en.yml was not copied).\n" }, { "from": "human", "value": "require 'rails/generators'\nrequire 'rails/generators/named_base'\n\nmodule LinkToAction\n module Generators\n class InstallGenerator < Rails::Generators::Base\n desc \"Copy L...
ruby
chosen
[ { "from": "system", "value": "Save previous changes before saving\n" }, { "from": "human", "value": "module MongoModel\n module AttributeMethods\n module Dirty\n extend ActiveSupport::Concern\n \n include ActiveModel::Dirty\n \n included do\n after_save { chan...
ruby
chosen
[ { "from": "system", "value": "Fix homepage to use SSL in TexturePacker 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 => 'texturepacker' do\n version '3.8.0'...
ruby
chosen
[ { "from": "system", "value": "Remove unused new action in payments controller.\n" }, { "from": "human", "value": "class PaymentsController < ApplicationController\n before_filter :find_payments, :build_payment\n\n def index\n @query = params[:query]\n @payments = @payments.search(@que...
ruby
chosen
[ { "from": "system", "value": "Increase size of activity feed\n" }, { "from": "human", "value": "class ProjectsController < ApplicationController\n def index\n @projects = Project.by_last_updated\n @entry = Entry.new\n @activities = Entry.last(10).reverse\n end\n\n def show\n @proj...
ruby
chosen
[ { "from": "system", "value": "Fix signin bug (because of lower case)\n" }, { "from": "human", "value": "class SessionsController < ApplicationController\n def new\n end\n\n def create\n user = User.find_by_mtgname(params[:session][:mtgname].downcase)\n if user && user.authenticate(param...
ruby
chosen
[ { "from": "system", "value": "Remove some more 'plus' occurrences\n" }, { "from": "human", "value": "class WebhooksController < ApplicationController\n def create\n shop = Shop.find_by(shopify_domain: params[:myshopify_domain])\n user = User.shopify.find_by(shop_id: shop.id)\n\n Analyt...
ruby
chosen
[ { "from": "system", "value": "Fix editing of contact's website.\n" }, { "from": "human", "value": "class WebsitesController < ApplicationController\n\n\tlayout \"contacts\"\n\n\tbefore_filter :check_signed_in\n\tbefore_filter :find_contact\n\n\tdef index\n\t\tredirect_to contact_url(@contact)\n\...
ruby
chosen
[ { "from": "system", "value": "Add support for '.txt' format to get IP in plain text\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'sinatra'\nrequire 'sinatra/activerecord'\nrequire 'socket'\n\nset :database, 'postgres://ip:ip@localhost/ips'\n\ndef hostname(ip)\n\tbegin\n\t\taddr...
ruby
chosen
[ { "from": "human", "value": "Test to check http interception\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe GiroCheckout::GcGiropaytransactionstartMessage do\n \n it \"should not be able to send a http request\" do\n transaction = Factory.create(:transaction)\n msg = ...
ruby
chosen
[ { "from": "system", "value": "Fix column name that is changed by ad67746 on factory file\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\n# Copyright 2014 TIS Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance...
ruby
chosen
[ { "from": "system", "value": "Add checks on Ceph backend for Glance\n" }, { "from": "human", "value": "require 'spec_helper'\n\n#\n# Glance\n#\n\ndescribe service('glance-api') do\n it { should be_enabled }\n it { should be_running }\nend\n\ndescribe port(9292) do\n it { should be_listening.w...
ruby
chosen
[ { "from": "human", "value": "Add fragile, preliminary tests for Commons.rb\n" }, { "from": "gpt", "value": "require 'rails_helper'\nrequire \"#{Rails.root}/lib/commons\"\n\ndescribe Commons do\n describe '.import_all_uploads' do\n it 'should find and record files uploaded to Commons' do\n ...
ruby
chosen
[ { "from": "system", "value": "Add spec for where conditions hash" }, { "from": "human", "value": "require 'spec_helper'\n\nmodule Allowance\n describe Permissions do\n SomeClass = Class.new\n SomeOtherClass = Class.new\n\n it \"should allow simple permissions to be specified\" do\n ...
ruby
chosen
[ { "from": "system", "value": "Add os x support to podspec" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"semver\"\n s.version = \"0.1.3\"\n s.summary = \"Swift Semantic Versioning Library\"\n s.homepage = \"https://github.com/weekwood...
ruby
chosen
[ { "from": "human", "value": "Add unit tests for formatting output\n" }, { "from": "gpt", "value": "\n# This seems wrong, but I don't actually know how to do this\nrequire_relative '../../libraries/icinga2.rb'\n\ndescribe \"#icinga_format\" do\n subject { icinga_format }\n\n it \"handles hashes...
ruby
chosen
[ { "from": "system", "value": "Fix post viewers to be attachable on post creation\n" }, { "from": "human", "value": "class PostViewer < ActiveRecord::Base\n belongs_to :post\n belongs_to :user\n\n validates_presence_of :user, :post\nend\n" }, { "from": "gpt", "value": "class PostVi...
ruby
chosen
[ { "from": "system", "value": "Add Rake as a development dependency\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'softie/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Remove assertion that is now implicitly tested\n" }, { "from": "human", "value": "require './lib/tunefish/client'\nrequire_relative 'test_helper'\n\nclass ClientTest < Minitest::Test\n def setup\n @client = Tunefish::Client.new('http://localhost:3000')\n end\n\...
ruby
chosen
[ { "from": "system", "value": "Fix error deleting indicator histories.\n" }, { "from": "human", "value": "class IndicatorHistory < ActiveRecord::Base\n\n hobo_model # Don't put anything above this\n \n include ModelBase\n\n fields do\n value :decimal\n goal :decimal\n day :date\n ...
ruby
chosen
[ { "from": "system", "value": "Supervision: Change leave supervision button to direct back to group page\n" }, { "from": "human", "value": "class SupervisionMembershipsController < ApplicationController\n before_filter :authenticate_user!\n before_filter :fetch_supervision\n before_filter :req...
ruby
chosen
[ { "from": "human", "value": "Add spec helper that loads Watir\n" }, { "from": "gpt", "value": "$LOAD_PATH.unshift File.expand_path(\"#{File.dirname(__FILE__)}/../commonwatir/lib\")\n$LOAD_PATH.unshift File.expand_path(\"#{File.dirname(__FILE__)}/../watir/lib\")\n$LOAD_PATH.unshift File.expand_pa...
ruby
chosen
[ { "from": "system", "value": "Remove the chefspec converge report\n\nThese are useless and lead to poorly written specs\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "from": "human", "value": "require 'chefspec'\nrequire 'chefspec/berkshelf'\n\nDir['./spe...
ruby
chosen
[ { "from": "system", "value": "Exclude on_what helper from test coverage" }, { "from": "human", "value": "require File.expand_path('on_what', File.dirname(File.dirname(__FILE__)))\n\n# Code coverage (via SimpleCov) on Ruby 1.9+\nunless on_1_8?\n begin\n require 'simplecov'\n SimpleCov.star...
ruby
chosen
[ { "from": "system", "value": "Add a redis namespace for tests\n" }, { "from": "human", "value": "require 'bundler'\nBundler.setup\nrequire 'resque-assurances'\nrequire 'resque_spec'\nrequire_relative 'support/test_worker'\nrequire_relative 'support/unique_worker'\nrequire_relative 'support/anoth...
ruby
chosen
[ { "from": "system", "value": "Set default chefspec platform and platform version\n" }, { "from": "human", "value": "require 'safe_yaml'\nSafeYAML::OPTIONS[:default_mode] = :safe\n\nrequire 'chefspec'\nrequire 'chefspec/berkshelf'\nrequire 'chefspec/cacher'\nChefSpec::Coverage.start! if ENV['COVE...
ruby
chosen
[ { "from": "system", "value": "Use the heroku app when it's not me\n" }, { "from": "human", "value": "require 'bundler/setup'\nrequire 'capybara'\nrequire 'capybara/mechanize'\n\nrequire 'sinatra'\n\nrequire 'capybara/spec/extended_test_app'\n\n# TODO move this stuff into capybara\nrequire 'capyb...
ruby
chosen
[ { "from": "system", "value": "Add coveralls to spec helper.\n" }, { "from": "human", "value": "$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)\nrequire 'saxr'\n" }, { "from": "gpt", "value": "require 'coveralls'\nCoveralls.wear!\n\n$LOAD_PATH.unshift File.expand_path('../....
ruby
chosen
[ { "from": "system", "value": "Call Fluent::Test.setup before executing all specs\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'coveralls'\nCoveralls.wear!\n\nrequire 'fluent/test'\nrequire 'fluent/plugin/out_fork'\n\nRSpec.configure do |config|\nend\n\n" }, { "from": "g...
ruby
chosen
[ { "from": "system", "value": "Use spork if available and fall back if it's not\n" }, { "from": "human", "value": "$LOAD_PATH.unshift(File.dirname(__FILE__))\n$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))\n$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'ext', 'bal...
ruby
chosen
[ { "from": "system", "value": "Build agent before running individual tests\n\nSigned-off-by: Colin Obyrne <c47cc0033a0530c1ec004ae8db451730368aa030@pivotal.io>\n" }, { "from": "human", "value": "require File.expand_path('../shared_spec_helper', __FILE__)\n\nrequire 'fileutils'\nrequire 'digest/sh...
ruby
chosen
[ { "from": "system", "value": "Call build for child templates\n" }, { "from": "human", "value": "require 'aws-sdk'\nrequire 'securerandom'\nrequire 'baustelle/workspace_bucket'\n\nmodule Baustelle\n module CloudFormation\n class RemoteTemplate\n attr_reader :bucket\n\n def initializ...
ruby
chosen
[ { "from": "system", "value": "Remove support for attaching a custom resource to itself\n" }, { "from": "human", "value": "require_relative './resource'\n\nmodule Convection\n module Model\n class Template\n # TODO: We've been back on forth on the name for this concept.\n # Is Custo...
ruby
chosen
[ { "from": "system", "value": "Add debug comment to datapoints\n" }, { "from": "human", "value": "require 'trello' #it is not required by default for some reason\n\nclass BeeminderWorker\n include Sidekiq::Worker\n\n def perform\n Goal.joins(:provider).each do |goal|\n calculate_goal(go...
ruby
chosen
[ { "from": "system", "value": "Move the warning about specs as root\n" }, { "from": "human", "value": "use_realpath = File.respond_to?(:realpath)\nroot = File.dirname(__FILE__)\ndir = \"fixtures/code\"\nCODE_LOADING_DIR = use_realpath ? File.realpath(dir, root) : File.expand_path(dir, root)\n\n# ...
ruby
chosen
[ { "from": "system", "value": "Use the ghetto LWRP and not the sudoers provider that has been deprecated\n\n\nFormer-commit-id: 477057bfb8bd3229883de6bf2be84454e2fdace7 [formerly 7723c617d48ae057ed86fb13a6467e9d59b5c8dd] [formerly eff00b7054b6aa9ab06951dbf5d6d5ab8785ba60 [formerly 707d56db92da0fdf05746c89f5d...
ruby
chosen
[ { "from": "system", "value": "Fix Mountain Lion sed by setting LANG.\n\nIt's also necessary to delete LC_ALL or it overrides the new LANG.\nLC_COLLATE is the problem variable but is affected by LANG and LC_ALL\nso just use them instead. Extends the fix made to geoip in dc955c.\n\nFix Homebrew/homebrew#11728...
ruby
chosen
[ { "from": "system", "value": "Clean up TeX support installation, add caveat.\n\nCloses Homebrew/homebrew#42110.\n\nSigned-off-by: Alex Dunn <46952c1342d5ce1a4f5689855eda3c9064bca8f6@gmail.com>\n" }, { "from": "human", "value": "require 'formula'\n\nclass Noweb < Formula\n desc \"WEB-like litera...
ruby
chosen
[ { "from": "system", "value": "Use correct rails version specifier\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/requirejs_optimizer/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Jesse Trimble\"]\n gem.email ...
ruby
chosen
[ { "from": "system", "value": "Use redgreen when running rails integraton tests if available\n" }, { "from": "human", "value": "ENV[\"RAILS_ENV\"] = \"test\"\nrequire File.expand_path(File.dirname(__FILE__) + \"/../config/environment\")\nrequire 'test_help'\n\nrequire File.dirname(__FILE__) + \"/...
ruby
chosen
[ { "from": "system", "value": "Remove deprecated use of capture\n" }, { "from": "human", "value": "require 'spec_helper'\nrequire 'generators/rails_admin/install_generator'\n\ndescribe RailsAdmin::InstallGenerator, type: :generator do\n destination File.expand_path('../../dummy_app/tmp/generator...
ruby
chosen
[ { "from": "system", "value": "Add spec for failing route.\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'DolphyApplication' do\n include Rack::Test::Methods\n\n describe '#get' do\n it 'returns a page saying Hello on a correct path' do\n visit '/'\n expect(p...
ruby
chosen
[ { "from": "system", "value": "Use different test data in each engine test.\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Petroglyph::Engine do\n specify \"#to_hash\" do\n engine = Petroglyph::Engine.new('node :whatever => thing')\n engine.to_hash({:thing => 'stuff'}...
ruby
chosen
[ { "from": "system", "value": "Use $ASIR_LIB_PATH instead of gem.\n" }, { "from": "human", "value": "require 'rubygems'\n$:.unshift File.expand_path('../../lib', __FILE__)\n\ngem 'asir'\nrequire 'asir'\n\nmodule ASIR\n module Test\n class TestError < ::Exception; end\n class TestObject\n ...
ruby
chosen
[ { "from": "system", "value": "Use bundler for loading files\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'ruby-debug'\n\nrequire 'rspec'\nrequire 'ceiling_cat'\nrequire 'fakeweb'\n\nrequire 'ceiling_cat/storage/hash'\n\nFakeWeb.allow_net_connect = false\n\ndef fixture(name)\n ...
ruby
chosen
[ { "from": "system", "value": "Fix activesupport load order issues\n" }, { "from": "human", "value": "require 'rubygems'\n\nrequire 'rails/version'\nrequire 'rspec/rails/fixture_support'\nrequire 'ammeter/init'\n" }, { "from": "gpt", "value": "require 'rubygems'\n\nrequire 'rails/vers...
ruby
chosen
[ { "from": "system", "value": "Use simplecov's default \"test_frameworks\" profile\n" }, { "from": "human", "value": "require 'simplecov'\nSimpleCov.start\n\nrequire 'codeclimate-test-reporter'\nCodeClimate::TestReporter.start\n\nrequire 'pry'\nrequire 'omniauth-g5'\n\nDir[File.expand_path('../su...
ruby
chosen
[ { "from": "system", "value": "Replace a system call in the spec helper\n" }, { "from": "human", "value": "require 'simplecov'\nSimpleCov.start\n\n$LOAD_PATH.unshift(File.dirname(__FILE__))\n$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))\nrequire 'homesick'\nrequire 'rspec'\nr...
ruby
chosen
[ { "from": "system", "value": "Test with identity map enabled" }, { "from": "human", "value": "require 'simplecov'\nSimpleCov.start do\n add_filter '/spec/'\nend\n\n$:.unshift File.expand_path('../../', __FILE__)\n\nrequire 'rubygems'\nrequire 'rspec'\nrequire 'rr'\nrequire 'vidibus-versioning'\...
ruby
chosen
[ { "from": "system", "value": "Add helper for system environment TZ testing" }, { "from": "human", "value": "begin\n require 'simplecov'\n SimpleCov.start\nrescue LoadError\n # okay\nend\n\nrequire File.dirname(__FILE__) + '/../lib/ice_cube'\n\nDAY = Time.utc(2010, 3, 1)\nWEDNESDAY = Time.utc(...
ruby
chosen
[ { "from": "system", "value": "Add backports to spec helper to allow specs to run under 1.8.7\n" }, { "from": "human", "value": "require 'dm-core/spec/setup'\nrequire 'dm-core/spec/lib/adapter_helpers'\n\nrequire 'dm-adjust'\nrequire 'dm-migrations'\n\nSpec::Runner.configure do |config|\n config...
ruby
chosen
[ { "from": "system", "value": "Update integration testing to work with Serverspec 2.N\n" }, { "from": "human", "value": "require 'serverspec'\nrequire 'net/ssh'\n\ninclude SpecInfra::Helper::DetectOS\ninclude SpecInfra::Helper::Exec\ninclude SpecInfra::Helper::Ssh\n\n\nif ENV['RAKE_ANSIBLE_USE_VA...
ruby
chosen
[ { "from": "system", "value": "Clean up the if/else block in method_missing for ExifHash and add a class comment\n" }, { "from": "human", "value": "require 'set'\n\nmodule FileData\n # Container for Exif tag values\n class ExifData\n SECTIONS = { 0 => :image, 1 => :thumbnail }.freeze\n SE...
ruby
chosen
[ { "from": "system", "value": "Add support for connection string\n" }, { "from": "human", "value": "require 'active_support/core_ext/hash/keys'\nrequire 'active_support/core_ext/hash/except'\n\nmodule MongoModel\n class Configuration\n def initialize(options)\n @options = DEFAULTS.merge(...
ruby
chosen
[ { "from": "system", "value": "Fix metric checker adding defaults even if results existed\n" }, { "from": "human", "value": "module Processor\n class MetricResultsChecker < ProcessingStep\n protected\n\n def self.task(context)\n wanted_metrics = {}\n\n context.native_metrics.each...
ruby
chosen
[ { "from": "system", "value": "Fix bug in yumgroup provider\n" }, { "from": "human", "value": "Puppet::Type.type(:yumgroup).provide(:default) do\n desc 'Support for managing the yum groups'\n\n commands :yum => '/usr/bin/yum'\n\n # TODO\n # find out how yum parses groups and reimplement that ...
ruby
chosen
[ { "from": "system", "value": "Fix a migration that breaks a clean install\n" }, { "from": "human", "value": "class CreateRadioAssignments < ActiveRecord::Migration\n def change\n create_table :radio_assignments do |t|\n t.integer :radio_id\n t.integer :volunteer_id\n\n t.times...
ruby
chosen
[ { "from": "system", "value": "Update podspec for correct author\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"PathMenu\"\n s.version = \"2.0.0\"\n s.summary = \"Path 4.2 menu using CoreAnimation in Swift.\"\n s.homepage = 'https://github.com/pixyzehn/PathMenu'\n s.lic...
ruby
chosen
[ { "from": "system", "value": "Allow apps to run without Airbrake\n" }, { "from": "human", "value": "require 'airbrake/sidekiq/error_handler'\n\nAirbrake.configure do |c|\n c.project_id = ENV['AIRBRAKE_PROJECT_ID']\n c.project_key = ENV['AIRBRAKE_API_KEY']\n c.root_directory = Rails.root\n c....
ruby
chosen
[ { "from": "system", "value": "Connect to two Rummager endpoints\n\nWe need to continue to access both 'whitehall-search' and 'search'\nRummager instances until mainstream's Rummager is using Elastic Search,\nat which point we should be able to migrate to a single instance.\n" }, { "from": "human", ...
ruby
chosen
[ { "from": "system", "value": "Reset stdin, stdout and stderr before exiting." }, { "from": "human", "value": "$LOAD_PATH << File.expand_path(File.dirname(__FILE__) + '/../lib')\n\nrequire_relative 'troo/troo'\nrequire_relative 'troo/version'\n\nmodule Troo\n InvalidAccessToken = Class.new(Stand...
ruby
chosen
[ { "from": "system", "value": "Fix pnp spec syntax error\n" }, { "from": "human", "value": "require_relative '../spec_helper'\n\ndescribe \"yarn pnp hello world\" do\n it \"zero-install with NODE_MODLES_CACHE=false should deploy successfully\" do\n app = Hatchet::Runner.new(\n \"spec/fix...
ruby
chosen
[ { "from": "system", "value": "Add closing the socket after received result\n" }, { "from": "human", "value": "require 'sidekiq'\nrequire 'socket'\nrequire 'timeout'\nDEFAULT_SOCKET_PATH=\"/var/run/dokku-daemon/dokku-daemon.sock\"\nDEFAULT_TIMEOUT=60\nSidekiq.configure_server do |config|\n confi...
ruby
chosen
[ { "from": "human", "value": "Add BC module with tmeplate_exists? stuff\n" }, { "from": "gpt", "value": "module Ardes\n module ResponseFor\n module Bc\n def self.included(base)\n base.class_eval do\n alias_method_chain :template_exists?, :response_for\n end\n ...
ruby
chosen
[ { "from": "system", "value": "Remove useless `IGNORE INTO` queries\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\n\nmodule Hotdog\n module Commands\n class Hosts < BaseCommand\n def run(args=[])\n if args.empty?\n result = execute(\"SELECT DISTINCT host_id FROM ...
ruby
chosen