conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add plist for parsing secure notes from keychain" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path(\"../lib\", __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire \"mellon/version\"\n\nGem::Specification.new do |spec|\n...
ruby
chosen
[ { "from": "system", "value": "Remove autoload in favor of require\n" }, { "from": "human", "value": "path = File.expand_path(File.dirname(__FILE__))\n$:.unshift(path) unless $:.include?(path)\n\nrequire path + '/rfm/utilities/case_insensitive_hash'\nrequire path + '/rfm/utilities/factory'\n\nmod...
ruby
chosen
[ { "from": "system", "value": "Change AWS Network Refresher to the new format\n\nChange AWS Network Refresher to the new format separating collection\nfrom parsing. We use Inventory abstraction for the inventory\ncollection and parsing.\n" }, { "from": "human", "value": "module ManageIQ::Provide...
ruby
chosen
[ { "from": "system", "value": "Add a dot test on a single goal.\n" }, { "from": "human", "value": "require 'spec_helper'\nmodule Agora\n describe \"Graphviz dot export\" do\n\n context 'on the minepump' do\n let(:model){ minepump_model }\n\n subject{ model.to_dot }\n\n it{ shou...
ruby
chosen
[ { "from": "system", "value": "Fix race condition in the config test\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Hubstats\n context \".config\" do\n it \"creates a new config object\" do\n expect(Hubstats::Config).to receive(:parse).once\n Hubstats.config\n ...
ruby
chosen
[ { "from": "system", "value": "Fix migration for rails 5\n" }, { "from": "human", "value": "class CreateAssetAttachments < ActiveRecord::Migration[5.1]\n def change\n create_table :assetable_asset_attachments do |t|\n t.references :asset\n t.references :assetable, :polymorphic => tr...
ruby
chosen
[ { "from": "human", "value": "Add test for daimon_skycrawlers enqueue sub command\n" }, { "from": "gpt", "value": "require \"test_helper\"\nrequire \"daimon_skycrawlers/commands/enqueue\"\n\nclass EnqueueCommandTest < Test::Unit::TestCase\n setup do\n @command = DaimonSkycrawlers::Commands::E...
ruby
chosen
[ { "from": "system", "value": "Make sure the ruby helper is required\n" }, { "from": "human", "value": "require 'erb'\nrequire 'fileutils'\nrequire 'logger'\n\nrequire 'domgen/orderedhash'\n\n# Core components\nrequire 'domgen/model'\nrequire 'domgen/template'\nrequire 'domgen/render_context'\nre...
ruby
chosen
[ { "from": "human", "value": "Add integration test for Ruby\n" }, { "from": "gpt", "value": "require \"spec_helper\"\n\ndescribe \"practicingruby::_ruby\" do\n let(:prefix_path) { \"/usr/local\" }\n\n it \"installs ruby-build\" do\n expect(command \"#{prefix_path}/bin/ruby-build --version\")...
ruby
chosen
[ { "from": "system", "value": "Define aliases for backward compatibility\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'ruby_event_store'\n\nmodule RubyEventStore\n ProtobufEncodingFailed = Class.new(Error)\n\n module Protobuf\n end\nend\n\nrequire 'ruby_event_sto...
ruby
chosen
[ { "from": "system", "value": "Add some basic functionality, plus the tie-in to the Runtime class.\n" }, { "from": "human", "value": "class Swftly\n attr_reader :swf\n \n #init w/ a swf\n def initialize( swf, options = {} )\n @swf = swf\n @options = {\n form: {\n upload_fiel...
ruby
chosen
[ { "from": "system", "value": "Remove Rails, Sprockets and ActionMailer dependencies\n" }, { "from": "human", "value": "# roadie.gemspec\n# -*- encoding: utf-8 -*-\n\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire 'roadie/version'\n\nGem::Specification.new do |s|\n s.name = 'road...
ruby
chosen
[ { "from": "system", "value": "Optimize dump file generation code\n\nAn intermediary string that contained all the dumped envelopes is\ndiscarded in favor of writing directly to the final file on disk.\n" }, { "from": "human", "value": "require 'envelope_dump'\nrequire 'internet_archive'\n\n# Gen...
ruby
chosen
[ { "from": "system", "value": "Update Gemspec summary and homepage.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/wordpress_deploy/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Ryan Lovelett\"]\n gem.email ...
ruby
chosen
[ { "from": "system", "value": "Fix step for accept/reject button\n" }, { "from": "human", "value": "Then (/^I should( not)? see an \"Accept Proposed Organisation\" button$/) do |negation|\n unless negation\n expect(page).to have_link \"Accept\"\n end\n expect(page).not_to have_link \"Accept...
ruby
chosen
[ { "from": "system", "value": "Make SimpleClient compatible with ruby 2.3\n\nSomehow `super kwargs` worked pre-2.3 but resulted in `NoMethodError:\nsuper called outside of method` in 2.3\n\nI still don't understand why, but this is a better implementation anyway\n" }, { "from": "human", "value": ...
ruby
chosen
[ { "from": "system", "value": "Update one more instance where new article count logic is duplicated.\n\nWe want to use course.new_article_count as the canonical definition of how many new articles were created by a class.\n" }, { "from": "human", "value": "json.course do\n json.(@course, :id, :t...
ruby
chosen
[ { "from": "system", "value": "Use execute rather than run\n" }, { "from": "human", "value": "namespace :nodejs do\n\n desc 'Install node packages in shared directory'\n task :install_packages do\n run \"ln -s #{shared_path}/node_modules #{release_path}/node_modules\"\n run \"cd #{release...
ruby
chosen
[ { "from": "system", "value": "Fix rubygems checklist git tag command\n\nShipit don't support annotated tags unfortunately :/\n" }, { "from": "human", "value": "module Shipit\n class DeploySpec\n module RubygemsDiscovery\n def discover_deploy_steps\n discover_gem || super\n e...
ruby
chosen
[ { "from": "system", "value": "Add lazy match to Bitrise repo URL regex\n\nLazy match allows for periods in the repo name.\n" }, { "from": "human", "value": "# http://devcenter.bitrise.io/docs/available-environment-variables\nrequire \"danger/request_sources/github/github\"\nrequire \"danger/requ...
ruby
chosen
[ { "from": "human", "value": "Add rspec-activemodel-mocks patch until fixed upstream.\n" }, { "from": "gpt", "value": "# Manually applied the patch from https://github.com/jdelStrother/rspec-activemodel-mocks/commit/1211c347c5a574739616ccadf4b3b54686f9051f\nif Gem.loaded_specs['rspec-activemodel-...
ruby
chosen
[ { "from": "human", "value": "Add code wars (6) is prime\n" }, { "from": "gpt", "value": "# http://www.codewars.com/kata/5262119038c0985a5b00029f/\n# --- iteration 1 ---\ndef isPrime(num)\n return false if num < 2\n (2..(Math.sqrt(num))).each do |x|\n return false if num % x == 0\n end\n t...
ruby
chosen
[ { "from": "system", "value": "Address state is required (and shouldn't be)\n\nEmail validation in checkout controller decorator assumes the\n`address` state will be the present. Changed to use the first\ncheckout step via `current_order.checkout_steps.first`.\n\nFixes #59\n" }, { "from": "human", ...
ruby
chosen
[ { "from": "system", "value": "Update i686 template to nixos-16.03\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\nrequire './gen_template.rb'\n\ngen_template(\n arch: \"i686\",\n iso_url: \"https://nixos.org/releases/nixos/15.09/nixos-15.09.1076.9220f03/nixos-minimal-15.09.1076.9220f03...
ruby
chosen
[ { "from": "system", "value": "Rework building the uri to enable pagination to properly implemented\n" }, { "from": "human", "value": "require 'net/http'\nrequire 'uri'\nrequire 'json'\n\nmodule Honeybadger\n module Read\n class Api\n \n attr_reader :access_token\n\n def initia...
ruby
chosen
[ { "from": "system", "value": "Add api key to Geocode API\n\nGoogle requires an API key for this API and you'll get over query limit errors early without it.\n" }, { "from": "human", "value": "require File.expand_path('../api', __FILE__)\n\nmodule Google\n module Maps\n class Location\n ...
ruby
chosen
[ { "from": "system", "value": "Use multipart uploads per Jonathan Baxter's fork\n" }, { "from": "human", "value": "require \"fog\"\nrequire \"open-uri\"\n\nclass PgbackupsArchive::Storage\n\n def initialize(key, file)\n @key = key\n @file = file\n end\n\n def connection\n Fog::Storage...
ruby
chosen
[ { "from": "system", "value": "Make Kaminari actually see this\n" }, { "from": "human", "value": "require \"kaminari-views-bootstrap/version\"\n\nmodule KaminariViewsBootstrap\n\nend\n" }, { "from": "gpt", "value": "require \"kaminari-views-bootstrap/version\"\n\nmodule KaminariViewsB...
ruby
chosen
[ { "from": "human", "value": "Add docker-machine with no boot2docker dependency\n" }, { "from": "gpt", "value": "cask :v1 => 'dockermachine010' do\n version 'v0.1.0'\n sha256 '9915d88f779915aa7f1d7ba2537433b15665030574d61b9e348dd1f7397606c4'\n\n # github.com is the official download host per t...
ruby
chosen
[ { "from": "system", "value": "Update IntelliJ IDEA to 13.1.4\n\nAdditionally, reuse `version` stanza to facilitate future updates\n" }, { "from": "human", "value": "class IntellijIdeaCe < Cask\n version '13.1.3'\n sha256 '4b0e3cb665aa2e3523d3c90b0075292f5ba3eaaff2bfc4872e4438193e561067'\n\n u...
ruby
chosen
[ { "from": "system", "value": "Add explicit require to ensure presenter works in isolation\n" }, { "from": "human", "value": "require_dependency \"renalware/dashboard\"\n\nmodule Renalware\n module Dashboard\n class DashboardPresenter\n def initialize(user)\n @user = user\n ...
ruby
chosen
[ { "from": "human", "value": "Create podspec file and edit required details\n" }, { "from": "gpt", "value": "Pod::Spec.new do |s|\n s.name = \"AGEmojiKeyboard\"\n s.version = \"0.1.0\"\n s.summary = \"An emoji keyboard view that can replace the default iOS keyboar...
ruby
chosen
[ { "from": "system", "value": "Allow office create (Sabre related).\n" }, { "from": "human", "value": "module TicketEvolution\n class Offices < Endpoint\n include TicketEvolution::Modules::List\n include TicketEvolution::Modules::Search\n include TicketEvolution::Modules::Show\n end\ne...
ruby
chosen
[ { "from": "system", "value": "Correct call to ActiveRecord.find_by_sql probe, prompting exception\non bad call to probes in ruby-dtrace.\n\n\ngit-svn-id: ee21a9573714ad23dc07274cc891719afe0bb9d1@358 0a37a38d-5523-0410-8951-9484fa28833c\n" }, { "from": "human", "value": "module Probes\n module A...
ruby
chosen
[ { "from": "system", "value": "Remove unused variable and fix success? method on Transaction\n" }, { "from": "human", "value": "module WebpayRails\n class Transaction\n attr_reader :token, :url\n\n def initialize(params)\n @token = params[:token]\n @url = params[:url]\n @val...
ruby
chosen
[ { "from": "system", "value": "Correct assignment to array's last element\n" }, { "from": "human", "value": "module WorthSaving\n module Form\n module Record\n def self.included(base)\n base.send :include, InstanceMethods\n end\n\n module InstanceMethods\n private...
ruby
chosen
[ { "from": "system", "value": "Support ruby 1.8 as well\n" }, { "from": "human", "value": "module TruncateHtml\n class HtmlString < String\n\n UNPAIRED_TAGS = %w(br hr img)\n\n def initialize(original_html)\n super(original_html)\n end\n\n def html_tokens\n scan(/(?:<script...
ruby
chosen
[ { "from": "human", "value": "Add resque failure threshold check\n" }, { "from": "gpt", "value": "module OkComputer\n class ResqueFailureThresholdCheck < SizeThresholdCheck\n attr_accessor :threshold\n\n # Public: Initialize a check for a backed-up Resque queue\n #\n # threshold - An...
ruby
chosen
[ { "from": "system", "value": "Use git to list the files that go in the gem\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\n#require \"gdata/version\"\n\nGem::Specification.new do |s|\n s.name = 'gdata'\n s.version = '1.1....
ruby
chosen
[ { "from": "system", "value": "Add name, license and zap for GIMP.app\n" }, { "from": "human", "value": "cask :v1 => 'gimp' do\n version '2.8.14'\n sha256 'a90fe7001ee4f64d5108cd7b6aad843772aab7f1a7e67018564c620a4374460a'\n\n url \"http://download.gimp.org/pub/gimp/v2.8/osx/gimp-#{version}.dmg...
ruby
chosen
[ { "from": "system", "value": "Update Docker Compose to 1.5.1\n" }, { "from": "human", "value": "cask :v1_1 => 'docker-compose' do\n version '1.5.0'\n sha256 'e7ef90aa8081c767380a22588f329693d30a4ec658802b117c92acbe180ce5d4'\n\n # github.com is the official download host per the vendor homepag...
ruby
chosen
[ { "from": "system", "value": "Add admin base_allowed_users to all apps\n" }, { "from": "human", "value": "module Spider; module Admin\n\n class AppAdminController < Spider::PageController\n include Spider::Auth::AuthHelper\n\n def before(action='', *params)\n @scene.a...
ruby
chosen
[ { "from": "system", "value": "Create support directory with shared examples\n" }, { "from": "human", "value": "ENV['RAILS_ENV'] ||= 'test'\n\nif ENV['TRAVIS']\n require 'coveralls'\n Coveralls.wear!\nend\n\nrequire_relative 'dummy/config/environment'\n\nrequire 'rspec/rails'\nrequire 'rspec/au...
ruby
chosen
[ { "from": "human", "value": "Add podspec to link directly on this repo with Cocoapods\n" }, { "from": "gpt", "value": "Pod::Spec.new do |s|\n s.name \t= \"GDSheetController\"\n s.version \t= \"0.1.1\"\n \n s.summary \t= \"Simply organize your controllers in a stack of sheet...
ruby
chosen
[ { "from": "system", "value": "Fix variable name in gemspec\n" }, { "from": "human", "value": "require './lib/spring/version'\n\nGem::Specification.new do |gem|\n gem.name = \"spring\"\n gem.version = Spring::VERSION\n gem.authors = [\"Jon Leighton\"]\n gem.email ...
ruby
chosen
[ { "from": "system", "value": "Allow using sidekiq pool with sidekiq 3\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'sidekiq/pool/version'\n\nGem::Specification.new do |spec|\n spe...
ruby
chosen
[ { "from": "system", "value": "Stop our requiring-admins policy preventing anyone from ever logging in\n" }, { "from": "human", "value": "class ApplicationController < ActionController::Base\n include GDS::SSO::ControllerMethods\n protect_from_forgery\n before_filter :authenticate_user!\n bef...
ruby
chosen
[ { "from": "system", "value": "Fix up current_user to work with warden based authentication\n" }, { "from": "human", "value": "class ApplicationController < ActionController::Base\n # protect_from_forgery TODO: might want this back\n before_filter :api_check\n\n def api_check\n if params[:a...
ruby
chosen
[ { "from": "system", "value": "Disable faqs in navigation for current release.\n" }, { "from": "human", "value": "class ApplicationController < ActionController::Base\n\n before_filter :prepare_nav\n before_filter :update_sanitized_params, if: :devise_controller?\n\n rescue_from CanCan::Access...
ruby
chosen
[ { "from": "system", "value": "Add delegate for class method providing token header key\n" }, { "from": "human", "value": "module Authenticable\n extend ActiveSupport::Concern\n\n # Header token const\n TOKEN_HEADER_KEY = 'X-Auth-Token'.freeze\n\n class_methods do\n # Returns HTTP header k...
ruby
chosen
[ { "from": "system", "value": "Fix unperformant call to full_rank\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\n# Non-RESTful, JSON-only controller that provides data for the filter components.\n# Cuts across multiple models and builds a data structure needed by the view.\nc...
ruby
chosen
[ { "from": "system", "value": "Put a lot on the page\n" }, { "from": "human", "value": "Kaminari.configure do |config|\n config.default_per_page = 9\n config.max_per_page = 13\n # config.window = 4\n # config.outer_window = 0\n # config.left = 0\n # config.right = 0\n # config.page_method_...
ruby
chosen
[ { "from": "system", "value": "Verify that an rvmrc is created properly.\n" }, { "from": "human", "value": "require File.expand_path(\"helper\", File.dirname(__FILE__))\n\nprepare do\n FileUtils.rm_rf(TARGET)\nend\n\n# monk init NAME\nscope do\n test \"fail if the target working directory is no...
ruby
chosen
[ { "from": "system", "value": "Remove spec folder from gemspec\n\nWe were including the specs when the gem was installed. This is not\nnecessary, so remove them from the gemspec.\n\nChange-Id: I29791add1ee8a4e262fb3bcdfdd6c88f2b2699a4\nReviewed-on: https://gerrit.causes.com/1935\nTested-by: Greg Hurrell <79e...
ruby
chosen
[ { "from": "system", "value": "Use legacy migration instead of rails 3.1's change method\n" }, { "from": "human", "value": "class AddQueueToDelayedJobs < ActiveRecord::Migration\n def change\n add_column :delayed_jobs, :queue, :string\n end\nend\n" }, { "from": "gpt", "value": "c...
ruby
chosen
[ { "from": "system", "value": "Write correct require line in vendor/assets/javascript files\n" }, { "from": "human", "value": "module SpreeReviews\n module Generators\n class InstallGenerator < Rails::Generators::Base\n\n class_option :auto_run_migrations, :type => :boolean, :default => ...
ruby
chosen
[ { "from": "system", "value": "Fix test on Sync model.\n" }, { "from": "human", "value": "require File.dirname(__FILE__) + '/../test_helper'\n\nclass SyncTest < ActiveSupport::TestCase\n \n context 'Associations' do\n \n should 'have many sync items via polymorphic association' do\n ...
ruby
chosen
[ { "from": "system", "value": "Add identity change message on group creation\n" }, { "from": "human", "value": "class GroupsController < ApplicationController\n include SocialStream::Controllers::Subjects\n include SocialStream::Controllers::Authorship\n\n before_filter :authenticate_user!, :e...
ruby
chosen
[ { "from": "system", "value": "Support log_level of Fluentd 0.10.43\n" }, { "from": "human", "value": "# encoding: UTF-8\nclass Fluent::GcInput < Fluent::Input\n Fluent::Plugin.register_input('gc', self)\n\n config_param :disable, :bool, :default => false\n config_param :interval, :time, :defa...
ruby
chosen
[ { "from": "system", "value": "Add only iOS to podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"NBNPhotoChooser\"\n s.version = \"0.0.1\"\n s.summary = \"NBNPhotoChooser is an example implementation of the Tumblr Photo Chooser.\"\n s.homepage ...
ruby
chosen
[ { "from": "system", "value": "Add licensing information to gemspec.\n\nThis should make it easier for automated tools to find out what license is used." }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n\nrequire File.join(File.dirname(__FILE__), 'lib', 'radius', 'version')\nGem::Specif...
ruby
chosen
[ { "from": "human", "value": "Add unit test for local search client\n" }, { "from": "gpt", "value": "require_relative \"../../test_helper\"\nrequire \"health_check/logging_config\"\nrequire \"health_check/local_search_client\"\nLogging.logger.root.appenders = nil\n\nmodule HealthCheck\n class Lo...
ruby
chosen
[ { "from": "system", "value": "Disable the Ohai password plugin on all NIS nodes\n" }, { "from": "human", "value": "#\n# Cookbook Name:: sys\n# Recipe:: time\n#\n# Copyright 2013, Victor Penso\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file exc...
ruby
chosen
[ { "from": "system", "value": "Redefine gem documentation and summary\n" }, { "from": "human", "value": "$:.push File.expand_path('../lib', __FILE__)\n\n# Maintain your gem's version:\nrequire 'swagger_ui_engine/version'\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new...
ruby
chosen
[ { "from": "system", "value": "Update TSPredication to use keyword args" }, { "from": "human", "value": "module Arel\n module TSPredications\n \n def ts_query(expression, language=nil)\n vector = Arel::Nodes::TSVector.new(self, language)\n query = Arel::Nodes::TSQuery.new(express...
ruby
chosen
[ { "from": "system", "value": "Move Mailbox impl to Celluloid::EventedMailbox\n" }, { "from": "human", "value": "module Celluloid\n module IO\n # An alternative implementation of Celluloid::Mailbox using Reactor\n class Mailbox < Celluloid::Mailbox\n attr_reader :reactor\n\n def ...
ruby
chosen
[ { "from": "system", "value": "Add an explicit require to deface\n\nWithout this deface might not be loaded and will not apply its\noverrides.\n" }, { "from": "human", "value": "require \"spree_core\"\nrequire \"spree/auth/devise\"\nrequire \"spree/authentication_helpers\"\nrequire \"sass/rails\"...
ruby
chosen
[ { "from": "system", "value": "Use XPath to find the verifiedCertificateChain element instead of lazy-initializing/searching the Ruby objects.\n" }, { "from": "human", "value": "require 'sslyze/xml/plugin'\nrequire 'sslyze/xml/certinfo/received_certificate_chain'\nrequire 'sslyze/xml/certinfo/cer...
ruby
chosen
[ { "from": "system", "value": "Fix bug with how errors are passed through ForkedSandbox\n" }, { "from": "human", "value": "require 'base64'\n\nmodule Tack\n\n class ForkedSandbox\n \n def run(&block)\n @reader, @writer = IO.pipe\n value = nil\n if @child = fork\n valu...
ruby
chosen
[ { "from": "system", "value": "Store settings in settings collection\n" }, { "from": "human", "value": "require 'mongoid'\n\nmodule Mongoid\n module AppSettings\n extend ActiveSupport::Concern\n\n class Record\n include Mongoid::Document\n identity type: String\n end\n\n mo...
ruby
chosen
[ { "from": "system", "value": "Handle 0 idle_timeout for apps\n" }, { "from": "human", "value": "module Ringleader\n\n # Proxy for an application running on a given port.\n class AppProxy\n include Celluloid::IO\n include Celluloid::Logger\n\n attr_reader :config\n\n # Create a new ...
ruby
chosen
[ { "from": "system", "value": "Add webmock as a dev dep\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'redrax/version'\n\nGem::Specification.new do |spec|\n spec.name = \"r...
ruby
chosen
[ { "from": "system", "value": "Add after sign up path\n" }, { "from": "human", "value": "require_dependency \"ajo_register/application_controller\"\nclass AjoRegister::RegistrationsController < Devise::RegistrationsController\n def index\n end\n\n def new\n super\n end\n\n def create\n ...
ruby
chosen
[ { "from": "system", "value": "Remove unused files from gemspec\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"schlep/version\"\n\nGem::Specification.new do |s|\n s.name = \"schlep\"\n s.version = Schlep::VERSIO...
ruby
chosen
[ { "from": "system", "value": "Add carrier and service level to the shipping method factory\n" }, { "from": "human", "value": "require 'spree/testing_support/factories/calculator_factory'\nrequire 'spree/testing_support/factories/shipping_category_factory'\nrequire 'spree/testing_support/factorie...
ruby
chosen
[ { "from": "system", "value": "Remove cancan gem from generator\n\nThe gemspec already declares cancan as a dependency, so we don't need to add it to the host's Gemfile as well." }, { "from": "human", "value": "module Invitational\n module Generators\n class InstallGenerator < Rails::Generato...
ruby
chosen
[ { "from": "system", "value": "Remove JSON response correction\nThanks @zeke!\n" }, { "from": "human", "value": "require 'typhoeus'\nrequire 'multi_json'\n\nclass GeoIPs\n \n BASE_URI = 'http://api.geoips.com'\n \n attr_writer :api_key\n \n def initialize api_key\n @api_key = api_key\n...
ruby
chosen
[ { "from": "system", "value": "Add spec for exitstatus for unrecognized tasks\n" }, { "from": "human", "value": "require 'spec_helper'\n\n\ndescribe 'bundle executable' do\n it 'returns non-zero exit status when passed unrecognized options' do\n bundle '--invalid_argument', :exitstatus => tru...
ruby
chosen
[ { "from": "system", "value": "Disable failing spec on CI.\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe MrDarcy do\n it { should be }\n it { should respond_to :driver }\n it { should respond_to :driver= }\n\n describe '#promise' do\n When 'no driver is specified' do...
ruby
chosen
[ { "from": "system", "value": "Add spec of mass assigment on Event\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Event do\n context \".occurs_first\" do\n it \"should sort the next to occur first\" do\n late_event = FactoryGirl.create(:event, :occurs_at => 5.days.f...
ruby
chosen
[ { "from": "human", "value": "Remove MP from MP's names\n\nAs a person interested in government I need to know that as of 30/03/15\nMP's elected in 2010 are no longer officially MP's so that that I am not\nconfused.\n\nAs a MP I need GOV.UK to reflect the fact that I am no longer a MP so\nthat I am not accus...
ruby
chosen
[ { "from": "system", "value": "Add a limit to the context column\n\nSigned-off-by: Nathan Lowrie <4f3407de78bccc8cc160ee4d278d5efe7162e6b5@finelineautomation.com>\n" }, { "from": "human", "value": "class ActsAsTaggableOnPosts < ActiveRecord::Migration\n def self.up\n return if table_exists? :...
ruby
chosen
[ { "from": "system", "value": "Prepend selected ruby to PATH in RubyRequirement\n" }, { "from": "human", "value": "class RubyRequirement < Requirement\n fatal true\n default_formula \"ruby\"\n\n def initialize(tags)\n @version = tags.shift if /(\\d\\.)+\\d/ =~ tags.first\n raise \"RubyRe...
ruby
chosen
[ { "from": "system", "value": "Add more YARD docs for Env\n" }, { "from": "human", "value": "module ROM\n # Exposes defined repositories, relations and mappers\n #\n # @api public\n class Env\n include Equalizer.new(:repositories, :relations, :readers, :commands)\n\n attr_reader :reposi...
ruby
chosen
[ { "from": "system", "value": "Clean name a bit. Generic.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n name = \"SHTextFieldBlocks\"\n url = \"https://github.com/seivan/#{name}\"\n git_url = \"#{url}.git\"\n version = \"1.0.0\"\n source_files ...
ruby
chosen
[ { "from": "human", "value": "Add implementation of ninth rule of disambiguator prefix\n" }, { "from": "gpt", "value": "module Sastrawi\n module Morphology\n module Disambiguator\n class DisambiguatorPrefixRule9\n def disambiguate(word)\n contains = /^te([bcdfghjklmnpqrst...
ruby
chosen
[ { "from": "system", "value": "Apply bindings to querys from QueryRecorder\n\n- local tests that assume certain parameters to queries from\n QueryRecorder fail. These same tests don't fail in the runners,\n and I can't tell why. This fixes the local failures\n" }, { "from": "human", "value": "#...
ruby
chosen
[ { "from": "human", "value": "Add tests for users/show view; all tests pass\n" }, { "from": "gpt", "value": "require 'rails_helper'\n\nRSpec.describe \"users/show\", type: :view do\n\tbefore(:each) do\n\t\t@user = create(:user)\n\t\tcreate(:plan_with_recipes, user_id: @user.id)\n\tend\n\n\tit \"r...
ruby
chosen
[ { "from": "system", "value": "Fix deprecation warning on ActiveRecord::Base.establish_connection\n" }, { "from": "human", "value": "require 'active_record'\nrequire 'database_cleaner'\nrequire 'pathname'\n\ntmp_dir = Pathname.new(__FILE__).parent.parent.join('tmp')\ntmp_dir.mkpath\n::ActiveReco...
ruby
chosen
[ { "from": "system", "value": "Create ruby hash association with table_name and links\n" }, { "from": "human", "value": "# http://ruby-doc.org/stdlib-2.0.0/libdoc/open-uri/rdoc/OpenURI.html \nrequire 'open-uri'\nrequire 'nokogiri'\n\n# Go fetch the contents of a URL & store them as a String\nresp...
ruby
chosen
[ { "from": "system", "value": "Change gemspec '~>0.7.6' --> '>=0.7.6'\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/thinreports-rails/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Takeshi Shinoda\"]\n gem.email ...
ruby
chosen
[ { "from": "human", "value": "Add a tools to issue signed requests to AWS\n" }, { "from": "gpt", "value": "#!/usr/bin/env ruby\n\nrequire 'json'\nrequire 'aws-sdk'\n\n# Set these environment variables:\n# * AWS_ACCESS_KEY_ID\n# * AWS_SECRET_ACCESS_KEY\n\nmodule AWS\n class CloudSearch\n class...
ruby
chosen
[ { "from": "system", "value": "Tidy up the cookbook to use the new one level format.\n" }, { "from": "human", "value": "#\n# Cookbook Name:: CIS_CentOS7_v1.1.0\n# Recipe:: default\n#\n# Copyright (C) 2015 Conor Lee\n#\n# MIT LICENSE\n#\n\n# Depending upon the level the enviroment variable is give...
ruby
chosen
[ { "from": "system", "value": ":anchor: Add rest-client as a 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 'discordrb/webhooks/version'\n\nGem::Specification.new do |spec|...
ruby
chosen
[ { "from": "system", "value": "Update Serviio to version 1.5.1\n" }, { "from": "human", "value": "cask :v1 => 'serviio' do\n version '1.4.1.2'\n sha256 '132ed6ba9baf466eec5d89789cd8d50163fa5b534899f10a9232e00f711707aa'\n\n url \"http://download.serviio.org/releases/serviio-#{version}-osx.tar.g...
ruby
chosen
[ { "from": "system", "value": "Change platform to 8.0, since Swift support uses dynamic frameworks and is therefore only supported on iOS > 8.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"UIColor-Hex-Swift\"\n s.version = \"1.0\"\n s.summary = \"Conven...
ruby
chosen
[ { "from": "system", "value": "Add sqlite3 to dev dependencies\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/validate_as_email/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = ['James Conroy-Finn']\n gem.email ...
ruby
chosen
[ { "from": "system", "value": "Use spec helper to parse json and compare key/values\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'Returning all defined factories' do\n before do\n RemoteFactoryGirlHomeRails.configure do |config|\n config.skip_before_filter = [:aut...
ruby
chosen
[ { "from": "system", "value": "Add enctype option to express-form for file upload\n" }, { "from": "human", "value": "module ExpressTemplates\n module Components\n module Forms\n class ExpressForm < Container\n include ExpressTemplates::Components::Capabilities::Resourceful\n\n ...
ruby
chosen
[ { "from": "system", "value": "Write migration code for users table\n" }, { "from": "human", "value": "class CreateUsers < ActiveRecord::Migration\n def change\n end\nend\n" }, { "from": "gpt", "value": "class CreateUsers < ActiveRecord::Migration\n def change\n create_table :us...
ruby
chosen