conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Add integration test for image fetching\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe \"Getting an image\" do\n describe \"Search by target\" do\n before(:all) do\n target_request = SkyMorph::TargetRequest.new(\"J99TS7A\")\n target_...
ruby
chosen
[ { "from": "system", "value": "Add extra logging to try and work out why test fails on jenkins but not locally\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe NeedStateListener do\n before(:each) do\n Need.any_instance.stubs(:update_search_index).returns(true)\n stomp_...
ruby
chosen
[ { "from": "system", "value": "Add return json object to login on request .json\n" }, { "from": "human", "value": "class SessionsController < ApplicationController\n\n def login\n end\n\n def begin\n user = Session.login_by_username_or_email(params[:user_input])\n\n if user && user.authe...
ruby
chosen
[ { "from": "system", "value": "Fix instance var/ local var mistake\n" }, { "from": "human", "value": "class IepStorer\n def initialize(file_name:,\n path_to_file:,\n file_date:,\n local_id:,\n client:,\n logger:)\n ...
ruby
chosen
[ { "from": "system", "value": "Rename class name and fields to comply with system conventions\n" }, { "from": "human", "value": "class EnrollmentExemption\n include Mongoid::Document\n include Mongoid::Timestamps\n include Mongoid::Versioning\n include Mongoid::Paranoia\n\n # TYPES = %w[]\n ...
ruby
chosen
[ { "from": "system", "value": "Move variant scoping from alias method into manifest method\n" }, { "from": "human", "value": "module Spree\n Shipment.class_eval do\n def ensure_correct_adjustment_with_included_tax\n ensure_correct_adjustment_without_included_tax\n\n update_adjustmen...
ruby
chosen
[ { "from": "system", "value": "Fix typo in gemspec description.\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'partoo/version'\n\nGem::Specification.new do |s|\n s.name = \...
ruby
chosen
[ { "from": "system", "value": "Add a check in case cluster id is not valid\n" }, { "from": "human", "value": "json.extract! @workflow, :name, :batch_host, :script_path, :staged_script_name, :staged_dir, :created_at, :updated_at, :status, :account\njson.set! 'status_label', status_label(@workflow)...
ruby
chosen
[ { "from": "human", "value": "Fix missing tagging_counts attribute bringing migration from gem\n" }, { "from": "gpt", "value": "# This migration comes from acts_as_taggable_on_engine (originally 3)\nclass AddTaggingsCounterCacheToTags < ActiveRecord::Migration\n def self.up\n add_column :tags...
ruby
chosen
[ { "from": "system", "value": "Add Olle Jonsson as author to gemspec\n" }, { "from": "human", "value": "# coding: utf-8\n\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'rainbow/version'\n\nGem::Specification.new do |spec|\n spec.nam...
ruby
chosen
[ { "from": "system", "value": "[refactor] Add `key` to Issue (2m)\n" }, { "from": "human", "value": "require \"ntlm/http\"\n\nmodule Houston\n module Itsm\n class Issue < Struct.new(:summary, :url, :assigned_to_email, :assigned_to_user)\n \n \n def self.open\n http = Net...
ruby
chosen
[ { "from": "system", "value": "Disable rubocop for down method\n" }, { "from": "human", "value": "class MigrateProjectStatistics < ActiveRecord::Migration\n include Gitlab::Database::MigrationHelpers\n\n DOWNTIME = true\n DOWNTIME_REASON = 'Removes two columns from the projects table'\n\n def...
ruby
chosen
[ { "from": "system", "value": "Revert \"Tell rails' generator to generate rspec request specs when generating a\"\n\nThis reverts commit 12f0afaa0410504170fad7e5f99c75cffa0cd40d.\n\n- Rails controller generator does not generate the routes needed for the\n generated request spec. Backing this out.\n" }, ...
ruby
chosen
[ { "from": "system", "value": "Update Android Studio to version 1.4.1.0\n\nHi all,\n\nI use static url to replaced original url with `#{version}` variable in this change,\nbecause no only version number, but also build number are in the download url.\n\nMaybe we can add a variable for build number to generat...
ruby
chosen
[ { "from": "system", "value": "Update Ahuramzda to sha256 checksums\n" }, { "from": "human", "value": "class FontAhuramzda < Cask\n url 'http://openfontlibrary.org/assets/downloads/ahuramazda/b2c0eeb9186f389749746f075b5a1abf/ahuramazda.zip'\n homepage 'http://openfontlibrary.org/font/ahuramazda...
ruby
chosen
[ { "from": "system", "value": "Append url attribute only when explicitly given\n" }, { "from": "human", "value": "require 'securerandom'\n\nmodule LjaxRails\n module LjaxRenderer\n def render_partial(context, options, &block)\n if options[:locals] && options[:locals].delete(:remote)\n ...
ruby
chosen
[ { "from": "system", "value": "Fix wrong number of arguments (2 for 1)\n" }, { "from": "human", "value": "module RedmineGitHosting\n module Utils\n module Ssh\n extend self\n\n def ssh_fingerprint(key)\n file = Tempfile.new('keytest')\n file.write(key)\n file.cl...
ruby
chosen
[ { "from": "system", "value": "Disable gemspec dep on mapper\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/session/version', __FILE__)\n\nGem::Specification.new do |s|\n s.name = 'session'\n s.version = Session::VERSION.dup\n\n s.authors = ['Ma...
ruby
chosen
[ { "from": "system", "value": "Enable openid in the dummy app, for use in specs\n" }, { "from": "human", "value": "OmniAuth.config.path_prefix = OpenConferenceWare.mounted_path(\"/auth\")\n\nRails.application.config.middleware.use OpenConferenceWare::OmniAuthBuilder do\n provider :developer if %...
ruby
chosen
[ { "from": "system", "value": "Implement shown and update actions for steps controller\n" }, { "from": "human", "value": "class Pet::StepsController < ApplicationController\n include Wicked::Wizard\n steps *Pet.form_steps\n\n def show\n end\n\n def update\n end\nend\n" }, { "from": ...
ruby
chosen
[ { "from": "system", "value": "Move metriks around to directly after calls.\n" }, { "from": "human", "value": "require 'helper'\nrequire 'flipper/adapters/memory'\nrequire 'flipper/instrumentation/metriks'\n\ndescribe Flipper::Instrumentation::MetriksSubscriber do\n let(:adapter) { Flipper::Adap...
ruby
chosen
[ { "from": "system", "value": "Remove broken ammeter helper method\n" }, { "from": "human", "value": "require \"spec_helper\"\nrequire \"generators/clearance/views/views_generator\"\n\ndescribe Clearance::Generators::ViewsGenerator, :generator do\n it \"copies clearance views to the host applica...
ruby
chosen
[ { "from": "system", "value": "Change initialiser to log in development\n\nDoes nothing, logs requests.\n" }, { "from": "human", "value": "require 'gds_api/gov_uk_delivery'\nrequire 'plek'\n\nunless ENV['USE_GOVUK_DELIVERY']\n Whitehall.govuk_delivery_client = GdsApi::GovUkDelivery.new(Plek.curr...
ruby
chosen
[ { "from": "system", "value": "Disable root element in JSON\n" }, { "from": "human", "value": "# Be sure to restart your server when you modify this file.\n\n# This file contains settings for ActionController::ParamsWrapper which\n# is enabled by default.\n\n# Enable parameter wrapping for JSON. ...
ruby
chosen
[ { "from": "system", "value": "Add test for Address country_name method\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass AddressTest < ActiveSupport::TestCase\n # test \"the truth\" do\n # assert true\n # end\nend\n" }, { "from": "gpt", "value": "require 'test_he...
ruby
chosen
[ { "from": "system", "value": "Drop rbenv::user and use new rbenv cookbook\n" }, { "from": "human", "value": "name 'rails'\ndescription 'This role configures a Rails stack using Unicorn'\nrun_list \"recipe[apt]\", \"recipe[build-essential]\", \"recipe[mysql::server]\", \"recipe[packages]\", \"rec...
ruby
chosen
[ { "from": "system", "value": "Add a bit more documentation\n" }, { "from": "human", "value": "require_relative \"lib/mozart\"\n\nStack = Mozart.context(:push, :pop) do\n def each\n target.reverse_each { |e| yield(e) }\n end\nend\n\n# messages are sent to each of these objects\n# in order un...
ruby
chosen
[ { "from": "human", "value": "Add Wayback Machine as a collector\n" }, { "from": "gpt", "value": "require 'uri'\n\nmodule Aquatone\n module Collectors\n class Crtsh < Aquatone::Collector\n self.meta = {\n :name => \"Wayback Machine\",\n :author => \"Joel (@jol...
ruby
chosen
[ { "from": "system", "value": "Make sure custom parameters gets passed to query for collection.all\n" }, { "from": "human", "value": "module BitBalloon\n class CollectionProxy\n include Enumerable\n\n attr_accessor :client, :prefix\n\n def self.path(value = nil)\n return @path unle...
ruby
chosen
[ { "from": "system", "value": "Add uninstall_phase method to CaskroomOnly artifact\n" }, { "from": "human", "value": "class Cask::Artifact::CaskroomOnly < Cask::Artifact::Base\n def self.artifact_dsl_key\n :caskroom_only\n end\n\n def install_phase\n # do nothing\n end\nend\n" }, { ...
ruby
chosen
[ { "from": "system", "value": "Raise inside a library code for the test controller\n\nThat way, we can see whether the evaluated binding is inside the\nStrongParameters code, which it shouldn't be, as we display the first\napplication code on the error pages.\n" }, { "from": "human", "value": "cl...
ruby
chosen
[ { "from": "system", "value": "Fix block local variable names\n" }, { "from": "human", "value": "require \"optparse\"\nrequire \"grid_pattern_editor/window\"\n\nmodule GridPatternEditor\n class Command\n class << self\n def run(*arguments)\n options = parse_option(arguments)\n ...
ruby
chosen
[ { "from": "system", "value": "Return root as a Pathname object\n" }, { "from": "human", "value": "# Require this file for quick access to Rails environment properties\nunless defined? Rails\n # Mock a Rails class that supplies the env and root if it's not defined\n class Rails\n def self.en...
ruby
chosen
[ { "from": "system", "value": "Simplify the Kernel core_ext spec.\n" }, { "from": "human", "value": "require 'spec_helper'\nrequire 'hexdump/core_ext'\n\ndescribe \"Hexdump core_ext\" do\n it \"should include Hexdump into String\" do\n expect(String).to include(Hexdump::Mixin)\n end\n\n it ...
ruby
chosen
[ { "from": "system", "value": "Allow using versions of Opal beyond 0.8.x (aka 0.9.x)" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'jekyll-opal/version'\n\nGem::Specification.new do |s...
ruby
chosen
[ { "from": "system", "value": "Add auth_info hash for User.\n" }, { "from": "human", "value": "module GitHub\n class User < Base\n attr_accessor :login, :token\n \n def get(login)\n if [:self, :me].include? login\n login = self.login\n end\n return GitHub::Browser....
ruby
chosen
[ { "from": "system", "value": "Fix issue with nil replies to eventmachine client\n" }, { "from": "human", "value": "require 'hiredis/reader'\n\nmodule Hiredis\n\n module EM\n\n class Base < ::EM::Connection\n\n CRLF = \"\\r\\n\".freeze\n\n def initialize\n super\n @rea...
ruby
chosen
[ { "from": "system", "value": "Use two newlines after each note\n" }, { "from": "human", "value": "module Kindle\n class OrgMode\n def self.save(book, path)\n filename = path + \"/\" + book.to_file_name + \".org\"\n\n ::File.open(filename, 'w') do |file|\n file.puts(\"* #{boo...
ruby
chosen
[ { "from": "system", "value": "Add docs to the Place class.\n" }, { "from": "human", "value": "module Nominatim\n class Place\n # attr_reader :attrs\n # alias to_hash attrs\n\n def initialize(attrs = {})\n @attrs = attrs\n end\n\n def display_name\n @display_name ||= @at...
ruby
chosen
[ { "from": "system", "value": "Remove the repetition in Ohm::Transaction\n\n- use a #blocks Hash to store all Sets\n" }, { "from": "human", "value": "require \"set\"\n\nmodule Ohm\n class Transaction\n attr_accessor :observed_keys\n attr_accessor :reading_procs\n attr_accessor :writing_...
ruby
chosen
[ { "from": "human", "value": "[importer] Add DataImport model regression test\n" }, { "from": "gpt", "value": "# encoding: utf-8\nrequire_relative '../spec_helper'\nrequire 'ruby-debug'\n\ndescribe DataImport do\n before(:all) do\n User.all.each(&:destroy)\n @user = create_user(:username =...
ruby
chosen
[ { "from": "human", "value": "Add spec coverage for the graphite_storage_schema resource.\n" }, { "from": "gpt", "value": "require \"spec_helper\"\nload_resource(\"graphite\", \"storage_schema\")\n\ndescribe Chef::Resource::GraphiteStorageSchema do\n\n let(:resource_name) { \"theone\" }\n\n it ...
ruby
chosen
[ { "from": "system", "value": "Fix pluralization of Spree::RelationType model in menu\n\n See https://github.com/spree/spree/issues/5842\n" }, { "from": "human", "value": "Deface::Override.new(\n virtual_path: 'spree/admin/shared/sub_menu/_product',\n name: 'add_product_relation_admin_sub_menu...
ruby
chosen
[ { "from": "system", "value": "Check if event_model responds to :user=" }, { "from": "human", "value": "module Ahoy\n module Stores\n class ActiveRecordStore < BaseStore\n def track_visit(options, &block)\n visit =\n visit_model.new do |v|\n v.id = ahoy.visit_i...
ruby
chosen
[ { "from": "system", "value": "Add .pre for next release\n" }, { "from": "human", "value": "# This file is maintained by a herd of rabid monkeys with Rakes.\nmodule EY\n class CloudClient\n VERSION = '1.0.15'\n end\nend\n# Please be aware that the monkeys like tho throw poo sometimes.\n" }...
ruby
chosen
[ { "from": "system", "value": "Configure methods don't write log messages\n" }, { "from": "human", "value": "module EventStore\n module Client\n module HTTP\n module Request\n def self.included(cls)\n cls.extend Logger\n cls.extend Build\n cls.extend Con...
ruby
chosen
[ { "from": "system", "value": "Change error check to new message prefix\n" }, { "from": "human", "value": "require 'ffi'\nrequire 'health-data-standards'\nrequire 'os'\n\nmodule GoCDATools\n module Import\n class GoImporter\n include Singleton\n extend FFI::Library\n \tif OS.li...
ruby
chosen
[ { "from": "human", "value": "Add Tools::Null (prof of concept)\n\nA strategy that doesn't provide any real value / transformation.\nAssigns 'nil' to any primitive or enum property for a given schema.\n" }, { "from": "gpt", "value": "#\n# This tool (strategy) doesn't provide any value.\n# Assigns...
ruby
chosen
[ { "from": "system", "value": "Create schema only if it not exists\n" }, { "from": "human", "value": "module PostgresqlTools\n class SchemaCreator\n def initialize(schema, connection)\n @schema = schema\n @connection = connection\n end\n\n def from_sql(file)\n original_pa...
ruby
chosen
[ { "from": "system", "value": "Add safeguard for scenarios where supported_currencies is nil" }, { "from": "human", "value": "module Spree\n module Admin\n class PricesController < ResourceController\n belongs_to 'spree/product', find_by: :slug\n\n helper_method :supported_currencie...
ruby
chosen
[ { "from": "system", "value": "Include request headers in payments\n" }, { "from": "human", "value": "module SpreeKomoju\n module ControllerHelpers\n def permitted_source_attributes\n super.push(permitted_komoju_konbini_attributes)\n super.push(permitted_komoju_banktransfer_attribut...
ruby
chosen
[ { "from": "system", "value": "Add Rails 3.1.* and 2.3.14 to test suite\n\nall pass without nulldb modification\n" }, { "from": "human", "value": "require 'ginger'\n \ndef create_scenario(version)\n scenario = Ginger::Scenario.new(\"Rails #{version}\")\n scenario[/^active_?record$/] = version\n...
ruby
chosen
[ { "from": "system", "value": "Revert newer ActiveSupport - requires Ruby 1.9.3+\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/git_tracker/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = 'git_tracker'\n gem.version ...
ruby
chosen
[ { "from": "system", "value": "Use $? instead of $CHILD_STATUS\n" }, { "from": "human", "value": "module Xcodeproj\n class Project\n module XCProjHelper\n class << self\n # @return [Bool] Whether the xcproj tool is available.\n #\n def available?\n `which xc...
ruby
chosen
[ { "from": "system", "value": "Print some logs, and actually call the correct method\n" }, { "from": "human", "value": "require 'travis'\nrequire 'travis/pro'\n\nclass Arf\n class Listener\n\n STATUSES = {\n broken: ->(build, _) { build.failed? || build.errored? },\n fixed: ->(prev...
ruby
chosen
[ { "from": "system", "value": "Fix spec for api factory.\n" }, { "from": "human", "value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\ndescribe Github::ApiFactory do\n\n subject(:factory) { described_class }\n\n context '#new' do\n it 'throws error if klass type is ommitted' do\n exp...
ruby
chosen
[ { "from": "human", "value": "Add spec for Reporter base class\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe HamlLint::Reporter do\n let(:reporter) { HamlLint::Reporter.new(double) }\n\n describe '#display_report' do\n subject { reporter.display_report(double) }\n\n i...
ruby
chosen
[ { "from": "system", "value": "Use a Struct for BoundingBox\n" }, { "from": "human", "value": "class BoundingBox\n attr_reader :x, :y, :width, :height\n\n def initialize(x, y, width, height)\n @x, @y, @width, @height = [x, y, width, height]\n end\nend\n" }, { "from": "gpt", "val...
ruby
chosen
[ { "from": "system", "value": "Check we calculate max_allocation correctly\n" }, { "from": "human", "value": "require 'provision/dns'\nrequire 'provision/dns/ddns'\nrequire 'tmpdir'\nrequire 'provision/core/machine_spec'\n\nclass Provision::DNS::DDNS\n attr_reader :network, :broadcast, :min_allo...
ruby
chosen
[ { "from": "human", "value": "Replace jiocloud_network.rb with this file for vagrant set up\n" }, { "from": "gpt", "value": "##\n# Custom fact for ipaddress and interface based on network and netmask\n# This will help to configure ipaddress and interfaces for various services\n# without assuming ...
ruby
chosen
[ { "from": "system", "value": "Use syck only on Ruby < 2.0\n\nInspired by https://github.com/tamc/Slogger/commit/916e3e35598c09991327386256113c9340243a9a\n" }, { "from": "human", "value": "require \"httparty\"\nrequire \"yaml\" unless defined?(YAML)\nYAML::ENGINE.yamler = \"syck\" if defined?(YAM...
ruby
chosen
[ { "from": "system", "value": "Fix gemspec not to include node_modules\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"gulp_assets/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new ...
ruby
chosen
[ { "from": "system", "value": "Add an easier to understand error message...\n\n...when the parameter resolver can not be found.\n" }, { "from": "human", "value": "module StackMaster\n class ParameterResolver\n ResolverNotFound = Class.new(StandardError)\n InvalidParameter = Class.new(Stand...
ruby
chosen
[ { "from": "system", "value": "Fix release links for phpMyAdmin." }, { "from": "human", "value": "\nmodule Versionator\n module Detector\n # Detects {phpMyAdmin}[http://www.phpmyadmin.net].\n class Phpmyadmin < Base\n set :app_name, \"phpMyAdmin\"\n set :project_url, \"http://www...
ruby
chosen
[ { "from": "system", "value": "Remove MM dependency from gemspec\n" }, { "from": "human", "value": "require File.expand_path('../lib/acts_as_versioned/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = 'mongo_mapper_acts_as_versioned'\n gem.version = ActsAsVersioned:...
ruby
chosen
[ { "from": "system", "value": "Add description to the gemspec for the gem\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/simple-conf/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Alexander Korsak\"]\n gem.email ...
ruby
chosen
[ { "from": "human", "value": "Add the Configuration code layer\n" }, { "from": "gpt", "value": "module Saves\n class Config\n class << self\n def games_list\n return @games_list if @games_list\n\n games_list = config_file('games.yml')\n @games_list = YAML.load_file(...
ruby
chosen
[ { "from": "human", "value": "Add configuration for local Unicorn/Nginx setip\n" }, { "from": "gpt", "value": "# see https://raw.github.com/defunkt/unicorn/master/examples/unicorn.conf.rb\n\nAPP_PATH = File.expand_path File.join(File.dirname(__FILE__), '..')\ndef app_path(local_path)\n File.join...
ruby
chosen
[ { "from": "system", "value": "Update gemspec file\nThis is why you do features and changes in branches.\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = %q{csv_class_maker}\n s.version = '0.2.0'\n s.date = %q{2014-03-06}\n s.authors = ['Mark Platt']\n s.email = 'm...
ruby
chosen
[ { "from": "system", "value": "Update summary and other metadata\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'motion/rest/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "human", "value": "Add a new entry into the world model, for example with the gtk demo.\n\n\tnew file: make_new_entry.rb\n" }, { "from": "gpt", "value": "################################################################################\n#This program will connect to a world model at a...
ruby
chosen
[ { "from": "system", "value": "Add URL Query Help Text For Agendas In API Docs\n" }, { "from": "human", "value": "class Api::DocsController < ApplicationController\n\thelper_method :get_url_query_parameters_for\n\n\tCOUNCILLOR_JSON_PATH = Rails.root.join('db/data/api/councillors.json')\n\tITEM_JS...
ruby
chosen
[ { "from": "system", "value": "Fix comments not appearing properly when you have more than the max comments amount\n" }, { "from": "human", "value": "class CommentsController < ApplicationController\n USER_KEY = :user\n TEXT_KEY = :text\n TIMESTAMP_KEY = :timestamp\n MAX_COMMENTS_TO_LOAD = 20...
ruby
chosen
[ { "from": "system", "value": "Allow saving of port and hosted bool\n" }, { "from": "human", "value": "class ServicesController < ApplicationController\n\n def index\n @services = Service.all.order(created_at: :desc)\n end\n\n def destroy\n @service = Service.find(params[:id])\n @serv...
ruby
chosen
[ { "from": "system", "value": "Fix OAuth callback triggering of return_to.\n" }, { "from": "human", "value": "class SessionsController < ApplicationController\n def new\n session[\"return_to\"] = request.env['HTTP_REFERER']\n redirect_to \"/auth/google_oauth2\"\n end\n\n def create\n ...
ruby
chosen
[ { "from": "system", "value": "Add db to rails_commands list\n" }, { "from": "human", "value": "desc 'Runs a command agains the local sample application'\ntask local: :enforce_version do\n Rake::Task['setup'].invoke(false,\n '.test-rails-apps',\n ...
ruby
chosen
[ { "from": "system", "value": "Revert \"Temporarily disable CodeClimate test reporting to see if thats \"\n\nThis reverts commit 05df6ebadbcb51e959f5fad3f015667a3b189524.\n" }, { "from": "human", "value": "require 'rspec'\n\nunless ENV['TM_FILEPATH']\n require 'simplecov'\n SimpleCov.start unle...
ruby
chosen
[ { "from": "system", "value": "Fix ssh user issue with helper script\n" }, { "from": "human", "value": "require 'serverspec'\nrequire 'net/ssh'\nrequire 'yaml'\n\nproperties = YAML.load_file('properties.yml')\n\nset :backend, :ssh\n\n\nif ENV['ASK_SUDO_PASSWORD']\n begin\n require 'highline/i...
ruby
chosen
[ { "from": "system", "value": "Remove dead test helper method.\n" }, { "from": "human", "value": "require 'simplecov'\nSimpleCov.start\n\nrequire 'erlectricity'\nrequire 'stringio'\n\n$stdout.sync = true\n\nRSpec.configure do |c|\n def run_erl(code)\n cmd = %Q{erl -noshell -eval \"A = #{code....
ruby
chosen
[ { "from": "system", "value": "Fix the timezone for the specs. We test in a specific timezone.\n" }, { "from": "human", "value": "$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)\nrequire 'lstash'\n\nrequire 'rspec/its'\n\nrequire 'timecop'\n\nENV['ES_URL'] = nil\n\nRSpec.configure do |...
ruby
chosen
[ { "from": "system", "value": "Disable Lita v3 compatibility mode\n" }, { "from": "human", "value": "require \"simplecov\"\nrequire \"coveralls\"\nSimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[\n SimpleCov::Formatter::HTMLFormatter,\n Coveralls::SimpleCov::Formatter\n]\nSimpleCov.s...
ruby
chosen
[ { "from": "system", "value": "Load libraries in specific order for Travis CI\n" }, { "from": "human", "value": "require 'bundler/setup'\nrequire 'simplecov'\nSimpleCov.start do\n add_filter '/spec/'\n add_filter '/test/'\nend\n\nrequire 'chefspec'\nrequire 'chefspec/berkshelf'\nrequire 'f5-ico...
ruby
chosen
[ { "from": "system", "value": "Remove Ruby 1.9.3, Rails 3.2 Test::Unit shim.\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'bundler/setup'\nrequire 'combustion'\n\nENV[\"RAILS_ENV\"] ||= 'test'\nCombustion.initialize! :action_controller, :active_record\n\nrequire 'rspec/rails'\nr...
ruby
chosen
[ { "from": "system", "value": "Use a different db for the tests\n" }, { "from": "human", "value": "lib = File.expand_path('../..', __FILE__)\n$:.unshift lib unless $:.include?(lib)\n\nrequire 'capybara/rspec'\nrequire 'rspec'\nrequire 'openreqs'\n\nset :environment, :test\n\nCapybara.app = Sinatr...
ruby
chosen
[ { "from": "system", "value": "Rearrange requires such that tests pass.\n" }, { "from": "human", "value": "# Create Rails environment based on the version given from Appraisal\nTESTAPP_ROOT = File.join(File.dirname(__FILE__), '..', 'tmp', 'aruba', 'testapp')\nFileUtils.rm_rf(TESTAPP_ROOT) if File...
ruby
chosen
[ { "from": "system", "value": "Remove duplicate :self block in VersionDecorator.\n" }, { "from": "human", "value": "require_relative 'base_decorator'\nrequire_relative 'embedded_tag_decorator'\n\nmodule PactBroker\n module Api\n module Decorators\n class VersionDecorator < BaseDecorator\...
ruby
chosen
[ { "from": "system", "value": "Use an old rake release for 1.9.2 and 1.8.7\n" }, { "from": "human", "value": "require './lib/syntax/version'\n\nGem::Specification.new \"syntax\", Syntax::Version::STRING do |s|\n s.summary = \"Perform simple syntax highlighting.\"\n s.description = \"Syntax is R...
ruby
chosen
[ { "from": "system", "value": "Add chefstyle as a dep\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "from": "human", "value": "$:.push File.expand_path(\"lib\", __dir__)\nrequire \"omnibus-ctl/version\"\n\nGem::Specification.new do |s|\n s.name = \...
ruby
chosen
[ { "from": "system", "value": "Allow override of host where sqlserver is running through ENV['SQLHOST']\n" }, { "from": "human", "value": "host = ENV['SQLHOST'] || 'localhost'\nconfig = {\n :username => 'blog',\n :password => '',\n :adapter => 'mssql',\n :database => 'weblog_development'\n}\...
ruby
chosen
[ { "from": "system", "value": "Change api url to production\n" }, { "from": "human", "value": "module Api\n class DocsController < ActionController::Base\n include Swagger::Blocks\n\n swagger_root do\n key :swagger, '2.0'\n info do\n key :version, '1.0.0'\n key :tit...
ruby
chosen
[ { "from": "system", "value": "Remove byebug from tags controller\n" }, { "from": "human", "value": "require 'byebug'\nclass Api::TagsController < ApplicationController\n\n before_action :ensure_logged_in\n\n def index\n @tags = current_user.tags\n render json: @tags\n end\n\n def show\...
ruby
chosen
[ { "from": "system", "value": "Add ox, oj and google-protobuf to tested gems\n" }, { "from": "human", "value": "# frozen_string_literal: true\n# Components we want to test\ngem 'rails_migrate_mutex'\ngem 'puma'\ngem 'rack-timeout'\ngem 'sidekiq'\ngem 'clockwork'\n\n# Ensure that gems with C lib d...
ruby
chosen
[ { "from": "system", "value": "Refactor session controller to not use session if it doesn't exist\n" }, { "from": "human", "value": "class SessionsController < ApplicationController\n def show\n user = User.find(session[:user_id])\n render json: {sessionID: user.id, userName: user.name }\n...
ruby
chosen
[ { "from": "system", "value": "Remove unused development dependency (yard-tomdoc).\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'tabulo/version'\n\nGem::Specification.new do |spec|\...
ruby
chosen
[ { "from": "system", "value": "Fix date chooser helper - broken `if` statement.\n" }, { "from": "human", "value": "module DefenceRequestsHelper\n\n def solicitor_id(solicitor_hash)\n \"solicitor-#{solicitor_hash['id']}\"\n end\n\n def data_chooser_setup(date_to_edit)\n today = Date.today...
ruby
chosen
[ { "from": "system", "value": "Make EA rules case insensitive\n" }, { "from": "human", "value": "module Bouncer\n ##\n # Rules to try before mappings because they are too important to let mappings\n # be used. This is a particular concern with mappings created automatically.\n class Preemptiv...
ruby
chosen
[ { "from": "system", "value": "Add rake as development dependency\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.dirname(__FILE__) + '/lib/temple/version'\nrequire 'date'\n\nGem::Specification.new do |s|\n s.name = 'temple'\n s.version = Temple::VERSIO...
ruby
chosen
[ { "from": "system", "value": "Make sure we dup our action_responses when the module is dup'd\n" }, { "from": "human", "value": "module Ardes\n # Just like ResponsesModule, but also handles the :except, :only stuff\n module RcResponsesModule\n include Ardes::ResponsesModule\n include Arde...
ruby
chosen
[ { "from": "system", "value": "Allow analyzer to fetch external specs\n" }, { "from": "human", "value": "module Pod\n class Command\n class Dependencies < Command\n self.summary = \"Show project's dependency graph.\"\n\n self.description = <<-DESC\n Shows the project's depend...
ruby
chosen
[ { "from": "system", "value": "Fix warning about undefining object_id in the Proxy class\n" }, { "from": "human", "value": "module RailsAdmin\n module Config\n class Proxy\n\n instance_methods.each { |m| undef_method m unless m =~ /^__/ || m == \"object_id\" }\n\n attr_reader :bindi...
ruby
chosen