conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix spec helper debug logging\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'rspec'\nrequire 'active_zuora'\n\nI18n.enforce_available_locales = true\n\nActiveZuora.configure(\n :log => ENV['DEBUG'],\n :username => ENV['ZUORA_USER'],\n :password =...
ruby
chosen
[ { "from": "system", "value": "Change details of code coverage reporting.\n" }, { "from": "human", "value": "$LOAD_PATH.unshift(File.dirname(__FILE__))\r\n\r\nrequire 'coveralls'\r\nCoveralls.wear!\r\n\r\nif ENV['SIMPLECOV']\r\n require 'simplecov'\r\n SimpleCov.start do\r\n command_name 'rs...
ruby
chosen
[ { "from": "system", "value": "Make sure to require the library that is pulled in for the gem\n" }, { "from": "human", "value": "# encoding: utf-8\n\nrequire 'rubygems'\nrequire 'backports'\nrequire 'backports/basic_object'\nrequire 'veritas/sql/generator'\nrequire 'spec'\nrequire 'spec/autorun'\...
ruby
chosen
[ { "from": "system", "value": "Fix ruby specs failing due to deprecated Spec\n" }, { "from": "human", "value": "require 'rubygems'\ngem 'rspec'\nrequire 'rspec'\n\n$:.unshift(File.join(File.dirname(__FILE__), %w[.. lib]))\n\nrequire 'store'\n\nMINIMUM_COVERAGE = 40\n\nif ENV['COVERAGE']\n requir...
ruby
chosen
[ { "from": "system", "value": "Migrate test database before running specs\n" }, { "from": "human", "value": "require 'simplecov'\n\nSimpleCov.start do\n add_filter '/spec'\nend\n\nRSpec.configure do |config|\n config.filter_run :focus\n config.run_all_when_everything_filtered = true\n\n confi...
ruby
chosen
[ { "from": "system", "value": "Remove usage of __dir__ (not compatible with 1.9)\n" }, { "from": "human", "value": "require 'bundler/setup'\nBundler.setup\n\nrequire 'pry'\nrequire 'stellar-core'\n\nSPEC_ROOT = File.dirname(__FILE__)\n\nDir[\"#{__dir__}/support/**/*.rb\"].each { |f| require f }\n...
ruby
chosen
[ { "from": "system", "value": "Fix Github url in gemspec\n" }, { "from": "human", "value": "require 'date'\n\nGem::Specification.new do |s|\n s.name = %q{spork-rails}\n s.version = \"3.2.0\"\n\n s.required_rubygems_version = Gem::Requirement.new(\">= 0\") if s.respond_to? :required_rubygems_ve...
ruby
chosen
[ { "from": "system", "value": "Add timezone-less local time helper\n" }, { "from": "human", "value": "module TimeZoneHelper\n def local_time(time, time_zone = Time.zone.name)\n \"#{l(time.in_time_zone(time_zone), format: :long)} (#{time_zone})\"\n end\nend\n" }, { "from": "gpt", ...
ruby
chosen
[ { "from": "system", "value": "Add the email of Will\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'bendy/version'\n\nGem::Specification.new do |spec|\n spec.name = \"bendy...
ruby
chosen
[ { "from": "system", "value": "Fix nil check on first record\n" }, { "from": "human", "value": "class Punchcard < ApplicationRecord\n belongs_to :user\n has_many :records, dependent: :destroy\n has_one :goal\n accepts_nested_attributes_for :goal\n\n validates :name, :presence => true\n\n\n ...
ruby
chosen
[ { "from": "system", "value": "Allow db:seed to update existing certificates.\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 d...
ruby
chosen
[ { "from": "system", "value": "Create a database user seed\n\nThis will be used in the e2e tests combined with GDS SSO mock mode to\nenable authenticated access to the API without needing to pass in a\nbearer token.\n" }, { "from": "human", "value": "# This file should contain all the record crea...
ruby
chosen
[ { "from": "system", "value": "Use new Routing DSL for rails 3.\n" }, { "from": "human", "value": "Demo::Application.routes.draw do |map|\n map.resources :contents\n map.search 'search', :controller => 'searches', :action => 'search'\n\n\n # Install the default route as the lowest priority.\n ...
ruby
chosen
[ { "from": "system", "value": "Fix Typo in spec description\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\n# Copyright 2017 Holger Just\n#\n# This software may be modified and distributed under the terms\n# of the MIT license. See the LICENSE.txt file for details.\n\nrequire ...
ruby
chosen
[ { "from": "system", "value": "Remove namespace from uploader spec\n" }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.describe Peoplefinder::ImageUploader, type: :uploader do\n include CarrierWave::Test::Matchers\n let(:person) { create(:person, image: File.open(sample_image)) }...
ruby
chosen
[ { "from": "system", "value": "Revert \"showing more info of projects\"\n\nThis reverts commit 56346a9c5774e18dee14fcf90cbf730ad23f121d.\n" }, { "from": "human", "value": "attributes :id,\n :title,\n :county,\n :description,\n :technical_description,\n ...
ruby
chosen
[ { "from": "system", "value": "Fix GitLab QA for new navigation enabled by default\n" }, { "from": "human", "value": "module QA\n module Page\n module Main\n class Menu < Page::Base\n def go_to_groups\n within_global_menu { click_link 'Groups' }\n end\n\n de...
ruby
chosen
[ { "from": "system", "value": "Fix rubocop warning in GemericListMixin\n" }, { "from": "human", "value": "module Mixins\n module GenericListMixin\n def index\n redirect_to :action => 'show_list'\n end\n\n def show_list\n @showtype = nil\n @center_toolbar = self.class.tool...
ruby
chosen
[ { "from": "system", "value": "Refactor PublicUploadsController to remove helper\n\nThis helper is going to be factored out of all the attachment\ncontrollers eventually.\n" }, { "from": "human", "value": "class PublicUploadsController < ApplicationController\n include ActionView::Helpers::Asset...
ruby
chosen
[ { "from": "system", "value": "Fix next and previous methods\n\nEither method was respecting the draft state or published date so by adding `live` scope we solve the issue" }, { "from": "human", "value": "module Spina\n class Article < ActiveRecord::Base\n extend FriendlyId\n friendly_id :...
ruby
chosen
[ { "from": "system", "value": "Fix Travis using 1.9.3 to build gems\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$LOAD_PATH.unshift(File.join(__dir__, \"lib\"))\n\nGem::Specification.new do |gem|\n gem.name = \"blinkbox-common_helpers\"\n gem.version = open(\"./V...
ruby
chosen
[ { "from": "system", "value": "Upgrade to AlamoFire 3.3.1 so that it XCode 7.3 can compile it" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"SwiftyDropbox\"\n s.version = \"3.0.0\"\n s.summary = \"Dropbox Swift SDK for APIv2\"\n s.homepage = \"https:/...
ruby
chosen
[ { "from": "system", "value": "Increase memory allocation for system task\n" }, { "from": "human", "value": "class SystemTask\n attr_accessor :section\n delegate :aws, :district, to: :section\n\n def initialize(section)\n @section = section\n end\n\n def run(container_instance_arns, env =...
ruby
chosen
[ { "from": "system", "value": "Use channel pool to avoid network saturation of channel open/close\n" }, { "from": "human", "value": "require \"bunny\"\n\nmodule Emque\n module Producing\n module Publisher\n class RabbitMq < Emque::Producing::Publisher::Base\n def initialize\n ...
ruby
chosen
[ { "from": "human", "value": "Add TC and PP acceptance to person\n" }, { "from": "gpt", "value": "class AddTcAcceptanceToPerson < ActiveRecord::Migration\n def self.up\n add_column :people, :accepted_tc_and_pp, :boolean, :default => false\n \n #Add agreed terms and conditions to every e...
ruby
chosen
[ { "from": "human", "value": "Replace hard-deleted prices with empty (0.00) price records\n" }, { "from": "gpt", "value": "class ReplaceHardDeletedPrices < ActiveRecord::Migration\n def up\n ActiveRecord::Base.connection.execute(\n \"INSERT into spree_prices (variant_id, amount, currency...
ruby
chosen
[ { "from": "human", "value": "Add verifiers for wiki cookbook test\n" }, { "from": "gpt", "value": "require \"serverspec\"\n\n# Required by serverspec\nset :backend, :exec\n\ndescribe package(\"apache2\") do\n it { should be_installed }\nend\n\ndescribe service(\"apache2\") do\n it { should be_...
ruby
chosen
[ { "from": "system", "value": "Add missing test coverage to advocate interim claim presenter\n" }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.describe Claim::AdvocateInterimClaimPresenter, type: :presenter do\n let(:claim) { build(:advocate_interim_claim) }\n\n subject(:presen...
ruby
chosen
[ { "from": "system", "value": "Fix bug in API handling of request body\n" }, { "from": "human", "value": "require 'exceptions'\nrequire 'v1/defaults'\nrequire 'v1/envelopes'\nrequire 'query_gremlin'\n\nmodule API\n module V1\n # Gremlin endpoint\n class Gremlin < Grape::API\n helpers ...
ruby
chosen
[ { "from": "system", "value": "Fix up sinatra specs a bit." }, { "from": "human", "value": "#\n# Copyright 2015, Noah Kantrowitz\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of ...
ruby
chosen
[ { "from": "system", "value": "Make spec pending for now\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire 'spec_helper'\n\ndescribe ActiveCampaign::Client::Contacts do\n\n initialize_new_client\n\n it \"syncs a contact\" do\n params = {\n id: 1,\n email: 'mhenr...
ruby
chosen
[ { "from": "system", "value": "Fix memory performance report filename\n" }, { "from": "human", "value": "require_relative 'initialization_task'\n\nmodule Performance\n class SerializationCompressedTask < Performance::InitializationTask\n def name\n 'serialization:compressed'\n end\n\n...
ruby
chosen
[ { "from": "system", "value": "Enable cookie based session store\n\nWe need enable a cookie based session store to allow users to remain\nlogged into the Transition checker using a GOV.UK Account.\n" }, { "from": "human", "value": "# Be sure to restart your server when you modify this file.\n\nFi...
ruby
chosen
[ { "from": "system", "value": "Tidy up unused code in Endpoint spec\n" }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe Endpoint do\n it { is_expected.to validate_presence :location }\n it { is_expected.to validate_presence :created_at }\n it { is_expected.to validate_presenc...
ruby
chosen
[ { "from": "system", "value": "Refactor Boolean type by removing duplicate code\n\nOracle enhanced adapter also needs to handle 'n' and 'N' as `FALSE`.\n" }, { "from": "human", "value": "module ActiveRecord\n module OracleEnhanced\n module Type\n class Boolean < ActiveModel::Type::Boolea...
ruby
chosen
[ { "from": "system", "value": "Trim line breaks from pacemaker bundle function\n\nOn CentOS9, the cibadmin query is returning '\\n' if the bundle is not\ndefined which results in:\n\nError: Evaluation Error: Error while evaluating a Function Call, invalid\nvalue for Integer(): \"\\n\" (line: 1, column: 1) on...
ruby
chosen
[ { "from": "system", "value": "Update chef client to 14.8.12\n" }, { "from": "human", "value": "# Add the opscode APT source for chef\ndefault[:apt][:sources] = node[:apt][:sources] | [\"opscode\"]\n\n# Set the default server version\ndefault[:chef][:server][:version] = \"12.17.33\"\n\n# Set the ...
ruby
chosen
[ { "from": "system", "value": "FIX: Change get tests for students_api\n" }, { "from": "human", "value": "require 'test_helper'\nrequire 'user'\n\nclass StudentsApiTest < ActiveSupport::TestCase\n include Rack::Test::Methods\n include TestHelpers::AuthHelper\n include TestHelpers::JsonHelper\n\...
ruby
chosen
[ { "from": "system", "value": "Add variance, min, and max to DataPoint\n" }, { "from": "human", "value": "require 'rackspace-fog/core/model'\nrequire 'rackspace-monitoring/monitoring/models/base'\n\nmodule Fog\n module Monitoring\n class Rackspace\n class DataPoint < Fog::Monitoring::Rac...
ruby
chosen
[ { "from": "system", "value": "Configure Airbrake to ignore development and test environments\n" }, { "from": "human", "value": "Airbrake.configure do |config|\n config.project_key = ENV['ECHO_TRELLO_AIRBRAKE_API']\n config.project_id = true\n config.host = ENV['ECHO_TRELLO_AIRBRAKE_HO...
ruby
chosen
[ { "from": "system", "value": "Update for new FB app" }, { "from": "human", "value": "Rails.application.config.middleware.use OmniAuth::Builder do\n provider :facebook, '101448083266993', 'e6fd636f8f479f62f9e62ce76d9bd8f9', {:scope => 'publish_stream,email', :client_options => {:ssl => {:ca_path...
ruby
chosen
[ { "from": "system", "value": "Fix NameError due to missing form builder\n" }, { "from": "human", "value": "# encoding: utf-8\n#--\n# Copyright (C) 2012 Gitorious AS\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Affero General Pu...
ruby
chosen
[ { "from": "system", "value": "Make robust against missing config/application.rb\n" }, { "from": "human", "value": "# encoding: UTF-8\n\nSettings.defaults = {\n 'payment_period' => 30.days,\n\n 'modules.enabled' => []\n}\n" }, { "from": "gpt", "value": "# encoding: UTF-8\n\nbegin\...
ruby
chosen
[ { "from": "system", "value": "Increase sleep for TTIN and TTOU.\n" }, { "from": "human", "value": "# encoding: UTF-8\n\nrequire 'spec_helper'\n\ndescribe Sponges do\n context 'start' do\n it 'can be started' do\n find_supervisor.cmdline.should eq(supervisor_name)\n end\n\n it 'hav...
ruby
chosen
[ { "from": "system", "value": "Make sure that the test app is properly working\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass ErdIndexTest < ActionDispatch::IntegrationTest\n test 'with author and book model' do\n visit '/erd'\n assert has_content? 'Author', minimum: 1\n...
ruby
chosen
[ { "from": "system", "value": "Remove support for Arch since it’s not a supported Chef platform\n\nWe lack the ability to actually test this\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "from": "human", "value": "#\n# Cookbook:: xml\n# Attributes:: defaul...
ruby
chosen
[ { "from": "system", "value": "Fix migration inheriting directly from `ActiveRecord::Migration`" }, { "from": "human", "value": "class InstallAudited < ActiveRecord::Migration\n def self.up\n create_table :audits, :force => true do |t|\n t.column :auditable_id, :integer\n t.column :...
ruby
chosen
[ { "from": "human", "value": "Add helper methods for specs\n" }, { "from": "gpt", "value": "require 'faraday'\nrequire 'json'\nrequire 'pry'\n\n\ndef mesos_master_state_json\n raw_state = Faraday.get mesos_master_state_endpoint\n JSON.parse(raw_state.body)\nend\n\ndef active_bosh_manifest_yaml\...
ruby
chosen
[ { "from": "system", "value": "Use ~> to restrict workflow version\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'workflow/sequel/version'\n\nGem::Specification.new do |spec|\n spec...
ruby
chosen
[ { "from": "system", "value": "Use SimpleJSON since the header for Content-Type=>application/json needs to be added to put an index into elasticsearch.\n\nSigned-off-by: Prajakta Purohit <e0b6074fb36005ab38b637036277c00627bb386c@chef.io>\n" }, { "from": "human", "value": "require 'chef/provider/l...
ruby
chosen
[ { "from": "system", "value": "Update Google Analytics tracking ID." }, { "from": "human", "value": "set :js_dir, 'javascripts'\nset :css_dir, 'stylesheets'\nset :images_dir, 'images'\n\nset :markdown_engine, :redcarpet\nset :markdown, fenced_code_blocks: true, autolink: true, smartypants: true\n...
ruby
chosen
[ { "from": "system", "value": "Verify 'sort' and 'java' are in $PATH\n" }, { "from": "human", "value": "boot_fail = false\n\n## Configurations\n#require_relative File.join('..', 'config', 'config')\n#require_relative File.join('..', 'config', 'constants')\n## Libraries\nrequire_relative 'command'...
ruby
chosen
[ { "from": "system", "value": "[ibm] Delete instance mock should return success\n" }, { "from": "human", "value": "module Fog\n module Compute\n class IBM\n class Real\n\n # Deletes the Instance that the authenticated user manages with the specified :instance_id\n #\n ...
ruby
chosen
[ { "from": "system", "value": "Use DB payload key logstasher is looking for\n\nBy using the same payload key as ActiveRecord, we get the DB duration into the\nlogstasher output for free.\n\nNote that this assumes that the application is only running mongoid and not\nActiveRecord as well, otherwise the record...
ruby
chosen
[ { "from": "system", "value": "Send 'execute' instead of use_case_name\n" }, { "from": "human", "value": "require 'caze/version'\nrequire 'active_support'\nrequire 'active_support/concern'\nrequire 'active_support/core_ext/module/delegation'\n\nmodule Caze\n class NoTransactionMethodError < Stan...
ruby
chosen
[ { "from": "system", "value": "Make sure category drop passes along accurate pagination info when category.articles is accessed." }, { "from": "human", "value": "class CategoryDrop < Drop\n \n alias_method :category, :source # for readability\n \n liquid_attributes :name, :slug, :path, :paren...
ruby
chosen
[ { "from": "system", "value": "Replace similar methods with meta-programming and hash-based icon mapping\n" }, { "from": "human", "value": "module IconHelper\n\n def ion_icon(name, html_class = '')\n \"<i class='ion ion-#{name} #{html_class}'></i>\".html_safe\n end\n\n def edit_icon\n fa...
ruby
chosen
[ { "from": "system", "value": "Add new 'GenericAPIError' exception type." }, { "from": "human", "value": "require_relative 'troo/troo'\nrequire_relative 'troo/version'\n\nmodule Troo\n InvalidAccessToken = Class.new(StandardError)\n\n Troo::Configuration.load(Dir.home + '/.trooconf', :default)\...
ruby
chosen
[ { "from": "system", "value": "Use sudo to restart passenger\n" }, { "from": "human", "value": "# config valid only for current version of Capistrano\nlock '~> 3.14.1'\n\nset :application, 'screaming_dinosaur'\nset :repo_url, 'https://github.com/umts/screaming-dinosaur.git'\nset :branch, :master\...
ruby
chosen
[ { "from": "system", "value": "Add the Auth0 callback handler\n" }, { "from": "human", "value": "Rails.application.routes.draw do\n resources :requests \n get '/login', :to => 'sessions#new', :as => :login\n get '/logout', :to => 'sessions#destroy', :as => :logout\n get \"/auth/auth0/cal...
ruby
chosen
[ { "from": "system", "value": "Add a named route from paginated albums\n" }, { "from": "human", "value": "Soshigal::Application.routes.draw do\n\n root to: 'albums#index'\n\n resources :albums, except: [:index], shallow: true do\n get 'page/:page', action: :show, on: :member\n resources :...
ruby
chosen
[ { "from": "system", "value": "Rearrange module definition for better code indexing\n" }, { "from": "human", "value": "module Tint\n class << self\n attr_accessor :attribute_capitalization\n\n def configuration\n if block_given?\n yield(Tint)\n end\n end\n\n alias :c...
ruby
chosen
[ { "from": "human", "value": "Add rake tasks for preparing database and creating initial objects.\n" }, { "from": "gpt", "value": "namespace :fluctus do \n desc \"Setup Fluctus\"\n task setup: :environment do\n desc \"Creating an initial institution names 'APTrust'...\"\n i = Institution....
ruby
chosen
[ { "from": "system", "value": "Update rake task for migrations\n" }, { "from": "human", "value": "namespace :migrate do\n desc 'Import all patches and sources to database'\n task :import_patches_and_sources => :environment do\n\n branch = Branch.where(name: 'Sisyphus').first\n branch.srpm...
ruby
chosen
[ { "from": "system", "value": "Use existing NODE_ENV if available" }, { "from": "human", "value": "namespace :webpack do\n desc \"Compile webpack bundles\"\n task compile: :environment do\n ENV[\"TARGET\"] = 'production' # TODO: Deprecated, use NODE_ENV instead\n ENV[\"NODE_ENV\"] = 'prod...
ruby
chosen
[ { "from": "system", "value": "Add capistrano gem to runtime 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 'capistrano/chatwork/version'\n\nGem::Specification.new do |spec...
ruby
chosen
[ { "from": "system", "value": "Remove DB index check breaking build\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'rails_helper'\n\nRSpec.describe Users::BlockedEmailDomain, type: :model do\n subject { build(:users_blocked_email_domain) }\n\n it { should have_db_co...
ruby
chosen
[ { "from": "human", "value": "Update all old data in database where watered should be true\n" }, { "from": "gpt", "value": "class UpdatePastWaterEvents < ActiveRecord::Migration[5.0]\n def change\n say_with_time \"Updating water events...\" do\n WaterEvent.update_all(watered: true)\n ...
ruby
chosen
[ { "from": "system", "value": "Make sure parser errors are raised\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass CInstructionTest < Minitest::Test\n def test_translation_of_unconditional_jump\n bytecode = CInstruction.translate('0;JMP')\n assert_equal '1110101010000111',...
ruby
chosen
[ { "from": "system", "value": "Update usage of Selenium driver\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'capybara/rspec'\nrequire 'selenium/webdriver'\n\nif ENV['HEADLESS_TEST'] == 'true' || ENV['USER'] == 'vagrant'\n require 'headless'\n\n headless = Headless...
ruby
chosen
[ { "from": "system", "value": "Fix flakey tests on Jenkins\n\nDepending on the order of tests, global state was being set\non the GovukHeaders singleton, which then interfered with\nthe pact tests that were checking the content type header.\n" }, { "from": "human", "value": "require_relative \"te...
ruby
chosen
[ { "from": "system", "value": "Remove unused validation spec from Theme spec\n" }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.describe Theme, type: :model do\n\n context \"validations\" do\n\n it { is_expected.to validate_presence_of(:title) }\n\n it { is_expected.to vali...
ruby
chosen
[ { "from": "system", "value": "Add a signup model test.\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Signup do\n pending \"add some examples to (or delete) #{__FILE__}\"\nend\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe Signup do\n\n it ...
ruby
chosen
[ { "from": "human", "value": "Add some specs for handling runtime attribute generation\n" }, { "from": "gpt", "value": "require 'template'\n\ndescribe Template::OutputBuffer do\n describe \"#attributes\" do\n it \"compiles an empty attribute set as ''\" do\n attributes({}).should == \"\"...
ruby
chosen
[ { "from": "system", "value": "Make sure the anonymous model defines a primary key\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'DataMapper::Validations::WithinValidator' do\n it 'should allow Sets to be passed to the :set option' do\n types = Set.new(%w(home mobile bu...
ruby
chosen
[ { "from": "system", "value": "Install elixir and erlang prerequisite" }, { "from": "human", "value": "dep 'erlang.app' do\n source 'https://packages.erlang-solutions.com/erlang/esl-erlang/FLAVOUR_1_general/esl-erlang_19.2-1~osx~10.10_amd64.dmg'\n\n provides 'erl'\nend\n\ndep 'elixir.managed' d...
ruby
chosen
[ { "from": "system", "value": "Bump version again for new internal API\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\n\n$:.push File.expand_path(\"../\", __FILE__)\nrequire 'twitter'\nrequire 'yaml'\nrequire 'optparse'\nrequire 'oauth'\n\n%w[config exceptions argparse actions].each do |f...
ruby
chosen
[ { "from": "human", "value": "Add migration to optimize user_details\n" }, { "from": "gpt", "value": "class OptimizeUserDetails < ActiveRecord::Migration\n def up\n execute <<-SQL\n DROP VIEW \"1\".user_details;\n\n CREATE VIEW \"1\".user_details AS\n SELECT u.id,\n ...
ruby
chosen
[ { "from": "system", "value": "Remove send duplicate welcome mail.\n" }, { "from": "human", "value": "class OmniauthCallbacksController < Devise::OmniauthCallbacksController\n def facebook\n woodlock_oauth_callback('facebook')\n end\n\n def google_oauth2\n woodlock_oauth_callback('google...
ruby
chosen
[ { "from": "system", "value": "Make entire 'take-action' button clickable\n" }, { "from": "human", "value": "class Views::LoggedOut::TakeActionButton < Views::Base\n def content\n div(class: buttonish(:large, :alert), onclick: \"analytics.track('acquisition/no-abandon')\") {\n a(href: ta...
ruby
chosen
[ { "from": "system", "value": "Update system test screenshot location\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire \"test_helper\"\n\n# Set up ApplicationSystemTestCase system tests.\nclass ApplicationSystemTestCase < ActionDispatch::SystemTestCase\n # Download chr...
ruby
chosen
[ { "from": "system", "value": "Allow Cucumber tests to run with PostgreSQL with a non-root user.\n" }, { "from": "human", "value": "# Copyright (c) 2010-2011, Diaspora Inc. This file is\n# licensed under the Affero General Public License version 3 or later. See\n# the COPYRIGHT file.\n\nD...
ruby
chosen
[ { "from": "system", "value": "Use SPDX standard license string\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "from": "human", "value": "name 'maradns'\nmaintainer 'Chef Software, Inc.'\nmaintainer_email 'cookbooks@chef.io'\nlicense ...
ruby
chosen
[ { "from": "system", "value": "Remove reference to storytime_root_path which no longer exists\n" }, { "from": "human", "value": "class Storytime::ApplicationController < ApplicationController\n layout Storytime.layout || \"storytime/application\"\n\n include Storytime::Concerns::ControllerConte...
ruby
chosen
[ { "from": "system", "value": "Test for keep api id between changes." }, { "from": "human", "value": "require 'test_helper'\n\nclass LazyDataApiTest < ActiveSupport::TestCase\n test \"should not be apiable by default\" do\n assert !NoLazyDummy.apiable?\n end\n\n test \"should be apiable\" d...
ruby
chosen
[ { "from": "system", "value": "Edit function calling to better reflect comment's position\n" }, { "from": "human", "value": "require 'restaurant'\n\nclass Guide\n def initialize(path = nil)\n # locate the restaurant text file at path\n Restaurant.filepath = path\n if Restaurant.file_exi...
ruby
chosen
[ { "from": "system", "value": "Include pending on incomplete test\n" }, { "from": "human", "value": "require_relative '../../../rspecs'\n\nRSpec.describe Sfn::Callback::StackPolicy do\n let(:ui) { double(:ui) }\n let(:config) { double(:config) }\n let(:arguments) { double(:arguments) }\n let(...
ruby
chosen
[ { "from": "system", "value": "Fix to support https & http.\n" }, { "from": "human", "value": "module Rbgct\n\n require 'rbgct/chart_factory'\n require 'rbgct/charts/chart'\n require 'rbgct/charts/line_chart'\n require 'rbgct/charts/pie_chart'\n require 'rbgct/charts/bar_chart'\n\n class No...
ruby
chosen
[ { "from": "system", "value": "Fix up remove user test case\n" }, { "from": "human", "value": "require File.join(File.dirname(__FILE__), \"../../toolbox/webrobot/lib/webrobot_core\")\n\ndescribe \"Local Admin - Remove User\", :local => true do\n\tit \"should remove the specified user\" do\n\t\t@s...
ruby
chosen
[ { "from": "system", "value": "[ruby] Use ‘<< self’ & make some methods private.\n" }, { "from": "human", "value": "require 'json'\n\nmodule Razorpay\n class IFSC\n def self.data\n @data ||= JSON.load(File.read(File.join(__dir__, '../../IFSC.json')))\n end\n\n def self.validate(cod...
ruby
chosen
[ { "from": "system", "value": "Fix date can be array\n" }, { "from": "human", "value": "require 'fileutils'\nrequire 'yaml'\n\nrequire 'archivist/client'\n\nmodule Archdown\n # The Librarian takes a book and puts it in the library\n class Librarian\n attr_reader :library, :book\n\n def in...
ruby
chosen
[ { "from": "system", "value": "Add support for recursive directory loading into archives\n" }, { "from": "human", "value": "class Archive::Tar::Writer\n def initialize(file, options = {})\n options = {\n :block_size => 2 ** 19\n }.merge(options)\n\n @block_size = options[:block_siz...
ruby
chosen
[ { "from": "system", "value": "Document alter sequence to for restarting id count\n" }, { "from": "human", "value": "Sequel.migration do\n up do\n execute(\"ALTER TABLE values ALTER COLUMN timestamp TYPE bigint\")\n execute(\"ALTER TABLE errors ALTER COLUMN timestamp TYPE bigint\...
ruby
chosen
[ { "from": "system", "value": "Correct homepage and licence SPDX identifier" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\nrequire \"dhcpsapi/version\"\n\nGem::Specification.new do |gem|\n gem.authors = [\"Dmitri Dolguikh\"]\n gem.email ...
ruby
chosen
[ { "from": "system", "value": "Use require_relative for files in the gem's own code base.\n" }, { "from": "human", "value": "require \"gday/version\"\n\nmodule Gday\n class Greeting\n def hi\n puts \"G'day!\"\n end\n\n def bye\n puts \"Cheerio\"\n end\n end\nend\n\n# Run i...
ruby
chosen
[ { "from": "system", "value": "Bring back cache invalidation debug message\n" }, { "from": "human", "value": "require 'rails/railtie'\n\nmodule Oprah\n class Railtie < Rails::Railtie\n initializer \"oprah.configure_cache_clear_on_code_reload\" do\n ActiveSupport::Reloader.to_run do\n ...
ruby
chosen
[ { "from": "system", "value": "Remove keyword args to support Ruby 1.9\n\nThe current implementation only uses keyword args at one point, so Ruby\n2.0 is not really needed.\n\nAlso, a lot of projects still uses Ruby 1.9, so the loaded ruby will be\nthe 1.9 (to run tests, app etc).\n\nSo I think that is a goo...
ruby
chosen
[ { "from": "system", "value": "Add stal as a dependency\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = \"ohm\"\n s.version = \"2.1.0\"\n s.summary = %{Object-hash mapping library for Redis.}\n s.description = %Q{Ohm is a library that allows to store an object in R...
ruby
chosen
[ { "from": "system", "value": "Sort support files by folder numbers on path.\n" }, { "from": "human", "value": "HOOKS = {}\n\ndef before_app(&block)\n if HOOKS[:before_app].nil?\n HOOKS[:before_app] = [block]\n else\n HOOKS[:before_app] << block\n end\nend\n\ndef after_app(&block)\n if ...
ruby
chosen
[ { "from": "system", "value": "Patch extlib, ObjectSpace is disabled in JRuby 1.5\n" }, { "from": "human", "value": "require 'dm-core'\nrequire 'dm-ar-finders'\nrequire 'dm-timestamps'\nrequire 'dm-validations'\nDataMapper.setup(:default, \"appengine://auto\")\n\nmodule DataMapper\n module Resou...
ruby
chosen