conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Disable chef status alerts for nodes known to be down\n"
},
{
"from": "human",
"value": "name \"chef-server\"\ndescription \"Role applied to all chef servers\"\n\nrun_list(\n \"recipe[chef::server]\"\n)\n"
},
{
"from": "gpt",
"value": "name \"chef-serve... | ruby | chosen |
[
{
"from": "system",
"value": "Add POST requests to Browser.\n"
},
{
"from": "human",
"value": "module GitHub\n class User < Base\n attr_accessor :login, :token\n \n def get(login)\n if [:self, :me].include? login\n login = self.login\n end\n return GitHub::Browser... | ruby | chosen |
[
{
"from": "system",
"value": "Remove required keyword arguments syntax\n"
},
{
"from": "human",
"value": "module Hearst\n class Listener\n\n attr_reader :connection\n\n def initialize\n @connection = Bunny.new(ENV['AMQP_HOST'])\n end\n\n def listen\n connection.start\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove reference to the get_stream_head file\n"
},
{
"from": "human",
"value": "require 'http_eventstore/api/client'\nrequire 'http_eventstore/api/connection'\nrequire 'http_eventstore/api/errors_handler'\nrequire 'http_eventstore/connection'\nrequire 'http_eventsto... | ruby | chosen |
[
{
"from": "system",
"value": "Resolve intermittent delete job test\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass DeleteUserJobTest < ActiveJob::TestCase\n\n test \"all user articles should be deleted\" do\n u = User.find(9)\n assert_difference 'Topic.all.count', -7 do\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test checking that logger is injected\n"
},
{
"from": "human",
"value": "describe Travis::Api::App::Middleware::Logging do\n it 'configures ActiveRecord' do\n expect(ActiveRecord::Base.logger).to eq(Travis.logger)\n end\n\n it 'sets the logger' do\n moc... | ruby | chosen |
[
{
"from": "system",
"value": "Add TODO note for future possible performance improvement\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nmodule Axiom\n module Types\n\n # Abstract base class for every type\n class Type\n extend Options, DescendantsTracker\n\n accept_optio... | ruby | chosen |
[
{
"from": "system",
"value": "Fix detection of platform on MRI\n"
},
{
"from": "human",
"value": "if Ruby.platform =~ /java/\n # JRuby OpenSSL support does not include the PKCS5 module, so we use the\n # built-in Java crypto classes instead\n require_relative 'encryption/java_encryption... | ruby | chosen |
[
{
"from": "system",
"value": "Add starter code to comments controller.\n\nRemove finished code - to drive development\n\nFIXUP 7adc3060\n"
},
{
"from": "human",
"value": "class CommentsController < ApplicationController\n before_filter :set_comment, only: [:show, :update, :destroy]\n\n def ind... | ruby | chosen |
[
{
"from": "system",
"value": "Add index action to payments controller\n"
},
{
"from": "human",
"value": "class PaymentsController < ApplicationController\n def new\n if params[:purchase_id] && !Purchase.exists?(params[:purchase_id])\n flash[:warning] = \"Purchase not found.\"\n red... | ruby | chosen |
[
{
"from": "system",
"value": "Use Rake 11.X not 10.X\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'va... | ruby | chosen |
[
{
"from": "system",
"value": "Add active record query to mark non-blinded wines\n"
},
{
"from": "human",
"value": "class TastingsController < ApplicationController\n\n # redirect back to events show_quiz method\n def create\n event_wine = EventWine.find(params[:event_wine_id])\n event = ... | ruby | chosen |
[
{
"from": "human",
"value": "Add view and edit support for xref fields\n"
},
{
"from": "gpt",
"value": "class Field::XrefPresenter < FieldPresenter\n delegate :choices, :selected_choice, :to => :field\n delegate :browse_similar_items_link, :to => :view\n\n def input(form, method, options={})\... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the \"onwards\" text after slot range title\n"
},
{
"from": "human",
"value": "class SlotRangePresenter < SimpleDelegator\n def title\n \"#{from.strftime('%d %B %Y')} ➡ onwards\"\n end\n\n def self.wrap(objects)\n objects.map { |o| new(o) }\n end\ne... | ruby | chosen |
[
{
"from": "system",
"value": "Allow accounting role access to GlTransaction\n"
},
{
"from": "human",
"value": "require 'lanes/access'\nrequire_relative \"model\"\n\nmodule Lanes::Access\n module Roles\n\n # re-open the exising Support role\n class Support\n grant Skr:... | ruby | chosen |
[
{
"from": "system",
"value": "Update for new database server IP.\n"
},
{
"from": "human",
"value": "name \"api_umbrella_log_production\"\ndescription \"A base role for API Umbrella database servers\"\n\nrun_list([\n \"role[api_umbrella_log_base]\",\n])\n\ndefault_attributes({\n :elasticsearch ... | ruby | chosen |
[
{
"from": "system",
"value": "Use a socket path that is guaranteed to be short.\n"
},
{
"from": "human",
"value": "require 'socket'\n\nmodule SocketSpecs\n def self.port\n 40001\n end\n\n def self.sockaddr_in(port, host)\n Socket::SockAddr_In.new(Socket.sockaddr_in(port, host))\n end\n... | ruby | chosen |
[
{
"from": "system",
"value": "Make :preview and :large images jpgs\n"
},
{
"from": "human",
"value": "class Asset < ActiveRecord::Base\n\n belongs_to :creator, :class_name => 'User', :foreign_key => 'user_id_creator'\n belongs_to :source\n\n if Rails.env == 'production'\n has_attached_file... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify logic in Round.closed method\n"
},
{
"from": "human",
"value": "class Round < ActiveRecord::Base\n attr_accessible :closed, :expire_time, :max_amount, :secret_token, :url, :winning_address1, :winning_address2, :charity\n\n has_many :donations\n belongs_t... | ruby | chosen |
[
{
"from": "system",
"value": "Check metric error if no metric supplied\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'redis'\n\ndescribe \"Basic Machiavelli Functionality\", :js => true do\n\n\tit \"has a front page with buttons\" do\n\t\tvisit \"/\"\n\n\t\texpect(page).to ha... | ruby | chosen |
[
{
"from": "system",
"value": "Disable netstat tests on CircleCI\n"
},
{
"from": "human",
"value": "require 'dockerspec'\nrequire 'dockerspec/serverspec'\n\ndescribe docker_build('.', tag: 'keywhiz') do\n it { should have_entrypoint '/entrypoint.sh' }\n it { should have_workdir %r{^/opt/keywhiz... | ruby | chosen |
[
{
"from": "system",
"value": "Add MixPanel tracking to Topbar Search\n"
},
{
"from": "human",
"value": "class SearchController < ApplicationController\n\n layout \"frontend\"\n\n # Search\n # Not using the same search for the client popup, since we probably want\\\n # to use a more advanced ... | ruby | chosen |
[
{
"from": "human",
"value": "Implement Net to handle requests\n"
},
{
"from": "gpt",
"value": "require \"rest_client\"\nrequire \"net/http\"\nrequire \"openssl\"\n\nmodule Bitflyer\n module Net\n def self.to_uri(path)\n return \"https://api.bitflyer.jp#{path}\"\n end\n\n def self.... | ruby | chosen |
[
{
"from": "system",
"value": "Move on_collection? into its own method.\n"
},
{
"from": "human",
"value": "module Candela\n class Rule\n def initialize(action, model, opts, block)\n @action, @model, @opts, @block = action, model, opts, block\n end\n\n # TODO: Find a better name for... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the unnecessary (and buggy) -print0 flag"
},
{
"from": "human",
"value": "module Gusteau\n class Chef\n def initialize(server, platform, dest_dir = '/etc/chef')\n @server = server\n @platform = platform\n @dest_dir = dest_dir\n end\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Use UTC for Mongoid timestamps, so it conforms with AR.\n"
},
{
"from": "human",
"value": "Mongoid.configure do |config|\n config.master = Mongo::Connection.new('127.0.0.1', 27017).db(\"devise-test-suite\")\nend\n\nclass ActiveSupport::TestCase\n setup do\n Use... | ruby | chosen |
[
{
"from": "system",
"value": "Rename document -> section in PublishingApiDraftManualWithSectionsExporter\n"
},
{
"from": "human",
"value": "class PublishingApiDraftManualWithSectionsExporter\n def call(manual, action = nil)\n update_type = (action == :republish ? \"republish\" : nil)\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add initial OAuth header generation functionality.\n"
},
{
"from": "human",
"value": "# SimpleOauth\n"
},
{
"from": "gpt",
"value": "require 'base64'\nrequire 'cgi'\nrequire 'openssl'\nrequire 'uri'\n\nmodule SimpleOAuth\n class Header\n ATTRIBUTE_KE... | ruby | chosen |
[
{
"from": "system",
"value": "Return provider names instead of full class names\n"
},
{
"from": "human",
"value": "module CurrencyRate\n class Synchronizer\n attr_accessor :storage\n\n def initialize(storage: nil)\n @storage = storage || FileStorage.new\n end\n\n def sync!\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update some grammar to be less aggressive\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire \"valid_email2/email_validator\"\n\nmodule ValidEmail2\n BLACKLIST_FILE = \"config/blacklisted_email_domains.yml\"\n WHITELIST_FILE = \"config/w... | ruby | chosen |
[
{
"from": "system",
"value": "Fix missing Text.reindex for tests\n"
},
{
"from": "human",
"value": "ENV['RAILS_ENV'] ||= 'test'\n\nrequire 'simplecov'\nSimpleCov.start\n\nrequire_relative '../config/environment'\nrequire 'rails/test_help'\n\nclass Hash\n def to_o\n JSON.parse to_json, object... | ruby | chosen |
[
{
"from": "system",
"value": "Add some comments to the tests\n"
},
{
"from": "human",
"value": "require_relative \"./test_helper\"\nrequire \"test/unit\"\nrequire \"palta\"\n\nclass TestBasic < Test::Unit::TestCase\n\n def test_default_creation_yields_no_error\n s = Palta::Server.new\n end\... | ruby | chosen |
[
{
"from": "system",
"value": "Change to constrain Ruby version\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'tty/spinner/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Add note on associate tags.\n"
},
{
"from": "human",
"value": "require 'net/http'\nrequire 'nokogiri'\nrequire 'openssl'\n\n%w{builder cart locale request response}.each do |f|\n require \"vacuum/#{f}\"\nend\n\n# Vacuum is a Ruby wrapper to the Amazon Product Adver... | ruby | chosen |
[
{
"from": "system",
"value": "Bump version number to 0.4.0\n"
},
{
"from": "human",
"value": "require \"rubygems\"\n\n$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__))) unless $LOAD_PATH.include?(File.expand_path(File.dirname(__FILE__)))\n\nmodule Webrat\n # The common base class for ... | ruby | chosen |
[
{
"from": "system",
"value": "Update faraday dependency to >= 1.0\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire 'gibbon/version'\n\nGem::Specification.new do |s|\n s.name = \"gibbon\"\n s.version = Gibbon::VERSI... | ruby | chosen |
[
{
"from": "system",
"value": "Fix migration which depends on old models\n"
},
{
"from": "human",
"value": "# https://trello.com/c/DHVC2pH1/488-bug-investigate-why-description-encapsulation-has-been-bypassed\nclass FixNilDescriptions < ActiveRecord::Migration\n def up\n models = [DraftContent... | ruby | chosen |
[
{
"from": "system",
"value": "Add seats methods for PassengerCarriage\n"
},
{
"from": "human",
"value": "require_relative 'carriage.rb'\n\nclass PassengerCarriage < Carriage \n def initialize\n @type = :passenger\n end\nend"
},
{
"from": "gpt",
"value": "require_relative 'carria... | ruby | chosen |
[
{
"from": "system",
"value": "Use auth info from couchdb.yml if provided\n"
},
{
"from": "human",
"value": "module CouchRestAdapter\n module DbConfig\n def self.included(base)\n base.extend ClassMethods\n end\n\n module ClassMethods\n attr_accessor :config_file\n\n def p... | ruby | chosen |
[
{
"from": "human",
"value": "Make a test case for the way to use DatabaseJoinProcessor\n"
},
{
"from": "gpt",
"value": "require File.dirname(__FILE__) + '/test_helper'\n\nclass DatabaseJoinProcessorTest < Test::Unit::TestCase\n\n def new_processor(options)\n ETL::Processor::DatabaseJoinProce... | ruby | chosen |
[
{
"from": "system",
"value": "Add roles, offices, and old roles to Legislator\n\nIn order to match all of the fields returned by the Sunlight OpenStates\nAPI, this commit adds these additional fields. In addition, it\nalphabetizes the fields for easier readability.\n"
},
{
"from": "human",
"valu... | ruby | chosen |
[
{
"from": "system",
"value": "Remove gate from % of actors.\n"
},
{
"from": "human",
"value": "require 'zlib'\n\nmodule Flipper\n module Gates\n class PercentageOfActors < Gate\n # Internal: The name of the gate. Used for instrumentation, etc.\n def name\n :percentage_of_act... | ruby | chosen |
[
{
"from": "system",
"value": "Fix implementation of \"has\" method\n"
},
{
"from": "human",
"value": "module Sastrawi\n module Stemmer\n module Cache\n class ArrayCache\n attr_accessor :data\n\n def initialize\n @data = {}\n end\n\n def set(key, valu... | ruby | chosen |
[
{
"from": "system",
"value": "Remove some more development dependencies.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nrequire File.expand_path('../lib/browscapper/version', __FILE__)\n\nGem::Specification.new do |s|\n s.name = %q{browscapper}\n s.version = Browscapper::VERSI... | ruby | chosen |
[
{
"from": "system",
"value": "Increase sleep time after deploying sample app.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe package('marathon') do\n it { should be_installed }\nend\n\ndescribe port(8080) do\n it { should be_listening }\nend\n\ndescribe command(\"/usr/loc... | ruby | chosen |
[
{
"from": "system",
"value": "Send room notifications in HTML format\n"
},
{
"from": "human",
"value": "require 'cinch'\nrequire 'hipchat'\n\nunless ENV.has_key?('HIPCHAT_API_TOKEN')\n abort 'Set HIPCHAT_API_TOKEN environment variable with your HipChat API Token: https://hipchat.com/account/api... | ruby | chosen |
[
{
"from": "system",
"value": "Use <<-EOF for multi-line description\n\nAs recommended by gemspec reference documentation.\r\nhttp://guides.rubygems.org/specification-reference/"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) u... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec to use Swift3 dependencies\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"SwiftDDP\"\n s.version = \"0.3.2\"\n s.summary = \"A DDP Client for communicating with Meteor servers, written in Swift. S... | ruby | chosen |
[
{
"from": "system",
"value": "Add more label color suggestions\n"
},
{
"from": "human",
"value": "module LabelsHelper\n def project_label_names\n @project.labels.pluck(:title)\n end\n\n def render_colored_label(label)\n label_color = label.color || Label::DEFAULT_COLOR\n text_color =... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure there are locales coming back from get_locales.\n"
},
{
"from": "human",
"value": "module LocaleHelper\n def enabled_locales\n @enabled_locales ||= (Spree::Config.get(:enabled_locales) || get_locales || I18n.available_locales || [I18n.default_locale]).... | ruby | chosen |
[
{
"from": "system",
"value": "Change ticket mailer from to match postmark signature\n"
},
{
"from": "human",
"value": "class TicketMailer < ActionMailer::Base\n default from: \"new_ticket_deamon@helpdesk.com\"\n\n # Subject can be set in your I18n file at config/locales/en.yml\n # with the fo... | ruby | chosen |
[
{
"from": "system",
"value": "Add back send_message? policy method.\n\nNo idea where it went.\n"
},
{
"from": "human",
"value": "class TasksPolicy < ApplicationPolicy\n allow_params :task\n include TaskAccessCriteria\n\n def show?\n authorized_to_modify_task?\n end\n\n def create?\n a... | ruby | chosen |
[
{
"from": "system",
"value": "Add support for Rails 5.x\n"
},
{
"from": "human",
"value": "require 'uri'\nrequire 'net/http'\nrequire 'net/https'\nrequire 'digest/sha1'\nrequire 'cgi'\n\nrequire 'rubygems'\nrequire 'json'\n\nmodule Sendhub\nend\n\nrequire 'sendhub/http'\nrequire 'sendhub/respons... | ruby | chosen |
[
{
"from": "system",
"value": "Comment out rspec's generator initializer by default\n"
},
{
"from": "human",
"value": "require \"generators/beard/generator\"\n\nmodule Beard\n class InstallGenerator < Rails::Generators::Base\n extend Beard::Generator\n\n def install_dependencies\n say... | ruby | chosen |
[
{
"from": "system",
"value": "Exit with exit code 1 if any subtest errors\n"
},
{
"from": "human",
"value": "module ParallelTests\n class CLI\n def run_tests_in_parallel(num_processes, options)\n test_results = nil\n\n report_time_taken do\n groups = @runner.tests_in_groups(... | ruby | chosen |
[
{
"from": "system",
"value": "Allow Ruby 3 in gem specs\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire_relative 'lib/filewatcher'\nrequire_relative 'lib/filewatcher/version'\n\nGem::Specification.new do |s|\n s.name = 'filewatcher'\n s.version = File... | ruby | chosen |
[
{
"from": "system",
"value": "Make Blug controller inherit from main app controller\n"
},
{
"from": "human",
"value": "module Blug\n class ApplicationController < ActionController::Base\n protect_from_forgery with: :exception\n end\nend\n"
},
{
"from": "gpt",
"value": "module Bl... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up runtime dependencies and gem description\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'crudecumber'\n s.version = '0.1.2'\n s.date = '2015-06-09'\n s.summary = \"Crudecumber 0.1.2\"\n s.description =... | ruby | chosen |
[
{
"from": "system",
"value": "fix: Update podspec file configuration for repository\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n\t# 1\n\ts.name \t \t= 'UrbandManager'\n \ts.version \t\t= '0.0.1'\n \ts.ios.deployment_target = '10.0'\n \ts.summary \t\t=... | ruby | chosen |
[
{
"from": "system",
"value": "Add a unit test for creating a post.\n"
},
{
"from": "human",
"value": "module Hawkins\n RSpec.describe \"Hawkins\" do\n context \"when creating a post\" do\n before(:each) do\n default_config = Jekyll::Configuration[Jekyll::Configuration::DEFAULTS]\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for wrong intendation in MarkChargeAsPaid spec\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe MarkChargeAsPaidService do\n let(:charge) { create(:charge, card: nil, paid: false)}\n let(:stripe_charge) { { id: 1, card: JSON.parse('{\"test\... | ruby | chosen |
[
{
"from": "system",
"value": "Define show, new, create, edit, update, and destroy methods in ArtistsController\n"
},
{
"from": "human",
"value": "class ArtistsController < ApplicationController\n def index\n end\n\n def show\n end\n\n def new\n end\n\n def edit\n end\n\n def create\n e... | ruby | chosen |
[
{
"from": "system",
"value": "Send email instead of brave_publisher_id to Sentry\n"
},
{
"from": "human",
"value": "# Send handled exceptions to Sentry (which normally only sends unhandled exceptions).\n# See https://stackoverflow.com/questions/16567243/rescue-all-errors-of-a-specific-type-insid... | ruby | chosen |
[
{
"from": "system",
"value": "Add initializer, run_all/run_on_changes, :files option\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire 'guard/guard'\nrequire 'guard/xmllint/version'\n\nmodule Guard\n class XmlLint < Guard\n\n # Returns this guard's name, in accordance with Guar... | ruby | chosen |
[
{
"from": "system",
"value": "Add a require on launchy\n"
},
{
"from": "human",
"value": "require \"fileutils\"\nrequire \"digest/sha1\"\nrequire \"cgi\"\n\nrequire \"letter_opener/message\"\nrequire \"letter_opener/delivery_method\"\nrequire \"letter_opener/railtie\" if defined? Rails\n"
},
... | ruby | chosen |
[
{
"from": "system",
"value": "Add specs for type coercion behaviour"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe UseCase::Params do\n it 'defaults attributes to not required so that nil or the given type is an acceptable value' do\n params = Class.new do\n include ... | ruby | chosen |
[
{
"from": "system",
"value": "Add the new Sandbox URL\n\nThere's a new API base for the sandbox application.\n\nNote, the authorize action requires a different URL in sandbox (https://sandbox.transferwise.tech), but in production requires https://api.transferwise.com still.\n"
},
{
"from": "human",
... | ruby | chosen |
[
{
"from": "system",
"value": "Update to use fixed att_speech"
},
{
"from": "human",
"value": "# encoding: utf-8\nmodule AdhearsionASR::Watson\n class Plugin < Adhearsion::Plugin\n config :adhearsion_asr_watson do\n auto_include true, transform: Proc.new { |v| v == 'true' }, desc: \"Enab... | ruby | chosen |
[
{
"from": "system",
"value": "Reduce public API methods from HorizontalHelper\n\nBefore this PR, including `bh` in an app would include more methods\nthan necessary for horizontal: methods like `horizontal_string`\nthat should only be accessed privately.\n"
},
{
"from": "human",
"value": "requir... | ruby | chosen |
[
{
"from": "human",
"value": "Create book param sanitizer; escape book HTML\n"
},
{
"from": "gpt",
"value": "class BookParamSanitizer\n def initialize(book_params)\n @book_params = book_params\n end\n\n def sanitize\n @book_params[:content] = CGI.escapeHTML(@book_params[:content])\n @... | ruby | chosen |
[
{
"from": "system",
"value": "Revert changes to block filter pipe."
},
{
"from": "human",
"value": "module Pacer::Pipes\n class BlockFilterPipe < RubyPipe\n def initialize(starts, back, block)\n super()\n set_starts(starts)\n @back = back\n @block = block\n @graph = ... | ruby | chosen |
[
{
"from": "human",
"value": "Add integration test for Nginx\n"
},
{
"from": "gpt",
"value": "require \"spec_helper\"\n\ndescribe \"practicingruby::_nginx\" do\n let(:nginx_dir) { \"/etc/nginx\" }\n let(:domain_name) { \"practicingruby.local\" }\n\n it \"installs Nginx\" do\n expect(package... | ruby | chosen |
[
{
"from": "system",
"value": "Add license and description fields to gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |s|\n s.name = \"gir_ffi-gtk\"\n s.version = \"0.6.0\"\n\n s.summary = \"GirFFI-based Ruby bindings for Gtk+ 2 and 3\"\n\n s.a... | ruby | chosen |
[
{
"from": "system",
"value": "Fix cuke tests to remove dependency on term and experience ids.\n"
},
{
"from": "human",
"value": "When(/^he filters for another job term$/) do\n visit('/')\n check('term_2')\n click_button('Filter')\nend\n\nWhen(/^he filters for another job experience$/) do\n v... | ruby | chosen |
[
{
"from": "system",
"value": "Load the entension outside of the module\n"
},
{
"from": "human",
"value": "require 'grape'\nrequire 'grape/cancan/version'\n\nmodule Grape\n module CanCan\n module API\n # Convienience method to authorize every route\n def authorize_routes!\n b... | ruby | chosen |
[
{
"from": "system",
"value": "Use the same attribute reader name \"keypair\" like other jwk's.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule JWT\n module JWK\n class HMAC\n attr_reader :key\n attr_reader :kid\n\n KTY = 'oct'.freeze\n\n def ini... | ruby | chosen |
[
{
"from": "system",
"value": "Add require for Net::HTTP as some rubies can't resolve it properly\n"
},
{
"from": "human",
"value": "require \"pinch_hitter/version\"\nrequire \"pinch_hitter/message/message_store\"\nrequire \"pinch_hitter/message/content_type\"\nrequire \"pinch_hitter/service/runn... | ruby | chosen |
[
{
"from": "system",
"value": "Update Player class with minor functionality changes.\n\n- Minor updates to interface to facilitate use in Controller.\n- Allow the track to be accessed outside of the class.\n- Change #pause and #unpause to #toggle- we only should make one call to do this action.\n- Remove unn... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec to version 0.2.0\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n\n s.name = \"Navajo-Swift\"\n s.version = \"0.1.0\"\n s.summary = \"Password Validator & Strength Evaluator\"\n\n s.description = <<-DESC... | ruby | chosen |
[
{
"from": "system",
"value": "Return status for each executed command"
},
{
"from": "human",
"value": "require 'timeout'\nmodule Rubotium\n class CMD\n class << self\n def run_command(command_to_run, opts = {})\n begin\n Timeout::timeout(opts[:timeout] || 10 * 60) {\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Raise an error on failure\nAdd statusmsg\n"
},
{
"from": "human",
"value": "module Solusvm\n class Base\n attr_reader :returned_parameters\n\n def perform_request(options)\n http = Net::HTTP.new(api_endpoint.host, api_endpoint.port)\n http.use_ssl =... | ruby | chosen |
[
{
"from": "system",
"value": "Apply the same fix in SHA: 61457e1c1b\n"
},
{
"from": "human",
"value": "# thanks _why\n# http://whytheluckystiff.net/articles/seeingMetaclassesClearly.html\nclass Object\n # The hidden singleton lurks behind everyone\n def metaclass; class << self; self; end; end... | ruby | chosen |
[
{
"from": "system",
"value": "Delete obsolete comment in DiffReporter\n"
},
{
"from": "human",
"value": "module LLT\n class Diff::Parser\n module DiffReporter\n # While all classes that include DiffReporter also include\n # HashContainable, we cannot include it here, as HashContain... | ruby | chosen |
[
{
"from": "system",
"value": "Fix process kill on windows (abort)\n"
},
{
"from": "human",
"value": "module PushyClient\n class JobState\n attr_accessor :job_id\n attr_accessor :command\n attr_accessor :state\n attr_accessor :pid\n\n def initialize(job_id, command, state)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Set homepage, summary, description, and rails dependency version\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"lunar_shell/version\"\n\n# Describe your gem and declare its dependencies:... | ruby | chosen |
[
{
"from": "system",
"value": "Add rspec and rspec-mock dependencies\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'normalizexml/version'\n\nGem::Specification.new do |spec|\n spec.... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake to development dependencies\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/grooveshark/version', __FILE__)\n\nGem::Specification.new do |s|\n s.name = \"grooveshark\"\n s.version = Grooveshark::VE... | ruby | chosen |
[
{
"from": "system",
"value": "Fix rails server in development.\n"
},
{
"from": "human",
"value": "# This file is used by Rack-based servers to start the application.\n\nrequire ::File.expand_path('../config/environment', __FILE__)\nrun Rails.application\n"
},
{
"from": "gpt",
"value"... | ruby | chosen |
[
{
"from": "system",
"value": "Use repo_hook scope for auth\n"
},
{
"from": "human",
"value": "require './config/environment'\nrequire 'omniauth'\nrequire 'newrelic_rpm'\nrequire 'newrelic-hanami'\n\nNewRelic::Agent.manual_start\n\nuse SecureHeaders::Middleware\nuse Rack::Session::Cookie, secret:... | ruby | chosen |
[
{
"from": "system",
"value": "Use splat to pass keyword arguments into method\n\nThis fixes the following deprecation notice which appeared in the move from Ruby 2.6 to 2.7:\n\n```\nlib/govspeak/template_renderer.rb:20: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be... | ruby | chosen |
[
{
"from": "system",
"value": "Fix another race in Zookeeper watcher\n"
},
{
"from": "human",
"value": "module ProxyMgr\n module Watcher\n class Zookeeper < Base\n def watch\n @zookeeper = ZKClient.new(@config['server'])\n @zookeeper.on_connected { watch_zookeeper }\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix up name validation so it checks the whole string not just a partial match\n"
},
{
"from": "human",
"value": "class Variable < ActiveRecord::Base\n validates :name, format: {with: /MORPH_[A-Z_]+/, message: \"should look something like MORPH_SEAGULL\"}\nend\n"
... | ruby | chosen |
[
{
"from": "system",
"value": "Add specs for user model.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe User do\n before(:each) do\n @valid_attributes = {\n }\n end\n\n it \"should create a new user 'tuser'\" do\n Factory.create(:tuser)\n end\nend\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Add sawyer as gem dependency.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nrequire 'chatspry/version'\n\nGem::Specification.new do |spec|\n\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Put condition around Timestamp test, requiring that the variable tested is actually a Timestamp.\n"
},
{
"from": "human",
"value": "require 'spec/helper'\n\n$dbh = connect_to_spec_database\n\ndescribe 'a DBI::Timestamp object' do\n before do\n @ts = $dbh.sc \"SE... | ruby | chosen |
[
{
"from": "system",
"value": "Use newer syntax for validations"
},
{
"from": "human",
"value": "module MortgageCalculator\n class Person\n include ActiveModel::Validations\n include CurrencyInput::Macro\n\n attr_accessor :annual_income, :extra_income\n\n validates_numericality_of :a... | ruby | chosen |
[
{
"from": "system",
"value": "Add ability to run with a given block\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\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Allow logging out through GET request to `/logout`\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html\n\n devise_for :users, skip: [\n :sessio... | ruby | chosen |
[
{
"from": "system",
"value": "Add logger for debug messages\n"
},
{
"from": "human",
"value": "require \"open-uri\"\nrequire \"nokogiri\"\nrequire \"forwardable\"\nrequire \"delegate\"\nrequire \"uri\"\n\nrequire \"cartographer/version\"\nrequire \"cartographer/url\"\nrequire \"cartographer/page... | ruby | chosen |
[
{
"from": "system",
"value": "Use TracePoint to trace the stack.\n\nAdd class Gotero.\nUse cutest for test.\n"
},
{
"from": "human",
"value": "require 'pp'\n\nclass Knowledge\n\n def ask string\n q = Question.new \"?\"\n ! q.well_formed?\n end\n\nend\n\nclass Question\n\n def initialize... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.