conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Change to new expect syntax for rspec\n" }, { "from": "human", "value": "# encoding: UTF-8\nrequire 'spec_helper'\n\ndescribe LibMsPack do\n\n describe '.MsPackSelfTest' do\n it 'should pass' do\n LibMsPack.SysSelfTest.should eq(LibMsPack::MSPAC...
ruby
chosen
[ { "from": "human", "value": "Enable Bullet for all specs, not just feature specs.\n" }, { "from": "gpt", "value": "# Test group helpers for killing N+1 queries.\nmodule Bullet::TestGroupHelpers\n def self.extended(group)\n return if [:feature].include?(group.metadata[:type])\n group.aroun...
ruby
chosen
[ { "from": "system", "value": "Substitute control has no defined default levels\n" }, { "from": "human", "value": "module Log::Controls\n module Log\n def self.example\n ::Log::Substitute.build\n end\n\n module Levels\n def self.example\n logger = Log.example\n l...
ruby
chosen
[ { "from": "system", "value": "Correct license of IntelliJ IDEA\n" }, { "from": "human", "value": "class IntellijIdea < Cask\n version '14'\n sha256 '9695bedfe145d70010b853cc67d7dc07bf2768e38b5b9034d1f6a00b0b9a15a7'\n\n url \"http://download.jetbrains.com/idea/ideaIU-#{version}.dmg\"\n homepa...
ruby
chosen
[ { "from": "system", "value": "Remove unused argument in Currency.native\n" }, { "from": "human", "value": "module Stellar\n Currency.class_eval do\n def self.native(amount)\n new(:native)\n end\n\n def self.iso4217(code, issuer)\n raise ArgumentError, \"Bad :issuer\" unless i...
ruby
chosen
[ { "from": "system", "value": "Add text regexp filter on failures.text\n\nExperimental. Unknown performance characteristics.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nclass FailuresController < ApplicationController\n include Concerns::Controller::Platform\n include Co...
ruby
chosen
[ { "from": "system", "value": "Add params wrapping to sessions\n" }, { "from": "human", "value": "class SessionsController < ApplicationController\n\n def new\n\n end\n\n def create\n p \"Username:\"\n p params[:username]\n p \"params:\"\n p params\n p \"Password\"\n p params...
ruby
chosen
[ { "from": "system", "value": "Save and remove session data\n" }, { "from": "human", "value": "require 'fb_service'\n\nclass SessionsController < ApplicationController\n def create\n auth = request.env[\"omniauth.auth\"]\n token = auth[\"credentials\"][\"token\"]\n user = User.find_by...
ruby
chosen
[ { "from": "human", "value": "Add Eve Contracts to graphql\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\n\nmodule Types\n class EveContractType < Types::BaseObject\n field :id, ID, null: false\n field :buyout, Float, null: true\n field :collateral, Float, null: true\n ...
ruby
chosen
[ { "from": "system", "value": "Disable staleness emails until per user email preferences exist.\n" }, { "from": "human", "value": "class StalenessNotificationJob < Struct.new(:article_ids)\n def perform\n articles = Article.find(article_ids)\n articles.each do |article|\n article.upda...
ruby
chosen
[ { "from": "system", "value": "Remove exported shipments if the shipment is destroyed\n" }, { "from": "human", "value": "module Spree\n\tShipment.class_eval do\n#\t\thas_one :export, :class_name => 'Spree::UpsWorldship::Export'\n\t\tafter_save :update_worldship\n\n\t\tdef update_worldship\n\t\t\t...
ruby
chosen
[ { "from": "system", "value": "Clean up syntax of Deface override for nav bar\n\nThis was using the old 1.8 Ruby Hash syntax, and same-line wrapping made\nit more difficult to read. I'd ultimately prefer to deprecate this\noverride, but cleaning it up is a good start.\n" }, { "from": "human", "va...
ruby
chosen
[ { "from": "system", "value": "Resolve issue with not being able to find ActiveSupport::Autoload in ruby-2.1.0\n" }, { "from": "human", "value": "require \"active_support/core_ext\"\n\nrequire 'nark/middleware'\nrequire 'nark/exceptions'\nrequire 'nark/plugin'\nrequire 'nark/report_broker'\nrequi...
ruby
chosen
[ { "from": "system", "value": "Fix for Ruby 1.8 and etc." }, { "from": "human", "value": "require 'nerv/version'\n\nclass Nerv\n DEFAULT_SEPARATOR = '_'.freeze\n\n class << self\n def prefix(keys_prefix, separator = DEFAULT_SEPARATOR)\n regexp = /^#{keys_prefix}#{separator}/\n\n pa...
ruby
chosen
[ { "from": "system", "value": "Revert \"add step method to Member model (for multi-page form)\"\n\nThis reverts commit 831b6dc3961123980a0a159ba582f0a13f2c7eb6.\n" }, { "from": "human", "value": "class Member < ActiveRecord::Base\n belongs_to :club\n has_many :cards\n\n # TODO: validations\n ...
ruby
chosen
[ { "from": "system", "value": "Update swift_version and ios.deployment_target in podspec\n" }, { "from": "human", "value": "\nPod::Spec.new do |s|\n s.name = \"SignificantSpices\"\n s.version = \"0.14.0\"\n s.summary = \"An ensemble of extensions to Swift and Foundation that ...
ruby
chosen
[ { "from": "system", "value": "Fix dispatching events to methods with arity < args\n" }, { "from": "human", "value": "require 'chef/event_dispatch/base'\n\nclass Chef\n module EventDispatch\n\n # == EventDispatch::Dispatcher\n # The Dispatcher handles receiving event data from the sources\...
ruby
chosen
[ { "from": "system", "value": "Add compatibility with sprockets 4\n" }, { "from": "human", "value": "module FontAwesome\n module Sass\n module Rails\n class Engine < ::Rails::Engine\n initializer 'font-awesome-sass.assets.precompile', group: :all do |app|\n %w(stylesheets...
ruby
chosen
[ { "from": "system", "value": "Read Rails version from a file instead of modifying the load path and doing requires\n\nSigned-off-by: Jeremy Kemper <b3f594e10a9edcf5413cf1190121d45078c62290@bitsweat.net>\n" }, { "from": "human", "value": "$:.unshift \"lib\"\nrequire \"active_resource/version\"\n\...
ruby
chosen
[ { "from": "system", "value": "Use at least Devise 4.6 for security patch\n\nDevise ruby gem before 4.6.0 when the lockable module is used is vulnerable to a time-of-check time-of-use (TOCTOU) race condition due to increment_failed_attempts within the `Devise::Models::Lockable` class not being concurrency sa...
ruby
chosen
[ { "from": "human", "value": "Remove extra Digest::SHA2.digest method to fix Digest::SHA2.hexdigest issue\n" }, { "from": "gpt", "value": "require_relative '../../../spec_helper'\nrequire_relative '../sha256/shared/constants'\n\ndescribe \"Digest::SHA2#hexdigest\" do\n\n it \"returns a SHA256 he...
ruby
chosen
[ { "from": "system", "value": "Remove reference to new relic.\n" }, { "from": "human", "value": "require 'newrelic_rpm'\n\nrequire 'stringio'\n\nrequire 'pp'\n\nrequire 'active_support'\n\nmodule Hopper\n def self.logger\n return @logger if @logger\n\n @logger = Logger.new(STDOUT)\n @lo...
ruby
chosen
[ { "from": "system", "value": "Add upgraded_at to user decorator\n" }, { "from": "human", "value": "module CartoDB\n module UserDecorator\n def data(options = {})\n calls = self.get_api_calls(from: self.last_billing_cycle, to: Date.today)\n calls.fill(0, calls.size..29)\n data ...
ruby
chosen
[ { "from": "system", "value": "Delete unnecessary lines from 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 'serverkit/login_items/version'\n\nGem::Specification.new do |spec|...
ruby
chosen
[ { "from": "system", "value": "Remove unsupported ruby version method\n" }, { "from": "human", "value": "require 'ivapi/client'\nrequire 'ivapi/default'\nrequire 'pry'\n\nmodule Ivapi\n extend Ivapi::Configuration\n\n class << self\n def client\n unless defined?(@client) && @client.same...
ruby
chosen
[ { "from": "system", "value": "Remove private post method and add private encode method\n" }, { "from": "human", "value": "require 'net/http'\nrequire 'net/https'\nrequire 'json'\nrequire 'uri'\n\nmodule Nexmo\n class Client\n def initialize(key, secret)\n @key, @secret = key, secret\n\n...
ruby
chosen
[ { "from": "system", "value": "Change jenv from cask to bin dep\n" }, { "from": "human", "value": "# java.rb\n\ndep 'gradle.bin'\n\ndep 'intellij-idea.cask'\n\ndep 'java.cask'\n\ndep 'jenv.bin'\n\ndep 'mvn.bin' do\n installs 'maven'\nend\n\ndep 'osx-dev-java-base' do\n requires 'java.cask'\n r...
ruby
chosen
[ { "from": "human", "value": "Add form types for backward compatibility\n" }, { "from": "gpt", "value": "require 'dry/core/deprecations'\n\nDry::Core::Deprecations.warn('Form types were renamed to Params', tag: :'dry-types')\n\nmodule Dry\n module Types\n container.keys.grep(/^params\\./).eac...
ruby
chosen
[ { "from": "system", "value": "Add Yardoc for ::Enumerable extensions\n" }, { "from": "human", "value": "require \"hamster/list\"\n\nmodule Enumerable\n def to_list\n # use destructive operations to build up a new list, like Common Lisp's NCONC\n # this is a very fast way to build up a lin...
ruby
chosen
[ { "from": "system", "value": "Add an MisPersonCourse for no_mis driver\n" }, { "from": "human", "value": "# Leap - Electronic Individual Learning Plan Software\n# Copyright (C) 2011 South Devon College\n\n# Leap is free software: you can redistribute it and/or modify\n# it under the terms of the...
ruby
chosen
[ { "from": "system", "value": "Fix name class and comment\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule RubyRabbitmqJanus\n module Errors\n module Tools\n # Define a super class for all error in Option class\n class BaseOption < BaseTools\n def in...
ruby
chosen
[ { "from": "system", "value": "Add rake task to create checksums\n" }, { "from": "human", "value": "require 'bundler/gem_tasks'\n\nrequire 'rake/testtask'\n\nRake::TestTask.new do |t|\n t.libs << 'lib'\n t.test_files = FileList['spec/lib/**/*_spec.rb']\n t.verbose = false\n t.warning = true\n...
ruby
chosen
[ { "from": "system", "value": "Reword progress description for Guru\n" }, { "from": "human", "value": "require_relative '../badge'\n\nclass Guru < Badge\n\n def progress_title\n \"You're getting close to...\"\n end\n\n def calculate_progress!\n answers = service.fetch('users', 'answers',...
ruby
chosen
[ { "from": "system", "value": "Update Ability for User Course Edit\n\nUpdate the Ability model to ensure that the Course edit is managed\ncorrectly.\n" }, { "from": "human", "value": "class Ability\n include CanCan::Ability\n\n def initialize(user)\n user ||= User.new\n can :update, Club,...
ruby
chosen
[ { "from": "human", "value": "Test event names in event chain.\n" }, { "from": "gpt", "value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\nRSpec.describe FiniteMachine::EventsChain, '.events' do\n it \"has no event names\" do\n events_chain = described_class.new\n expect(events_chain.ev...
ruby
chosen
[ { "from": "system", "value": "Edit Routes To Get Rid of Paths Modals Replace\n" }, { "from": "human", "value": "Rails.application.routes.draw do\n\n resources :sessions, only: [:new, :create, :destroy]\n get '/login' => 'sessions#new', as: 'login'\n post '/login' => 'sessions#create'\n delet...
ruby
chosen
[ { "from": "system", "value": "Put redirect to new CoC URL before Docs resources\n" }, { "from": "human", "value": "Rails.application.routes.draw do\n # For details on the DSL available within this file,\n # see http://guides.rubyonrails.org/routing.html\n\n # Render legal documents by using K...
ruby
chosen
[ { "from": "system", "value": "Package version is increased from '0.0.1.3 to 0.0.2.0\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'controls'\n s.version = '0.0.1.3'\n s.summary = 'Test controls'\n s.description = ' '\n\n s.authors = [...
ruby
chosen
[ { "from": "system", "value": "Use the default Rails 6 configurations\n" }, { "from": "human", "value": "require_relative 'boot'\n\nrequire \"rails\"\nrequire \"rails/all\"\nrequire \"active_storage/engine\"\n\n# Require the gems listed in Gemfile, including any gems\n# you've limited to :test, :...
ruby
chosen
[ { "from": "system", "value": "Put placeholder values back in config file" }, { "from": "human", "value": "###\n# Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.\n# See LICENSE in the project root for license information.\n##\n\n# The following values must match th...
ruby
chosen
[ { "from": "system", "value": "Work around JRuby new line issue. :test:\n" }, { "from": "human", "value": "require 'ae'\nrequire 'ostruct'\n\nWhen /Given a template/ do |text|\n @template = text.strip\nend\n\nWhen /given a local binding/ do |code|\n @code = code\nend\n\nWhen /The result will be...
ruby
chosen
[ { "from": "system", "value": "Use db/seeds for Disabilities sections\n" }, { "from": "human", "value": "#######\n#\n# This file will be run on every deploy, so make sure the changes here are non-destructive\n#\n#######\n\nTagRepository.put(:tag_id => 'businesslink', :title => 'Business Link', :t...
ruby
chosen
[ { "from": "system", "value": "Use 'add_runtime_dependency' in Gem specification\n" }, { "from": "human", "value": "unless defined? Looks::VERSION\n $LOAD_PATH.unshift File.expand_path(\"../lib\", __FILE__)\n\n require 'looks/version'\nend\n\nGem::Specification.new do |s|\n s.name = \"l...
ruby
chosen
[ { "from": "system", "value": "Add dependency on activerecord, and development dependencies on rspec-rails and sqlite\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'has_pub...
ruby
chosen
[ { "from": "system", "value": "Remove the default STDOUT for out option\n" }, { "from": "human", "value": "require \"bash/session/version\"\nrequire 'securerandom'\nrequire 'pty'\n\nmodule Bash\n class Session\n def initialize\n start_session\n @separator = SecureRandom.hex\n end...
ruby
chosen
[ { "from": "system", "value": "Allow specifying number of latest entries to get\n" }, { "from": "human", "value": "require 'doing_stream/version'\nrequire 'doing_stream/stream'\nrequire 'doing_stream/streams'\n\nclass DoingStream::DoingStream\n attr_accessor :streams\n\n def initialize streams\...
ruby
chosen
[ { "from": "system", "value": "Update gem description in gemspec\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.dirname(__FILE__) + \"/lib/unicode/display_width\"\n\nGem::Specification.new do |s|\n s.name = \"unicode-display_width\"\n s.version = Unicode::...
ruby
chosen
[ { "from": "system", "value": "Fix minitest warning with an additional 'require'.\n\nRunning the test suite out-of-the-box throws a warning, although the\ntest suite still passes:\n\n $ rake\n ...\n Warning: you should require 'minitest/autorun' instead.\n Warning: or add 'gem \"minitest\"' before 'requi...
ruby
chosen
[ { "from": "system", "value": "Add a bit more Yard\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'webmachine/actionview/version'\n\nGem::Specification.new do |gem|\n gem.n...
ruby
chosen
[ { "from": "system", "value": "Put logs when current_num exceeds max_num\n" }, { "from": "human", "value": "require 'barbeque/config'\nrequire 'barbeque/exception_handler'\nrequire 'barbeque/execution_log'\nrequire 'barbeque/message_handler'\nrequire 'barbeque/message_queue'\n\nmodule Barbeque\n ...
ruby
chosen
[ { "from": "system", "value": "Make sure migrations are run with Bundler gems." }, { "from": "human", "value": "require 'active_record'\nrequire 'logger'\nrequire 'yaml'\nrequire 'uri'\n\nconfig_path = File.join(File.dirname(__FILE__), 'config.yaml')\nif File.exists?(config_path)\n CONFIG = YAML...
ruby
chosen
[ { "from": "system", "value": "Add failed status to instance creation\n" }, { "from": "human", "value": "module OpsTasks\n class Scale < OpsTasks::Deployment\n def initialize(args)\n @instance_type = args[:instance_type]\n super\n end\n\n def create_instance(auto_scale = false...
ruby
chosen
[ { "from": "system", "value": "Add support for .mdown files" }, { "from": "human", "value": "libdir = File.dirname(__FILE__)\n$LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)\n\n# Gems \nrequire 'rdiscount'\n\n# Processor\nPakyow::App.processor(:md, :markdown) { |content|\n RDiscoun...
ruby
chosen
[ { "from": "system", "value": "Update and add dev dependencies.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'tty/version'\n\nGem::Specification.new do |gem|\n gem.name ...
ruby
chosen
[ { "from": "system", "value": "Make these gems into development dependencies.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n\nrequire File.expand_path('../lib/ffi-geos/version', __FILE__)\n\nGem::Specification.new do |s|\n s.name = \"ffi-geos\"\n s.version = Geos::VERSION\n\n s...
ruby
chosen
[ { "from": "system", "value": "Set required Ruby version (>= 1.9.3)" }, { "from": "human", "value": "require File.expand_path('../lib/enumerate_it/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = ['Cássio Marques', 'Lucas Caton']\n gem.summary = 'Ruby Enumerati...
ruby
chosen
[ { "from": "system", "value": "Enable memcached in acceptance tests\n\n... because it is required as cache backend.\n\nChange-Id: I7b9cf3581c427f5a7332d27a26568a63d26e9864\n" }, { "from": "human", "value": "require 'spec_helper_acceptance'\n\ndescribe 'basic trove' do\n\n context 'default parame...
ruby
chosen
[ { "from": "human", "value": "Add feature spec for caching properties and taxons AMS\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\n\nrequire \"spec_helper\"\n\nfeature \"Caching\", js: true, caching: true do\n let!(:taxon) { create(:taxon, name: \"Cached Taxon\") }\n let!(:pro...
ruby
chosen
[ { "from": "system", "value": "Add functional specs to test more cases when using API key\n Refactor previous specs to clean-up\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Filepreviews do\n let(:file_previews) { Filepreviews }\n let(:sample_img) { 'http://pixelhipsters...
ruby
chosen
[ { "from": "system", "value": "Add project to load path\n" }, { "from": "human", "value": "require 'active_record'\nrequire 'yaml'\nrequire 'rspec/rails/model_mocks'\n\nrequire_relative '../models/widget'\n\ndb_config = YAML::load(File.open('db/config.yml'))\n\nActiveRecord::Base.establish_connec...
ruby
chosen
[ { "from": "system", "value": "Remove data files from gem\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'tachikoma/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Add a regression test for friendship removal\n" }, { "from": "human", "value": "require 'test_helper'\nrequire 'integration/concerns/authentication'\nrequire 'support/web_mocking'\n\nclass FriendshipsTest < ActionDispatch::IntegrationTest\n include Authentication\n...
ruby
chosen
[ { "from": "system", "value": "Use `set_pixel` instead of `rect`/`point`.\n\nChunkyPNG calls `point` internally when drawing a rectangle. `point` does unnecessary composing of the pixels.\nSince we are always working in a blank canvas, we can use `set_pixel` direct without worrying about the destination.\n" ...
ruby
chosen
[ { "from": "system", "value": "Include request data in the results.\n" }, { "from": "human", "value": "require 'atomic'\n\nmodule Peek\n module Views\n class Faraday < View\n def initialize(options = {})\n @duration = Atomic.new(0)\n @calls = Atomic.new(0)\n @request...
ruby
chosen
[ { "from": "system", "value": "Change github schema to https\n" }, { "from": "human", "value": "require 'yaml'\nrequire 'fileutils'\n\nclass ReadmeTracker::Cli\n attr_accessor :yaml_path, :bash_hash\n\n def self.run(config = {})\n new(config).run\n end\n\n def initialize(config)\n @yaml...
ruby
chosen
[ { "from": "system", "value": "Fix the capitalization of GitHub in DeployHQ\n\n@darkphnx \"good\" HTTP libraries shouldn't care about the capitalization of headers but for the sake of our human readers @gjtorikian makes a good point that it should continue to be consistent. :sparkles:" }, { "from": "...
ruby
chosen
[ { "from": "system", "value": "Add new modules to main module\n" }, { "from": "human", "value": "require \"bandicoot/version\"\nrequire \"bandicoot/dsl\"\nrequire \"bandicoot/processor\"\nrequire 'active_support/all'\n\n# Your code goes here...\nmodule Bandicoot\n attr_reader :config\n\n def se...
ruby
chosen
[ { "from": "system", "value": "Update rubocop-rspec to 1.4 and rubocop to 0.37\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'td_critic/version'\n\nGem::Specification.new do |spec|\n...
ruby
chosen
[ { "from": "human", "value": "Add unit test for PipeSource\n" }, { "from": "gpt", "value": "require 'test/unit'\nrequire 'event_core'\n\nclass TestPipe < Test::Unit::TestCase\n\n def setup\n @loop = EventCore::MainLoop.new\n @loop.add_once(30) { raise 'Test timed out!' }\n end\n\n def te...
ruby
chosen
[ { "from": "system", "value": "Make our dependencies less angry\n" }, { "from": "human", "value": "# encoding: utf-8\n\nrequire File.expand_path('../lib/myaso/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [ 'Dmitry A. Ustalov' ]\n gem.email = [ 'dmitry@eve...
ruby
chosen
[ { "from": "system", "value": "Add 'after_touch' to the list of hooks after which to publish on ActiveRecord\n" }, { "from": "human", "value": "module PubSub\n module Railties\n module ActiveRecord\n def self.included(klass)\n klass.send :include, InstanceMethods\n klass.se...
ruby
chosen
[ { "from": "system", "value": "Fix for Ruby 1.9 that allows proper lookup of nested constants\n" }, { "from": "human", "value": "class Module\n def find_const(const_name)\n if const_name[0..1] == '::'\n Object.find_const(const_name[2..-1])\n else\n nested_const_lookup(const_name)...
ruby
chosen
[ { "from": "system", "value": "Fix followable? and blockable? methods\n" }, { "from": "human", "value": "require \"active_support\"\nrequire \"interest/followable\"\nrequire \"interest/blockable\"\n\nmodule Interest\n module Base\n extend ActiveSupport::Concern\n\n def followable?(other)\n...
ruby
chosen
[ { "from": "system", "value": "Add in the ability to use decorators\n" }, { "from": "human", "value": "module Shoppe\n class Engine < ::Rails::Engine\n isolate_namespace Shoppe\n \n if Shoppe.respond_to?(:root)\n config.autoload_paths << File.join(Shoppe.root, 'lib')\n config....
ruby
chosen
[ { "from": "system", "value": "Include lua files in gem.\n" }, { "from": "human", "value": "# Encoding: utf-8\n# -*- ruby -*-\n\nGem::Specification.new do |gem|\n gem.name = 'qsome'\n gem.version = '0.1.0'\n gem.date = '2013-10-02'\n gem.summary = 'Qsome Queueing'\n gem...
ruby
chosen
[ { "from": "system", "value": "Fix out of date task description" }, { "from": "human", "value": "namespace :users do\n desc \"Create a new user (specify name, email and optional password in environment)\"\n task :create => :environment do\n raise \"Requires name and email specified in enviro...
ruby
chosen
[ { "from": "system", "value": "Subtract from window width to get proper centering\n" }, { "from": "human", "value": "require_relative 'pane/chapter'\nrequire_relative 'pane/code'\nrequire_relative 'pane/list'\nrequire_relative 'pane/text'\nrequire_relative 'pane/console'\n\nmodule TermNote\n mod...
ruby
chosen
[ { "from": "human", "value": "Add a migration-version checker: keep the server (or tests, or script/console) from starting if there's a migration that hasn't been applied\n\ngit-svn-id: 8ae0a6b396effb9e2d04f216330b631e689e8608@508 54c6411d-1744-0410-a9eb-b99409f43359\n" }, { "from": "gpt", "value...
ruby
chosen
[ { "from": "system", "value": "Make MLton formula install statically-linked-gmp\n\nCloses #9529\n\nSigned-off-by: Misty De Meo <85d6b3741948526aebc363d97f74b6575b2cc027@gmail.com>\n" }, { "from": "human", "value": "require 'formula'\n\n# Installs the binary build of MLton.\n# Since MLton is writt...
ruby
chosen
[ { "from": "system", "value": "Update motion-cocoapods dependency to use a version >= 1.4.0\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |gem|\n gem.name = 'motion-blitz'\n gem.version = '1.0.0'\n gem.authors = ['Devon Blandin']\n...
ruby
chosen
[ { "from": "system", "value": "Test the default property values\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "from": "human", "value": "#\n# Copyright:: Copyright (c) Chef Software Inc.\n# License:: Apache License, Version 2.0\n#\n# Licensed under the Apa...
ruby
chosen
[ { "from": "system", "value": "Add test for legacy prefix quoting.\n" }, { "from": "human", "value": "#!/usr/bin/ruby\n# This software is in the public domain, furnished \"as is\", without technical\n# support, and with no warranty, express or implied, as to its usefulness for\n# any purpose.\n\n...
ruby
chosen
[ { "from": "system", "value": "Fix open-ending version of 'ruby-filemagic'\n" }, { "from": "human", "value": "$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)\nrequire 'ooxml_parser/version'\nGem::Specification.new do |s|\n s.name = 'ooxml_parser'\n s.version = OoxmlParser::Version::STRI...
ruby
chosen
[ { "from": "system", "value": "Update spec helper to match other ROM-style gems\n" }, { "from": "human", "value": "# encoding: utf-8\n\nrequire 'equalizer'\nrequire 'devtools/spec_helper'\n\nif ENV['COVERAGE'] == 'true'\n require 'simplecov'\n require 'coveralls'\n\n SimpleCov.formatter = Simp...
ruby
chosen
[ { "from": "system", "value": "Fix up specs so that they start running again\n" }, { "from": "human", "value": "begin\n require 'spec'\nrescue LoadError\n require 'rubygems'\n gem 'rspec'\n require 'spec'\nend" }, { "from": "gpt", "value": "begin\n require 'spec'\nrescue LoadErro...
ruby
chosen
[ { "from": "system", "value": "Use new syntax for SimpleCov::Formatter\n\nSee https://github.com/dillondrobena/simplecov/commit/ddde04d\n" }, { "from": "human", "value": "require 'simplecov'\nrequire 'coveralls'\n\nSimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[\n SimpleCov::Formatte...
ruby
chosen
[ { "from": "system", "value": "Disable `should` syntax in Rspec\n\n`should` syntax is deprecated as of Rspec version 3.0 and the previous\ncommit converts all of our tests to use `expect` for consistency.\n\nTo prevent regressions, this change disables `should` syntax for this\ngem.\n" }, { "from": "...
ruby
chosen
[ { "from": "system", "value": "Add some colour to rspec, because console\n" }, { "from": "human", "value": "require 'simplecov'\nrequire 'simplecov-rcov'\nrequire 'fakeweb'\nSimpleCov.formatter = SimpleCov::Formatter::RcovFormatter\nSimpleCov.start\n\nrequire 'datapackage'\nrequire 'fakeweb'\n\nR...
ruby
chosen
[ { "from": "system", "value": "Fix application args in spec\n" }, { "from": "human", "value": "require 'coveralls'\nCoveralls.wear!\n\n$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)\nrequire 'qml'\nQML.init(%w{--platform offscreen})\n\nDir.glob(Pathname(__FILE__) +'../shared/**/*.rb')...
ruby
chosen
[ { "from": "system", "value": "Add newline to sent moves\n" }, { "from": "human", "value": "require \"socket\"\n\nrequire_relative 'player'\n\nclass RemotePlayer < Player\n \n PORT = 2000\n \n def initialize(board, color, address = nil)\n super(board, color)\n \n if address.nil?\n ...
ruby
chosen
[ { "from": "system", "value": "Package version is increased from 0.1.1 to 0.1.2\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = \"process_host\"\n s.version = \"0.1.1\"\n s.summary = \"Run multiple logical processes inside a single physical process.\"...
ruby
chosen
[ { "from": "system", "value": "Make possible to work with rack 1.5\n\nThis will make possible to this gem work with Rails 4\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path('../lib', __FILE__)\nrequire 'redis/rack/version'\n\nGem::Specification.new do |s|\n ...
ruby
chosen
[ { "from": "human", "value": "Add missing mysql aes tests\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\nmodule CryptKeeper::LogSubscriber\n describe MysqlAes do\n use_mysql\n\n context \"AES encryption\" do\n # Fire the ActiveSupport.on_load\n before do\n Crypt...
ruby
chosen
[ { "from": "system", "value": "Disable default www pool if not defined in pools attribute.\n" }, { "from": "human", "value": "#\n# Author:: Seth Chisamore (<schisamo@opscode.com>)\n# Cookbook Name:: php-fpm\n# Recipe:: package\n#\n# Copyright 2011, Opscode, Inc.\n#\n# Licensed under the Apache L...
ruby
chosen
[ { "from": "system", "value": "Change mkdir to chef directory resource" }, { "from": "human", "value": "include_recipe \"midokura::_common\"\n\nif (node['midokura']['zookeepers'] == [])\n raise \"Please set the Midokura zookeepers list attribute in your environment: midokura->zookepers\"\nend\n\...
ruby
chosen
[ { "from": "system", "value": "Make key-pair deletable when instance is terminated\n" }, { "from": "human", "value": "#\n# Copyright (c) 2013-2015 SKYARCH NETWORKS INC.\n#\n# This software is released under the MIT License.\n#\n# http://opensource.org/licenses/mit-license.php\n#\n\nKeyPair = Stru...
ruby
chosen
[ { "from": "system", "value": "Add pending spec as a note of something to do later\n" }, { "from": "human", "value": "require \"spec_helper\"\n\ndescribe Rack::Tracker do\n describe \"#plugins\" do\n it \"provides a list of plugins available\"\n\n it \"provides plugins used by default\" do...
ruby
chosen
[ { "from": "system", "value": "Fix hash key usage to older syntax.\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe TweetPretty do\n let (:tweet) { Twitter::Tweet.new({ id: 1, text: \"This is a test tweet\" }) }\n\n describe \"#to_html\" do\n it \"is monkey patched into T...
ruby
chosen
[ { "from": "system", "value": "Check if management_plan is a String within parse_management_plan\n" }, { "from": "human", "value": "module ProtectedAreasHelper\n def map_bounds protected_area=nil\n return Rails.application.secrets.default_map_bounds unless protected_area\n\n {\n 'from...
ruby
chosen
[ { "from": "system", "value": "Check for value correctly in retail price\n" }, { "from": "human", "value": "Spree::Variant.class_eval do\n \n include ActionView::Helpers::NumberHelper\n \n attr_accessible :option_values\n \n def to_hash\n #actual_price += Calculator::Vat.calculate_tax_on...
ruby
chosen