conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "human",
"value": "Add test case for progress bars\n"
},
{
"from": "gpt",
"value": "require 'color-console'\n\nConsole.puts \"Starting...\", :green\n(0..100).each do |i|\n Console.show_progress 'Test progress', i\n sleep 0.1\n if i % 10 == 0\n Console.puts \"#{i}% compl... | ruby | chosen |
[
{
"from": "system",
"value": "Remove empty overrides in registrations controller\n"
},
{
"from": "human",
"value": "class Spree::UserRegistrationsController < Devise::RegistrationsController\n helper 'spree/base', 'spree/store'\n\n if Spree::Auth::Engine.dash_available?\n helper 'spree/anal... | ruby | chosen |
[
{
"from": "system",
"value": "Mark Ruby 2.4 as supported\n\nCloses: https://github.com/wincent/wikitext/issues/4\n"
},
{
"from": "human",
"value": "# Copyright 2008-present Greg Hurrell. All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification... | ruby | chosen |
[
{
"from": "system",
"value": "Add thumbnail to illustrated life\n"
},
{
"from": "human",
"value": "module ZooniverseData\n module Projects\n class IllustratedLife\n include Helpers\n\n def customize_subject\n original = convert_image(entry.location['standard']).input_image\n... | ruby | chosen |
[
{
"from": "system",
"value": "Build Number is now stored in shared hash\n"
},
{
"from": "human",
"value": "module Fastlane\n module Actions\n def self.increment_build_number(params)\n # More information about how to set up your project and how it works: \n # https://developer.apple... | ruby | chosen |
[
{
"from": "system",
"value": "Add explicit caller param to the deprecation warning method\n"
},
{
"from": "human",
"value": "module Brainstem\n module Concerns\n module PresenterDSL\n class BaseBlock\n attr_accessor :configuration, :block_options\n\n def initialize(configu... | ruby | chosen |
[
{
"from": "system",
"value": "Bump Ruby version to 1.9.3-p194, and Ubuntu version to 12.04\n"
},
{
"from": "human",
"value": "set_default :ruby_version, \"1.9.3-p125\"\nset_default :rbenv_bootstrap, \"bootstrap-ubuntu-10-04\"\n\nnamespace :rbenv do\n desc \"Install rbenv, Ruby, and the Bundler ... | ruby | chosen |
[
{
"from": "system",
"value": "Make all the webhooks connect to Auxo App.\n"
},
{
"from": "human",
"value": "module Integrity\n class ProjectFinder\n def self.find(repo)\n new(repo).find\n end\n\n def initialize(repo)\n @repo = repo\n end\n\n def find\n unless Integ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a bug that displays inappropriate diff in file deletion\n"
},
{
"from": "human",
"value": "require 'itamae'\nrequire 'erb'\nrequire 'tempfile'\n\nmodule Itamae\n module Resource\n class Template < RemoteFile\n define_attribute :variables, type: Hash, de... | ruby | chosen |
[
{
"from": "system",
"value": "Add additional files to gemspec.\n\n[ci skip]"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/interpol/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Myron Marston\"]\n gem.email ... | ruby | chosen |
[
{
"from": "system",
"value": "Use --rc= instead of --rc\n"
},
{
"from": "human",
"value": "require 'rails/version'\n\nif ['--version', '-v'].include?(ARGV.first)\n puts \"Rails #{Rails::VERSION::STRING}\"\n exit(0)\nend\n\nif ARGV.first != \"new\"\n ARGV[0] = \"--help\"\nelse\n ARGV.shift\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix variable names in MigrateNamespacedPolymorphicModels migration\n"
},
{
"from": "human",
"value": "class MigrateNamespacedPolymorphicModels < ActiveRecord::Migration\n def up\n ['spree_payments', 'spree_adjustments', 'spree_log_entries'].each do |table|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Handle non existing method scopes.\n\nSigned-off-by: Yorick Peterse <82349cb6397bb932b4bf3561b4ea2fad50571f50@gmail.com>\n"
},
{
"from": "human",
"value": "module RubyLint\n module Helper\n ##\n # Helper module that provides various methods for looking up met... | ruby | chosen |
[
{
"from": "system",
"value": "Add task for adding people to register\n"
},
{
"from": "human",
"value": "namespace :content_register do\n desc \"registers all organisations with the content register\"\n task :organisations => :environment do\n puts \"Updating all Organisation entries in the ... | ruby | chosen |
[
{
"from": "system",
"value": "[0.99] Make http client docs private\n"
},
{
"from": "human",
"value": "require 'uri'\nrequire 'net/http'\n\nmodule Timezone\n # A basic HTTP Client that handles requests to Geonames and Google.\n #\n # You can create your own version of this class if you want to... | ruby | chosen |
[
{
"from": "system",
"value": "Make Merb controller more specific to avoid namespace conflicts\n"
},
{
"from": "human",
"value": "# = Merb Standalone SWX Ruby Server\n# \n# An example of how simple it is to build a standalone SWX Ruby server using Merb.\n# \n# == Prerequisites\n# \n# * SWX Ruby G... | ruby | chosen |
[
{
"from": "system",
"value": "Update attributes for device data updater\n\n\nFormer-commit-id: 45047d508513a6d9ff0635cfd84db74813c06b6e [formerly 00bc1b9d43cf4a15a24fbbeebc3c870e606d84fb] [formerly f219bfdf0e89b67a64a54f34b6037b5d8f5abbe2 [formerly 751a2ab74b56410b68168ec8e6f023bb02802e4e [formerly 64dfdc70... | ruby | chosen |
[
{
"from": "system",
"value": "Update Node.js versions for current/future releases\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\n# Node 12.x\nif property[:name] =~ /v0.12./\n describe command('node -v') do\n its(:stdout) { should contain('v0.12.13') }\n end\nend\n\n# Node 4.x\n... | ruby | chosen |
[
{
"from": "system",
"value": "Put CountDistinct in MiniFacet module\n"
},
{
"from": "human",
"value": "# Can be included in any class that responds to #each. \n# Such as Array.\nmodule CountDistinct\n def count_distinct(purge_smaller_than=0)\n h={}\n self.each {|e|\n h[e] ? h[e] += 1... | ruby | chosen |
[
{
"from": "system",
"value": "Add html-pipeline as a dependency\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nGem::Specification.new do |gem|\n gem.name = 'html-pipeli... | ruby | chosen |
[
{
"from": "system",
"value": "Use `column_exists?` to see if `:workflow_id` is present\n\nUsing the `column_names` method on the `Hyrax::PermissionTemplate` class leads to false positives, which lead to exceptions. Now it is possible for Hyrax-based apps to run `rails db:drop db:create db:migrate` without e... | ruby | chosen |
[
{
"from": "system",
"value": "Fix spec failures under Rails 4.1.\n"
},
{
"from": "human",
"value": "require 'logger'\n\nmodule Experimental\n class Loader\n def initialize(options = {})\n @logger = options[:logger] || Logger.new('/dev/null')\n end\n\n attr_reader :logger\n\n de... | ruby | chosen |
[
{
"from": "system",
"value": "Set MA logger to Logger::WARN\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nMetalArchives.configure do |c|\n ## Application identity (required)\n c.app_name = 'Headbanger'\n c.app_version = Headbanger::VERSION\n c.app_contact = ENV['MAILER_... | ruby | chosen |
[
{
"from": "system",
"value": "Add Torrent artist processing to task scheduler.\n"
},
{
"from": "human",
"value": "require 'feed_fetcher'\n\nscheduler = Rufus::Scheduler.start_new\n\nscheduler.every \"20m\" do\n FeedFetcher.fetch_and_save_torrents_from_tpb\nend\n"
},
{
"from": "gpt",
... | ruby | chosen |
[
{
"from": "system",
"value": "Support for positional parameters added\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nmodule ProxyPacRb\n # Proxy Pac parser\n #\n # @example Usage\n #\n # parser = Parser.new\n # parser.load('http://example.com/proxy.pac')\n # parser.read('file.pac')... | ruby | chosen |
[
{
"from": "human",
"value": "Load divisions.xml part of memxml2db.pl\n"
},
{
"from": "gpt",
"value": "require 'nokogiri'\n\n# TODO: Put this in configuration\nXML_DATA_DIRECTORY='/home/henare/tmp/openaustralia/pwdata/members'\n\nnamespace :application do\n desc 'memxml2db.pl'\n task reload_mem... | ruby | chosen |
[
{
"from": "system",
"value": "Disable block length cop for Twitter::NullObject\n"
},
{
"from": "human",
"value": "require 'naught'\n\nmodule Twitter\n NullObject = Naught.build do |config|\n include Comparable\n\n config.black_hole\n config.define_explicit_conversions\n config.defin... | ruby | chosen |
[
{
"from": "system",
"value": "Add error logging to WebhookController\n\nFor easier debugging.\n\nFixes #56\n"
},
{
"from": "human",
"value": "module StripeEvent\n class WebhookController < ActionController::Base\n before_filter do\n if StripeEvent.authentication_secret\n authenti... | ruby | chosen |
[
{
"from": "system",
"value": "Define collectd plugins separately for Bluebox.\n\nAs CPUs show up for the vserver host, it's safe to remove them.\nThey won't give us anything meaningful in this case.\n"
},
{
"from": "human",
"value": "include_recipe \"travis_worker_collectd\"\n\ncollectd_plugin \... | ruby | chosen |
[
{
"from": "human",
"value": "Add example that inspects server information & capabilities\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env ruby\n# encoding: utf-8\n\n__dir = File.dirname(File.expand_path(__FILE__))\nrequire File.join(__dir, \"example_helper\")\n\namq_client_example \"Inspecting se... | ruby | chosen |
[
{
"from": "system",
"value": "Add frozen string literal comment\n"
},
{
"from": "human",
"value": "class AddPrivacyRequireUserToUsers < ActiveRecord::Migration[6.1]\n def up\n add_column :users, :privacy_require_user, :boolean, default: false\n end\n\n def down\n remove_column :users, :... | ruby | chosen |
[
{
"from": "system",
"value": "Remove git token from code\n"
},
{
"from": "human",
"value": "require \"httparty\"\nrequire \"pry\"\n\nrequire \"githubber/version\"\nrequire \"githubber/issues\"\n\nmodule Githubber\n # Your code goes here...\n api = Issues.new(\"861af2db0c4cfc39ce9b835206a1511d5... | ruby | chosen |
[
{
"from": "system",
"value": "Use custom range keys for durations\n"
},
{
"from": "human",
"value": "require \"cdx/api/elasticsearch/grouping/grouping_detail\"\n\nclass DurationGroupingDetail < GroupingDetail\n attr_reader :ranges\n\n def initialize(name, field_definition, uri_param, ranges)\n... | ruby | chosen |
[
{
"from": "system",
"value": "Test commit: also forward order id to authenticate action.\n"
},
{
"from": "human",
"value": "module ShopifyLoginProtection\n\n def shopify_session\n if params[:shop].present?\n session[:return_to] = request.path\n redirect_to :controller => 'login', :... | ruby | chosen |
[
{
"from": "system",
"value": "Update internal render method reference\n\nSigned-off-by: Chris Keele <34c6fceca75e456f25e7e99531e2425c6c1de443@chriskeele.com>\n"
},
{
"from": "human",
"value": "module RailsTables\n module Renderers\n def link_to_object(object)\n property = object.try(:se... | ruby | chosen |
[
{
"from": "system",
"value": "Add style parameter to authenticated_url method\n"
},
{
"from": "human",
"value": "module Paperclip\n\n module ClassMethods\n def has_attached_file_with_destroy(*args)\n has_attached_file_without_destroy *args\n name = args[0]\n \n attr_acces... | ruby | chosen |
[
{
"from": "human",
"value": "Create a 4 hour heartbeat e-mail recipe in wt_monitoring that goes to the admin_email in wt_common\n"
},
{
"from": "gpt",
"value": "#\n# Cookbook Name:: wt_monitoring\n# Recipe:: email_heartbeat\n#\n# Copyright 2012, Webtrends\n#\n# All rights reserved - Do Not Redis... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure the exception handler is useable in 3rd party code (correct Events module)"
},
{
"from": "human",
"value": "class Object\n def catching_standard_errors(&block)\n begin\n yield\n rescue StandardError => e\n Events.trigger ['exception'], e\n... | ruby | chosen |
[
{
"from": "system",
"value": "Remove no longer needed test\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe RemoveFactFromChannel do\n describe \".perform\" do\n before do\n @ch = create :channel\n @f = create :fact\n @ch.sorted_cached_facts << @f\n @f... | ruby | chosen |
[
{
"from": "system",
"value": "Fix running tests on clang\n"
},
{
"from": "human",
"value": "require 'mkmf'\n$CFLAGS << ' -Wall -Werror'\nif ENV['DEBUG'] == 'true'\n $CFLAGS << ' -fbounds-check'\nend\n$warnflags.gsub!(/-Wdeclaration-after-statement/, \"\")\ncreate_makefile(\"liquid_c\")\n"
},
... | ruby | chosen |
[
{
"from": "system",
"value": "Fix an existing test that was not being run due to incorrect test name and broken assertion.\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass Blake2Test < MiniTest::Test\n def setup\n out_len = 32\n key = Blake2::Key.from_string('foo bar ... | ruby | chosen |
[
{
"from": "human",
"value": "Add routing spec for teams\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe TeamsController do\n describe 'routing' do\n\n it 'routes to #index' do\n get('/teams').should route_to('teams#index')\n end\n\n it 'routes to #new' do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use the new configuration idiom and remove USPS_LIVE.\n\nThe test data was defined in 2006 or before and isn't valid any more for\nmany of the tests.\n"
},
{
"from": "human",
"value": "require 'test/unit'\nrequire 'rubygems'\n\nmodule USPS\n # This class is a test ... | ruby | chosen |
[
{
"from": "system",
"value": "Clear quantity discount amount from registers before appying again\n"
},
{
"from": "human",
"value": "module Tray\n module Calculator\n module Discounters\n class QuantityDiscount < Discounter\n\n def call\n @cart.quantity_discounts.each do ... | ruby | chosen |
[
{
"from": "system",
"value": "Use `ActionDispatch::Session::MemCacheStore` instead of `Rack::Session::Memcache`\n"
},
{
"from": "human",
"value": "module Rack\n module Session\n class Memcache\n def destroy_session_with_jpmobile(env, session_id, options)\n destroy_session_without... | ruby | chosen |
[
{
"from": "system",
"value": "Enable origin competition filter also for point entry list\n"
},
{
"from": "human",
"value": "# -*- encoding : utf-8 -*-\nclass Jmd::AppearancesController < Jmd::BaseController\n\n # Set up filters\n has_scope :in_competition, only: :index\n has_scope :in_categor... | ruby | chosen |
[
{
"from": "system",
"value": "Add an optional method to allow checking if access is allowed."
},
{
"from": "human",
"value": "module OnTheSpot\n module ControllerExtension\n\n def self.included(base)\n base.extend ClassMethods\n end\n\n # if this method is called inside a controll... | ruby | chosen |
[
{
"from": "system",
"value": "Adjust code readability for CleanAbandonedSiteChannelsJob\n"
},
{
"from": "human",
"value": "class CleanAbandonedSiteChannelsJob < ApplicationJob\n queue_as :scheduler\n\n def perform\n # clear all abandoned site channels where a site channel is considered aban... | ruby | chosen |
[
{
"from": "system",
"value": "Add in the remaining attributes for the feed\n"
},
{
"from": "human",
"value": "class Api::Auth::FeedRepresenter < Api::BaseRepresenter\n property :id, writable: false\n property :created_at, writable: false\n property :updated_at, writable: false\n\n property :... | ruby | chosen |
[
{
"from": "human",
"value": "Add Facter fact about local volumes (i.e. exclude NFS mount points, etc ...).\n\nThis fact was originally added by Matt Moran and discussed on the puppet-dev\nmailing list. My version is an improvement upon it.\n\nSigned-off-by: Krzysztof Wilczynski <9bf091559fc98493329f7d61963... | ruby | chosen |
[
{
"from": "system",
"value": "Use logger instead of puts\n"
},
{
"from": "human",
"value": "require 'nokogiri'\n\nmodule DataLoader\n class DebatesParser\n # +xml_directory+ scrapedxml directory, e.g. files from http://data.openaustralia.org/scrapedxml/\n # The options hash takes:\n # ... | ruby | chosen |
[
{
"from": "human",
"value": "Fix loading errors in non-rails apps and rails apps with db-charmer used as a gem, not a plugin\n"
},
{
"from": "gpt",
"value": "module DbCharmer\n module Sharding\n module Method\n autoload :Range, 'db_charmer/sharding/method/range'\n autoload :HashMap... | ruby | chosen |
[
{
"from": "system",
"value": "Use req.path instead of env['REQUEST_PATH'].\n"
},
{
"from": "human",
"value": "require 'signature'\nrequire 'garufa/config'\n\nclass Cuba\n module Authentication\n def authenticate\n request = Signature::Request.new(req.request_method, env['REQUEST_PATH'],... | ruby | chosen |
[
{
"from": "system",
"value": "Use REXML to load the entities table (once, at startup) rather than Nokogiri.\n"
},
{
"from": "human",
"value": "require 'nokogiri'\nrequire 'singleton'\n\nmodule MaRuKu::Out\n Entity = Struct.new(:html_num, :html_entity, :latex_string, :latex_package)\n\n class E... | ruby | chosen |
[
{
"from": "human",
"value": "Add a simple script to compare output with redcarpet\n"
},
{
"from": "gpt",
"value": "#! /usr/bin/env ruby\n\nputs \"Maruku:\"\nputs `bin/maruku -o - --html-frag #{ARGV[0]}`\n\nputs \"Redcarpet:\"\nputs `redcarpet #{ARGV[0]}`\n"
}
] | ruby | chosen |
[
{
"from": "system",
"value": "Add republish all `/world` content rake task\n\nThis adds a rake task to republish all of the content under `/world` so:\n\n* corporate information pages (worldwide organisation flavour)\n* worldwide organisations\n* world locations\n\nThis will be required when the routes have... | ruby | chosen |
[
{
"from": "system",
"value": "Fix circular reference warning when loading tests\n"
},
{
"from": "human",
"value": "require 'minitest/spec'\nrequire 'minitest/autorun'\n\nMiniTest::Spec::DSL.class_eval do\n alias_method :test, :it\nend\n\nrequire 'charazard'\n"
},
{
"from": "gpt",
"v... | ruby | chosen |
[
{
"from": "system",
"value": "Remove code coverage for 1.8\n\nSimpleCov only works with Ruby 1.9+. It seems that it doesn't just move\non, but rather exits in failure. Removing code coverage for 1.8.\n"
},
{
"from": "human",
"value": "require 'simplecov'\nSimpleCov.start { add_filter '/test/' }\... | ruby | chosen |
[
{
"from": "system",
"value": "Add description to turn off the bundler warnings\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"hashable_lecter/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Speci... | ruby | chosen |
[
{
"from": "system",
"value": "Update the migrate task to the default rc4 script/generate version\n"
},
{
"from": "human",
"value": "namespace :radiant do\n namespace :extensions do\n namespace :mailer do\n \n desc \"Runs the migration of the Mailer extension\"\n task :migrate ... | ruby | chosen |
[
{
"from": "system",
"value": "Add start and batch_size args\n"
},
{
"from": "human",
"value": "namespace :search do\n\n desc 'Update comment tsvectors'\n task update_comment_tsvectors: :environment do\n Comment.find_in_batches.with_index do |comments, batch|\n puts \"Processing comment... | ruby | chosen |
[
{
"from": "system",
"value": "Add accessor for exclude_success for configuration checkbox\n"
},
{
"from": "human",
"value": "require 'bundler/setup'\nrequire 'hipchat/publisher'\n\nclass HipchatPublisher < Jenkins::Tasks::Publisher\n\n display_name \"HipChat Publisher\"\n\n attr_accessor :toke... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary development dependency (duplicated runtime).\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'tzinfo-data'\n s.version = '1.2013.9'\n s.summary = 'Timezone Data for TZInfo'\n s.description = 'TZInfo::Data contains d... | ruby | chosen |
[
{
"from": "system",
"value": "Include facts in rspec test\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'ansible' do\n it { is_expected.to compile.with_all_deps }\n\n it { should contain_class('ansible') }\n it {\n should contain_class('ansible::install')\n .tha... | ruby | chosen |
[
{
"from": "human",
"value": "Add feature spec for vision\n"
},
{
"from": "gpt",
"value": "require 'rails_helper.rb'\n\nfeature 'Vision' do\n\n scenario 'User can add a vision' do\n # given_i_am_on_the_homepage\n visit root_path\n\n # when_i_add_a_new_vision\n click_link \"Add Your V... | ruby | chosen |
[
{
"from": "system",
"value": "Fix cookstyle warning in the specs\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nplatforms = [\n {\n platform: 'ubuntu',\n version: '16.04',\n package: 'cron',\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Set ActionCable multiplayer controller logic\n"
},
{
"from": "human",
"value": "class MultiplayerController < ApplicationController\n before_action :set_game, only: [:show]\n\n def create\n if @game = Game.find_by(multiplayer?: true, status: \"pending\")\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix up webserver to at least call the right method\n"
},
{
"from": "human",
"value": "require 'sinatra/base'\n\nmodule Blimp\n class WebServer < Sinatra::Base\n configure :production, :development do\n enable :logging\n end\n\n before do\n logger... | ruby | chosen |
[
{
"from": "system",
"value": "Use `secret_key_base` on Rails 5 or later\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n\n# Your secret key for verifying the integrity of signed cookies.\n# If you change this key, all old signed cookies will become... | ruby | chosen |
[
{
"from": "system",
"value": "Add support for String specifiers along with Symbols\n"
},
{
"from": "human",
"value": "module Comma\n \n class Extractor\n\n def initialize(instance, &block)\n @instance = instance\n @block = block\n @results = []\n end\n \n def results... | ruby | chosen |
[
{
"from": "system",
"value": "Allow for BulkIndexFailure error in closing test\n\nWith elasticsearch 1.4.3+, when we try and do a bulk write to a closed\nindex, we get a \"success\" response code, but with error reports for the\nindividual documents which fail (rather than the 0.90.x behaviour of\nreturning... | ruby | chosen |
[
{
"from": "system",
"value": "Update and fix Vagrant provisioning\n"
},
{
"from": "human",
"value": "require 'chef/provisioning'\nrequire 'chef/provisioning/vagrant_driver'\n\nwith_driver \"vagrant:#{File.dirname(__FILE__)}/../../../vms\"\n\nmachine_batch do\n [%w(client 11), %w(server 12)].eac... | ruby | chosen |
[
{
"from": "system",
"value": "Add gem aruba ~> 0.4 to gemspec for dev\n"
},
{
"from": "human",
"value": "require File.expand_path('../lib/tmdb/version', __FILE__)\n\nGem::Specification.new do |s|\n s.name = 'neo-tmdb'\n s.version = TMDb::VERSION\n s.author = 'Andrew Smith'\n s.summary = 'A w... | ruby | chosen |
[
{
"from": "system",
"value": "Add some more tests to parse class\n"
},
{
"from": "human",
"value": "require_relative '../../../test_helper'\nrequire_relative '../../../../lib/automation_object/step_definitions/support/parse'\n\nclass TestStepDefinitionsSupportParse < Minitest::Test\n def setup\... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"moved selected file to the top of the open file list\"\n\nThis reverts commit d3f9d15b3f45aa529b0b9907391795262a4940d4.\n"
},
{
"from": "human",
"value": "module Merrol\n class FileController < Controller\n def initialize commands, views\n super co... | ruby | chosen |
[
{
"from": "system",
"value": "Add options attribute to rake task\n"
},
{
"from": "human",
"value": "# @author Eric Weinstein <eric.q.weinstein@gmail.com>\n\nrequire 'rake'\nrequire 'rake/tasklib'\n\nmodule Ruumba\n # Provides a custom Rake task.\n class RakeTask < Rake::TaskLib\n attr_acces... | ruby | chosen |
[
{
"from": "human",
"value": "Fix for OLIO-153. Adding indexes for improving AddEvent performance\n\n\ngit-svn-id: 9e8631a84d97bf96d7d440e76c2e3d95216d1dc3@1148179 13f79535-47bb-0310-9956-ffa450edef68\n"
},
{
"from": "gpt",
"value": "#\n# Licensed to the Apache Software Foundation (ASF) under one... | ruby | chosen |
[
{
"from": "system",
"value": "Change arg order on request_to_stellar for clarity since method has default value\n"
},
{
"from": "human",
"value": "require 'timeout'\nrequire 'ostruct'\n\nmodule StellarApi\n class Base\n\n attr_accessor :client, :response\n \n def initialize\n @clien... | ruby | chosen |
[
{
"from": "human",
"value": "Add rake tasks for cloning and pulling METADATA.jl"
},
{
"from": "gpt",
"value": "namespace :metadata do\n\n metadata_directory = 'tmp/METADATA.jl'\n\n desc \"clone metadata project\"\n task clone: :environment do\n `git clone https://github.com/JuliaLang/METAD... | ruby | chosen |
[
{
"from": "system",
"value": "Implement eql? for hash key usage\n"
},
{
"from": "human",
"value": "module TicTacToe\n\n class Mark\n\n attr_reader :symbol\n\n def initialize(symbol = \" \")\n @symbol = symbol\n end\n\n def ==(o)\n o.class == self.class && o.symbol == self.... | ruby | chosen |
[
{
"from": "system",
"value": "Fix rubocop warnings in AddSecurityGroup mixin\n"
},
{
"from": "human",
"value": "module Mixins\n module Actions\n module VmActions\n module AddSecurityGroup\n def add_security_group_vms\n assert_privileges(\"instance_add_security_group\")\n... | ruby | chosen |
[
{
"from": "human",
"value": "Add cloud tenant list page\n\n* create cloud_tenant_controller with show_list method\n* copied availability_zone icon for cloud_tenant icon\n - cloud_tenant needs dedicated icon\n* created show_list view for cloud_tenant\n\nNOTE: requires cloud_tenant.png icon ... currently bor... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing return for super call in Metric.const_missing\n"
},
{
"from": "human",
"value": "require 'raindrops'\n\nmodule LitmusPaper\n module Metric\n class UnixSocketUtilization < SocketUtilization\n attr_reader :socket_path\n\n def initialize(weigh... | ruby | chosen |
[
{
"from": "system",
"value": "Add tests for the integration controller\n"
},
{
"from": "human",
"value": "require \"test_helper\"\n\nclass Account::IntegrationsControllerTest < ActionController::TestCase\nend\n"
},
{
"from": "gpt",
"value": "require \"test_helper\"\n\nclass Account::... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test for new actions method changes.\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\ndescribe Github::API do\n subject { described_class.new(options) }\n\n it { described_class.included_modules.should include Github::Authorizat... | ruby | chosen |
[
{
"from": "system",
"value": "Reorder factory to appease JRuby's JSON parser\n"
},
{
"from": "human",
"value": "describe RspecApiHelpers::Strategies::JsonStrategy do\n before do\n User = Class.new { attr_accessor :name, :email }\n\n FactoryGirl.define do\n factory :user do\n n... | ruby | chosen |
[
{
"from": "system",
"value": "Add NilClass to uncloneable types\n"
},
{
"from": "human",
"value": "module Pakyow\n module Utils\n module Dup\n UNCLONEABLE = [Symbol, Fixnum]\n def self.deep(value)\n return value if UNCLONEABLE.include?(value.class)\n \n if valu... | ruby | chosen |
[
{
"from": "system",
"value": "Allow any number of arguments on touch method\n\nWe override activerecords touch method. We don't need any of the arguments passed into that method. Rails 5 introduces some additional attributes. In order to be save while upgrading we should change the signature to something mo... | ruby | chosen |
[
{
"from": "human",
"value": "Add spatial index on PhysicalRoads\n"
},
{
"from": "gpt",
"value": "class CreatePhysicalRoadsSpatialIndex < ActiveRecord::Migration\n def up\n add_index :physical_roads, :geometry, :spatial => true\n end\n\n def down\n remove_index :physical_roads, :geometry... | ruby | chosen |
[
{
"from": "human",
"value": "Create migration to turn dates into strings.\n\nThis migration will turn the opened_date and closed_date on all\ncma_cases, including both the bare attributes and extra_fields.\n\nThere's a big comment in the code about some weirdness with mongoid,\ntoo.\n\nThanks mongoid. Thong... | ruby | chosen |
[
{
"from": "system",
"value": "Fix :nocov: comment in code.\n"
},
{
"from": "human",
"value": "module Extensible\n ##\n # Utils contains utility methods whose implementation depends on the currently used Ruby version.\n module Utils\n class << self\n if RUBY_VERSION >= \"1.9\".freeze\n... | ruby | chosen |
[
{
"from": "system",
"value": "Change ReadMap reference to Poke::ReadMap in ProgramMap\n"
},
{
"from": "human",
"value": "class ProgramMap\n\n include ReadMap\n\n attr_reader :map_in_columns\n\n def initialize(pathfile)\n @map_in_columns = get_array_of_columns_from_file(pathfile)\n @widt... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake task for bump\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\ndesc 'Bumps the version to the next patch level, tags and pushes the code to\norigin repository and releases the gem. BOOM!'\ntask :release do\n system 'gem bump --tag --push... | ruby | chosen |
[
{
"from": "system",
"value": "Remove useless failing rspec test\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe LatestStable do\n it 'has a version number' do\n expect(LatestStable::VERSION).not_to be nil\n end\n\n it 'does something useful' do\n expect(false).to eq... | ruby | chosen |
[
{
"from": "system",
"value": "Add tests for multiple minutes\n"
},
{
"from": "human",
"value": "require 'rspec/given'\nrequire 'subtime/timer'\n\ndescribe Timer do\n\n let(:output) { double('output').as_null_object }\n\n describe \"#start\" do\n context \"without messages\" do\n let(:m... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a subtle bug involving RAILS_ROOT\n"
},
{
"from": "human",
"value": "require \"active_support/string_inquirer\"\nrequire \"active_support/basic_object\"\n\nmodule Rails\n class DeprecatedConstant < ActiveSupport::BasicObject\n def self.deprecate(old, new)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix indentation and remove extra `end`"
},
{
"from": "human",
"value": "require 'bcrypt'\n\nclass User < ActiveRecord::Base\n include BCrypt\n\n has_many :votes, :questions, :answers\n has_many :comments, through: :answers, source: :author_id\n validates :userna... | ruby | chosen |
[
{
"from": "human",
"value": "Add global feature interactor integration tests\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe 'global_features' do\n include PavlovSupport\n\n let(:current_user) { create :user }\n\n it 'initial state is empty' do\n as(current_user) do |pav... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"my attempt to fix e2e_sandbox test\"\n\nThis reverts commit 8db3d9d25a1ad55080a15d0ba6a40c5287164482.\n"
},
{
"from": "human",
"value": "=begin\n\nCopyright 2012-2013 inBloom, Inc. and its affiliates.\n\nLicensed under the Apache License, Version 2.0 (the \... | ruby | chosen |
[
{
"from": "system",
"value": "Check database permissions across different users.\n"
},
{
"from": "human",
"value": "require 'sinatra/base'\nrequire 'json'\nrequire 'pg'\n\nclass PostgresqlSmoketest < Sinatra::Base\n get '/' do\n connection.exec(\"SELECT 'ok'\").values.first.first\n end\n\n ... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.