conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Rewrite model spec w/o validations_helper\n" }, { "from": "human", "value": "require File.dirname(__FILE__) + '/../spec_helper'\n\ndescribe Layout do\n #dataset :layouts\n test_helper :validations\n\n before :each do\n @layout = @model = Layout.new(layout_para...
ruby
chosen
[ { "from": "system", "value": "Update unity sdk source to use cdn\n" }, { "from": "human", "value": "#\n# Be sure to run `pod spec lint YumiUnitySDK.podspec' to ensure this is a\n# valid spec and to remove all comments including this before submitting the spec.\n#\n# To learn more about Podspe...
ruby
chosen
[ { "from": "system", "value": "Define a more verbose association, also to circumvent circular dependency issue while loading in production\n" }, { "from": "human", "value": "# frozen_string_literal: true\nclass Course::Video < ActiveRecord::Base\n acts_as_lesson_plan_item has_todo: true\n\n inc...
ruby
chosen
[ { "from": "system", "value": "Allow city to be missing.\n" }, { "from": "human", "value": "class GeoActivity\n\n include Mongoid::Document\n\n embedded_in :user\n\n field :_id, type: String\n field :dates, type: Array, default: -> { [DateTime.current.utc.to_date.to_s] }\n ...
ruby
chosen
[ { "from": "system", "value": "Add id value to PAYMENT_TYPE\n" }, { "from": "human", "value": "class Registration < ActiveRecord::Base\n belongs_to :user\n belongs_to :event\n\n\tPAYMENT_TYPE = ['Cash','Check']\nend\n" }, { "from": "gpt", "value": "class Registration < ActiveRecord:...
ruby
chosen
[ { "from": "system", "value": "Reduce profile picture path size and make safe.\n\n* 16^3 directory entries is well within FS limits.\n* DragonFly root path means \"attachments\" is not needed.\n* Give path a more relevant name.\n" }, { "from": "human", "value": "class UserProfile < ActiveRecord::...
ruby
chosen
[ { "from": "system", "value": "Update spec tests to expect boolean\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'apache', :type => :class do\n context \"On a Debian OS\" do\n let :facts do\n { :osfamily => 'Debian' }\n end\n it { should include_class(\"apach...
ruby
chosen
[ { "from": "system", "value": "Remove comments and dev dependencies\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'webhookr-mandrill/version'\n\nGem::Specification.new do |...
ruby
chosen
[ { "from": "system", "value": "Fix syntax in subscription migration\n" }, { "from": "human", "value": "class CreateStorytimeSubscriptions < ActiveRecord::Migration\n def change\n create_table :storytime_subscriptions do |t|\n t.string :email\n t.boolean :subscribed, default: true\n ...
ruby
chosen
[ { "from": "system", "value": "Fix my own email in gemspec\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'phare/version'\n\nGem::Specification.new do |spec|\n spec.name = '...
ruby
chosen
[ { "from": "system", "value": "Set report_only to 'false' in CSP\n" }, { "from": "human", "value": "SecureHeaders::Configuration.default do |config|\n src = %w(* 'unsafe-inline' 'unsafe-eval' data:\n *.google-analytics.com *.googleapis.com *.google.com *.gstatic.com\n *.faceb...
ruby
chosen
[ { "from": "system", "value": "Add private-chef as runtime dependency\n" }, { "from": "human", "value": "#\n# Copyright:: Copyright (c) 2012 Opscode, Inc.\n# License:: Apache License, Version 2.0\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file ...
ruby
chosen
[ { "from": "system", "value": "deploy: Configure ES url and log\n" }, { "from": "human", "value": "require \"tire\"\n\n# Taken from config/boot.rb\nAPP_ENV = ENV['APP_ENV'] ||= ENV['RACK_ENV'] ||= 'development' unless defined?(APP_ENV)\nAPP_ROOT = File.expand_path('../..', __FILE__).gsub(/relea...
ruby
chosen
[ { "from": "system", "value": "Check if keys exist before accessing\n" }, { "from": "human", "value": "require 'json'\n\nmodule Cb\n module ResponseValidator\n\n def self.validate(response)\n if response.blank? || response.response.body.blank?\n return false\n end\n\n if...
ruby
chosen
[ { "from": "system", "value": "Update project & source URL from MSysGit to Git for Windows." }, { "from": "human", "value": "class DownloadsController < ApplicationController\n\n def index\n end\n\n def latest\n latest = Version.latest_version.name\n render :text => latest\n end\n\n de...
ruby
chosen
[ { "from": "system", "value": "Update library search to render same page.\n" }, { "from": "human", "value": "class LibrariesController < ApplicationController\n def show\n @items = Library::ItemDecorator.decorate(Library::Item.by_most_recent.page(params[:page]))\n end\n\n def search\n s ...
ruby
chosen
[ { "from": "system", "value": "Remove unnecessary local variable from questions controller\n" }, { "from": "human", "value": "class QuestionsController < ApplicationController\n before_action :authenticate_user!\n before_action :find_question, only: [:show, :edit, :update, :destroy]\n before_a...
ruby
chosen
[ { "from": "system", "value": "Update podspec to have more information\n" }, { "from": "human", "value": "#\n# Be sure to run `pod lib lint MTLParseAdapter.podspec' to ensure this is a\n# valid spec and remove all comments before submitting the spec.\n#\n# Any lines starting with a # are optional...
ruby
chosen
[ { "from": "system", "value": "Update RSpec dependency to work with RSpec 3.0\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\n\nGem::Specification.new do |s|\n s.rubygems_version = '1.3.5'\n\n s.name = 'fuubar'\...
ruby
chosen
[ { "from": "system", "value": "Set the Galena box site and container type.\n" }, { "from": "human", "value": "# load the defaults file in the seed directory\nrequire File.join(File.dirname(__FILE__), '..', 'seed', 'defaults')\n\nmodule CaTissue\n # Declares the classes modified for migration.\n ...
ruby
chosen
[ { "from": "system", "value": "Address `NameError: uninitialized constant Arel::Collectors::Bind`\nwhen tested with Ruby 2.5 or higher\n\n```ruby\n$ ruby -v\nruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux]\n$ bundle exec ruby -w -Itest test/cases/arel/collectors/bind_test.rb -n test_compile_gathers_...
ruby
chosen
[ { "from": "system", "value": "Allow bulk_perform_and_wait wait timeout to be overridden\n" }, { "from": "human", "value": "module WaitableWorker\n extend ActiveSupport::Concern\n\n module ClassMethods\n # Schedules multiple jobs and waits for them to be completed.\n def bulk_perform_and_...
ruby
chosen
[ { "from": "system", "value": "Add env to each command\n" }, { "from": "human", "value": "name \"fluentd\"\n# fluentd v0.12.29\ndefault_version 'cd458194c949851a2b76c06b994330e964b55cc0'\n\ndependency \"ruby\"\n#dependency \"bundler\"\n\nsource :git => 'https://github.com/fluent/fluentd.git'\nrel...
ruby
chosen
[ { "from": "system", "value": "Add confirmation of a new comment to the flash.\n" }, { "from": "human", "value": "class IslayBlog::Public::BlogController < IslayBlog::Public::ApplicationController\n def index\n @blog_entries = BlogEntry.public_summary.active.page(params[:page]).per(5).order('...
ruby
chosen
[ { "from": "system", "value": "Use different syntax as recommended by Bjorn.\n" }, { "from": "human", "value": "require 'faraday'\nrequire 'faraday_middleware'\n\nmodule Mountebank\n class Network\n def self.connection\n @conn ||= Faraday.new(url: mountebank_server_uri) do |conn|\n ...
ruby
chosen
[ { "from": "system", "value": "Fix NoMethodError on Rails 5.2\n" }, { "from": "human", "value": "require 'digest'\nrequire 'active_record'\n\nmodule Seed\n class Configuration\n def initialize\n # error if adapter is not mysql\n raise 'seed-snapshot support only MySQL' unless adapte...
ruby
chosen
[ { "from": "system", "value": "Make code similar to other providers\n" }, { "from": "human", "value": "require 'vagrant'\n\nmodule Vagrant\n module LXC\n class Plugin < Vagrant.plugin(\"2\")\n name \"vagrant-lxc\"\n description <<-EOF\n The LXC provider allows Vagrant to manage...
ruby
chosen
[ { "from": "system", "value": "Fix custom_field_path for been usable on new instances of chiliproject\n" }, { "from": "human", "value": "module RedmineProjectFiltering\n\n module Patches\n\n module CustomFieldPatch\n def self.included(base) # :nodoc:\n base.send(:include, Instance...
ruby
chosen
[ { "from": "system", "value": "Add failing spec for redirect to index after remove done\n" }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.describe ItemsController, type: :controller do\n\tdescribe \"GET index\" do\n\t\tlet(:items) { [double(:item)] }\n\n\t\tbefore do\n\t\t\tallow...
ruby
chosen
[ { "from": "human", "value": "Add create receptacle action trait\n" }, { "from": "gpt", "value": "require 'modularity'\nrequire 'lims-laboratory-app/laboratory/receptacle'\nrequire 'lims-laboratory-app/laboratory/sample/create_sample_shared'\nrequire 'lims-laboratory-app/laboratory/create_labella...
ruby
chosen
[ { "from": "system", "value": "Use Rails 5 syntax to set referer in specs\n\nThe previous way was working fine with Rails 4, but now the referer was\nreturning nil and therefore raising an error in this spec.\n" }, { "from": "human", "value": "require \"rails_helper\"\n\ndescribe RemoteTranslatio...
ruby
chosen
[ { "from": "system", "value": "Update spec to use .try interface\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'User model mapping' do\n let(:rom) { Rails.application.config.rom.env }\n\n let(:users) { rom.read(:users) }\n\n before do\n rom.command(:users).create.call...
ruby
chosen
[ { "from": "system", "value": "Create Puppy class, characteristics hash and behavior array\n" }, { "from": "human", "value": "SPECIES ------------------------\nCanis lateus amplexus\n\nCHARACTERISTICS ----------------\nAbility to hug: varies\nFriendly: yes\nEye count: 2\nTail count: 1\nWag_tail:...
ruby
chosen
[ { "from": "system", "value": "Remove name property from the resource\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "from": "human", "value": "property :name, String, name_property: true\nproperty :data, Array, default: []\n\naction :create do\n converge_...
ruby
chosen
[ { "from": "system", "value": "Update Aluxian Messenger to 1.4.3\n" }, { "from": "human", "value": "cask :v1 => 'aluxian-messenger' do\n version '1.4.0'\n sha256 'cd29d15312435952d6dba2bf65421d910a4c4f866c036e2b1f3beb3af626ac23'\n\n url \"https://github.com/Aluxian/Facebook-Messenger-Desktop/r...
ruby
chosen
[ { "from": "system", "value": "Support all versions of 2.x.x of Capistrano.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"version\"\n\nGem::Specification.new do |s|\n s.name = \"capistrano-cook\"\n s.version = ...
ruby
chosen
[ { "from": "system", "value": "Make partial title and TOC match less strict.\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe \"Default search\" do\n\n it \"Should match popular items\" do\n default_search('b3340555', 'Pubmed', 3)\n end\n\n it \"Should match partial titl...
ruby
chosen
[ { "from": "system", "value": "Add to ensure that we generate coverage info for hosts\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'foo.example.com' do\n describe 'rspec group' do\n it 'should have a catalogue method' do\n expect(catalogue).to be_a(Puppet::Resourc...
ruby
chosen
[ { "from": "system", "value": "Add the start of a stub-based spec of WikiEdits\n" }, { "from": "human", "value": "require 'rails_helper'\nrequire \"#{Rails.root}/lib/wiki_edits\"\n\ndescribe WikiEdits do\n describe '.notify_untrained' do\n pending 'should post messages to Wikipedia talk pages...
ruby
chosen
[ { "from": "system", "value": "Rename spec support method for faster tab completion on save_and_open_page\n" }, { "from": "human", "value": "module OpenFoodNetwork\n module HtmlHelper\n def save_and_open(html)\n require \"launchy\"\n file = Tempfile.new('html')\n file.write htm...
ruby
chosen
[ { "from": "system", "value": "Add myself as gem author\n" }, { "from": "human", "value": "lib = File.expand_path(\"../lib\", __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire \"climate_control/version\"\n\nGem::Specification.new do |gem|\n gem.name = \"climate_control\...
ruby
chosen
[ { "from": "human", "value": "Introduce tests for the admin-controller: spec the destroy action.\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe Spree::Admin::SalePricesController, type: :controller do\n routes { Spree::Core::Engine.routes }\n let(:sale_price) { mock_model(Sp...
ruby
chosen
[ { "from": "system", "value": "Allow any Rails 5.x version\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"mustache-js-rails/version\"\n\nGem::Specification.new do |s|\n s.name = \"mustache-js-rails\"\n s.version = MustacheJsRails::VERSION...
ruby
chosen
[ { "from": "system", "value": "Remove extraneous `puts` from spec\n\nThis was probably mistakenly forgotten in #282.\nAlso fixes a typo in the spec description.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\ndescribe Lograge::Formatters::KeyValueDeep do\n let(:payload) do\n ...
ruby
chosen
[ { "from": "system", "value": "Implement expense report update action" }, { "from": "human", "value": "class Api::V1::ExpenseReportsController < Api::V1::ApiController\n inherit_resources\n\n def create\n expense_report = ExpenseReport.new(safe_params)\n if expense_report.save\n rend...
ruby
chosen
[ { "from": "system", "value": "Fix style according to Mr. Rubocop\n" }, { "from": "human", "value": "module IntegrationHelper\n class TestRepo\n\n REPO = \"https://github.com/renderedtext/test-boosters-tests.git\".freeze\n\n attr_reader :project_path\n\n def initialize(test_project)\n ...
ruby
chosen
[ { "from": "system", "value": "Fix warden error fetching current_user\n" }, { "from": "human", "value": "module Subscribem\n class ApplicationController < ActionController::Base\n def current_account\n if user_signed_in?\n @current_account ||= begin\n account_id = env['wa...
ruby
chosen
[ { "from": "system", "value": "Use the right country designation for country\n" }, { "from": "human", "value": "class EnqueuePublishersForPaypalPayoutJob < ApplicationJob\n queue_as :scheduler\n\n def perform(should_send_notifications: false, final: true, manual: false, payout_report_id:)\n ...
ruby
chosen
[ { "from": "human", "value": "Add migration to set up delayed job\n" }, { "from": "gpt", "value": "class AddDataDumpDelayedJobs < ActiveRecord::Migration\n def up\n Delayed::Job.enqueue StatsDump, { :priority => 5, :run_at => DateTime.now.tomorrow.change(:hour => 1, :min => 30) }\n Delayed...
ruby
chosen
[ { "from": "human", "value": "Add migration to remove simple_captcha_data table\n" }, { "from": "gpt", "value": "class RemoveSimpleCaptchaData < ActiveRecord::Migration\n def up\n drop_table :simple_captcha_data\n end\n\n def down\n create_table :simple_captcha_data do |t|\n t.strin...
ruby
chosen
[ { "from": "human", "value": "Create index against column type varchar for PostgreSQL\n" }, { "from": "gpt", "value": "class ChangeColumnTypeToText < ActiveRecord::Migration\n def change\n return unless Redmine::Database.postgresql?\n opclass = \"pgroonga.varchar_full_text_search_ops\"\n ...
ruby
chosen
[ { "from": "human", "value": "Add migration for removing old heat network mekkos\n" }, { "from": "gpt", "value": "class RemoveHeatNetworkMekkos < ActiveRecord::Migration[5.2]\n def up\n OutputElement.find_by_key(:mekko_agricultural_heat_network).destroy!\n OutputElement.find_by_key(:mekko_...
ruby
chosen
[ { "from": "system", "value": "Use the taxonomy metrics namespace for distribution metrics\n" }, { "from": "human", "value": "module Metrics\n class ContentDistributionMetrics\n def count_content_per_level\n counts_by_level.each_with_index do |count, level|\n Services.statsd.gauge...
ruby
chosen
[ { "from": "system", "value": "Remove 2 dependencies on provides_service and mountable_volumes from zookeeper. These just don't exist anywhere and they break bulk cookbook uploads\n" }, { "from": "human", "value": "maintainer \"Chris Howe - Infochimps, Inc\"\nmaintainer_email \"coders@info...
ruby
chosen
[ { "from": "system", "value": "Change name of click button feature test\n" }, { "from": "human", "value": "require 'rails_helper'\n\nfeature 'User managment' do \n\n scenario \"add new user\" do\n expect{\n visit new_user_path\n fill_in 'user_user_name', with: attributes_for(:user)[:...
ruby
chosen
[ { "from": "system", "value": "Add example for ng_words size\n" }, { "from": "human", "value": "require 'rspec/its'\nrequire_relative '../lib/message_filter'\n\ndescribe MessageFilter do\n\tshared_examples 'MessageFilter with argument \"foo\"' do\n\t\tit { is_expected.to be_detect('hello from foo...
ruby
chosen
[ { "from": "system", "value": "Update mocking strategy for remote intecepts\n" }, { "from": "human", "value": "require 'sfn'\nrequire 'bogo-ui'\nrequire 'minitest/autorun'\nrequire 'mocha/mini_test'\n\ndef command_instance(klass, config={}, args=[])\n Miasma.test_api = connection\n instance = k...
ruby
chosen
[ { "from": "system", "value": "Add a separate coverage category for .y files.\n" }, { "from": "human", "value": "require 'tempfile'\n\nrequire 'simplecov'\nrequire 'coveralls'\n\nif SimpleCov.usable?\n if defined?(TracePoint)\n require_relative 'racc_coverage_helper'\n\n RaccCoverage.start...
ruby
chosen
[ { "from": "system", "value": "Bring in the big guns.\n" }, { "from": "human", "value": "if RUBY_VERSION > '1.9' && ENV[\"COVERAGE\"] == \"true\"\n require 'simplecov'\n require 'simplecov-gem-adapter'\n SimpleCov.start('gem')\nend\n\nrequire 'test/unit'\nrequire 'redgreen' if RUBY_VERSION < '...
ruby
chosen
[ { "from": "system", "value": "Remove support for IE7 and IE8\n\nRef #1978\n" }, { "from": "human", "value": "module Browser\n ALLOWED_BROWSERS = %w[firefox ie11 ie10 ie9 ie8 ie7 chrome safari]\n\n def user_agent\n case request.env['HTTP_USER_AGENT']\n when /Firefox/ then 'firefox'\n ...
ruby
chosen
[ { "from": "human", "value": "Add unit tests for link checker service\n\nIn preparation for adding public URL lookups to the service.\n" }, { "from": "gpt", "value": "require 'test_helper'\n\nclass LinkCheckerApiServiceTest < ActiveSupport::TestCase\n WEBHOOK_URI = \"https://example.com/webhook_...
ruby
chosen
[ { "from": "system", "value": "Clean up JSON file from tests\n" }, { "from": "human", "value": "class JSONCompareTests < Test::Unit::TestCase\n include BrakemanTester::DiffHelper\n\n def setup\n @path = File.expand_path \"#{TEST_PATH}/apps/rails3.2\"\n @json_path = File.join @path, \"repo...
ruby
chosen
[ { "from": "system", "value": "Remove extra report call in resque test\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire File.expand_path('../test_helper', File.dirname(__FILE__))\n\nclass ResqueWorkerTest < Minitest::Test\n def enqueue_and_run_job\n Resque.enqueue(T...
ruby
chosen
[ { "from": "human", "value": "Add tests for label prioritization\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\nfeature 'Prioritize labels', feature: true do\n include WaitForAjax\n\n let(:user) { create(:user) }\n let(:project) { create(:project, name: 'test', namespace: user.na...
ruby
chosen
[ { "from": "system", "value": "Rename instance variable in a test\n" }, { "from": "human", "value": "require 'iruby/jupyter'\n\nmodule IRubyTest\n class JupyterDefaultKernelSpecDirectoryTest < TestBase\n def setup\n @kernel_spec = IRuby::Jupyter.kernelspec_dir\n end\n\n def test_de...
ruby
chosen
[ { "from": "human", "value": "Add test program of json.php\n" }, { "from": "gpt", "value": "require 'json'\nrequire 'faraday'\n\nurl = \"http://cal.syoboi.jp\"\njson_path = \"/json.php\"\n\nprogram_title = \"冴えない彼女の育てかた\"\n\nbegin\n\tconnection ||= Faraday::Connection.new(url: url) do |c|\n\t\tc....
ruby
chosen
[ { "from": "system", "value": "Remove `warning: ambiguous first argument; put parentheses or a space even after `/' operator`\n" }, { "from": "human", "value": "require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')\n\nclass TestFakerBitcoin < Test::Unit::TestCase\n\n def test_addr...
ruby
chosen
[ { "from": "system", "value": "Update Context class to read the settings from a toml file\n" }, { "from": "human", "value": "require 'application_insights'\n\nmodule AIAgent\n class Context\n class << self\n def self.configure(config)\n @context = ApplicationInsights::Channel::Tel...
ruby
chosen
[ { "from": "system", "value": "Upgrade filum to fix tests.\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'loquor/version'\n\nGem::Specification.new do |spec|\n spec.name = ...
ruby
chosen
[ { "from": "human", "value": "Rename and migrate art_museum.png to museum_art.png in node_types table\n\nFixes 404 - icon not found error for \"Art Museum\"\nRelated Github issue: #484\n" }, { "from": "gpt", "value": "class ChangeArtMuseumToMuseumArt < ActiveRecord::Migration\n class LocalNodeTy...
ruby
chosen
[ { "from": "system", "value": "Rename NodeType class back to LocalNodeType to use own model for migration\n" }, { "from": "human", "value": "class ChangeArtMuseumToMuseumArt < ActiveRecord::Migration\n class LocalNodeType < ActiveRecord::Base\n self.table_name = 'node_types'\n validates :i...
ruby
chosen
[ { "from": "system", "value": "Add basic specs for Kernel.printf\n" }, { "from": "human", "value": "require File.expand_path('../../../spec_helper', __FILE__)\nrequire File.expand_path('../fixtures/classes', __FILE__)\n\ndescribe \"Kernel#printf\" do\n it \"is a private method\" do\n Kernel.s...
ruby
chosen
[ { "from": "system", "value": "Drop test cases for session destroy.\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Api::V1::SessionsController do\n render_views\n\n before(:each) do\n @user = FactoryGirl.create(:user)\n @request.env[\"devise.mapping\"] = Devise.mappi...
ruby
chosen
[ { "from": "system", "value": "Use 1 thread instead of 4 with Puma server for system tests\n" }, { "from": "human", "value": "begin\n require \"rack/handler/puma\"\nrescue LoadError\n false\nend\n\nmodule ActionSystemTest\n module DriverAdapters\n module WebServer # :nodoc:\n def regis...
ruby
chosen
[ { "from": "system", "value": "Use same ordering in FOM preview as dashboard\n" }, { "from": "human", "value": "module Admin\n module AlertTypes\n class FindOutMorePreviewController < AdminController\n load_and_authorize_resource :alert_type\n\n def show\n @alert = @alert_typ...
ruby
chosen
[ { "from": "system", "value": "Fix typo in Erlang plugin\n" }, { "from": "human", "value": "#\n# Author:: Joe Williams (<joe@joetify.com>)\n# Copyright:: Copyright (c) 2008 Opscode, Inc.\n# License:: Apache License, Version 2.0\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"...
ruby
chosen
[ { "from": "system", "value": "Refactor RedmineAPI::Issue.find to include journals which allows access to notes/comments\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'active_support'\nrequire 'active_resource'\n\n\nmodule RedmineAPI\n class Error < StandardError; end\n\n class...
ruby
chosen
[ { "from": "system", "value": "Remove code which doesn't appear to be needed that was throwing me off\n" }, { "from": "human", "value": "require 'stacks/namespace'\n\nclass Stacks::ProxyServer < Stacks::MachineDef\n attr_reader :virtual_service\n\n def initialize(virtual_service, index)\n su...
ruby
chosen
[ { "from": "system", "value": "Check if column even exists\n" }, { "from": "human", "value": "namespace :data do\n\n desc \"Data points, collections, etc. for aggregation.\"\n namespace :points do\n desc \"Load data points and related records.\"\n task load: :environment do\n Spreads...
ruby
chosen
[ { "from": "system", "value": "Fix - Shipment includes vat is allways false after save\n\nFixes #2368\n" }, { "from": "human", "value": "module Spree\n module Admin\n class TaxSettingsController < Spree::Admin::BaseController\n\n def update\n Spree::Config.set(params[:preferences]...
ruby
chosen
[ { "from": "system", "value": "Add support of <b> tag\n" }, { "from": "human", "value": "When /^I get the bold text for the \"([^\\\"]*)\" element$/ do |el|\n @b = @page.send \"#{el}\"\nend\n\nThen /^I should see \"([^\\\"]*)\" in bold$/ do |text|\n @b.should == text\nend\n\nWhen /^I search bol...
ruby
chosen
[ { "from": "system", "value": "Add test for related items on start page." }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe \"Start page\" do\n\n specify \"Inspecting the start page\" do\n\n visit \"/#{APP_SLUG}\"\n\n within 'section#content' do\n within 'header' do\n ...
ruby
chosen
[ { "from": "system", "value": "Update the list of keys that should be skipped\n\nThis spec is running the same rake tasks. It needs it's own\nlist of excluded keys. See:\n\nhttps://github.com/alphagov/rails_translation_manager/blob/e6d46f03cf1d9a75f852784aaab385ed48de1147/lib/rails_translation_manager/locale...
ruby
chosen
[ { "from": "system", "value": "Add initial test to ensure routes event\n" }, { "from": "human", "value": "require \"spec_helper\"\n\ndescribe Lita::Handlers::Hal9000, lita_handler: true do\nend\n" }, { "from": "gpt", "value": "require \"spec_helper\"\n\ndescribe Lita::Handlers::Hal900...
ruby
chosen
[ { "from": "system", "value": "Add specs for left and right joins\n" }, { "from": "human", "value": "RSpec.describe ROM::Relation, '#join_dsl' do\n subject(:relation) { relations[:tasks] }\n\n include_context 'users and tasks'\n\n with_adapters :postgres do\n it 'can join relations using ar...
ruby
chosen
[ { "from": "human", "value": "Add unit test for Trello::BasicData.many\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\nRSpec.describe Trello::BasicData do\n\n describe '.many' do\n let(:association_name) { 'cards' }\n let(:association_options) { { test: 'test' } }\n\n it 'call...
ruby
chosen
[ { "from": "system", "value": "Fix migration adding avatar attachment\n" }, { "from": "human", "value": "class AddAttachmentAvatarToUsers < ActiveRecord::Migration\n def self.up\n change_table :users do |t|\n add_column :users, :retina_dimensions, :text, after: :email\n end\n end\n\n...
ruby
chosen
[ { "from": "system", "value": "Change gemspec dependency from json libs to active support\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib/', __FILE__)\n$:.unshift lib unless $:.include?(lib)\n\nrequire 'zencoder/version'\n\nGem::Specification.new do |s...
ruby
chosen
[ { "from": "human", "value": "Add tests specific to configuration files\n" }, { "from": "gpt", "value": "require 'client_helper'\n\ndescribe Cyclid::Client::Config do\n it 'loads a valid configuration' do\n config = nil\n expect{ config = Cyclid::Client::Config.new(ENV['TEST_CONFIG']) }.to...
ruby
chosen
[ { "from": "system", "value": "Fix bug returning Array of Ids\n" }, { "from": "human", "value": "module B2bCenterApi\n module WebService\n module Types\n # Массив ID или других строк\n class ArrayOfIds < WebService::BaseType\n # @return [String[]]\n def self.from_part_...
ruby
chosen
[ { "from": "system", "value": "Add simple instructions to get the tests running\n" }, { "from": "human", "value": "require 'capybara'\nrequire 'capybara/mechanize'\n\nrequire 'sinatra'\nrequire 'spec'\n\nrequire 'capybara/spec/extended_test_app'\n\n# TODO move this stuff into capybara\nrequire 'c...
ruby
chosen
[ { "from": "system", "value": "[Test] Replace deprecated CodeClimate::TestReporter by SimpleCov" }, { "from": "human", "value": "$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)\n\nrequire \"codeclimate-test-reporter\"\nCodeClimate::TestReporter.start\n\nrequire \"panda_doc\"\n\nRSpec.c...
ruby
chosen
[ { "from": "system", "value": "Delete all records after each examples\n" }, { "from": "human", "value": "ENV['RAILS_ENV'] ||= 'test'\n\n$LOAD_PATH.unshift(File.join(__dir__, '..', 'lib'))\n$LOAD_PATH.unshift(__dir__)\n\nrequire 'rails'\nrequire 'database_rewinder'\nrequire 'fake_app'\n\nRSpec.con...
ruby
chosen
[ { "from": "system", "value": "Fix issue in generator where RSpec.configuration is nil\n" }, { "from": "human", "value": "require 'generators/stripe_webhooks'\n\nmodule StripeWebhooks\n module Generators\n class CallbackGenerator < Base\n desc 'Creates a stripe webhook callback object'\n...
ruby
chosen
[ { "from": "system", "value": "Reset Timecop after each spec\n" }, { "from": "human", "value": "ENV['RACK_ENV'] = \"test\"\nrequire File.expand_path(File.dirname(__FILE__) + \"/../config/boot\")\nrequire 'webmock/rspec'\n\nWebrat.configure do |conf|\n conf.mode = :rack\nend\n\nRSpec.configure do...
ruby
chosen
[ { "from": "system", "value": "Use environment variables for API keys\n\nSince we have to use our own keys to run the tests on this gem, support\nusing environment variables so we don’t have to edit this file and\nremember to revert it back before committing. This way we can run tests\nlike:\n\n`MAILGUN_API_...
ruby
chosen
[ { "from": "human", "value": "Add seed for personal access token\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\n\nrequire './spec/support/sidekiq'\n\n# Create an api access token for root user with the value: ypCa3Dzb23o5nvsixwPA\nGitlab::Seeder.quiet do\n PersonalAccessToken.cr...
ruby
chosen
[ { "from": "system", "value": "Delete lines which fails on Centos postgresql\n" }, { "from": "human", "value": "class AddKindToPhysicalRoads < ActiveRecord::Migration\n def change\n add_column :physical_roads, :kind, :string\n\n ActiveRoad::PhysicalRoad.reset_column_information\n Active...
ruby
chosen
[ { "from": "system", "value": "Use the same type as the last_build_date\n" }, { "from": "human", "value": "class AddReleasedAtToEpisode < ActiveRecord::Migration\n def change\n add_column :episodes, :released_at, :timestamp\n end\nend\n" }, { "from": "gpt", "value": "class AddRel...
ruby
chosen
[ { "from": "human", "value": "Update export_id foreign key to bigint\n" }, { "from": "gpt", "value": "class ChangeExportIdToBigint < ActiveRecord::Migration[6.0]\n def up\n change_column :notifications, :export_id, :bigint\n end\n\n def down\n change_column :notifications, :export_id, :i...
ruby
chosen