conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Set Sequel strict_param_setting globally for models\n" }, { "from": "human", "value": "if defined?(Sequel)\n DB = Sequel.sqlite # in memory\n Sequel.extension :migration\n Sequel::Migrator.run(DB, 'spec/support/sequel_migrations', :current => 0)\n\n def clear_se...
ruby
chosen
[ { "from": "system", "value": "Add a test for mark_postinstall.\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Kosmos::Versioner do\n let(:sandbox_dir) { 'spec/sandbox' }\n let(:ksp_dir) { File.absolute_path(File.join(sandbox_dir, 'ksp')) }\n\n before(:each) { FileUtils.m...
ruby
chosen
[ { "from": "human", "value": "Add test for context option\n" }, { "from": "gpt", "value": "RSpec.describe Hanami::Router do\n describe \"context option\" do\n let(:app) { Rack::MockRequest.new(router) }\n\n let(:router) { described_class.new(context: context, &routes) }\n\n let(:routes)...
ruby
chosen
[ { "from": "system", "value": "Change default spec to True\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe PahoMqtt do\n it 'has a version number' do\n expect(PahoMqtt::VERSION).not_to be nil\n end\n\n it 'does something useful' do\n expect(false).to eq(true)\n end\...
ruby
chosen
[ { "from": "system", "value": "Call the right method in the spec\n\ncloses #129\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Dotenv::Environment do\n subject { env(\"OPTION_A=1\\nOPTION_B=2\") }\n\n describe 'initialize' do\n it 'reads the file' do\n expect(subje...
ruby
chosen
[ { "from": "system", "value": "Change 'terms_accepted' to 'terms' in helper\n" }, { "from": "human", "value": "module Support\n module FactoryHelpers\n\n def create_user(options = {})\n user = build_user(options)\n gateway = Users::Gateways::UserGateway.new\n\n uid = gateway...
ruby
chosen
[ { "from": "system", "value": "FIX: Make migrations work with Discourse stable\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nclass RemoveOldAkismetStates < ActiveRecord::Migration[6.0]\n def up\n DB.exec(<<~SQL, updated_at: 5.minutes.ago\n DELETE FROM post_custom_fi...
ruby
chosen
[ { "from": "system", "value": "Update rake requirement from ~> 10.0 to ~> 12.3\n\nUpdates the requirements on [rake](https://github.com/ruby/rake) to permit the latest version.\n- [Release notes](https://github.com/ruby/rake/releases)\n- [Changelog](https://github.com/ruby/rake/blob/master/History.rdoc)\n- [...
ruby
chosen
[ { "from": "system", "value": "Upgrade Waterfox.app to version 40.0.2\n" }, { "from": "human", "value": "cask :v1 => 'waterfox' do\n version '39.0'\n sha256 'ba25c4c3a422b2727d5d47a1369fb26b3c66d9c03967fdd22076e27fff982134'\n\n # cloudfront.net is the official download host per the vendor home...
ruby
chosen
[ { "from": "system", "value": "Add doc files into gemspec\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 'ochibako_share'\n s.version = '0.1.2'\t# TODO: use the value in ./bin/ochibako-share\n s.date = Time.now.strftime(\"%Y-%m-%d\")\n s.summary ...
ruby
chosen
[ { "from": "system", "value": "Add test for title field search config\n" }, { "from": "human", "value": "describe 'search options' do\n context 'search dropdown' do\n before { visit search_catalog_path }\n\n it 'provides a dropdown with fielded search options' do\n expect(page).to hav...
ruby
chosen
[ { "from": "system", "value": "Add a spec for ProjectsFinder project_ids_relation option\n\nFollow-up 1003454c\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe ProjectsFinder do\n describe '#execute' do\n let(:user) { create(:user) }\n let(:group) { create(:group, :publ...
ruby
chosen
[ { "from": "system", "value": "Fix typo in UIImageViewStyler spec.\n" }, { "from": "human", "value": "class StyleSheetForUIViewStylerTests < RubyMotionQuery::Stylesheet\n\n def u_image_view_kitchen_sink(st)\n st.image = image.resource('logo')\n end\n\nend\n\ndescribe 'stylers/ui_image_view' ...
ruby
chosen
[ { "from": "system", "value": "Fix order of deployment targets to match version.xcconfig.\n" }, { "from": "human", "value": "Pod::Spec.new do |spec|\n spec.name = 'SipHash'\n spec.version = '1.0.0'\n spec.osx.deployment_target = \"10.9\"\n spec.ios.deployment_target = \"8...
ruby
chosen
[ { "from": "system", "value": "Add rubocop as a development dependency\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'mako/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Fix to allow specs to run in 1.8.7\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe ApiCanon do\n let(:fake_controller) do\n class FakeController < ActionController::Base\n include ApiCanon\n end\n end\n describe 'including' do\n ...
ruby
chosen
[ { "from": "human", "value": "Add specs for `Diff` class\n" }, { "from": "gpt", "value": "require_relative '../../lib/sub_diff/diff'\n\nRSpec.describe SubDiff::Diff do\n let(:diff) { described_class.new(value, value_was) }\n let(:diff_without_value_was) { described_class.new(v...
ruby
chosen
[ { "from": "system", "value": "Update the Debian 7 test AMI to Debian 7.1\n" }, { "from": "human", "value": "require 'integration_helper'\n\nclass Debian7KnifeBootstrapTest < IntegrationTest\n def user\n \"admin\"\n end\n\n def image_id\n \"ami-1d620e74\"\n end\n\n def prepare_server\n...
ruby
chosen
[ { "from": "system", "value": "Add UIKit and Foundation as dependencies" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"Whisper\"\n s.summary = \"A short description of Whisper.\"\n s.version = \"0.1.0\"\n s.homepage = \"https://github....
ruby
chosen
[ { "from": "system", "value": "Upgrade Android Studio.app to v0.8.3 build-135.1281642\n" }, { "from": "human", "value": "class AndroidStudio < Cask\n version '0.8.2 build-135.1267975'\n sha256 '55a20e6f9a9e76468344aacf2909b6db224fa3a87e4eac0d76d277ae8c479f89'\n\n url 'https://dl.google.com/dl/...
ruby
chosen
[ { "from": "system", "value": "Update DEVONthink Pro to 2.8.6\n" }, { "from": "human", "value": "cask :v1 => 'devonthink-pro' do\n version '2.8.6'\n sha256 '3b5d369bc641d6c0d8ded140ca6c496474051f93f79f53a97c872631f17530a7'\n\n # amazonaws.com is the official download host per the vendor homepa...
ruby
chosen
[ { "from": "system", "value": "Update Iterm2 Nightly URL and Homepage" }, { "from": "human", "value": "cask :v1 => 'iterm2-nightly' do\n version :latest\n sha256 :no_check\n\n url 'http://www.iterm2.com/nightly/latest'\n homepage 'http://www.iterm2.com/'\n license :oss\n\n app 'iTerm.app'\n...
ruby
chosen
[ { "from": "system", "value": "Upgrade The Unarchiver to v3.10\n" }, { "from": "human", "value": "cask :v1 => 'the-unarchiver' do\n version '3.9.1'\n sha256 '4911c332df7f4bb23877652700e845fe097b793ae37450948319398009e923a3'\n\n url \"http://unarchiver.c3.cx/downloads/TheUnarchiver#{version}_le...
ruby
chosen
[ { "from": "system", "value": "Add defaults to fixtures for fuel markets.\n" }, { "from": "human", "value": "FuelMarket.seed_many([\n {:id => 1, :name => \"Wind\",\n :description => \"The movement of air.\"},\n {:id => 2, :name => \"Sun\",\n :description => \"Solar radiation.\"},\n {...
ruby
chosen
[ { "from": "system", "value": "Update DBeaver community to v3.3.1\n" }, { "from": "human", "value": "cask :v1 => 'dbeaver-community' do\n version '3.3.0'\n\n if Hardware::CPU.is_32_bit?\n sha256 'd91acbac3dc2c86d20f3562f2b7ef5e5a87229a9f32f7bc8f4542d135c5eb31e'\n url \"http://dbeaver.jkis...
ruby
chosen
[ { "from": "system", "value": "Fix `url` stanza comment for Nulloy.\n" }, { "from": "human", "value": "cask 'nulloy' do\n version '0.8.2'\n sha256 '67acc5ada9b5245cda7da04456bc18ad6e9b49dbdcb1e2752ce988d4d3607b35'\n\n url \"https://github.com/nulloy/nulloy/releases/download/#{version}/Nulloy-#...
ruby
chosen
[ { "from": "system", "value": "Add Ansible event target type into event_type.\n\nAdd Ansible event target type into event_type to distinguish the event from different event targets.\nNo need to repeat event.changes in message to reduce the event object's size.\n" }, { "from": "human", "value": "m...
ruby
chosen
[ { "from": "human", "value": "Add the ship graphics class.\n\nThis class will take care for the ship drawing.\n" }, { "from": "gpt", "value": "module Asteroids\n class ShipGraphics < Component\n\n def initialize(game_object)\n super(game_object)\n @image = Gosu::Image.load_tiles($wi...
ruby
chosen
[ { "from": "system", "value": "Rename Dims -> Measurb. Add more specs.\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Dims do\n describe '.define' do\n before :example do\n clear_defined_inches\n end\n\n shared_context 'adding the Numeric method' do |method, o...
ruby
chosen
[ { "from": "system", "value": "Spec: Remove module_inclusion, it is a deperecated method.\n" }, { "from": "human", "value": "# Include only Rspec's active record functionalities\nrequire 'rspec/rails/extensions/active_record/base'\nrequire 'rspec/rails/adapters'\nrequire 'rspec/rails/matchers/be_...
ruby
chosen
[ { "from": "system", "value": "Complete url is not needed\n" }, { "from": "human", "value": "module SlackHelpers\n def create_atmos\n slack = slack_omniauth_hash_for_atmos\n options = {\n slack_user_id: slack.info.user_id,\n slack_user_name: slack.info.name,\n slack_team_id:...
ruby
chosen
[ { "from": "system", "value": "Add a spec for InvalidCommandError\n" }, { "from": "human", "value": "require \"spec_helper\"\nrequire \"vimrunner/errors\"\n\nmodule Vimrunner\n describe NoSuitableVimError do\n it \"has a useful message\" do\n expect {\n raise NoSuitableVimError\n ...
ruby
chosen
[ { "from": "human", "value": "Add a CocoaPods podspec for a future 3.0.0 release.\n" }, { "from": "gpt", "value": "Pod::Spec.new do |s|\n s.name = 'Reachability'\n s.version = '3.0.0'\n s.license = 'BSD'\n s.platform = :ios\n s.homepage = 'https://github.com/tonymil...
ruby
chosen
[ { "from": "system", "value": "Update delete_all usage to fix deprecation\n" }, { "from": "human", "value": "class Friendship < ApplicationRecord\n belongs_to :person\n belongs_to :friend, class_name: 'Person', foreign_key: 'friend_id'\n belongs_to :site\n\n scope_by_site_id\n\n validates :p...
ruby
chosen
[ { "from": "system", "value": "Clean up namespaces a bit\n" }, { "from": "human", "value": "require 'exercism'\nrequire 'sinatra/petroglyph'\nrequire 'will_paginate'\nrequire 'will_paginate/active_record'\n\nrequire 'app/presenters/workload'\nrequire 'app/presenters/profile'\nrequire 'app/present...
ruby
chosen
[ { "from": "system", "value": "Handle special case when function arg doesn't have a name\n" }, { "from": "human", "value": "require 'nokogiri'\nrequire 'json'\n\n# TODO:\n# 1. Verify RubyMotion is installed\n# 2. Get latest BridgeSupport folder\n# 3. Get all files inside folder\n# 4. Process each...
ruby
chosen
[ { "from": "system", "value": "Add test for ssl puma\n" }, { "from": "human", "value": "require 'spec_helper'\nmodule Formaggio\n describe PumaConfig, \"#initialize\" do\n def dummy_path\n @dummy_path ||= File.expand_path(\"../../dummy\", __FILE__)\n end\n\n it \"returns correct se...
ruby
chosen
[ { "from": "system", "value": "Fix QA spec tests for checkout\n" }, { "from": "human", "value": "require_relative '../../../lib/gitlab/build/qa.rb'\nrequire 'chef_helper'\n\ndescribe Build::QA do\n describe 'clone gitlab repo' do\n it 'calls the git command' do\n allow(Build::Info).to re...
ruby
chosen
[ { "from": "human", "value": "Add test of CourseHelper methods.\n" }, { "from": "gpt", "value": "require 'rails_helper'\n\ndescribe CourseHelper, :type => :helper do\n describe '.contribution_link' do\n it \"should return a link to a user's contributions page\" do\n user = build(:user)\n...
ruby
chosen
[ { "from": "system", "value": "Fix typo in the spec file\n" }, { "from": "human", "value": "require \"spec_helper\"\n\ndescribe Ruboty::Adapters::Shell do\n before do\n Ruboty.logger.stub(:info)\n end\n\n let(:adapter) do\n described_class.new(robot)\n end\n\n let(:robot) do\n Rubot...
ruby
chosen
[ { "from": "system", "value": "Cover all untested methods in Queue.\n" }, { "from": "human", "value": "require path('containers/queue')\n\nRSpec.describe(Todo::Containers::Queue) do\n\n before(:each) do\n @sut = Todo::Containers::Queue.new(2)\n end\nend\n" }, { "from": "gpt",...
ruby
chosen
[ { "from": "human", "value": "Add few unit tests for Caca::Display\n\ngit-svn-id: 3f9eced0add15b5a9fa491ea3f7f263c10f60fd6@2297 92316355-f0b4-4df1-b90c-862c8a59935f\n" }, { "from": "gpt", "value": "require 'test/unit'\nrequire 'caca'\n\nclass TC_Canvas < Test::Unit::TestCase\n def test_create\...
ruby
chosen
[ { "from": "system", "value": "Complete test for geolocation error alert\n" }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe 'Showing restaurants', js: true do\n let!(:user) { User.create!(name: 'Matt', email: 'matt@matt.com', password: 'password') }\n let!(:group1) { Group.cr...
ruby
chosen
[ { "from": "human", "value": "Add system tests for Admin Flash\n" }, { "from": "gpt", "value": "require 'rails_helper'\n\nRSpec.describe 'Admin Flashes', type: :system do\n let(:user) { create(:user, admin: true) }\n\n before do\n sign_in(user)\n end\n\n context 'when creating a new admin ...
ruby
chosen
[ { "from": "system", "value": "Add support for multiple rules per line.\n" }, { "from": "human", "value": "module Reunion\n\n class RulesReporter\n\n def initialize(engine)\n @rules = engine.rules\n end\n\n\n def by_line_number(filename)\n Hash[@rules.map do |r|\n trace...
ruby
chosen
[ { "from": "system", "value": "Modify user_id call in query factory\n" }, { "from": "human", "value": "FactoryGirl.define do\n factory :user do\n \tsequence(:username) { |n| \"user#{n}\"}\n sequence(:email) {|n| \"email#{n}@gmail.com\" }\n password \"password\"\n end\n \n factory :flue...
ruby
chosen
[ { "from": "system", "value": "Switch to 1.8 hash syntax\n" }, { "from": "human", "value": "FactoryGirl.define do\n factory :animal do\n name \"Fred\"\n species \"Elephant\"\n color \"gray\"\n end\n\n factory :car do\n name \"Betsy\"\n color \"white\"\n year 1984\n end\n\n ...
ruby
chosen
[ { "from": "system", "value": "Change to coerce values into array type\n" }, { "from": "human", "value": "# encoding: utf-8\n\nmodule TTY\n class Prompt\n class AnswersCollector\n # Initialize answer collector\n #\n # @api public\n def initialize(prompt, options = {})\n ...
ruby
chosen
[ { "from": "system", "value": "FIX bad podspec version number\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'UINavigationControllerWithCompletionBlock'\n s.version = '0.0.6'\n s.requires_arc = true\n s.author = {\n 'Morissard...
ruby
chosen
[ { "from": "system", "value": "Add a few tweaks to the cotn email process\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nclass CotnEmailController < ApplicationController\n before_action :set_users\n\n def new\n @message = Message.new\n @message.subject = 'Call for Vo...
ruby
chosen
[ { "from": "system", "value": "Save Stripe customer to the user\n\nAnd don't recreate it if we already have one.\n" }, { "from": "human", "value": "class SupportersController < ApplicationController\n before_filter :authenticate_user!\n\n def new\n end\n\n def create\n @price = params[:pri...
ruby
chosen
[ { "from": "system", "value": "Create :updated event on Post update\n" }, { "from": "human", "value": "module Persister\n class PostPersister\n attr_accessor :post\n\n def initialize(post)\n @post = post\n end\n\n def save\n ::ActiveRecord::Base.transaction do\n post...
ruby
chosen
[ { "from": "system", "value": "Fix errors for logged out angular votes\n" }, { "from": "human", "value": "class API::VotesController < API::RestfulController\n include UsesDiscussionReaders\n\n alias :update :create\n\n def my_votes\n @votes = current_user.votes.most_recent.includes({motion...
ruby
chosen
[ { "from": "system", "value": "Add json and xml output in campaigns controller\n" }, { "from": "human", "value": "class CampaignsController < ApplicationController\n expose(:campaigns)\n expose(:campaign, attributes: :campaign_params)\n\n before_filter :authenticate_user!\n respond_to :html\n...
ruby
chosen
[ { "from": "system", "value": "Add show, update & destroy actions\n" }, { "from": "human", "value": "class EmployeesController < ApplicationController\n def index\n @employees = Employee.all\n end\n\n def new\n end\n\n def create\n @employee = Employee.new(employee_params)\n if @emp...
ruby
chosen
[ { "from": "system", "value": "Increment version⇒ 0.1.3 enabling setting override\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'event_store-client-http'\n s.summary = 'HTTP Client for EventStore'\n s.version = '0.1.2'\n s.authors = [''...
ruby
chosen
[ { "from": "system", "value": "Set a cache time for 10 minutes. We might change this later, but this shouldn't be noticeable to the user\n" }, { "from": "human", "value": "class Api::Public::ChannelsController < Api::BaseController\n def identity\n builder = JsonBuilders::IdentityJsonBuilder....
ruby
chosen
[ { "from": "system", "value": "Fix MembersController inherited class to be Forem::Admin::BaseController\n" }, { "from": "human", "value": "module Forem\n class Admin::MembersController < ApplicationController\n\n def create\n user = Forem.user_class.where(Forem.autocomplete_field => para...
ruby
chosen
[ { "from": "system", "value": "Add data hook to admin tab for easy hookin'\n" }, { "from": "human", "value": "Deface::Override.new(\n virtual_path: 'spree/layouts/admin',\n name: 'add_return_requests_to_admin_tab',\n insert_top: '[data-hook=\"admin_tabs\"]',\n text: '\n <li class=\"tab-with-...
ruby
chosen
[ { "from": "system", "value": "Add OverseasTerritoriesImporter to importer test\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass TestWdpaImporter < ActiveSupport::TestCase\n test '.import creates a WDPA Release, imports the protected areas from\n it, generates downloads for th...
ruby
chosen
[ { "from": "system", "value": "Add id to account representer.\n" }, { "from": "human", "value": "require 'roar/decorator'\n\nclass AccountRepresenter < Roar::Decorator\n include Roar::JSON\n include Roar::JSON::HAL\n\n property :has_payment_account\n\n link :payment_portal do\n represented...
ruby
chosen
[ { "from": "system", "value": "Make sure nobody tries to install Bashcov on obsolete Rubies\n\n[References #19]\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nlib = File.expand_path(\"../lib\", __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire \"bash...
ruby
chosen
[ { "from": "system", "value": "Disable Webrick's access log to make tests quieter\n" }, { "from": "human", "value": "module DockTest\n module DSL\n\n attr_reader :url\n # sets the test url\n # also creates a new webrick server process\n def url=(value)\n @url = value\n\n if...
ruby
chosen
[ { "from": "human", "value": "Add comment out tests for Trello::Member.update!\n\nCurrent trello update API return permission require message. Maybe, we can try it in future\n" }, { "from": "gpt", "value": "# require 'spec_helper'\n\n# RSpec.describe 'Trell::Member.update!' do\n# include Integr...
ruby
chosen
[ { "from": "system", "value": "Change where content images are saved.\n" }, { "from": "human", "value": "class ContentImageUploader < CarrierWave::Uploader::Base\n include CarrierWave::RMagick\n\n storage :file\n\n def filename\n @name ||= \"#{secure_token}.#{file.extension.downcase}\" if o...
ruby
chosen
[ { "from": "system", "value": "Update rack requirement from >= 1.5.0, ~> 1.5 to >= 1.5.0, < 3.0\n\nUpdates the requirements on [rack](https://github.com/rack/rack) to permit the latest version.\n- [Release notes](https://github.com/rack/rack/releases)\n- [Changelog](https://github.com/rack/rack/blob/master/C...
ruby
chosen
[ { "from": "system", "value": "Use finish_timeout constant rather than 15s in timer_game_end\n" }, { "from": "human", "value": "module PugBot\n # The plugin to be imported into a cinch bot instance that actually interprets\n # the users input, tracks players and controls nearly all running of t...
ruby
chosen
[ { "from": "system", "value": "Fix default filename extension for the kyotocabinet adapter.\n" }, { "from": "human", "value": "module Anemone\n module Storage\n\n def self.Hash(*args)\n hash = Hash.new(*args)\n # add close method for compatibility with Storage::Base\n class << ...
ruby
chosen
[ { "from": "system", "value": "Fix another deprecated rake syntax after move to rake 0.9" }, { "from": "human", "value": "require 'asset_hat/tasks/css'\nrequire 'asset_hat/tasks/js'\n\nnamespace :asset_hat do\n\n desc 'Minifies all CSS and JS bundles'\n task :minify, :needs => :environment do\n...
ruby
chosen
[ { "from": "human", "value": "Remove the database.yml hack; Make it possible to not have a database.yml\n" }, { "from": "gpt", "value": "module Moltrio\n module Config\n\n class DatabaseYmlStorage < Storage\n attr_reader :real_storage, :environment\n\n def initialize(storage, enviro...
ruby
chosen
[ { "from": "system", "value": "Use upcase environment variable names\n" }, { "from": "human", "value": "namespace :cartodb do\n namespace :db do\n desc <<-DESC\nSetup cartodb database and creates a new user from environment variables:\n - ENV['email']: user e-mail\n - ENV['password']: user ...
ruby
chosen
[ { "from": "system", "value": "Add a few default settings\n" }, { "from": "human", "value": "require \"tl_ember_edit/engine\"\n\nmodule TlEmberEdit\nend\n" }, { "from": "gpt", "value": "require \"tl_ember_edit/engine\"\n\nmodule TlEmberEdit\n\n # Override these settings in an initial...
ruby
chosen
[ { "from": "system", "value": "Add Maintain Test Schema Test\n" }, { "from": "human", "value": "ENV['RAILS_ENV'] ||= 'test'\nrequire File.expand_path('../../config/environment', __FILE__)\nabort(\"The Rails environment is running in production mode!\") if Rails.env.production?\nrequire 'spec_help...
ruby
chosen
[ { "from": "system", "value": "Clarify comments for feed job" }, { "from": "human", "value": "# To create outside of Rails, insert into the `delayed_jobs` table:\n#\n# handler: {see example.yml}\n# run_at: {current_time}\n#\n# Note: raw_message for the handler must have line endings \"\\n...
ruby
chosen
[ { "from": "system", "value": "Remove unnecessary comment from VirusScanner class\n\nNow that we are explicitly handling VirusScanner::InfectedFile\nexceptions in VirusScanWorker#perform, I think this comment is less\nuseful and just clutters up the code.\n" }, { "from": "human", "value": "requir...
ruby
chosen
[ { "from": "system", "value": "Call width and height methods in initialize\n" }, { "from": "human", "value": "class Map\n\n def initialize(window, mapfile)\n @window = window\n @tileset = Gosu::Image.load_tiles(window, 'media/32x32diagonal_lines.png',\n ...
ruby
chosen
[ { "from": "system", "value": "Drop task now recreates tmp dir\n" }, { "from": "human", "value": "require 'pact_broker/tasks'\n\nPactBroker::DB::MigrationTask.new do | task |\n require 'pact_broker/db'\n task.database_connection = DB::PACT_BROKER_DB\nend\n\n\nnamespace :db do\n desc 'drop and ...
ruby
chosen
[ { "from": "system", "value": "Remove unnecessary call to `self`\n" }, { "from": "human", "value": "require_relative \"library\"\nrequire \"yaml\"\n\nmodule Franklin\n class Config\n DEFAULT_CONFIG_FILE = File.join(Dir.home, \".franklin\").freeze\n attr_reader :libraries\n\n def initial...
ruby
chosen
[ { "from": "human", "value": "Add integration test for user login\n" }, { "from": "gpt", "value": "require 'test_helper'\n\nclass UsersLoginTest < ActionDispatch::IntegrationTest\n test 'login with invalid information' do\n get login_path\n assert_template 'sessions/new'\n post login_pa...
ruby
chosen
[ { "from": "system", "value": "Fix document collection membership in speed tagger\n\nAlso eager load document collection groups to avoid an N+1 query\n" }, { "from": "human", "value": "module Admin::DocumentCollectionHelper\n def document_collection_select_options(edition, user, selected_ids)\n ...
ruby
chosen
[ { "from": "system", "value": "Use dummy app ApplicationRecord in test\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'test_helper'\nrequire 'simple_drilldown/helper'\n\nmodule SimpleDrilldown\n class HelperTest < ActiveSupport::TestCase\n include Helper\n\n te...
ruby
chosen
[ { "from": "system", "value": "Handle weird postgresql string concat error.\n" }, { "from": "human", "value": "module Scholarship\n module RoleRequest\n extend ActiveSupport::Concern\n \n included do\n const_set 'EVENTS', [:accept, :deny, :change_roles]\n \n scope :order_by...
ruby
chosen
[ { "from": "system", "value": "Add a meaningful comment for tracker end\n" }, { "from": "human", "value": "class Tracksperanto::Middleware::Base\n include Tracksperanto::Casts\n \n def initialize(exporter)\n @exporter = exporter\n end\n \n # Called on export start\n def start_export( im...
ruby
chosen
[ { "from": "system", "value": "Fix incorrect HOST request header causing 400 errors\n\nWithout this patch nginx returns a 400 error response for requests that\notherwise are 200 OK over TCP connections. The specific error message\nis:\n\n 2014/11/25 21:47:24 [info] 19036#0: *1 client sent invalid host\n ...
ruby
chosen
[ { "from": "system", "value": "Update podspec to use most recent version of RxSwift\n\nThis will allow it to take advantage of swift 3\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"RxSugar\"\n s.version = \"0.0.10\"\n s.summary = \"Simple RxSwift extens...
ruby
chosen
[ { "from": "system", "value": "Add a 1.8 compatibility shim.\n" }, { "from": "human", "value": "module WashOut\n # This class is a Rack middleware used to route SOAP requests to a proper\n # action of a given SOAP controller.\n class Router\n def initialize(controller_name)\n @controll...
ruby
chosen
[ { "from": "system", "value": "Add a field to regional sweden\n" }, { "from": "human", "value": "module Billogram\n class RegionalSweden < Resource\n attr_accessor :rotavdrag, :rotavdrag_personal_number, :rotavdrag_description, :reversed_vat\n end\nend\n" }, { "from": "gpt", "val...
ruby
chosen
[ { "from": "system", "value": "Change to mock out undefined transition.\n" }, { "from": "human", "value": "# encoding: utf-8\n\nmodule FiniteMachine\n class UndefinedTransition\n include Threadable\n\n def initialize(name)\n self.name = name\n end\n\n def cancelled?\n false...
ruby
chosen
[ { "from": "system", "value": "Improve module namespacing for ResponseDecorator\n" }, { "from": "human", "value": "module SolidusShipwire::Response\n def resource\n body['resource'].with_indifferent_access\n end\n\n def to_sku_id_hashmap\n Hash[resource[:items].map do |v|\n [v[:reso...
ruby
chosen
[ { "from": "system", "value": "Replace playlist search with api search\n\nPlaylist search now requires authentication, so I'm replacing it with\nthe ajax api search. Currently I'm sending in the api key used in their\nexample on the documentation page, we'll see how long that lasts.\n" }, { "from": "...
ruby
chosen
[ { "from": "system", "value": "Refactor outer anonymous function into a do block\n" }, { "from": "human", "value": "# VariableDuplicatesValidator\n#\n# This validator is designed for especially the following condition\n# - Use `accepts_nested_attributes_for :xxx` in a parent model\n# - Use `valid...
ruby
chosen
[ { "from": "system", "value": "Use the latest version of ActiveMQ\n" }, { "from": "human", "value": "#\n# Cookbook Name:: activemq\n# Attributes:: default\n#\n# Copyright 2009-2015, Chef Software, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this...
ruby
chosen
[ { "from": "system", "value": "Add a bit more to description of gem\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'breaktime/version'\n\nGem::Specification.new do |gem|\n ...
ruby
chosen
[ { "from": "system", "value": "Raise Error when Will Paginate Gems not installed.\n" }, { "from": "human", "value": "# Include hook code here\nrequire 'somatic_link_renderer'" }, { "from": "gpt", "value": "# Include hook code here\nraise \"You Should install will_paginate gems or plug...
ruby
chosen
[ { "from": "system", "value": "Add a default architecture fact to stop tests failing.\n\nWe're moving to Puppet 4 (eventually) and enabling `strict_variables`\nis one part of this. Adding this as a global default fixes issues in\na range of module tests.\n" }, { "from": "human", "value": "require...
ruby
chosen
[ { "from": "system", "value": "Fix redirect loops for some github users" }, { "from": "human", "value": "class GithubUser < ActiveRecord::Base\n has_many :github_contributions\n has_many :github_repositories, primary_key: :github_id, foreign_key: :owner_id\n\n scope :visible, -> { where(hidden...
ruby
chosen
[ { "from": "system", "value": "Remove the my_orcid attribute if it is present\n" }, { "from": "human", "value": "require_dependency 'libra2/lib/serviceclient/orcid_access_client'\n\nmodule UpdateOrcidBehavior\n\n extend ActiveSupport::Concern\n\n included do\n before_action :save_orcid...
ruby
chosen
[ { "from": "human", "value": "Add spec for style guide\n\nThis would catch if the page fails to render\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe \"Style guide\", type: :feature do\n stub_authorization!\n\n it \"should render successfully\" do\n visit \"/admin/style_g...
ruby
chosen
[ { "from": "system", "value": "Use the latest page speed module\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "from": "human", "value": "#\n# Cookbook Name:: nginx\n# Recipe:: pagespeed_module\n#\ndefault['nginx']['pagespeed']['version'] = '1.8.31.4'\ndefa...
ruby
chosen
[ { "from": "system", "value": "Use README.md instead of .rdoc\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib/', __FILE__)\n$:.unshift lib unless $:.include?(lib)\nrequire 'capissh/version'\n\nGem::Specification.new do |s|\n s.name = \"capissh\"\n s....
ruby
chosen