conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Verify application has been built before running tests\n" }, { "from": "human", "value": "namespace :test_sweet do\n desc \"Initial setup of Test Sweet\"\n task :initialize do\n if !TestSweet.verify_initialized\n TestSweet.init\n puts \"TestSweet has ...
ruby
chosen
[ { "from": "system", "value": "Remove invalid directive from gemspec\n" }, { "from": "human", "value": "#!/usr/bin/env gem build\n# -*- encoding: utf-8 -*-\n\nrequire 'date'\n\n# Load this library's version information\nrequire File.expand_path('../lib/merb_datamapper/version', __FILE__)\n\nGem::...
ruby
chosen
[ { "from": "system", "value": "Remove a zeitwerk initialization warning\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\n# Define superworkers for the sidekiq-superworker gem.\n\n# If subworkers die, superworker is never notified. Setting this option makes the superworker expir...
ruby
chosen
[ { "from": "system", "value": "Remove unnecessary comments attribute on Gquery\n" }, { "from": "human", "value": "module Atlas\n class Gquery\n include ActiveDocument\n\n FILE_SUFFIX = 'gql'\n DIRECTORY = 'gqueries'\n\n attribute :comments, String\n attribute :query, ...
ruby
chosen
[ { "from": "system", "value": "Fix a issue when symbolic link included\n" }, { "from": "human", "value": "module DirFriend\n class F\n include Comparable\n attr_reader :name, :path, :level, :stat\n def initialize(name, level:0)\n @path = File.expand_path(name)\n @name = File.b...
ruby
chosen
[ { "from": "system", "value": "Remove deprecated option of passing a block to GirFFI.define_type\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire \"ffi\"\nrequire \"ffi/bit_masks\"\n\nrequire \"ffi-gobject_introspection\"\n\nrequire \"gir_ffi-base\"\n\nrequire \"gir_ffi...
ruby
chosen
[ { "from": "system", "value": "Bump :gem: version to 20.\n" }, { "from": "human", "value": "class GitHubPages\n VERSION = 19\n\n # Jekyll and related dependency versions as used by GitHub Pages.\n # For more information see:\n # https://help.github.com/articles/using-jekyll-with-pages\n def ...
ruby
chosen
[ { "from": "system", "value": "Speed up the loop a lot\n" }, { "from": "human", "value": "require 'fog'\nrequire \"iamfindbykey/version\"\n\nmodule EverTools\n class IamFindByKey\n\n def initialize(args)\n @args = args\n @key = args[0]\n end\n\n def run\n display('ID', us...
ruby
chosen
[ { "from": "system", "value": "Print output from upgrade and cleanup.\n" }, { "from": "human", "value": "require 'rake'\n\nnamespace :brew do\n task :refresh do\n puts \"#{time}: Checking if any brew upgrades are required ...\"\n if brew_outdated?\n `brew upgrade && brew cleanup`\n ...
ruby
chosen
[ { "from": "system", "value": "Set status on new campaign comment\n" }, { "from": "human", "value": "namespace :temp do\n desc 'Backfill confirmed_at field for campaigns' \n task :backfill_campaign_confirmed_at => :environment do \n Campaign.find_each(:conditions => [\"confirmed = ?\", true]...
ruby
chosen
[ { "from": "system", "value": "Update github repo owner name\n" }, { "from": "human", "value": "require_relative './version'\n\n# Mix this module into the main application module to provide\n# information about the current version, latest version,\n# and whether the app is up-to-date.\n#\n# In co...
ruby
chosen
[ { "from": "system", "value": "[FEATURE] Allow direct access to raw configuration\n" }, { "from": "human", "value": "require 'fulmar/domain/service/configuration_service'\n\nmodule Fulmar\n\n module Domain\n\n module Service\n\n module CommonHelperService\n\n def use_environment(n...
ruby
chosen
[ { "from": "system", "value": "Refresh translation files too during .i18n_reload\n" }, { "from": "human", "value": "# encoding: utf-8\n# This file is part of the K5 bot project.\n# See files README.md and COPYING for copyright and licensing information.\n\n# Internationalization plugin\n\nrequire...
ruby
chosen
[ { "from": "system", "value": "Add a mode for the directory git will create\n" }, { "from": "human", "value": "require 'git'\n\nactions :install\ndefault_action :install\n\n# Create the owner, path, or group if they do not exist\nattribute :path, 'kind_of' => String, :default => '/opt/app/'\nattr...
ruby
chosen
[ { "from": "system", "value": "Switch gemspec to Bundler's default format\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 'scraperwiki'\n s.version = '2.0.6'\n s.date = '2013-04-04'\n s.summary = \"ScraperWiki\"\n s.description = \"A library ...
ruby
chosen
[ { "from": "human", "value": "Add input for INET type" }, { "from": "gpt", "value": "class InetInput < Formtastic::Inputs::StringInput\n def input_html_options\n super.tap do |options|\n options[:class] = [options[:class], \"inet\"].compact.join(' ')\n options[:data] ||= {}\n o...
ruby
chosen
[ { "from": "system", "value": "Add gem summary and 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 'burlesque/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Test with mocked http request" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe EventGirl::Client do\n\n subject { described_class.new('http://example.com', 'foobar') }\n\n it 'creates instances with two arguments' do\n expect(described_class.i...
ruby
chosen
[ { "from": "system", "value": "Update to work with latest API changes in relation/mapper\n" }, { "from": "human", "value": "if ENV['COVERAGE'] == 'true'\n require 'simplecov'\n require 'coveralls'\n\n SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[\n SimpleCov::Formatter::HTMLFo...
ruby
chosen
[ { "from": "system", "value": "Fix include syntax in RSpec configuration\n" }, { "from": "human", "value": "require 'config/boot'\n\nRSpec.configure do |config|\n include Rack::Test::Methods\n\n def app\n Acme::Application\n end\nend\n" }, { "from": "gpt", "value": "require 'con...
ruby
chosen
[ { "from": "system", "value": "Allow focusing on examples in RSpec\n" }, { "from": "human", "value": "require 'bundler/setup'\nrequire 'remote_ruby'\n\nrequire_relative 'integration/config'\n\nBundler.require(:development, :test)\n\nRSpec.configure do |config|\n config.expect_with :rspec do |exp...
ruby
chosen
[ { "from": "system", "value": "Improve model and mapper mocking in specs\n" }, { "from": "human", "value": "require 'dm-mapper'\n\nbegin\n require 'rspec' # try for RSpec 2\nrescue LoadError\n require 'spec' # try for RSpec 1\n RSpec = Spec::Runner\nend\n\nRSpec.configure do |config|\n con...
ruby
chosen
[ { "from": "system", "value": "Fix Unit tests on CI\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nunless ENV['CI']\n require 'simplecov'\n SimpleCov.start\nend\n\nrequire 'capybara'\nrequire 'capybara/dsl'\n\n$LOAD_PATH << './test_site'\n$LOAD_PATH << './lib'\n\nrequire 's...
ruby
chosen
[ { "from": "system", "value": "Create a test database & load the AR schema.\n" }, { "from": "human", "value": "require 'bundler/setup'\nrequire 'simplecov'\n\nSimpleCov.start do\n add_filter '/spec/'\n add_filter '/test/'\n add_filter '/db/'\nend\n\nrequire_relative '../lib/cyclid'\n" }, {...
ruby
chosen
[ { "from": "system", "value": "Use the appropriate environment variable in specs\n" }, { "from": "human", "value": "require 'simplecov'\nrequire 'coveralls'\n\nSimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[\n SimpleCov::Formatter::HTMLFormatter,\n Coveralls::SimpleCov::Formatter\n]...
ruby
chosen
[ { "from": "system", "value": "Revert \"and one's still failing... figuring out what zone the server's in\"\n\nThis reverts commit 8301bddc0d28a022dec97857fe31db2301cd0745.\n" }, { "from": "human", "value": "# Inspiration gained from Thinking Sphinx's test suite.\n# Pat Allan is a genius.\n\nputs...
ruby
chosen
[ { "from": "system", "value": "Add headers to response in test\n" }, { "from": "human", "value": "require 'helper'\nrequire 'amazon-drs'\n\nclass AmazonDrs::Client::Test < Test::Unit::TestCase\n sub_test_case '#subscription_info' do\n setup do\n device = fixture('device.json')\n @ja...
ruby
chosen
[ { "from": "system", "value": "Make unit tests outside of test app running\n" }, { "from": "human", "value": "# Set the default environment to sqlite3's in_memory database\nENV['RAILS_ENV'] ||= 'in_memory'\n\n# Load the Rails environment and testing framework\nrequire \"#{File.dirname(__FILE__)}/...
ruby
chosen
[ { "from": "system", "value": "Update mocha require statement to the new 'mocha/setup' file\n" }, { "from": "human", "value": "TEST_LIVE_API = false\n\nrequire 'rubygems'\nrequire 'test/unit'\nrequire 'mocha'\n\nunless(TEST_LIVE_API)\n require 'webmock/test_unit'\n include WebMock::API\nend\n\n...
ruby
chosen
[ { "from": "system", "value": "Load request files at exit\n" }, { "from": "human", "value": "# Add the gem's lib folder to the load path\n$:.unshift File.expand_path('../../lib', __FILE__)\n\n\n# Set-up coverage reporting (local and Coveralls.com)\nrequire 'simplecov'\nrequire 'coveralls'\nSimple...
ruby
chosen
[ { "from": "human", "value": "Add sample to catch bug.\n" }, { "from": "gpt", "value": "class FunctionAbstract\n\n attr_accessor :type\n\n def initialize(pFunctionName)\n return nil if pFunctionName.nil? or !pFunctionName.is_a? String\n\n @name = pFunctionName\n @visibility = \"public\...
ruby
chosen
[ { "from": "system", "value": "Add explicit support for params wrapper\n" }, { "from": "human", "value": "# Be sure to restart your server when you modify this file.\n\n# This file contains settings for ActionController::ParamsWrapper\n\n# Enable parameter wrapping for JSON.\nActiveSupport.on_loa...
ruby
chosen
[ { "from": "system", "value": "Switch to default_value_for rather than custom logic\n" }, { "from": "human", "value": "module UuidMixin\n extend ActiveSupport::Concern\n included do\n before_validation :set_guid, :on => :create if respond_to?(:before_validation)\n validates :guid, :uniqu...
ruby
chosen
[ { "from": "system", "value": "Add template example (just check create on default file path)\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'gitprep::gitprep' do\n let(:chef_run) { ChefSpec::Runner.new.converge(described_recipe) }\n\n it 'creates group \"gitprep\"' do\n ...
ruby
chosen
[ { "from": "system", "value": "Refactor spec to use let and get rid of tap\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Collection, :type => :model do\n before do\n @user = FactoryGirl.create(:user)\n @collection = Collection.new(title: \"test collection\").tap do |...
ruby
chosen
[ { "from": "system", "value": "Test for Node.js 6.x image\n" }, { "from": "human", "value": "require 'spec_helper'\n\n# Node 12.x\nif property[:name] =~ /v0.12./\n describe command('node -v') do\n its(:stdout) { should contain('v0.12.13') }\n end\nend\n\n# Node 4.x\nif property[:name] =~ /v4...
ruby
chosen
[ { "from": "system", "value": "Test that request id is properly set\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass NordeaRenewCertRequestSoapBuilderTest < ActiveSupport::TestCase\n setup do\n @params = nordea_renew_certificate_params\n\n # Convert the keys here sinc...
ruby
chosen
[ { "from": "system", "value": "Update dependencies used for acceptance tests\n" }, { "from": "human", "value": "require 'beaker-rspec'\nrequire 'beaker/puppet_install_helper'\nrequire 'beaker/module_install_helper'\n\nrun_puppet_install_helper\ninstall_module_on(hosts)\ninstall_module_from_forge_...
ruby
chosen
[ { "from": "system", "value": "Clean up acceptance spec helper\n" }, { "from": "human", "value": "require 'beaker-rspec/spec_helper'\nrequire 'beaker-rspec/helpers/serverspec'\nrequire 'beaker/puppet_install_helper'\n\nrun_puppet_install_helper unless ENV['BEAKER_provision'] == 'no'\n\nRSpec.conf...
ruby
chosen
[ { "from": "system", "value": "Add main logic to Centable\n" }, { "from": "human", "value": "require \"centable/engine\"\n\nmodule Centable\nend\n" }, { "from": "gpt", "value": "require \"centable/engine\"\n\nmodule Centable\n extend ActiveSupport::Concern\n\n module ClassMethods\n ...
ruby
chosen
[ { "from": "system", "value": "Add --universal option to Neon\n" }, { "from": "human", "value": "require 'formula'\n\nclass Neon <Formula\n url 'http://www.webdav.org/neon/neon-0.29.3.tar.gz'\n md5 'ba1015b59c112d44d7797b62fe7bee51'\n homepage 'http://www.webdav.org/neon/'\n\n def keg_only?\n...
ruby
chosen
[ { "from": "system", "value": "Add ability to show committer\n" }, { "from": "human", "value": "require 'thor'\nrequire 'colorize'\nrequire 'active_support/all'\n\nmodule WeeklyCommits\n class CLI < Thor\n package_name 'Weekly Commits'\n default_task :weekly_commits\n\n desc 'weekly_com...
ruby
chosen
[ { "from": "system", "value": "Stop relying on columns in mysql quoting tests\n\nThe behavior tested by the removed lines is sufficiently covered\nelsewhere.\n" }, { "from": "human", "value": "require \"cases/helper\"\n\nmodule ActiveRecord\n module ConnectionAdapters\n class MysqlAdapter\n ...
ruby
chosen
[ { "from": "system", "value": "Exclude some files from the generated gem\n" }, { "from": "human", "value": "# coding: utf-8\n# frozen_string_literal: true\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'vagrant_blocker/version'\n\nGem...
ruby
chosen
[ { "from": "system", "value": "Fix positive amount adjustments being considered as discounts\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule SolidusAvataxCertified\n module Request\n class GetTax < SolidusAvataxCertified::Request::Base\n def generate\n p...
ruby
chosen
[ { "from": "system", "value": "Connect track changes function to fixed Listing.date_range()\n" }, { "from": "human", "value": "class TrackchangesController < ApplicationController\n skip_before_action :verify_authenticity_token\n\n def get_changes\n date1_start, date1_end, date2_star...
ruby
chosen
[ { "from": "system", "value": "Create it of rspec projeto test\n" }, { "from": "human", "value": "require 'simplecov'\nrequire 'coveralls'\n\nrequire \"spec_helper\"\nrequire \"rails_helper\"\nrequire \"projeto\"\nrequire 'usuario'\n\ndescribe Projeto do\n\tsubject(:projeto) { Projeto.new(nome: \...
ruby
chosen
[ { "from": "system", "value": "Make it clear that the later test is skipped for adapters that do not implement it\n" }, { "from": "human", "value": "require 'helper'\nrequire 'jobs/hello_job'\nrequire 'active_support/core_ext/numeric/time'\n\n\nclass QueuingTest < ActiveSupport::TestCase\n setup...
ruby
chosen
[ { "from": "system", "value": "Make sure we log out of the room before we try to logout of the service.\n" }, { "from": "human", "value": "service :campfire do |data, payload|\n repository = payload['repository']['name']\n branch = payload['ref'].split('/').last\n campfire = Tinder::Camp...
ruby
chosen
[ { "from": "system", "value": "Remove auth requirement for event archive\n" }, { "from": "human", "value": "class EventsController < ApplicationController\n load_resource :find_by => :slug\n load_and_authorize_resource :except => :index \n\n def index\n @current_events = Event.current.inclu...
ruby
chosen
[ { "from": "system", "value": "Refactor group creation to refuse adding creator as a member\n" }, { "from": "human", "value": "class GroupsController < ApplicationController\n def create\n groupName = params[:groupName]\n emails = params[:groupEmails]\n return render json: { errors: \"G...
ruby
chosen
[ { "from": "system", "value": "Fix PARAMS_REQUIRED const, should be an array, not a hash\n" }, { "from": "human", "value": "module Poke\n # Map reads an ASCII file and coverts it to an object that can be read and\n # manipulated by other program objects.\n class Map\n\n include Poke::ReadMa...
ruby
chosen
[ { "from": "system", "value": "Resolve frozen string warning on Chef 13\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "from": "human", "value": "require File.join(File.dirname(__FILE__), 'ec2')\n\nmodule Opscode\n module Aws\n module S3\n include ...
ruby
chosen
[ { "from": "system", "value": "Fix podspec and increase version\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"RMStore\"\n s.version = \"0.2\"\n s.license = \"Apache 2.0\"\n s.summary = \"A lightweight iOS framework for In-App Purchases.\"\n s.hom...
ruby
chosen
[ { "from": "system", "value": "Add context to test cases.\n" }, { "from": "human", "value": "require 'spec_helper'\n\nclass APIKey\n @default_api_key = nil\n class << self\n attr_accessor :default_api_key\n end\nend\n\ndescribe APIKey do\n let( :apiKeyClass ) { APIKey }\n\n it \"sets the ...
ruby
chosen
[ { "from": "human", "value": "Add fail test example for minitest\n" }, { "from": "gpt", "value": "require 'test_helper'\n\nclass FailTest < ActiveSupport::TestCase\n # uncomment if you would like to run failing test\n #def test_failure\n #assert_equal 1, 2\n #end\nend\n" } ]
ruby
chosen
[ { "from": "system", "value": "Patch up test that fails only on os x\n" }, { "from": "human", "value": "require 'spec_helper'\nrequire File.expand_path File.join(File.dirname(__FILE__), '..', '..', 'lib', 'cuttlefish_smtp_server')\n\ndescribe CuttlefishSmtpConnection do\n describe '#receive_mess...
ruby
chosen
[ { "from": "system", "value": "Use temp sql var to improve return val readability\n" }, { "from": "human", "value": "module Korma\n class Entity\n attr_reader :tablename, :columns\n\n def initialize(tablename, *columns)\n @tablename = tablename\n @columns = columns\n end\n en...
ruby
chosen
[ { "from": "system", "value": "Add a step to verify progress with a pattern\n" }, { "from": "human", "value": "When /^I run `vim-flavor(.*)`(?: again)?(?:,? (but))?$/ do |args, mode|\n begin\n original_home = ENV['HOME']\n ENV['HOME'] = expand('$home')\n Dir.chdir(expand('$tmp')) do\n ...
ruby
chosen
[ { "from": "system", "value": "Add tests for uniquness exceptions in Memory adapter\n" }, { "from": "human", "value": "require 'spec_helper'\nrequire 'ruby_event_store/rom/memory'\nrequire 'ruby_event_store/spec/rom/relations/stream_entries_lint'\n\nmodule RubyEventStore::ROM::Memory\n RSpec.des...
ruby
chosen
[ { "from": "human", "value": "Add data migration to redirect SAGE policy groups to org page\n" }, { "from": "gpt", "value": "SLUGS = %w[\n scientific-advisory-group-for-emergencies-sage\n scientific-advisory-group-for-emergencies-sage-coronavirus-covid-19-response\n].freeze\n\nREDIRECT_PATH = \...
ruby
chosen
[ { "from": "system", "value": "Add date to CSV download\n" }, { "from": "human", "value": "# Presenter for download information\n\nclass DownloadState < Presenter\n\n STANDARD_COLUMNS = [\n {label: \"Name\", method: :name},\n {label: \"URI\", property: \"ukhpi:refRegion\"},\n {label: \"...
ruby
chosen
[ { "from": "system", "value": "Add request headers to JS error report\n" }, { "from": "human", "value": "class ErrorsController < ApplicationController\n class JavaScriptError < Struct.new(:message)\n def backtrace\n []\n end\n end\n\n newrelic_ignore if defined?(NewRelic) && respon...
ruby
chosen
[ { "from": "system", "value": "Add the create method for uploading the photo and return the url of the photo to the form.\n" }, { "from": "human", "value": "class PhotosController < ApplicationController\n def create\n end\nend\n" }, { "from": "gpt", "value": "class PhotosController...
ruby
chosen
[ { "from": "system", "value": "Add authentication of subscription to a channel in the Pusher\nController.\n\nThis implements both presence channel authorization (used for the river)\nas well as private channel authorization (used for private messages).\n" }, { "from": "human", "value": "class Pus...
ruby
chosen
[ { "from": "system", "value": "Fix [dashboard] button on review/show page\n" }, { "from": "human", "value": "\nclass ReviewController < ApplicationController\n\n def show\n # Once you are on the review dialog/page\n # all interaction with the web server is via the\n # differ-controller....
ruby
chosen
[ { "from": "system", "value": "Add skip_before_action to RobotsController to avoid unnecessary actions\n" }, { "from": "human", "value": "#\n# == RobotsController\n#\nclass RobotsController < ActionController::Base\n layout false\n\n def index\n expires_in 12.hours, public: true\n\n if Ra...
ruby
chosen
[ { "from": "system", "value": "Add a title variable for the static 'follow' page and make sure logged out users shouldn't be able to access it without logging in.\n" }, { "from": "human", "value": "class StaticController < ApplicationController\n def homepage\n @list_class = \"\"\n render ...
ruby
chosen
[ { "from": "system", "value": "Use guard clause instead of if else statement\n" }, { "from": "human", "value": "module Spree::Retail\n module RefundDecorator\n delegate :pos_order_id, to: :payment\n delegate :pos_refunded, to: :reimbursement\n\n def perform!\n if reimbursement.pres...
ruby
chosen
[ { "from": "system", "value": "Test viewing publications for another user.\n" }, { "from": "human", "value": "require_relative '../integration_test_helper'\n\nclass UserSearchTest < ActionDispatch::IntegrationTest\n\n def setup\n alice = FactoryGirl.create(:user, name: \"Alice\", uid: \"alice...
ruby
chosen
[ { "from": "system", "value": "Use `sha256` instead of `sha1`\n\n```\r\nError: Invalid formula: /usr/local/Homebrew/Library/Taps/ryfow/homebrew-phabricator/arcanist.rb\r\nCalling Resource#sha1 is disabled!\r\nUse Resource#sha256 instead.\r\n```" }, { "from": "human", "value": "require \"formula\"...
ruby
chosen
[ { "from": "human", "value": "Fix Somalian embassy slug correctly\n\nhttps://www.pivotaltracker.com/story/show/51980679\n" }, { "from": "gpt", "value": "# WorldwideOrganisations have an implicit office, which was already\n# updated in 20130701154722_update_fco_embassy.rb. This cleans up the\n# ac...
ruby
chosen
[ { "from": "system", "value": "Revert \"Ensure message as error\" (logged_errors method is in the bug)\n\nThis reverts commit 8571bb04ee46a0e26193fa6dfb5857813744ff89.\n" }, { "from": "human", "value": "class Fluentd::Settings::HistoriesController < ApplicationController\n before_action :login_r...
ruby
chosen
[ { "from": "system", "value": "Fix the backwards asetting for raising exceptions\n" }, { "from": "human", "value": "require 'rescue_from'\n\nOpenStax::RescueFrom.configure do |config|\n config.raise_exceptions = !Rails.application.config.consider_all_requests_local\n\n # config.application_name...
ruby
chosen
[ { "from": "system", "value": "Use full path, working dir is not the project root on CI\n" }, { "from": "human", "value": "require 'rspec'\nrequire 'rspec/core/rake_task'\n\nrspec_opts = %w(--format documentation --color)\nrspec_opts << '--fail-fast' if (ENV['BAT_FAIL_FAST'] || 'false').downcase ...
ruby
chosen
[ { "from": "system", "value": "TEST: Check that portfolio ready comes from main convenor\n" }, { "from": "human", "value": "require 'test_helper'\nrequire 'grade_helper'\n\nclass UnitMailTest < ActionMailer::TestCase\n\n def test_send_summary_email\n unit = FactoryBot.create :unit\n\n summ...
ruby
chosen
[ { "from": "system", "value": "Use pgroonga_command instead of pgroonga.command\n" }, { "from": "human", "value": "class RegisterFunctionsVector < ActiveRecord::Migration\n def change\n reversible do |d|\n d.up do\n command = \"plugin_register functions/vector\"\n case\n ...
ruby
chosen
[ { "from": "system", "value": "Add :with_country trait for Zone factory\n" }, { "from": "human", "value": "FactoryGirl.define do\n factory :global_zone, class: Spree::Zone do\n name 'GlobalZone'\n description { generate(:random_string) }\n zone_members do |proxy|\n zone = proxy.ins...
ruby
chosen
[ { "from": "system", "value": "Use class methods in Ipsum class\n\nAlso remove executable testing code." }, { "from": "human", "value": "require_relative 'paragraph.rb'\nrequire_relative 'text_paragraph.rb'\nrequire_relative 'haml_paragraph.rb'\nrequire_relative 'html_paragraph.rb'\nrequire_relat...
ruby
chosen
[ { "from": "system", "value": "Remove init file requirement from configuration integration test" }, { "from": "human", "value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\ndescribe 'kafka::configure' do\n describe file('/opt/kafka/config/log4j.properties') do\n it { should be_a_file }\n ...
ruby
chosen
[ { "from": "system", "value": "Test creating an invalid overheard\n\nOur test trys to create an overheard without a body. In this case, we\nwant our user to stay on the same page and see a nice error message.\n\nUnfortunately, it looks like we redirect to \"/\" even if the user\ndoesn't provide a body. How s...
ruby
chosen
[ { "from": "system", "value": "Revert \"Revert \"Backported change from radiant CMS to fix extension routes loading.\"\"\n\nThis reverts commit f7b4439ba38a2f67ef7509d014227f3070a766d4.\n" }, { "from": "human", "value": "############################################################################...
ruby
chosen
[ { "from": "system", "value": "Maintenance: Make login clue check Capybara system tests more robust in local environments.\n" }, { "from": "human", "value": "class Capybara::Node::Element\n\n # This is an extension to each node to check if the element\n # is moving or in a fixed position. This ...
ruby
chosen
[ { "from": "system", "value": "Read the prefix of another project must be delayed\n" }, { "from": "human", "value": "require 'projecta'\n\nclass ProjectB < Application\n \n git 'https://github.com/rjud/ProjectB.git'\n \n cmake do\n option :BUILD_WITH_A, :BOOLEAN, desc: 'Build with A'\n ...
ruby
chosen
[ { "from": "system", "value": "Use T4 taxCode by default\n" }, { "from": "human", "value": "module Spree\n class BpOrderRow < Brightpearl\n\n def initialize(line_item)\n super()\n @line_item = line_item\n end\n\n def save\n Nacre::API::OrderRow.create @line_item.order.bri...
ruby
chosen
[ { "from": "system", "value": "Update RStudio preview to version 0.98.932\n" }, { "from": "human", "value": "class RstudioPreview < Cask\n url 'https://s3.amazonaws.com/rstudio-dailybuilds/RStudio-0.98.806.dmg'\n homepage 'http://www.rstudio.com/ide/download/preview'\n version '0.98.806'\n sh...
ruby
chosen
[ { "from": "human", "value": "Add OP renew cert soap test\n" }, { "from": "gpt", "value": "require 'test_helper'\n\nclass OpRenewCertRequestSoapBuilderTest < ActiveSupport::TestCase\n setup do\n @params = op_renew_certificate_params\n\n # Convert the keys here since the conversion is usual...
ruby
chosen
[ { "from": "system", "value": "Fix outdated diff comments test\n\nIt looks like GitHub now loads some of these outdated comments via AJAX\nand not on the initial page load.\n" }, { "from": "human", "value": "require 'spec_helper'\n\nRSpec.describe 'Conversation page' do\n let(:driver) { EprSpecH...
ruby
chosen
[ { "from": "system", "value": "Add 'ruby-graphviz' gem to development_dependency\n\nWhen `bundle exec rake` to run tests locally, ruby-graphviz is needed.\nSure `bundle exec rake test:all` ensures the gem is installed for\nall rails versions, but `bundle exec rake test` (the default task) fails\nwithout 'rub...
ruby
chosen
[ { "from": "system", "value": "Fix typo in user model test\n" }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.describe User, type: :model do\n\n describe \"associations\" do\n it { should have_many(:initiated_conversations).with_foreign_key 'initiator_id' }\n it { should h...
ruby
chosen
[ { "from": "system", "value": "Add license to gem spec\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path('../lib', __FILE__)\nrequire 'peddler/version'\n\nGem::Specification.new do |gem|\n gem.name = 'peddler'\n gem.version = Peddler::VERSION\n g...
ruby
chosen
[ { "from": "system", "value": "Correct version number in podspec file.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'AmazeKit'\n s.version = '0.0.2'\n s.authors = {'Jeff Kelley' => 'SlaunchaMan@gmail.com'}\n s.license = 'Proprietary'\n s.homepage = 'https://githu...
ruby
chosen
[ { "from": "system", "value": "Add \"json\" gem as 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 'deadly_serious/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Update database cookbook with correct database info.\n" }, { "from": "human", "value": "include_recipe \"database\"\n\ngem_package \"mysql\" do\n gem_binary \"/opt/chef/embedded/bin/gem\"\nend\n\nif node[:active_applications]\n\n node[:active_applications].each do...
ruby
chosen
[ { "from": "system", "value": "Add simple spec to test webhooks\n" }, { "from": "human", "value": "require \"spec_helper\"\n\ndescribe \"Threasy::Work\" do\n before :each do\n @work = Threasy::Work.instance\n end\n\n describe \"#enqueue\" do\n it \"should allow a job object to be enqueue...
ruby
chosen
[ { "from": "human", "value": "Add basic compile tests for the new class.\n" }, { "from": "gpt", "value": "require_relative '../../../../spec_helper'\n\ndescribe 'govuk_docker', :type => :class do\n\n it { is_expected.to compile }\n\n it { is_expected.to compile.with_all_deps }\nend\n" } ]
ruby
chosen
[ { "from": "system", "value": "Refresh materialized views twice a day\n\n* Why twice? Because it's relatively cheap and I don't like the thought\n of all hits, all-time being increasingly inaccurate as the day goes on\n (especially if traffic spikes are likely)\n" }, { "from": "human", "value":...
ruby
chosen
[ { "from": "system", "value": "Remove returns from case statements\n\ngit-svn-id: 00255c29502d8dc24a666882d37304e67b560e94@1520 8456e5f2-bb15-0410-bd20-b44782a1fb1e\n" }, { "from": "human", "value": "# Methods added to this helper will be available to all templates in the application.\nmodule App...
ruby
chosen
[ { "from": "system", "value": "Update session key management for lastfm 1.5.1.\n" }, { "from": "human", "value": "require 'lastfm'\n\nmodule Scrapescrobbler\n class Listener\n attr_accessor :lastfm, :station, :started\n\n def initialize(station)\n @lastfm = Listener.authenticate\n ...
ruby
chosen
[ { "from": "human", "value": "Add GUI for the game\n\nThis uses Gosu library for ruby.\n" }, { "from": "gpt", "value": "require 'gosu'\nrequire_relative 'world.rb'\n\nclass GameOfLifeWindow < Gosu::Window\n\n def initialize(width=500, height=500)\n @width = width\n @height = height\n su...
ruby
chosen