conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Remove unneeded files from gemspec.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |s|\n s.name = 'normalize-scss'\n\n s.summary = %q{The Sass/Compass version of Normalize.css}\n s.description = %q{This is the...
ruby
chosen
[ { "from": "system", "value": "Make Feast card selection clearer.\n" }, { "from": "human", "value": "module Dominion\n module Engine\n class Feast < Action\n \n def cost() 4 end\n def to_s() 'Feast' end\n \n def play(turn)\n card = turn.select_card turn.game.bu...
ruby
chosen
[ { "from": "system", "value": "Fix bug in migration 003 not running from within ghtorrent\n\nThe DB constant is only defined in the sequel cmd-line tool\n" }, { "from": "human", "value": "require 'sequel'\n\nSequel.migration do\n up do\n\n puts(\"Adding organization descriminator field to tab...
ruby
chosen
[ { "from": "human", "value": "Complete model relation template file\n" }, { "from": "gpt", "value": "public class <%= model.relation_name %>: Relation<<%= model.name %>> {\n override init() {\n super.init()\n self.select = \"SELECT \\(<%= model.name %>.tableName.unwrapped).* FROM...
ruby
chosen
[ { "from": "system", "value": "Update spec to conform new Aitch API.\n" }, { "from": "human", "value": "require \"spec_helper\"\n\ndescribe PagSeguro::PaymentRequest::Response do\n context \"when payment request is created\" do\n def xml_response(path)\n response = double(\n body:...
ruby
chosen
[ { "from": "system", "value": "Fix FieldUsage analyzer method args\n" }, { "from": "human", "value": "# frozen_string_literal: true\nmodule GraphQL\n module Analysis\n module AST\n class FieldUsage < Analyzer\n def initialize(query)\n super\n @used_fields = Set.n...
ruby
chosen
[ { "from": "system", "value": "Add support for exporting smart answers content\n\nThis adds support for the new `smart_answer` schema when exporting\ntaxons of mainstream content as CSV. Previously smart answers were\nrepresented by the transaction schema. This ensures the functionality\ndoesn't break when S...
ruby
chosen
[ { "from": "system", "value": "Remove RMagick, since resizing no longer necessary.\n" }, { "from": "human", "value": "#encoding: utf-8\n\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nrequire 'mill/version'\n\nGem::Specification.new do |s|\...
ruby
chosen
[ { "from": "system", "value": "Update gemspec author since nf took maintainership\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n\nlib = File.expand_path('../lib/', __FILE__)\n$:.unshift lib unless $:.include?(lib)\n\nrequire 'moob'\n\nGem::Specification.new do |s|\n s.name ...
ruby
chosen
[ { "from": "system", "value": "Add development dependency for running rake\n" }, { "from": "human", "value": "\n\n# ecoding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'chinese_faker/version'\n\nGem::Specification.new do |sp...
ruby
chosen
[ { "from": "system", "value": "Add friendly name to Omnibus project config\n" }, { "from": "human", "value": "#\n# Copyright 2015 YOUR NAME\n#\n# All Rights Reserved.\n#\n\nname \"delivery-cli\"\nmaintainer \"Chef Software, Inc.\"\nhomepage \"http://chef.io\"\n\n# Defaults to C:\\chef\\delivery-c...
ruby
chosen
[ { "from": "system", "value": "Update podspec to point to forked repo\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"Charts\"\n s.version = \"2.2.3\"\n s.summary = \"ios-charts is a powerful & easy to use chart library for iOS, tvOS and OSX\"\n s.homepage = \"https://git...
ruby
chosen
[ { "from": "system", "value": "Update Phoenix Slides.app to 1.4.0\n" }, { "from": "human", "value": "cask :v1 => 'phoenix-slides' do\n version '1.3.1'\n sha256 '6e5df9e586bb33b79249d9917f99f50395f255b85bf39c5fafca64fe66aef758'\n\n url \"http://blyt.net/phxslides/phoenix-slides-#{version.delete...
ruby
chosen
[ { "from": "system", "value": "Upgrade Thunderbird (Japanese) to 38.3.0\n" }, { "from": "human", "value": "cask :v1 => 'thunderbird-ja' do\n version '38.2.0'\n sha256 '2014b6fac54d398f63c442cc531ddfa77b604ecd616a98e67b2197225135398b'\n\n url \"https://download.mozilla.org/?product=thunderbird-...
ruby
chosen
[ { "from": "system", "value": "Delete downloaded file after running complete\n\nThis line really has no effect on anything whatsoever, and I'm just\nadding it because I keep accidentally editing bots.rb instead of v2.rb\nin my development environment.\n\nAlso moved a line inside begin statement so everything...
ruby
chosen
[ { "from": "system", "value": "Update the Podspec to v3.0.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'DateRangePicker'\n s.version = '2.1'\n\n s.homepage = 'https://github.com/MrMage/DateRangePicker'\n s.summary ...
ruby
chosen
[ { "from": "system", "value": "Update podspec versino: 0.6.0 -> 0.6.1\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'POSRx'\n s.version = '0.6.0'\n s.license = 'MIT'\n s.summary = 'Utilities around ReactiveCocoa.'\n s.homepage = 'https://github...
ruby
chosen
[ { "from": "human", "value": "Add example script for UnpackedURI\n" }, { "from": "gpt", "value": "require 'pathname'\nrequire 'tmpdir'\nrequire 'epub/parser'\nrequire 'epub/ocf/physical_container/unpacked_uri'\n\nEPUB_URI = URI.parse(ARGV.shift)\nDOWNLOAD_DIR = Pathname.new(ARGV.shift || Dir.mktm...
ruby
chosen
[ { "from": "system", "value": "Add the ability to differentiate native vs synthesized events when running specs.\n" }, { "from": "human", "value": "require File.expand_path(\"../spec_helper\", __FILE__)\n\nWatirSpec.implementation do |imp|\n name = :webdriver\n browser = (ENV['WATIR_WEBDRIVE...
ruby
chosen
[ { "from": "system", "value": "Check that x and y respond with a signed integer between -255 and 255.\nRenamed @object -> @mbp" }, { "from": "human", "value": "require 'minitest/pride'\nrequire 'minitest/autorun'\nrequire 'minitest/spec'\n\nrequire File.dirname(__FILE__) + '/../lib/kinetosis'\n\n...
ruby
chosen
[ { "from": "system", "value": "Use xdescribe to avoid confusion on test\n" }, { "from": "human", "value": "# xdescribe makes all test cases under this scenario go into skip mode\ndescribe \"Skip 101\" do\n \n # appending 'x' on a test case skips its execution\n xit \"Assertions on equali...
ruby
chosen
[ { "from": "system", "value": "Increase version number to 1.0.1\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'Verso'\n s.version = '1.0.0'\n s.summary = 'A multi-paged image viewer for iOS'\n\n s.description = <<-DESC\nVerso makes it ea...
ruby
chosen
[ { "from": "system", "value": "Fix merge conflicts, add author\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'getinline/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "human", "value": "Set to proper Github location\n" }, { "from": "gpt", "value": "# Generated by jeweler\n# DO NOT EDIT THIS FILE DIRECTLY\n# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command\n# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |s|\n s.name = %q...
ruby
chosen
[ { "from": "system", "value": "Fix voting from game page.\n" }, { "from": "human", "value": "class GamesController < ApplicationController\n def index\n @days = Game.scheduled.display_order.group_by{|x| x.scheduled_at.to_date }\n end\n\n def show\n @game = Game.find(params[:id])\n @co...
ruby
chosen
[ { "from": "system", "value": "Add authenticate method and post route\n" }, { "from": "human", "value": "class LoginController < ApplicationController\n get '/' do\n slim :'login/login'\n end\nend\n" }, { "from": "gpt", "value": "class LoginController < ApplicationController\n g...
ruby
chosen
[ { "from": "system", "value": "Reimplement APICache but heavily reduce the cache time\n" }, { "from": "human", "value": "require 'net/http'\nrequire 'json'\n\nmodule HttpRequest\n def self.json(key:, uri_string:)\n JSON.parse(get_request(key: key, uri_string: uri_string))\n end\n\n def self...
ruby
chosen
[ { "from": "system", "value": "Load crops from search, without hitting the database\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nclass CropSearchService\n # Crop.search(string)\n def self.search(query, page: 1, per_page: 12, current_member: nil)\n search_params = {\n ...
ruby
chosen
[ { "from": "system", "value": "Remove Hashie version in gemspec" }, { "from": "human", "value": "Gem::Specification.new do |s|\n \n s.name = \"discogs-wrapper\"\n s.version = \"2.1.1\"\n s.date = \"2015-01-07\"\n s.summary = \"Discogs::Wrapper is a full wrapper for the http://www.discogs.com...
ruby
chosen
[ { "from": "system", "value": "[CocoaPods] Update podspec for 0.6 version\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"SwiftCarousel\"\n s.version = \"0.5\"\n s.summary = \"Infinite carousel of options.\"\n s.description = \"SwiftCaro...
ruby
chosen
[ { "from": "system", "value": "Update Beyond Compare.app to v4.0.5.19480 & add name\n" }, { "from": "human", "value": "cask :v1 => 'beyond-compare' do\n version '4.0.4.19477'\n sha256 'f37569d5f116ac76607e4c0df6081cf93d8c16ac61c4350e8e9495cc89714ceb'\n\n url \"http://www.scootersoftware.com/BC...
ruby
chosen
[ { "from": "system", "value": "Update podspec to use a dependency on the iOS SDK instead of the frameworks.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"DSAWSOperations\"\n s.version = \"0.5\"\n s.summary = \"Small framework to make the AWS IOS SDK les...
ruby
chosen
[ { "from": "system", "value": "Update pod spec for 1.0.1.\n\nSigned-off-by: Zachary Waldowski <f6cb034ae1bf314d2c0261a7a22e4684d1f74b57@gmail.com>\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'BlocksKit'\n s.version = '1.0.0'\n s.license = 'MIT'\n s.summary = 'The...
ruby
chosen
[ { "from": "system", "value": "Remove Unused expense types from seed data\n\nThe two Cost Judge expense types in the seed data are not used in real life, and cannot be migrated\nas part of the expense type refactor. This PR removes them from the seed data so that demo data claims\nusing them is not created....
ruby
chosen
[ { "from": "system", "value": "Add some comments to Tradera module\n" }, { "from": "human", "value": "require 'open-uri'\nrequire 'savon'\n\nclass Tradera\n\n # Credentials for Campanja test app\n AppId = ENV['APP_ID']\n ServiceKey = ENV['SERVICE_KEY']\n PublicKey = ENV['PUBLIC_KEY']\n Domai...
ruby
chosen
[ { "from": "human", "value": "Add GPGTools 2013.05.20\n- tweaked for new uninstall syntax\n\nCloses #350\n\nSigned-off by: Fernando Paredes <nanoid.xd@gmail.com>\n" }, { "from": "gpt", "value": "class Gpgtools < Cask\n url 'https://s3.amazonaws.com/gpgtools/GPGTools-2013.5.20.dmg'\n homepage 'h...
ruby
chosen
[ { "from": "system", "value": "Update spec to version 2.1.11\n" }, { "from": "human", "value": "\nPod::Spec.new do |s|\n s.name = \"LightRoute\"\n s.version = \"2.1.10\"\n s.summary = \"LightRoute is easy transition between view controllers and support many popylar arhitectur...
ruby
chosen
[ { "from": "system", "value": "Support activemodel up to 5.1.x\n\nPreviously we were capped at 5.0.0; support patch versions in the 5.0\nline as well as the 5.1 line.\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LO...
ruby
chosen
[ { "from": "system", "value": "Add the scenario to add a new user\n" }, { "from": "human", "value": "require 'rails_helper'\n\nfeature \"Manage users\", type: :feature do\n scenario \"Show the list of users\", js: true do\n User.create!(name: \"Guirec Corbel\", age: 29)\n visit users_path\...
ruby
chosen
[ { "from": "system", "value": "Fix migration of notified users\n" }, { "from": "human", "value": "class CreateNotifications < ActiveRecord::Migration\n def change\n create_table :notifications do |t|\n t.references :notifiable, polymorphic: true, index: true\n t.references :user, in...
ruby
chosen
[ { "from": "system", "value": "Remove 'name' and 'using' from index\n\nRemove 'name' and 'using' from asset details index.\n" }, { "from": "human", "value": "class CreateAssetDetails < ActiveRecord::Migration[5.0]\n def change\n create_table :asset_details do |t|\n t.text :description\n...
ruby
chosen
[ { "from": "system", "value": "Deal with nil attirubtes on bill_address\n" }, { "from": "human", "value": "class SplitCustomersName < ActiveRecord::Migration[6.1]\n class SpreeAddress < ApplicationRecord\n end\n class Customer < ApplicationRecord\n belongs_to :bill_address, class_name: \"Sp...
ruby
chosen
[ { "from": "system", "value": "Fix factory for mulitple records.\n" }, { "from": "human", "value": "FactoryGirl.define do\n factory :ecm_tags_tag, class: Ecm::Tags::Tag do\n name 'foo'\n end\nend\n\n" }, { "from": "gpt", "value": "FactoryGirl.define do\n factory :ecm_tags_tag, c...
ruby
chosen
[ { "from": "system", "value": "Revert \"Updated gemspec as per Zoocasa standards\"\n\nThis reverts commit 289303be8582719fcf92700081328a592975950d.\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"webhookr/version\"\n\n...
ruby
chosen
[ { "from": "human", "value": "Add spec for proposition body bug.\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe Proposition do\n it \"can have a large body\" do\n body = \"a\" * 150_000\n\n prop = Proposition.new(:body => body)\n prop.save!\n\n prop.body.should ==...
ruby
chosen
[ { "from": "system", "value": "Add rake to dev dependencies (for Travis)\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'utf8-cleaner/version'\n\nGem::Specification.new do |...
ruby
chosen
[ { "from": "system", "value": "Remove OS X support (feel free to fork your own)\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"Forecastr\"\n s.version = \"0.2.3\"\n s.summary = \"A simple, asynchronous Objective-C wrapper for the Forecast.io API.\"\n s....
ruby
chosen
[ { "from": "system", "value": "Remove \"circular require considered harmful\" warning\n" }, { "from": "human", "value": "require 'spec_helper'\n\nshared_examples 'a numerical submatcher' do\n it 'implements the with_message method' do\n expect(subject).to respond_to(:with_message).with(1).arg...
ruby
chosen
[ { "from": "system", "value": "Remove code supporting cucumber 3 from simplecov set-up\n" }, { "from": "human", "value": "$LOAD_PATH.unshift File.expand_path(\"../../lib\", __dir__)\n\n# Has to be the first file required so that all other files show coverage information\nrequire \"simplecov\" unl...
ruby
chosen
[ { "from": "system", "value": "Increase capybara default wait time.\n" }, { "from": "human", "value": "# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.\n# It is recommended to regenerate this file in the future when you upgrade to a\n# newer version of cucumber-rail...
ruby
chosen
[ { "from": "system", "value": "Revert \"Add support for tvOS\"\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"Locksmith\"\n s.version = \"2.0.2\"\n s.summary = \"Locksmith is a powerful, protocol-oriented library for working with the keychain...
ruby
chosen
[ { "from": "human", "value": "Create a new subscription column in the ext_management_systems table.\nThis is part of the solution for BZ:\n\nhttps://bugzilla.redhat.com/show_bug.cgi?id=1318356\n" }, { "from": "gpt", "value": "class AddSubscriptionToExtManagementSystem < ActiveRecord::Migration[5....
ruby
chosen
[ { "from": "human", "value": "Add missing index for Mroonga\n\n* searcher_records.original_type\n* searcher_records.project_id\n" }, { "from": "gpt", "value": "class AddIndexToSearcherRecordsForMroonga < ActiveRecord::Migration\n def change\n if Redmine::Database.mysql?\n add_index(:sear...
ruby
chosen
[ { "from": "system", "value": "Handle if file is missing\n" }, { "from": "human", "value": "require \"dotenv\"\nrequire \"dotenv/parser\"\nrequire \"dotenv/configuration/version\"\n\nmodule Dotenv\n module Configuration\n def configure(*args)\n envfile, settings = nil, nil\n case ar...
ruby
chosen
[ { "from": "system", "value": "Resolve offenses from new RuboCop\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'forwardable'\n\nclass Filewatcher\n # Class for snapshots of file system\n class Snapshot\n extend Forwardable\n def_delegators :@data, :[], :each,...
ruby
chosen
[ { "from": "system", "value": "Refactor to be more simple\n" }, { "from": "human", "value": "class Chatroid\n module Adapter\n extend self\n\n def find(service_name)\n const_get(service_name)\n rescue NameError\n nil\n end\n end\nend\n" }, { "from": "gpt", "val...
ruby
chosen
[ { "from": "system", "value": "fix: Use blank instead of empty since nil doesn't have empty?\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'sequel'\nrequire 'ditty/services/logger'\n\nif defined? DB\n Ditty::Services::Logger.instance.warn 'Database connection alread...
ruby
chosen
[ { "from": "human", "value": "Add pomodoro like script, fun and profit\n" }, { "from": "gpt", "value": "#!/usr/bin/env ruby\n\nrequire 'growl'\nmodule Tomato\n PERIOD = 25 * 60\n\n class Log\n FILE_PATH = '~/.tomato.log'\n\n def initialize\n @file = File.open(File.expand_path(FILE_PA...
ruby
chosen
[ { "from": "system", "value": "Create Array that replaces even numbers with even\n" }, { "from": "human", "value": "class OddEven\n def initialize (user_number)\n @user_number = user_number\n\nend\n\n def makearray\n numbers = 1.upto(@user_number).to_a\n\n\nend\nend" }, { "from": ...
ruby
chosen
[ { "from": "system", "value": "Remove string comparison and test based on required feature." }, { "from": "human", "value": "# encoding: utf-8\n\nmodule HireFire\n module Backend\n\n ##\n # Load the correct module (ActiveRecord, Mongoid or Redis)\n # based on which worker and backends a...
ruby
chosen
[ { "from": "system", "value": "Add require for Holidays Wrapper\n" }, { "from": "human", "value": "class HolidaysWrapper < Holidays\n # sm - reads every holiday in region, including informal, and returns a date or nil\n # the date range is for the 12 month period following now\n def self.find_...
ruby
chosen
[ { "from": "system", "value": "Add json_parser (for request parsing)\n" }, { "from": "human", "value": "require \"quickets/config\"\nrequire \"quickets/logger\"\n\n# Web framework\nrequire \"roda\"\nrequire \"quickets/available_printers\"\n\n# Interface to java lib\nrequire \"java\"\nrequire \"ja...
ruby
chosen
[ { "from": "system", "value": "Add bearer_token for publishing API authentication\n" }, { "from": "human", "value": "require 'gds_api/publishing_api_v2'\n\nmodule Services\n def self.publishing_api\n @publishing_api ||= GdsApi::PublishingApiV2.new(Plek.new.find('publishing-api'))\n end\nend\...
ruby
chosen
[ { "from": "system", "value": "Make sure action_dispatch is required\n" }, { "from": "human", "value": "require \"rambulance/version\"\nrequire \"rambulance/railtie\"\n\nmodule Rambulance\n\n mattr_reader :rescue_responses\n @@rescue_responses = {}\n\n mattr_reader :layout_name\n @@layout_nam...
ruby
chosen
[ { "from": "system", "value": "Fix JavaScript minification rake task\n" }, { "from": "human", "value": "namespace :js do\n desc \"Minify javascript src for production environment\"\n task :min => :environment do\n # list of files to minify\n libs = ['public/javascripts/prototype.js', \n ...
ruby
chosen
[ { "from": "system", "value": "Fix Protocol sends nil arg instead of no arg\n" }, { "from": "human", "value": "module Specjour\n class Printer < GServer\n include Protocol\n RANDOM_PORT = 0\n\n attr_reader :completed_workers\n attr_accessor :worker_size\n\n def initialize\n s...
ruby
chosen
[ { "from": "system", "value": "Rename parameter for the API\n\nDespite all the documentation I can find, using `gameid` consistently results in \r\n\r\n ArgumentError: The gameid supplied was not valid.\r\n\r\n`titleid` looks to be the older param name, but it still works." }, { "from": "human", ...
ruby
chosen
[ { "from": "system", "value": "Add tvOS to the Podfile." }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'Dwifft'\n s.version = '0.4'\n s.license = 'MIT'\n s.summary = 'Swift Diff'\n s.homepage = 'https://github.com/jflinter/Dwifft'\n s.social_media_url = 'http://twitter.com...
ruby
chosen
[ { "from": "system", "value": "Add device os version and resolution to display\n" }, { "from": "human", "value": "require 'thor'\n\nmodule AirPlayer\n class App < Thor\n desc 'play <URI|PATH> [-r|--repeat] [-s|--shuffle] [-d=|--device=]', 'Play video(URI[Podcast URI, YouTube] or Path[local vi...
ruby
chosen
[ { "from": "system", "value": "Define route methods using define_method instead.\n" }, { "from": "human", "value": "# This module handles all the methods that adds routes to our route array.\n# It has an array containing all the routes ordered by HTTP method.\nmodule Dolphy\n module Router\n ...
ruby
chosen
[ { "from": "system", "value": "Adjust in geocoder of invite when user click in key from email\n" }, { "from": "human", "value": "module InviteModule\n\n include GeocodedActions\n\n def create_user_from_invite(key)\n invite = Invite.where(key: key).first\n user = User.where(email: invite.e...
ruby
chosen
[ { "from": "system", "value": "Enable a gem client specific visitor in .get_chewy_clauses\n" }, { "from": "human", "value": "require_relative 'msfl_visitors/nodes'\nrequire_relative 'msfl_visitors/visitor'\nrequire_relative 'msfl_visitors/parsers/msfl_parser'\n\nmodule MSFLVisitors\n\n class << ...
ruby
chosen
[ { "from": "system", "value": "Update idea codestyle rules for react4j\n" }, { "from": "human", "value": "#\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 the License at\n#\n# ...
ruby
chosen
[ { "from": "system", "value": "Remove `collection_action` that has been placed here from a separate test in provided_poi\n" }, { "from": "human", "value": "ActiveAdmin.register Provider do\n\n menu :label => 'Anbieter', :parent => 'Premium'\n\n filter :name\n\n action_item(:upload_csv, :only =...
ruby
chosen
[ { "from": "system", "value": "Add upsertList action to Inventory Transfer\n" }, { "from": "human", "value": "module NetSuite\n module Records\n class InventoryTransfer\n include Support::Fields\n include Support::RecordRefs\n include Support::Records\n include Support::Ac...
ruby
chosen
[ { "from": "system", "value": "Fix error checking for rethinkdb 1.5\n\nCloses #6\n" }, { "from": "human", "value": "class NoBrainer::QueryRunner::WriteError < NoBrainer::QueryRunner::Middleware\n def call(env)\n @runner.call(env).tap do |result|\n # TODO Fix rethinkdb driver: Their class...
ruby
chosen
[ { "from": "system", "value": "Move ability to setup an omniauth sign to a dedicated method\n" }, { "from": "human", "value": "class UserInitializer\n attr_reader :authorization, :omniauth_data, :provider, :email\n\n def initialize(provider, omniauth_data)\n @provider, @omniauth_data = provi...
ruby
chosen
[ { "from": "system", "value": "Add wrappers for payment data to DotpayPayment\n" }, { "from": "human", "value": "class DotpayPayment\n def initialize(raw_post, secret: Rails.application.secrets.dotpay_secret)\n @secret = secret\n @data = CGI::parse(raw_post)\n end\n\n def acknowledge\n ...
ruby
chosen
[ { "from": "system", "value": "Move regular play back to the top of the list\n" }, { "from": "human", "value": "CURRENT_TOP_ROW_VALUES = [200, 400].freeze\n\nPLAY_TYPES = {\n \"teachers\" => \"Teachers Tournament\",\n \"regular\" => \"regular play\",\n \"college\" ...
ruby
chosen
[ { "from": "system", "value": "Tweak engine locale param fix.\n\nFix wasn’t applying when used in conjunction with a constraint object." }, { "from": "human", "value": "module Rails\n class Application\n class RoutesReloader\n\n def reload_with_engine_locale_fix!\n reload_without_...
ruby
chosen
[ { "from": "system", "value": "Add Github site as gem homepage\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'environment_canada/version'\n\nGem::Specification.new do |spec|\n spec....
ruby
chosen
[ { "from": "system", "value": "Correct SORN journey after recent deployment\n\nWe switched to Spotlight for SORN, which changed the #id.\n" }, { "from": "human", "value": "class VehicleLicensingJourney < BaseJourney\n\n def run()\n @browser.goto 'gov.uk/performance'\n sleep 5\n\n moveTo...
ruby
chosen
[ { "from": "human", "value": "Add a gemspec so it can be used with Bundler\n" }, { "from": "gpt", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\n\nGem::Specification.new do |s|\n s.name = \"js_named_routes\"\n s.version = \"1.0\"\n s.platform ...
ruby
chosen
[ { "from": "system", "value": "Remove sanity test for dirty-checking\n\nThis hasn't shown any problems on preview, but the test itself was\nmessed up in a rebase.\n" }, { "from": "human", "value": "desc 'One-time task to populate Tag#published_groups'\ntask populate_published_groups: [:environmen...
ruby
chosen
[ { "from": "human", "value": "Add custom log formatter for CLI\n" }, { "from": "gpt", "value": "require 'loggability' unless defined?( Loggability )\nrequire 'loggability/formatter' unless defined?( Loggability::Formatter )\n\nclass Loggability::Formatter::Timeless < Loggability::Formatter\n\n #...
ruby
chosen
[ { "from": "system", "value": "Disable Sphinx search; always use DB search [story:43690457]\n" }, { "from": "human", "value": "module SearchableModel\n def self.included(model)\n model.extend(ClassMethods)\n end\n\n def self.sphinx_servers\n @@sphinx_servers ||= begin\n servers = CM...
ruby
chosen
[ { "from": "system", "value": "[UPDATE] Set password to 'root' to simplify creation of further instances\n" }, { "from": "human", "value": "#\ndefault['mysql']['service_name'] = 'default'\n\n# passwords\ndefault['mysql']['server_root_password'] = 'ilikerandompasswords'\ndefault['mysql']['server_d...
ruby
chosen
[ { "from": "system", "value": "Refactor echo arg for clarity in simple-plugin\n" }, { "from": "human", "value": "class GenomerPluginSimple < Genomer::Plugin\n\n def run\n case arguments.shift\n when nil then 'Plugin \"simple\" called'\n when 'echo' then @arguments.unshi...
ruby
chosen
[ { "from": "system", "value": "Improve search for requests with \"ft.\"\n" }, { "from": "human", "value": "class Track\n include Lotus::Entity\n self.attributes = :artist_title, :title\n\n def queries\n [\"#{artist_title} #{title}\", title]\n end\nend\n" }, { "from": "gpt", "va...
ruby
chosen
[ { "from": "system", "value": "Package versin is increased from 0.1.2 to 0.1.3\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'clock'\n s.summary = 'Clock interface with support for dependency configuration for real and null object impleme...
ruby
chosen
[ { "from": "system", "value": "Fix unbalanced quotes in error message\n" }, { "from": "human", "value": "require 'active_model'\n\nmodule LinkedVocabs::Validators\n class PropertyValidator < ActiveModel::EachValidator\n def validate_each(record, attribute, values)\n values.each do |v|\n ...
ruby
chosen
[ { "from": "system", "value": "Simplify the tests' add_label_suffix custom method\n" }, { "from": "human", "value": "ReportsKit.configure do |config|\n config.custom_methods = {\n format_percentage: -> (value) { \"#{value.round(0)}%\" },\n add_label_suffix: -> (data) {\n data[:entitie...
ruby
chosen
[ { "from": "system", "value": "Make sure Company member classes start with the necessary permissions.\n" }, { "from": "human", "value": "class Company < Organisation\n has_many :meetings, :foreign_key => 'organisation_id'\n \n has_many :directors, :foreign_key => 'organisation_id'\n \n def m...
ruby
chosen
[ { "from": "system", "value": "Change the members to be a frozen set\n\n* I benchmarked the difference between Array#include? and\n Set#include? and the latter was faster even for small sets of\n objects. The performance was outstanding for larger sets.\n\n It makes sense since Array#include? is O(n) and ...
ruby
chosen
[ { "from": "system", "value": "Use autoload insted of require\n" }, { "from": "human", "value": "require 'cocoapods/search/version'\nrequire 'cocoapods/search/pod'\nrequire 'cocoapods/search/rendering'\nrequire 'cocoapods/search/cli'" }, { "from": "gpt", "value": "require 'rubygems'\n...
ruby
chosen
[ { "from": "system", "value": "Define association betwean Team model and Player model\n" }, { "from": "human", "value": "class Team < ActiveRecord::Base\n validates :name, :required_size, :tournament_id, presence: true\n belongs_to :tournament\nend\n" }, { "from": "gpt", "value": "c...
ruby
chosen
[ { "from": "system", "value": "Add required ruby version to gem\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |s|\n s.name = \"addresses\"\n s.authors = [\"Wilbert Ribe...
ruby
chosen
[ { "from": "system", "value": "Update gem version to 0.3.0\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nGem::Specification.new do |spec|\n spec.name = \"no-style-please\"\n spec.version = \"0.2.0\"\n spec.authors = [\"Riccardo Graziosi\"]\n spec.ema...
ruby
chosen
[ { "from": "system", "value": "Remove support for Ruby 1.9\n\nIt's been EoL for over a year now\n" }, { "from": "human", "value": "lib = File.expand_path('../lib', __FILE__)\n$:.unshift(lib) unless $:.include?(lib)\nrequire 'fauxhai/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Add gem summary and description\n" }, { "from": "human", "value": "require_relative 'lib/optbind/version'\n\nGem::Specification.new do |s|\n s.name = 'optbind'\n s.version = OptBind::VERSION\n s.authors = ['Pavol Zbell']\n s.email = ...
ruby
chosen