conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Use Rambo module as sole entry point to app\n"
},
{
"from": "human",
"value": "require \"colorize\"\nrequire \"rambo/document_generator\"\n\nmodule Rambo\n class CLI\n def initialize(raml_file=nil, opts={}, stdout=STDOUT, stderr=STDERR)\n @stdout = stdout\... | ruby | chosen |
[
{
"from": "system",
"value": "Remove Sprockets Configuration from Dummy app\n\nSince we no longer depend on Sprockets and the Asset Pipeline, `asset`\nconfiguration is no longer necessary, and only adds noise to the\nconfiguration.\n"
},
{
"from": "human",
"value": "require \"rails\"\n\nrequire ... | ruby | chosen |
[
{
"from": "system",
"value": "Add a new test to ensure hashes are stored correctly\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Notifiable::Notification do\n \n it \"stores a message\" do \n Notifiable::Notification.create :message => \"Test message\"\n \n N... | ruby | chosen |
[
{
"from": "system",
"value": "Fix worker admin specs to resume worker afterwards"
},
{
"from": "human",
"value": "feature \"Worker management\" do\n let(:worker_index) { WorkerIndex.new(Capybara) }\n let(:worker_detail) { WorkerDetail.new(Capybara) }\n\n scenario \"Admin views worker index\" ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove method that we don't use.\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n protect_from_forgery\n after_filter :prepare_unobtrusive_flash\n\n def index\n render :text => '', :layout => 'application'\n end\n\n p... | ruby | chosen |
[
{
"from": "system",
"value": "Fix \"class Cli\" -> \"describe Cli do\"\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\nrequire \"fileutils\"\n\nmodule Ajw2\n class Cli\n describe \"#execute\" do\n context \"with valid argument\" do\n before do\n @source = fix... | ruby | chosen |
[
{
"from": "system",
"value": "Use interpolation for flatfile test\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire './generate_flatfile'\n\ndescribe \"Flatfiles backend\", :js => true do\n\n type = \"Flatfile\"\n\tname = \"Metric\"\n\tmetric = \"#{type}~#{name}\"\n\t\n\tb... | ruby | chosen |
[
{
"from": "system",
"value": "Update where spec helper is loaded\n"
},
{
"from": "human",
"value": "#require \"spec_helper\"\nrequire_relative \"../lib/myosx/homebrew\"\n\nglobal_config = YAML.load_file('spec/example.config.yaml')\nconfig = global_config['homebrew']\npackages = config['packages'... | ruby | chosen |
[
{
"from": "system",
"value": "Use `expect` syntax with rspec\n"
},
{
"from": "human",
"value": "module Support\n module Files\n def set_file_contents(string)\n write_file(filename, string)\n vim.edit!(filename)\n end\n\n def file_contents\n IO.read(filename).chop # remov... | ruby | chosen |
[
{
"from": "system",
"value": "Fix issue in server model test\n"
},
{
"from": "human",
"value": "require \"helper\"\n\n# TODO - Global vars are so bad. Do this better.\n\ndescribe \"VMRequests\" do\n describe \"CreateRequest\" do\n it \"returns the new VM\" do\n s = get_compute.servers.c... | ruby | chosen |
[
{
"from": "system",
"value": "Allow older carrierwave versions as well\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'carrierwave/webp/version'\n\nGem::Specification.new do |spe... | ruby | chosen |
[
{
"from": "system",
"value": "Create random secret on Donation creation\n"
},
{
"from": "human",
"value": "class Donation < ActiveRecord::Base\n belongs_to :round\n attr_accessible :amount, :email, :name, :stripe_token, :round\n\n after_initialize do |donation|\n if amount.nil?\n self... | ruby | chosen |
[
{
"from": "system",
"value": "Add travelers association to Locations\n"
},
{
"from": "human",
"value": "class Location < ActiveRecord::Base\n has_many :activities\n has_many :itineraries, through: :activities\nend\n"
},
{
"from": "gpt",
"value": "class Location < ActiveRecord::Base... | ruby | chosen |
[
{
"from": "system",
"value": "Stop scanning the whole file to check if llanfair\n\nI tested this with every llanfair file I have (around 20) and it worked\nfine. I assume this come from the object serialization of the run\nobject.\n"
},
{
"from": "human",
"value": "class RunFile < ActiveRecord:... | ruby | chosen |
[
{
"from": "system",
"value": "Add swap fields to Memory widget\n"
},
{
"from": "human",
"value": "# Copyright (C) 2008 Dag Odenhall <dag.odenhall@gmail.com>\n# Licensed under the Academic Free License version 3.0\n\nrequire 'amazing/widget'\nrequire 'amazing/proc_file'\n\nmodule Amazing\n modul... | ruby | chosen |
[
{
"from": "system",
"value": "Set curl's maximum timeout to 30 seconds.\n"
},
{
"from": "human",
"value": "require 'rest'\n\nmodule CocoaPodsStats\n class Sender\n API_URL = 'https://stats.cocoapods.org/api/v1/install'\n\n def send(targets, pod_try: false)\n body = {\n :target... | ruby | chosen |
[
{
"from": "system",
"value": "Add a maximum length to the password fields since very long passwords break connects\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule ReservationValidations\n def self.included(mod)\n mod.class_eval do\n validates_presence_of :user... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor FC004 to catch more w/o as many false positives\n\nI sorta thing this should be a series of regex statements, but this does work and we have expanded specs to catch the false positives I encountered along the way\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6b... | ruby | chosen |
[
{
"from": "system",
"value": "Include latest_stable_release to project search api response\n\nFixes #635\n"
},
{
"from": "human",
"value": "class Api::SearchController < Api::ApplicationController\n skip_before_action :check_api_key, only: :searchcode\n\n def index\n @query = params[:q]\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add cheatsheet to show route\n"
},
{
"from": "human",
"value": "class CheatsheetController < ApplicationController\n\n def index\n @Cheatsheet = Cheatsheet.all\n end\n\n def show\n\n\n end\nend\n"
},
{
"from": "gpt",
"value": "class CheatsheetCont... | ruby | chosen |
[
{
"from": "system",
"value": "Fix mailer method name typo.\n"
},
{
"from": "human",
"value": "class SendArticleEndorsementJob < Struct.new(:endorsement_id)\n def perform\n endorsement = ArticleEndorsement.find(endorsement_id)\n contributors = endorsement.article.contributors\n article ... | ruby | chosen |
[
{
"from": "system",
"value": "Add refresh_fulfillment and update_fulfillment methods\n"
},
{
"from": "human",
"value": "module Spree\n class Fulfillment\n class Provider\n\n def services\n raise NotImplementedError, \"#services is not supported by #{self.class.name}.\"\n end... | ruby | chosen |
[
{
"from": "system",
"value": "[REFACTORING] Use message based type testing in Results::Item\n"
},
{
"from": "human",
"value": "module Slingshot\n module Results\n\n class Item < Hash\n\n # Create new instance, recursively converting all Hashes to Item\n # and leaving everything els... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade Erlang/OTP R16 to B"
},
{
"from": "human",
"value": "default[:kerl][:releases] = %w(R14B02 R14B03 R14B04 R15B R15B01 R15B02 R15B03 R16A)\ndefault[:kerl][:path] = \"/usr/local/bin/kerl\"\n"
},
{
"from": "gpt",
"value": "default[:kerl][:release... | ruby | chosen |
[
{
"from": "system",
"value": "Set curation concerns working path from UPLOAD_PATH environment variable\n"
},
{
"from": "human",
"value": "CurationConcerns.configure do |config|\n # Location on local file system where derivatives will be stored.\n # If you use a multi-server architecture, this ... | ruby | chosen |
[
{
"from": "system",
"value": "Correct readme file name in gemspec\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"iso639_config/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do... | ruby | chosen |
[
{
"from": "system",
"value": "Remove executables and add dependencies to gemspec\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nGem::Specification.new do |spec|\n spec.name = \"s... | ruby | chosen |
[
{
"from": "system",
"value": "Add Nokogiri 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 'kosmos/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix .podspec to specify arc\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"Stripe\"\n s.version = \"1.0.1\"\n s.summary = \"Stripe is a web-based API for accepting payments online.\"\n s.license ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for working under tests without request objects\n"
},
{
"from": "human",
"value": "require \"utf8_enforcer_workaround/version\"\nrequire 'action_view'\n\nmodule Utf8EnforcerWorkaround\n module ActionView\n module Helpers\n module FormTagHelper\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused task group class\n"
},
{
"from": "human",
"value": "class PagesController < ApplicationController\n\n def sabbaticals\n end\n\n def core_team\n end\n\n def tos\n end\n\n def home\n test = ab_test('signup_conversion_from_focus_homepage', 'focu... | ruby | chosen |
[
{
"from": "system",
"value": "Bring back Konstantin to about us\n"
},
{
"from": "human",
"value": "# Static pages\nclass PagesController < ApplicationController\n def section_choice\n end\n\n def home\n end\n\n def about\n @names = %w(amina andrea anja anna anne astrid basti bettina birt... | ruby | chosen |
[
{
"from": "system",
"value": "Set username when creating a new user\n"
},
{
"from": "human",
"value": "class UsersController < ApplicationController\n authorize_resource\n\n respond_to :html, :json\n\n def index\n @project = current_user.projects.friendly.find(params[:project_id])\n @us... | ruby | chosen |
[
{
"from": "system",
"value": "Change param in login method from username to email\n"
},
{
"from": "human",
"value": "class UsersController < ApplicationController\n\n def login\n user = User.find_by(username: params['username'])\n if user.authenticate(params['password'])\n login_user... | ruby | chosen |
[
{
"from": "system",
"value": "Add an active scope to CloudDatabaseFlavor\n\nSimplify filtering cloud_database_flavors to only active ones by adding\na scope `where(:enabled => true)`\n"
},
{
"from": "human",
"value": "class CloudDatabaseFlavor < ApplicationRecord\n include NewWithTypeStiMixin\n... | ruby | chosen |
[
{
"from": "system",
"value": "Allow order to ship normally if Fishbowl isn't enabled"
},
{
"from": "human",
"value": "module Spree\n Order.class_eval do\n has_many :fishbowl_logs\n attr_accessible :fishbowl_id, :so_number\n\n scope :fishbowl_submitted, lambda { where(arel_table[:fishbo... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor : less code :-)\n"
},
{
"from": "human",
"value": "class FactWithContext\n attr_reader :fact\n\n def initialize(options)\n @fact = options.fetch(:fact)\n @graph = options.fetch(:graph)\n end\n\n def context_summary\n context = @graph.by_subject... | ruby | chosen |
[
{
"from": "system",
"value": "Use 'require_relative' rather than 'require' so that consumers don't\nhave to fuss with the library path.\n"
},
{
"from": "human",
"value": "require \"gnucash/account\"\nrequire \"gnucash/account_transaction\"\nrequire \"gnucash/book\"\nrequire \"gnucash/transaction... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Removed require of core_ext\"\n\nThis reverts commit 7caa3903a91177403d54acb56154c00cfbc01615.\n"
},
{
"from": "human",
"value": "require \"find_as_hashes/version\"\nrequire 'active_record'\n\nmodule FindAsHashes\n\n module Relation\n def all_as_hashes\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the requiring of init for 1.9.2.\n"
},
{
"from": "human",
"value": "namespace :minify do\n desc \"Builds the minified CSS and JS assets.\"\n task :build do\n require 'init'\n puts \"Building...\"\n\n files = Sinatra::Minify::Package.build\n files.e... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused options on Device"
},
{
"from": "human",
"value": "module FiveMobilePush\n class Device\n\n VALID_OPTION_KEYS = [:alias, :email]\n\n attr_accessor :device_uid\n\n def initialize(client, device_uid, options={})\n @client = client\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Add workaround for NoMethodError in gem package\n"
},
{
"from": "human",
"value": "require \"gosu\"\nrequire \"rhythmmml/scene\"\n\nmodule Rhythmmml\n class Game < Gosu::Window\n attr_reader :mml, :options, :scenes\n def initialize(mml, options={})\n sup... | ruby | chosen |
[
{
"from": "system",
"value": "Handle the exception if an invalid variable name reaches method_missing\n"
},
{
"from": "human",
"value": "module Specinfra\n module Configuration\n class << self\n VALID_OPTIONS_KEYS = [\n :backend,\n :env,\n :path,\n :shell,\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow env is being different than test\n"
},
{
"from": "human",
"value": "module Spring\n module Commands\n class Spinach\n def env(*)\n \"test\"\n end\n\n def exec_name\n \"spinach\"\n end\n end\n\n Spring.register_comman... | ruby | chosen |
[
{
"from": "system",
"value": "Remove monkey patching from solidus specs\n\nWe don't to monkeypatch rspec in anymore (since its > 2009 and we've now\nupdated our specs)\n"
},
{
"from": "human",
"value": "if ENV[\"COVERAGE\"]\n # Run Coverage report\n require 'simplecov'\n SimpleCov.start do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up build output, not all machines have /etc/issue."
},
{
"from": "human",
"value": "namespace :cruise do\n \n task :info do\n # Add local user gem path, in case rcov was installed with non-root access\n ENV['PATH'] = \"#{ENV['PATH']}:#{File.join(Gem.us... | ruby | chosen |
[
{
"from": "system",
"value": "Use release_path in setup_db recipe.\n"
},
{
"from": "human",
"value": "# Application\nset :application, 'bookyt'\nset :repository, 'git@github.com:huerlisi/bookyt.git'\n\nrequire 'capones_recipes/cookbook/rails'\nrequire 'capones_recipes/tasks/thinking_sphinx'\nre... | ruby | chosen |
[
{
"from": "system",
"value": "Change eport to use index\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n devise_for :users\n\n resources :categories\n resources :items, path: \"/inventory\" do\n get :edit_stock, on: :member\n end\n resources :orders\n resources :org... | ruby | chosen |
[
{
"from": "system",
"value": "Fix LICENSE filename in gem file list\n"
},
{
"from": "human",
"value": "require File.expand_path('../lib/mysql2/version', __FILE__)\n\nGem::Specification.new do |s|\n s.name = %q{mysql2}\n s.version = Mysql2::VERSION\n s.authors = [\"Brian Lopez\"]\n s.license ... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for bulk deletion of files\n"
},
{
"from": "human",
"value": "require 'cabinet'\n\ndescribe Cabinet::Local do\n cl = Cabinet::Local.new('/tmp')\n file_name = 'cabinet.test'\n file_content = (0...50).map{('a'..'z').to_a[rand(26)]}.join\n\n i... | ruby | chosen |
[
{
"from": "system",
"value": "Use withscores option in median too\n"
},
{
"from": "human",
"value": "require 'redis'\n\nclass Leaderboard\n\n attr_accessor :name\n\n def initialize(name)\n @name = name\n @redis = Redis.new\n end\n\n def []=(user_id, score)\n @redis.zadd(@name, score... | ruby | chosen |
[
{
"from": "human",
"value": "Add tool to remove old version guards in ruby/spec\n"
},
{
"from": "gpt",
"value": "# Remove old version guards in ruby/spec\n\ndef dedent(line)\n if line.start_with?(\" \")\n line[2..-1]\n else\n line\n end\nend\n\ndef remove_guards(guard, keep)\n Dir[\"*... | ruby | chosen |
[
{
"from": "system",
"value": "Remove lint warnings for unused variables\n"
},
{
"from": "human",
"value": "require 'yaml'\n\nrequire_relative 'md'\nrequire_relative 'slug'\n\nmodule SectionIndex\n # (Array FilePath) -> (Map Tag File)\n Generate = lambda do |manifest|\n idx = {}\n n_ = 0\... | ruby | chosen |
[
{
"from": "system",
"value": "Use attr_reader instead of attr_accessor\n"
},
{
"from": "human",
"value": "module Roomy\n class World\n attr_accessor :rooms\n\n PROMPT = \"> \"\n\n def initialize(&block)\n @rooms = {}\n instance_eval(&block)\n end\n\n def enter(room)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Split create build url to an application slug and token\n"
},
{
"from": "human",
"value": "class Service::AppHarbor < Service\n string :create_build_url\n \n def receive_push\n create_build_url = data['create_build_url']\n\n raise_config_error 'Missing Crea... | ruby | chosen |
[
{
"from": "system",
"value": "Update rake requirement from ~> 12.3 to ~> 13.0\n\nUpdates the requirements on [rake](https://github.com/ruby/rake) to permit the latest version.\n- [Release notes](https://github.com/ruby/rake/releases)\n- [Changelog](https://github.com/ruby/rake/blob/master/History.rdoc)\n- [... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade Coda 2.app to v2.5\n"
},
{
"from": "human",
"value": "class Coda < Cask\n version '2.0.13'\n sha256 '89ae6432997915fa93c5a5eafaf4ea1774af78961ff0b7f37722a149618387aa'\n\n url \"https://panic.com/coda/d/Coda%20#{version}.zip\"\n appcast 'http://www.panic.... | ruby | chosen |
[
{
"from": "human",
"value": "Add sieve of Eratosthenes-based solution to problem 10\n"
},
{
"from": "gpt",
"value": "=begin\n\nThe sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.\n\nFind the sum of all the primes below two million.\n\n=end\n\ndef generate_primes(n)\n sieve = Array.new(n, true... | ruby | chosen |
[
{
"from": "system",
"value": "Use brew's c++11 flag, full name of opencv formula\n"
},
{
"from": "human",
"value": "require 'formula'\n\nclass Alvar < Formula\n homepage 'http://virtual.vtt.fi/virtual/proj2/multimedia/alvar/index.html'\n url 'https://github.com/tzwenn/alvar.git', :branch => 'm... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary stuff from gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path('../lib', __FILE__)\n\nrequire 'pronto/version'\n\nGem::Specification.new do |s|\n s.name = 'pronto'\n s.version = Pronto::VERSI... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec to match current conventions in other dm gems\n"
},
{
"from": "human",
"value": "#encoding: utf-8\n\nGem::Specification.new do |gem|\n gem.name = 'devtools'\n gem.version = '0.0.1'\n gem.authors = [ 'Markus Schirp' ]\n gem.email ... | ruby | chosen |
[
{
"from": "system",
"value": "Bump dry-schema to >= 0.5.0\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire File.expand_path('lib/dry/validation/version', __dir__)\n\nGem::Specification.new do |spec|\n spec.name = 'dry-validation'\n spec.version = Dry::... | ruby | chosen |
[
{
"from": "human",
"value": "Add the Apple Lossless Audio Codec decoder formula.\n\nAdd a formula for the alac binary from http://craz.net/programs/itunes/alac.html.\n\nCloses #13017.\n\nSigned-off-by: Max Howell <mxcl@me.com>\n\nRenamed alac.\n"
},
{
"from": "gpt",
"value": "require 'formula'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Change the path specifier for the API application\n"
},
{
"from": "human",
"value": "require File.dirname(__FILE__) + '/config/boot.rb'\n\nuse ::Rack::ShowExceptions\n# use Rack::CommonLogger\n# use Rack::Reloader, 0\nuse ::Rack::Session::Cookie, :secret => \"kjldfs... | ruby | chosen |
[
{
"from": "human",
"value": "Set up the faye server for pub/sub messaging.\n"
},
{
"from": "gpt",
"value": "require 'faye'\nFaye::WebSocket.load_adapter('thin')\n\n\nbayeux = Faye::RackAdapter.new(:mount => 'faye', :timeout => 50)\n\n\nrun bayeux"
}
] | ruby | chosen |
[
{
"from": "system",
"value": "Destroy the MiniMagick image when no longer used\n"
},
{
"from": "human",
"value": "class Thumbnail\n \n def initialize picture\n @picture = picture\n end\n \n def to_param\n @picture.to_param\n end\n\n def self.from_param param\n begin\n Pictur... | ruby | chosen |
[
{
"from": "system",
"value": "Change to use built-in symbols\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire_relative \"../lib/tty-prompt\"\nrequire 'pastel'\n\nprompt = TTY::Prompt.new\nheart = prompt.decorate('❤ ', :magenta)\n\nres = prompt.mask('What is your secret... | ruby | chosen |
[
{
"from": "human",
"value": "Update hash file with interior design questionairre\n"
},
{
"from": "gpt",
"value": "# Create a design application hash\n# For each question\n# Print the question to the screen\n# Store user answer as the value to the question key\n\n# Print out full hash\n# Ask ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix crash on missing padding\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n\nrequire 'sinatra'\nrequire 'json'\n\nrequire_relative 'left-pad'\n\nset :port, 3000\n\nget '/' do\n str = params['str'] || \"\"\n ch = params['ch'] || \" \"\n len = par... | ruby | chosen |
[
{
"from": "system",
"value": "Add deprecated message into gemspec\n\nBecause be going to rename this gem to 'Pseudoo'.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'pseudo_object/v... | ruby | chosen |
[
{
"from": "system",
"value": "Create new site, disable default.\n"
},
{
"from": "human",
"value": "# No default site\ntemplate '/etc/nginx/sites-available/no-default' do\n source 'no-default.erb'\n owner 'root'\n group 'root'\n mode '0755'\nend\n\nfile \"/etc/nginx/sites-enabled/default\" do... | ruby | chosen |
[
{
"from": "system",
"value": "Add an early check for the minimum Ruby version for ruby/spec\n"
},
{
"from": "human",
"value": "use_realpath = File.respond_to?(:realpath)\nroot = File.dirname(__FILE__)\ndir = \"fixtures/code\"\nCODE_LOADING_DIR = use_realpath ? File.realpath(dir, root) : File.exp... | ruby | chosen |
[
{
"from": "system",
"value": "Add author, email, summary and description to gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"tablebuilder/version\"\n\nGem::Specification.new do |s|\n s.name = \"tablebuilder\"\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix gemspec to be java platform only.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'jo/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Add fetch data from postal\n"
},
{
"from": "human",
"value": "class Address < ActiveRecord::Base\n translates :building_name, :street_name, \n :street_name, :province_name, :district_name, :sub_district_name,\n :extra_info\n\n belongs_to :addressable, polymo... | ruby | chosen |
[
{
"from": "system",
"value": "Add tests for eager_loading counter\n"
},
{
"from": "human",
"value": "require File.join(File.dirname(__FILE__), 'test_helper')\n\nclass CounterTest < Test::Unit::TestCase\n\n def setup\n @user = User.create\n end\n \n def test_default_counter_value\n asse... | ruby | chosen |
[
{
"from": "human",
"value": "Add a data migration to trim excessive slugs\n\nWe introduced a limit on slug length in ca28979, however documents\ncreated before this time don't conform to this validation, which breaks\nthe crawler.\n\nThis data migration cleans up the old slugs for published editions by\nupd... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration to remove bezier 110 and 119\n"
},
{
"from": "gpt",
"value": "class RemoveBezier110And119 < ActiveRecord::Migration[5.2]\n\n def up\n OutputElement.find_by_key(:source_of_district_heating_in_households).destroy!\n OutputElement.find_by_key(:sourc... | ruby | chosen |
[
{
"from": "system",
"value": "Add VCR as development dependency\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'libsyn/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Add brief summary to 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 'im_alive/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove open-ended dependencies from gemspec\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'jbuilder'\n s.version = '2.0.5'\n s.author = 'David Heinemeier Hansson'\n s.email = 'david@37signals.com'\n s.summary = 'Create J... | ruby | chosen |
[
{
"from": "system",
"value": "Update debugger dependency version to 1.6.2\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'debugger/xml/version'\n\nGem::Specification.new do... | ruby | chosen |
[
{
"from": "system",
"value": "Add Transaction object and use hash for storing steps\n"
},
{
"from": "human",
"value": "require 'transproc'\nrequire 'transflow/version'\n\nmodule Transflow\n class StepDSL\n attr_reader :name\n\n attr_reader :handler\n\n attr_reader :container\n\n att... | ruby | chosen |
[
{
"from": "system",
"value": "Allow mock test cases to be run with a report other than :progress\n"
},
{
"from": "human",
"value": "require \"protest\"\nrequire \"test/unit/assertions\"\n\nProtest.report_with(:documentation)\n\nmodule TestHelpers\n class IORecorder\n attr_reader :messages\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Make fixture inserts use safe mode to ensure all fixtures are loaded before tests are run\n"
},
{
"from": "human",
"value": "ENV[\"RAILS_ENV\"] = \"test\"\nrequire File.expand_path('../../config/environment', __FILE__)\nrequire 'rails/test_help'\n\nclass ActiveSuppo... | ruby | chosen |
[
{
"from": "system",
"value": "Remove rubygems require from tests.\n\nOn installations using rubygems, this require may be specified\nglobally via RUBYOPT:\n\nexport RUBYOPT=-rubygems\n"
},
{
"from": "human",
"value": "require 'rubygems'\n\n# Want to test the files here, in lib, not in an install... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug caused by fix of incompatible deprecation warning\n"
},
{
"from": "human",
"value": "ENV[\"RAILS_ENV\"] = \"test\"\n\nrequire 'pathname'\n\nif RUBY_VERSION >= '1.9'\n require 'simplecov'\n SimpleCov.start do\n if artifacts_dir = ENV['CC_BUILD_ARTIFACTS'... | ruby | chosen |
[
{
"from": "system",
"value": "Change require to remove Mocha deprecation warning.\n"
},
{
"from": "human",
"value": "if ENV[\"USE_SIMPLECOV\"]\n require \"simplecov\"\nend\n\nENV[\"RAILS_ENV\"] = \"test\"\nrequire File.expand_path('../../config/environment', __FILE__)\n\nrequire 'rails/test_hel... | ruby | chosen |
[
{
"from": "system",
"value": "Exclude tests from code coverage report\n"
},
{
"from": "human",
"value": "unless ENV['CI']\n require 'simplecov'\n SimpleCov.start\nend\nrequire 'twurl'\nrequire 'minitest/autorun'\nrequire 'rr'\n\nclass MiniTest::Unit::TestCase\n include RR::Adapters::TestUnit\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix indentation issue, make Utils work\n\nActual error was worse: methods were created in the wrong module because\nof an early end. It was indentation that made me notice\n"
},
{
"from": "human",
"value": "module ActiveCMIS\n module Internal\n module Utils\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update RSpec dep to 2.14\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'naught/version'\n\nGem::Specification.new do |spec|\n spec.name = \"n... | ruby | chosen |
[
{
"from": "system",
"value": "Remove explicit activesupport from dependencies\n\nIt is required for railties.\n"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift 'lib'\nrequire \"agile_serializer/version\"\n\nGem::Specification.new do |s|\n s.name = \"agile_serializer\"\n s.vers... | ruby | chosen |
[
{
"from": "system",
"value": "Rewrite RobotTest to verify delegation\n\nThis commit focuses on verifying that command messages are being\nsent. It renames public interface methods for the placement object.\nIt removes the ! from rotate!() and update!(). It does\nthis to target a more consisten interface.\n"... | ruby | chosen |
[
{
"from": "system",
"value": "Update deployment target in podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\ns.name = 'TaklDateTools'\ns.version = '0.1.0'\ns.summary = 'Swift 3 conversion of CupertinoYankee pod and Swift 3 conversion of select methods ... | ruby | chosen |
[
{
"from": "system",
"value": "Add the name as well\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'json'\n\nmodule Gattica\n class Variant\n \tinclude Convertible\n\n attr_reader :status, :url, :weight, :won\n\n def initialize(json)\n @status = json['status']\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use embedded data to retrieve name\n"
},
{
"from": "human",
"value": "module ImdbApi\n class Person < Base\n\n def self.find(imdb_id)\n doc = CacheFile.person_data(imdb_id)\n\n name = doc.at('h1.header').at(\"span.itemprop\").inner_html.strip\n na... | ruby | chosen |
[
{
"from": "system",
"value": "Add an example for LJMedia::Error::InvalidUsername usage\n\n[skip ci] documentation change only\n"
},
{
"from": "human",
"value": "module LJMedia\n\n # This module contains variuos error classes raised by our methods\n module Error\n\n # Raises when the provide... | ruby | chosen |
[
{
"from": "system",
"value": "Fix email address in podspec.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"Typographizer\"\n s.version = \"0.1.0\"\n s.summary = \"Smart Quotes for Swift Apps.\"\n s.description = <<-DESC\n Typograph... | ruby | chosen |
[
{
"from": "system",
"value": "Replace Ruboty::Capistrano.config with config variable\n"
},
{
"from": "human",
"value": "require 'ruboty/capistrano/actions/deploy'\nrequire 'ruboty/capistrano/actions/rollback'\nrequire 'ruboty/capistrano/verification'\nrequire 'ruboty/capistrano/deploy_source'\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Remove rarely used method\n* Best defined where actually used\n* Method was also active record specific so if anything should be in rails_core_extensions\n"
},
{
"from": "human",
"value": "class Array\n \n def to_param\n self.collect { |element| element.respond... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.