conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Add first basic unit test to Reports::LineItems\n\nThis is quite hard and tedious due to its tight coupling with\nPermissions::Order but sets the path to adding more of these and\neventually refactoring this class in the future.\n" }, { "from": "gpt", "value": "requi...
ruby
chosen
[ { "from": "system", "value": "Stop loading dummy Rails app\n" }, { "from": "human", "value": "# Configure Rails Environment\nENV['RAILS_ENV'] = 'test'\n\nbegin\n require 'coveralls'\n Coveralls.wear!\nrescue LoadError\n warn 'warning: coveralls gem not found; skipping Coveralls'\nend\n\n$LOAD...
ruby
chosen
[ { "from": "system", "value": "Fix mismatch between client and server variants (ordering issue)\n" }, { "from": "human", "value": "object @product\nattributes :id, :name, :price, :variant_unit, :variant_unit_scale, :variant_unit_name, :on_demand\n\n# Infinity is not a valid JSON object, but Rails...
ruby
chosen
[ { "from": "system", "value": "Add verification IP for firewalling purposes\n\nIf you run a lot of web apps in a firewalled environment, it's nice to be able to open up a http port specifically for verification. This is the IP that let's encrypt currently uses for verification." }, { "from": "human",...
ruby
chosen
[ { "from": "system", "value": "Switch to stable release of bootstrap_form\n" }, { "from": "human", "value": "insert_into_file \"Gemfile\", :after => /gem \"bcrypt\".*\\n/ do\n <<-GEMS.strip_heredoc\n gem \"bootstrap_form\", :git => \"https://github.com/bootstrap-ruby/rails-bootstrap-forms.git...
ruby
chosen
[ { "from": "system", "value": "Remove Smartdown reference from EngineIntegrationTest\n\nWe've now converted the final Smartdown flow (pay-leave-for-parents) to Ruby so\ncan start removing the Smartdown related code.\n" }, { "from": "human", "value": "require_relative '../../integration_test_helpe...
ruby
chosen
[ { "from": "system", "value": "Fix migrations failure for clean spinup\n\n$ bundle exec rake db:create db:migrate\n…\n\n== SwapMagicEverythingPermissionsForRealOnes: migrating ======================\nrake aborted!\nAn error has occurred, all later migrations canceled:\n\nMysql2::Error: Table 'signonotron2_d...
ruby
chosen
[ { "from": "system", "value": "Allow select_distribution to take no order_cycle\n" }, { "from": "human", "value": "module OpenFoodNetwork\n module DistributionHelper\n\n def select_distribution(distributor, order_cycle)\n create_enterprise_group_for distributor\n visit root_path\n ...
ruby
chosen
[ { "from": "system", "value": "Remove overide that put the table in view.\n" }, { "from": "human", "value": "Deface::Override.new(\n virtual_path: 'spree/admin/shared/_product_tabs',\n name: 'add_volume_pricing_admin_tab',\n insert_bottom: '[data-hook=\"admin_product_tabs\"]',\n partial: 'spr...
ruby
chosen
[ { "from": "system", "value": "Make the secret key for production env private\n" }, { "from": "human", "value": "# Be sure to restart your server when you modify this file.\n\n# Your secret key is used for verifying the integrity of signed cookies.\n# If you change this key, all old signed cookie...
ruby
chosen
[ { "from": "system", "value": "Use secrets from ENV file\n" }, { "from": "human", "value": "# Be sure to restart your server when you modify this file.\n\n# Your secret key for verifying the integrity of signed cookies.\n# If you change this key, all old signed cookies will become invalid!\n# Mak...
ruby
chosen
[ { "from": "system", "value": "Fix projects filter for screenshoots\n" }, { "from": "human", "value": "require 'carrierwave/orm/activerecord'\n\nclass Screenshot < ActiveRecord::Base\n belongs_to :project\n validates :project, presence: true\n\n mount_uploader :screenshot, ScreenshotUploader\n...
ruby
chosen
[ { "from": "human", "value": "Add class for XML to Object mapping\n" }, { "from": "gpt", "value": "class RecordInfo\n\n attr_accessor :descriptionStandards, :recordContentSource, :recordCreationDate, :recordChangeDate, :recordIdentifier, :recordOrigin\n\n def initialize(recordContentSource, rec...
ruby
chosen
[ { "from": "system", "value": "Update font fantasque sans mono" }, { "from": "human", "value": "cask 'font-fantasque-sans-mono' do\n version '1.6.4'\n sha256 'da5a7f84ac0e1c02b49334690d7451d936691718fb1332f863eacc521816dccd'\n\n url \"https://github.com/belluzj/fantasque-sans/releases/download...
ruby
chosen
[ { "from": "system", "value": "Add has_many relationships to Agency" }, { "from": "human", "value": "class Agency < ActiveRecord::Base\nend\n" }, { "from": "gpt", "value": "class Agency < ActiveRecord::Base\n has_many :stops\n has_many :trips\n has_many :stop_times\n has_many :rou...
ruby
chosen
[ { "from": "human", "value": "Add a test for DateTime to Time conversion\n" }, { "from": "gpt", "value": "require \"helper\"\n\nclass DatetimeConversionTest < IntegrityTest\n setup do\n assert !Object.const_defined?(:ActiveSupport), 'activesupport should not be loaded'\n end\n \n it 'conve...
ruby
chosen
[ { "from": "human", "value": "Add basic test coverage for info command.\n" }, { "from": "gpt", "value": "require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')\n\ndescribe \"Info command\" do\n \n it \"should display current version\" do\n run_command('info').should include(...
ruby
chosen
[ { "from": "human", "value": "Add migration to set political status of editions\n\nUpdate the political status of all editions based on the newly updated\npolitical rules. Previously we only added political status this will\nalso remove political from no-longer political documents.\n" }, { "from": "g...
ruby
chosen
[ { "from": "system", "value": "Add condition to mx_indices table\n" }, { "from": "human", "value": "class CreateMxIndices < ActiveRecord::Migration\n def change\n create_table :mx_indices do |t|\n t.timestamps\n\n t.integer :table_id, null: false\n t.string :name, null: false\n...
ruby
chosen
[ { "from": "system", "value": "Fix assert_not error with rails 3\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass ActiveTrailTest < ActionView::TestCase\n\n test \"should return true if path is in active trail\" do\n set_path '/some-path/other-path'\n assert active_trail?(...
ruby
chosen
[ { "from": "system", "value": "Use Jekyll logger for nicer log output\n\nUses Jekyll logger if it's available.\n" }, { "from": "human", "value": "require 'tempfile'\nrequire 'jekyll/minibundle/environment'\n\nmodule Jekyll::Minibundle\n class AssetBundle\n def initialize(type, assets, site_di...
ruby
chosen
[ { "from": "system", "value": "Handle situations when end_at is nil\n" }, { "from": "human", "value": "module Ab\n class Experiment < Struct.new(:hash, :salt, :bucket_count)\n def buckets\n hash['buckets']\n end\n\n def name\n hash['name']\n end\n\n def variants\n @...
ruby
chosen
[ { "from": "system", "value": "Set is much faster than array for checking uniqueness\n\nSpecifically, when we call Array#include? to check if we've already\nvisited a node, Set is much faster especially as the number of nodes\nvisited increases.\n\nIt's probably neglible for most use cases but there is a dif...
ruby
chosen
[ { "from": "system", "value": "Use Magick::QuantumRange instead of Magick::MaxRGB\n\nSee jakesgordon/sprite-factory/#38\n" }, { "from": "human", "value": "require 'RMagick'\n\nmodule SpriteFactory\n module Library\n module RMagick\n\n VALID_EXTENSIONS = [:png, :jpg, :jpeg, :gif, :ico]\n\...
ruby
chosen
[ { "from": "system", "value": "Switch to invoking 'bash' instead of '/bin/bash'.\n\nThis fixes #3 and works on Mac and Windows.\n" }, { "from": "human", "value": "module VagrantPlugins::HostShell\n class Provisioner < Vagrant.plugin('2', :provisioner)\n def provision\n result = Vagrant::...
ruby
chosen
[ { "from": "system", "value": "Use one INSERT for one page\n" }, { "from": "human", "value": "require \"wikipedia-search/converter\"\n\nmodule WikipediaSearch\n class SQLConverter < Converter\n private\n def create_listener(output)\n SQLListener.new(output, @options)\n end\n\n c...
ruby
chosen
[ { "from": "human", "value": "Add formula for the Google App Engine for Java SDK\n\nSigned-off-by: Max Howell <max@methylblue.com>\n\nI had quite a few quibbles with the name. Google can't make up their minds what they call it apparently!" }, { "from": "gpt", "value": "require 'brewkit'\n\nclass ...
ruby
chosen
[ { "from": "system", "value": "Remove dependent destroy on page-tag\n" }, { "from": "human", "value": "class User < ActiveRecord::Base \n # Include default devise modules. Others available are:\n # :token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable and :omniauthable\n ...
ruby
chosen
[ { "from": "system", "value": "Update build scripts for Binaryen 1.38.19\n" }, { "from": "human", "value": "#!/usr/bin/false\n\nNAME = \"binaryen\"\nVERSION = \"1.38.11\"\nRELEASE = \"1\"\n\nFILES = [\n [\n \"https://github.com/WebAssembly/binaryen/archive/#{VERSION}.tar.gz\",\n ...
ruby
chosen
[ { "from": "human", "value": "Add helper to include closure base.js when calcdeps.py is not used.\n" }, { "from": "gpt", "value": "module GoogleClosureHelper\n \n def closure_include_tag(file_path)\n out = ''\n unless ActionController::Base.perform_caching\n closure_base_path = File....
ruby
chosen
[ { "from": "system", "value": "Modify Xapi.exists? to check for language OR language/problem\n\nif 'slug' argument is provided, search for language/problem\nelse search for language\n" }, { "from": "human", "value": "module Xapi\n def self.exercises_api_url\n ENV.fetch('EXERCISES_API_URL') { ...
ruby
chosen
[ { "from": "system", "value": "Add todo note to agent test\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'dripdrop/agent'\n\nagent = DripDrop::Agent.new(ZMQ::PUB,'tcp://127.0.0.1:2900',:connect)\n\nloop do\n #Test is the message name, this is the first part of the 0MQ message, u...
ruby
chosen
[ { "from": "system", "value": "Make the I18n load path work in real life\n" }, { "from": "human", "value": "require 'i18n'\nrequire 'ibandit/version'\nrequire 'ibandit/errors'\nrequire 'ibandit/iban'\nrequire 'ibandit/german_details_converter'\nrequire 'ibandit/iban_splitter'\nrequire 'ibandit/ib...
ruby
chosen
[ { "from": "system", "value": "Make JSON endpoint inaccessible to outside world\n" }, { "from": "human", "value": "require 'aws-sdk'\n\nmodule Helios::Rack\n class SimpleClientService\n def self.call(env)\n begin\n json = env['rack.input'].read\n sqs = AWS::SQS.new(access_k...
ruby
chosen
[ { "from": "system", "value": "Add Github URL to gemspec" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |s|\n s.name = \"activeadmin-refinerycms-authentication\"\n s.version = \"0.0.2\"\n s.authors = [\"eugen neagoe\"]\n s.descript...
ruby
chosen
[ { "from": "system", "value": "Make json schema a run time 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 'json/api/version'\n\nGem::Specification.new do |spec|\n spec.nam...
ruby
chosen
[ { "from": "system", "value": "Return an empty Hash if headers are hil.\n" }, { "from": "human", "value": "module QueueingRabbit\n\n class AbstractJob\n\n extend Job\n\n attr_reader :payload, :metadata\n\n def initialize(payload, metadata)\n @payload = payload\n @metadata = me...
ruby
chosen
[ { "from": "system", "value": "Fix non-found route error in StatsdMiddleware\n\nsinatra.route is only available when there is a route. In case an user\ngave a wrong url then we do not have a route.\n" }, { "from": "human", "value": "module Salestation\n class Web < Module\n class StatsdMiddle...
ruby
chosen
[ { "from": "system", "value": "Use self.class instead of class name to make inheritance easier\n" }, { "from": "human", "value": "module Monadist\n class List < Monad\n\n attr_reader :values\n\n\n\n def initialize(values)\n @values = values\n end\n\n\n\n def bind(&block)\n ...
ruby
chosen
[ { "from": "system", "value": "Fix file matcher regular expression\n" }, { "from": "human", "value": "require 'webrick/httputils'\n\nmodule YARD\n module Server\n # A custom {Serializers::Base serializer} which returns resource URLs instead of\n # static relative paths to files on disk.\n ...
ruby
chosen
[ { "from": "system", "value": "Update migration version for stats\n" }, { "from": "human", "value": "require_relative 'migration_helpers'\n\n# Since we've designed metrics/docs tables to revolve around\n# the pods table, but be independent of each other, we can\n# run all trunk migrations first, ...
ruby
chosen
[ { "from": "system", "value": "Add missing gift_wrapping_type property to Item\n" }, { "from": "human", "value": "require \"openlogi/base_object\"\nrequire \"openlogi/stock\"\nrequire \"openlogi/international_info\"\nrequire \"openlogi/boolean\"\n\nmodule Openlogi\n class Item < BaseObject\n ...
ruby
chosen
[ { "from": "system", "value": "Load common spec_helper before running Serverspec\n" }, { "from": "human", "value": "require 'serverspec'\n\nmodule AmiSpec\n class ServerSpec\n def self.run(args)\n new(args).tap(&:run)\n end\n\n def initialize(instance:, spec:, private_ip: true, use...
ruby
chosen
[ { "from": "human", "value": "Add AndroidDockerImage class for generating tags from yaml file\n" }, { "from": "gpt", "value": "class AndroidDockerImage\n attr_reader :repo, :build_tools, :target_api\n\n PLACEHOLDER_BUILD_TOOLS = \"%{build_tools}\"\n PLACEHOLDER_TARGET_API = \"%{target_api}\"\n...
ruby
chosen
[ { "from": "system", "value": "Fix Rails::Rack::Static deprecated constant proxy\n" }, { "from": "human", "value": "require 'action_dispatch'\n\nmodule Rails::Rack\n Static = Deprecation::DeprecatedConstantProxy.new('Rails::Rack::Static', ActionDispatch::Static)\nend\n" }, { "from": "gpt...
ruby
chosen
[ { "from": "system", "value": "Add a TODO comment to `FrozenStringLiteral` module\n\nFollow up of #5036.\n\nThis PR adds a memorandum to source code.\n\nIf frozen string literal is default in Ruby 3.0 it will remove\nthis TODO comment and if not default it will need to change\nthe conditional expression of `...
ruby
chosen
[ { "from": "human", "value": "Add a basic spec for the ec2_security_group resource\n\nWe lost coverage when we stopped calling the ec2_security_group DSL\nmethod. Adds that coverage back and implements a simple template we can\nextend to test more complex properties of EC2 security groups like\nTaggable/Ingr...
ruby
chosen
[ { "from": "system", "value": "Test for canonical-data file without a version.\n" }, { "from": "human", "value": "require_relative '../../test_helper.rb'\nmodule Generator\n module Files\n class MetadataFilesTest < Minitest::Test\n FixturePaths = Paths.new(\n metadata: 'test/fixtu...
ruby
chosen
[ { "from": "system", "value": "Rename `make_command` to `command` in `Cloner`\n" }, { "from": "human", "value": "require 'net/http'\nrequire 'json'\n\nmodule GitMulticast\n class Cloner\n def initialize(username, dir)\n @username = username\n @dir = dir\n end\n\n def clone!\n ...
ruby
chosen
[ { "from": "system", "value": "Support X-Real-IP for when behind loadbalancer" }, { "from": "human", "value": "require 'grape/attack/options'\n\nmodule Grape\n module Attack\n class Request\n\n attr_reader :env, :context, :request, :throttle_options\n\n def initialize(env)\n ...
ruby
chosen
[ { "from": "system", "value": "Set rich format for Slack POST\n" }, { "from": "human", "value": "class MForwd::Deliver::Slack < MForwd::Deliver::HttpPost\n\n private\n\n # @param message [MForwd::Message]\n def create_body message\n { text: message.body }.to_json\n end\nend\n" }, { ...
ruby
chosen
[ { "from": "system", "value": "Update link to correct page\n" }, { "from": "human", "value": "\nPod::Spec.new do |s|\n\n s.name = \"Airbrake-iOS\"\n s.version = \"4.1.2\"\n s.summary = \"An Airbrake Notifier for iOS\"\n\n s.description = <<-DESC\n The Airb...
ruby
chosen
[ { "from": "system", "value": "Secure twilio sms webhook url /sms_votes.\n" }, { "from": "human", "value": "require File.expand_path('../boot', __FILE__)\n\nrequire 'rails/all'\n\n# Require the gems listed in Gemfile, including any gems\n# you've limited to :test, :development, or :production.\nB...
ruby
chosen
[ { "from": "system", "value": "Change App name and defaults\n" }, { "from": "human", "value": "require File.expand_path('../boot', __FILE__)\n\nrequire 'rails/all'\n\n# Require the gems listed in Gemfile, including any gems\n# you've limited to :test, :development, or :production.\nBundler.requir...
ruby
chosen
[ { "from": "system", "value": "Remove deprecation errors for edge Rails.\n" }, { "from": "human", "value": "require File.expand_path('../boot', __FILE__)\n\nrequire 'rails/all'\n\n# Require the gems listed in Gemfile, including any gems\n# you've limited to :test, :development, or :production.\nB...
ruby
chosen
[ { "from": "system", "value": "Switch to requiring mislav's will_paginate on github.\n" }, { "from": "human", "value": "# Be sure to restart your server when you modify this file\n\n# Specifies gem version of Rails to use when vendor/rails is not present\nRAILS_GEM_VERSION = '2.3.2' unless define...
ruby
chosen
[ { "from": "system", "value": "Remove some previously commented out stuff from filters\n" }, { "from": "human", "value": "require 'nanoc'\n\nclass PrettyUrls < Nanoc::Filter\n\n identifier :pretty_urls\n\n def run(content, params={})\n\n # Allows us to use pretty urls in markdown and add .ht...
ruby
chosen
[ { "from": "system", "value": "Fix compatability issue with ruby < 2.1\n" }, { "from": "human", "value": "require \"valid_email2\"\nrequire \"resolv\"\nrequire \"mail\"\n\nmodule ValidEmail2\n class Address\n attr_accessor :address\n\n def initialize(address)\n @parse_error = false\n ...
ruby
chosen
[ { "from": "system", "value": "Package version increased from 0.2.0 to 0.2.1\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'set_attributes'\n s.version = '0.2.0'\n s.summary = \"Set an object's attributes from an object or hash with a si...
ruby
chosen
[ { "from": "human", "value": "Migrate existing topics to new join model\n" }, { "from": "gpt", "value": "puts 'populating statistics announcement topics join model'\n\nStatisticsAnnouncement.find_each do |statistics_announcement|\n print '.'\n statistics_announcement.topic_ids = [statistics_ann...
ruby
chosen
[ { "from": "system", "value": "Fix `url` stanza comment for Lytro Desktop.\n" }, { "from": "human", "value": "cask 'lytro-desktop' do\n version '4.3.3,151118.98'\n sha256 '500b28ed7d67aaf18a59a8770e3fb83a4b96e692728ddbd522a52879af758966'\n\n # amazonaws.com/lytro-desktop-support was verified a...
ruby
chosen
[ { "from": "system", "value": "Fix from Marcog for error when using verify_equal with ci_reporter. \n\nC:/ruby/lib/ruby/gems/1.8/gems/ci_reporter-1.3.5/lib/ci/reporter/\ntest_suite.rb:89:in `trunc!': private method `sub' called for\n#<Test::Unit::Assertions::AssertionMessage:0x2b7ebf0> (NoMethodError)\n\tfro...
ruby
chosen
[ { "from": "human", "value": "Add an integration test for asynchronous publishing and consuming using a direct exchange.\n" }, { "from": "gpt", "value": "require 'spec_helper'\nrequire 'integration/jobs/print_line_job'\n\ndescribe \"Asynchronous publishing and consuming using direct exchange\" do...
ruby
chosen
[ { "from": "system", "value": "Fix link_to_member to not be bold by default\n" }, { "from": "human", "value": "module ProjectsHelper\n def grouper_project_members(project)\n @project.users_projects.sort_by(&:project_access).reverse.group_by(&:project_access)\n end\n\n def remove_from_team_m...
ruby
chosen
[ { "from": "system", "value": "Add QCA patch to allow compiling with clang\n\nCloses #15144.\n\nSigned-off-by: Max Howell <6ab8060e002788ba9309d53dba8df070e650cb04@me.com>\n" }, { "from": "human", "value": "require 'formula'\n\nclass Qca < Formula\n homepage 'http://delta.affinix.com/qca/'\n ur...
ruby
chosen
[ { "from": "system", "value": "Expand postgresql-adapter dependency on jdbc-postgres to include 9.1 series\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\narjdbc_lib = File.expand_path(\"../../lib\", __FILE__)\n$:.push arjdbc_lib unless $:.include?(arjdbc_lib)\nrequire 'arjdbc/versi...
ruby
chosen
[ { "from": "human", "value": "Add Riddler as a collector\n" }, { "from": "gpt", "value": "module Aquatone\n module Collectors\n class Riddler < Aquatone::Collector\n self.meta = {\n :name => \"Riddler\",\n :author => \"Joel (@jolle)\",\n :description =...
ruby
chosen
[ { "from": "system", "value": "Remove Bundler-generated comment from root module\n" }, { "from": "human", "value": "require \"hyperloop/application\"\nrequire \"hyperloop/response\"\nrequire \"hyperloop/version\"\nrequire \"hyperloop/view\"\nrequire \"hyperloop/view/registry\"\nrequire \"hyperloo...
ruby
chosen
[ { "from": "system", "value": "Use https homepage 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 'zebra/zpl/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Replace Mendeley with correct SNPedia\n" }, { "from": "human", "value": "RSpec.describe 'Arriving as user' do\n let(:snp) { double('snp', name: 'rs1234', snpedia_papers: [snpedia_paper]) }\n let!(:user) { create(:user, name: 'Potato Bill', snps: [snp]) }\n\n let(...
ruby
chosen
[ { "from": "system", "value": "Refactor the Hermann::Producer Java-based integration test to respect integration.yml\n\nI've also refactored/cleaned it up a bit to make sure it runs properly on my machine\n" }, { "from": "human", "value": "require 'spec_helper'\n\nrequire 'hermann/producer'\nrequ...
ruby
chosen
[ { "from": "human", "value": "Add mising spec for Caching::Response class\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\n\nRSpec.describe Caching::Response do\n subject(:instance) { described_class.new(response) }\n let(:response) { instance_double('mock_response', body: 'body ...
ruby
chosen
[ { "from": "system", "value": "Fix Internal Server Error when uploading invalid image via API\n\n@resouce contains an Array of Images in case an uploaded Image is invalid. This resulted in a 500 error (\"undefined method `errors' for #<Array:....\") instead of a 422 with appropriate error messages. This chan...
ruby
chosen
[ { "from": "system", "value": "Add spec for File.utime(nil, nil, ...) behavior\n\nThis is behavior explicitly used by FileUtils.touch\n" }, { "from": "human", "value": "require File.expand_path('../../../spec_helper', __FILE__)\n\ndescribe \"File.utime\" do\n before :each do\n @atime = Time.n...
ruby
chosen
[ { "from": "system", "value": "Adjust in tests of facebook api\n" }, { "from": "human", "value": "require 'rails_helper'\nrequire_relative '../../app/domain/usecases/friends/get_friends'\n\ndescribe 'UseCases::GetFriends' do\n\n describe '.friends_from_facebook_on_villeme' do\n it 'should ret...
ruby
chosen
[ { "from": "system", "value": "Add dependency on xenapi gem\n\nSigned-off-by: Jon Ludlam <e7e3380887a8f95cc9dc4f0d51dedc7e849a287a@citrix.com>\n" }, { "from": "human", "value": "$:.unshift File.expand_path(\"../lib\", __FILE__)\nrequire \"vagrant-xenserver/version\"\n\nGem::Specification.new do |...
ruby
chosen
[ { "from": "system", "value": "Make sure we search both nodes and ways\n" }, { "from": "human", "value": "require 'overpass_api_ruby'\nrequire 'nokogiri'\n\nclass OSMLeeds\n BORDER = {n: 53.9458558, e: -1.2903452, s: 53.6983747, w: -1.8003617}\n \n def initialize\n @overpass = OverpassAPI.n...
ruby
chosen
[ { "from": "system", "value": "Add Caskroom to Alfred's search paths\n" }, { "from": "human", "value": "sprout_osx_apps_homebrew_cask \"alfred\"\n" }, { "from": "gpt", "value": "sprout_osx_apps_homebrew_cask \"alfred\"\n\nexecute \"add Caskroom to Alfred search paths\" do\n command \...
ruby
chosen
[ { "from": "system", "value": "Fix upload path when not using fog with cloud storage\n" }, { "from": "human", "value": "class BaseUploader < CarrierWave::Uploader::Base\n include CarrierWave::Compatibility::Paperclip\n include CarrierWave::MiniMagick\n include CarrierWave::Backgrounder::Delay\...
ruby
chosen
[ { "from": "system", "value": "chore: Add string stripper plugin to sequel models\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'sequel'\nrequire 'ditty/services/logger'\nrequire 'active_support'\nrequire 'active_support/core_ext/object/blank'\n\npool_timeout = (ENV[...
ruby
chosen
[ { "from": "system", "value": "Make grid.start set that grid as @current_grid\n" }, { "from": "human", "value": "class GridOne\n\n attr_reader :map, :user, :program_1, :background\n\n def initialize(window, user)\n @window, @user = window, user\n end\n \n def start\n @map = Map.new(@wi...
ruby
chosen
[ { "from": "system", "value": "Use better count options for a demo\n" }, { "from": "human", "value": "module ApplicationHelper\n def poi_options\n pois_by_city = Poi.all.group_by(&:city_country)\n pois_by_city.each{ |ary| ary.last.map! &:name_id }\n end\n\n def count_options\n [2,5,10...
ruby
chosen
[ { "from": "system", "value": "Fix CarnivalEnumInput default nil parameter value in input method\n" }, { "from": "human", "value": "class CarnivalEnumInput < SimpleForm::Inputs::CollectionSelectInput\n\n def input(wrapper_options = nil)\n options[:collection] ||= get_collection\n super(wra...
ruby
chosen
[ { "from": "system", "value": "Handle index case in import job policy\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nclass ImportJobPolicy < ApplicationPolicy\n class Scope < ApplicationPolicy::Scope\n def post_initialize\n end\n\n def authorized_to_edit_records\n ...
ruby
chosen
[ { "from": "system", "value": "Remove unused method on PopularityScorer\n" }, { "from": "human", "value": "class PopularityScorer\n # The number of months of activity we will look at for scoring.\n MONTHS_OF_ACTIVITY = 3\n # For scoring, the number of commits we consider extremely busy.\n MAX...
ruby
chosen
[ { "from": "system", "value": "Use the 'unique title' for tags in export not the plain title\n\nThis means that parent/child relationships will be represented.\n" }, { "from": "human", "value": "namespace :reports do\n desc \"Generate CSV file of all live artefacts\"\n task live_artefacts: :env...
ruby
chosen
[ { "from": "system", "value": "Remove unused dependency to nokogiri\n" }, { "from": "human", "value": "require File.expand_path(\"../lib/octicons/version\", __FILE__)\n\nGem::Specification.new do |s|\n s.name = \"octicons\"\n s.version = Octicons::VERSION\n s.summary = \"GitHub'...
ruby
chosen
[ { "from": "human", "value": "Set up test for new matcher module\n" }, { "from": "gpt", "value": "require 'rspec/a11y/custom_matcher'\n\nmodule CustomA11yMatchers\n describe \"BeAccessible\" do\n\n before :each do\n @matcher = BeAccessible.new\n @page = double(\"page\")\n end\n\n...
ruby
chosen
[ { "from": "system", "value": "Use .to_s and .strip to remove valid? method\n" }, { "from": "human", "value": "class Scrabble\n attr_reader :word\n\n def initialize(word)\n @word = word&.downcase\n end\n\n def score\n return 0 if invalid?\n\n word.chars.sum { |letter| TILE_POINTS[let...
ruby
chosen
[ { "from": "system", "value": "Update build.rb invocation to use new option parsing.\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\n\nrequire 'pathname'\nNIGHTLY_BUILD_DIR = Pathname.new(ENV[\"NIGHTLY_BUILD_DIR\"])\nBUILD_SCRIPT = NIGHTLY_BUILD_DIR.join(\"../build.rb\")\nCLEANUP_SCR...
ruby
chosen
[ { "from": "system", "value": "Update gemspec names and email for Shopify\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'measured/version'\n\nGem::Specification.new do |spec|\n spec...
ruby
chosen
[ { "from": "human", "value": "Add a test file for BMFF::Box::DataInformation.\n" }, { "from": "gpt", "value": "# coding: utf-8\n# vim: set expandtab tabstop=2 shiftwidth=2 softtabstop=2 autoindent:\n\nrequire_relative '../../minitest_helper'\nrequire 'bmff/box'\nrequire 'stringio'\n\nclass TestBM...
ruby
chosen
[ { "from": "system", "value": "fix(podfile): Fix the source files path for the new structure\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'mnuboSDK'\n s.version = '1.3.1'\n s.summary = 'iOS SDK to communicate with the mnubo cloud platform'\n ...
ruby
chosen
[ { "from": "system", "value": "Remove warnings when building gem\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 'circleci'\n s.version = '0.0.2'\n s.date = '2013-04-16'\n s.summary = 'Circle CI API Wrapper'\n s.descriptio...
ruby
chosen
[ { "from": "human", "value": "Create integration test for method lookups.\n\nHaving this test will allow bigger changes to the mechanism used.\n" }, { "from": "gpt", "value": "require File.expand_path('../gir_ffi_test_helper.rb', File.dirname(__FILE__))\n\n# Tests how methods are looked up and ge...
ruby
chosen
[ { "from": "system", "value": "Use a name for factory card." }, { "from": "human", "value": "FactoryGirl.define do\n factory :card, class: Spells::Card do\n name ''\n text ''\n end\nend\n" }, { "from": "gpt", "value": "FactoryGirl.define do\n factory :card, class: Spells::Car...
ruby
chosen
[ { "from": "system", "value": "Complete spec for results now display finalised\n\n- should have done this before displaying page!\n" }, { "from": "human", "value": "require 'feature_helper'\n\ndescribe CoinCalculator::Main, type: :feature do\n\n it 'shows the main page' do\n visit '/'\n ex...
ruby
chosen
[ { "from": "system", "value": "Refactor keyspace and consistency setup to be handled by methods\n" }, { "from": "human", "value": "# encoding: utf-8\n\nmodule DataMapper\n module Adapters\n\n # Cassandra DataMapper Adapter\n class CassandraAdapter < AbstractAdapter\n\n def initialize(...
ruby
chosen
[ { "from": "system", "value": "Add a readme note to the generator\n" }, { "from": "human", "value": "module RequirejsOptimizer\n\n class InstallGenerator < Rails::Generators::Base\n source_root File.expand_path(\"../templates\", __FILE__)\n\n desc 'Set up for optimizing require.js modules'...
ruby
chosen
[ { "from": "system", "value": "Use \"response_parameters\" instead of \"result\" to match chargify2 0.2.0 gem release\n" }, { "from": "human", "value": "require 'sinatra'\nrequire 'yaml'\n\nrequire 'chargify2'\n\nget '/' do\n erb :index\nend\n\nget '/verify' do\n if chargify.direct.result(param...
ruby
chosen