conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add YARD docs for Axiom::Types::Encodable\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nmodule Axiom\n module Types\n\n # Add encoding constraints to a type\n module Encodable\n\n if RUBY_VERSION >= '1.9'\n def self.extended(descendant)\... | ruby | chosen |
[
{
"from": "system",
"value": "Support global_error_handlers at Rollbar plugin\n"
},
{
"from": "human",
"value": "require 'rollbar'\n\nmodule Rollbar\n class CronoTrigger\n def self.handle_exception(ex, record)\n scope = {\n framework: \"CronoTrigger: #{::CronoTrigger::VERSION}\",... | ruby | chosen |
[
{
"from": "system",
"value": "Use a set instead of simple array.\n"
},
{
"from": "human",
"value": "module DAV\n class Children < Struct.new(:parent)\n include DAV\n attr_reader :uris\n\n SEPARATOR = \"\\n\"\n\n def initialize(parent)\n super parent\n load_paths\n end\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add alias and except tags to the body payload\n"
},
{
"from": "human",
"value": "module Pushbots\n # All class\n class All < Push\n attr_accessor :schedule, :tags, :sound, :badge, :except_tags, :alias,\n :except_alias, :payload\n\n def initi... | ruby | chosen |
[
{
"from": "system",
"value": "Allow easier setting of a custom form class.\n"
},
{
"from": "human",
"value": "module Formulate\n module FormHelper\n FIELD_ERROR_PROC = proc { |html_tag, instance_tag| html_tag }\n\n def form_for(record, options={}, &proc)\n options[:html] ||= {}\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add short circuit for activities\n\nThis commit adds a short circuit for activities so we don't try and make\nthe call multiple times unnecessarily.\n"
},
{
"from": "human",
"value": "require 'nike_2_runkeeper/version'\nrequire 'nike'\nrequire 'runkeeper'\n\nmodule ... | ruby | chosen |
[
{
"from": "system",
"value": "Use db:create instead of db:migrate and db:test:prepare\n"
},
{
"from": "human",
"value": "namespace 'course_assets' do\n\n namespace 'config' do\n\n desc \"Copy sample config files\" \n\ttask 'samples' do\n\t sh \"cp config/solr.yml.sample config/solr.yml\"\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change Rake test to use the API instead of RSS feeds\n"
},
{
"from": "human",
"value": "namespace :sync do\n task feeds: [:environment] do\n Feed.all.each do |feed|\n content = Feedjira::Feed.fetch_and_parse feed.url\n content.entries.each do |entry|\n... | ruby | chosen |
[
{
"from": "system",
"value": "[0.99] Fix request handler doc wording\n"
},
{
"from": "human",
"value": "require 'timezone/error'\n\nmodule Timezone\n module Lookup\n # @abstract Subclass and override {#lookup} to implement\n # a custom Lookup class.\n class Basic\n attr_reader :... | ruby | chosen |
[
{
"from": "system",
"value": "Change default task name to yard. You know, \"rake the yard\"\n"
},
{
"from": "human",
"value": "require 'rake'\nrequire 'rake/tasklib'\n\nmodule YARD\n module Rake\n \n class YardocTask < ::Rake::TaskLib\n attr_accessor :name\n attr_accessor :optio... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug in adding runtime dependency\n\n* it uses patron, not typhoeus\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\n\nGem::Specification.new do |s|\n s.name = \"fluent-plugin-elasticsearch\"\... | ruby | chosen |
[
{
"from": "system",
"value": "Add empty line after guard clause\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire \"rack/cargo/core_ext/deep_dup\"\n\nmodule Rack\n module Cargo\n module RequestEnvBuilder\n class << self\n def call(request, state)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make STATIC_DIR relative to project for the subtree merge."
},
{
"from": "human",
"value": "require \"highline/import\"\n\nclass Rosy::Create::Boilerplate\n include Rosy\n \n def initialize\n @boilerplate = \"git://github.com/ff0000/red-boilerplate.git\"\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for PosixTZ.all method\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe TZFormater::PosixTZ do\n context 'with one-to-one mapped timezone' do\n let(:tz) { 'VLAT-11' }\n subject { TZFormater::PosixTZ.new(tz) }\n\n it 'returns ol... | ruby | chosen |
[
{
"from": "system",
"value": "Add one more spec example for SimpleSet.\n"
},
{
"from": "human",
"value": "require File.dirname(__FILE__) + '/spec_helper'\n\ndescribe Extlib::SimpleSet do\n\n before do\n @s = Extlib::SimpleSet.new(\"Initial\")\n end\n\n describe \"#initialize\" do\n it '... | ruby | chosen |
[
{
"from": "system",
"value": "Update Gemspec with a proper description.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'ruby_jawbone/version'\n\nGem::Specification.new do |spec|\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Use an already existing fixture\n"
},
{
"from": "human",
"value": "require 'cases/helper'\nrequire 'models/book'\n\nclass StoreTest < ActiveRecord::TestCase\n fixtures :books\n\n setup do\n @book = Book.create! name: 'REMOTE'\n end\n\n test \"query state by p... | ruby | chosen |
[
{
"from": "human",
"value": "Add reasonable defaults to game and player tables.\n"
},
{
"from": "gpt",
"value": "class AddPlayerAndGameConstraints < ActiveRecord::Migration\n def change\n change_column :games, :player_id, :integer, null: false\n change_column :games, :answer, :integer, nu... | ruby | chosen |
[
{
"from": "system",
"value": "Fix email id wrong arams\n"
},
{
"from": "human",
"value": "class ApplicationMailer < ActionMailer::Base\n # TODO: Remove hard code domain\n default(from: Rails.application.config.action_mailer.smtp_settings[:from],\n \"Message-ID\" => lambda {\"#{Digest:... | ruby | chosen |
[
{
"from": "system",
"value": "Allow shipped_email to take either a shipment id or a shipment object\n\nFixes #54\n"
},
{
"from": "human",
"value": "class Spree::ShipmentMailer < ActionMailer::Base\n helper \"spree/base\"\n\n def shipped_email(shipment, resend=false)\n @shipment = shipment\n... | ruby | chosen |
[
{
"from": "system",
"value": "Remove IRC logging of door events\n\nNotifications are now sent by https://github.com/initLab/irc-notifier"
},
{
"from": "human",
"value": "module Door::Loggable\n extend ActiveSupport::Concern\n\n included do\n has_one :log_entry, as: :loggable\n before_cre... | ruby | chosen |
[
{
"from": "system",
"value": "Handle unauthorized actions with a flash\n\nWhy:\n\nInstead of displaying a jarring 'Unauthorized' error, we want to direct\npeople back to the page they were on, with a flash.\n\nNOTE: We'll want to come back and test this.\n\nNOTE: We also need to decide how to handle unautho... | ruby | chosen |
[
{
"from": "system",
"value": "Add helper_methods for current_account and current_account_id"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n # Prevent CSRF attacks by raising an exception.\n # For APIs, you may want to use :null_session instead.\n protec... | ruby | chosen |
[
{
"from": "system",
"value": "Add require_subject method to force authentication\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n protect_from_forgery with: :null_session\n\n Forbidden = Class.new(StandardError)\n private_constant :Forbidden\n rescue_... | ruby | chosen |
[
{
"from": "system",
"value": "Add parameters to the devise sign up permitted list."
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n # Prevent CSRF attacks by raising an exception.\n # For APIs, you may want to use :null_session instead.\n protect_from_fo... | ruby | chosen |
[
{
"from": "system",
"value": "Change default view of instructor\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n # Prevent CSRF attacks by raising an exception.\n # For APIs, you may want to use :null_session instead.\n protect_from_forgery with: :exce... | ruby | chosen |
[
{
"from": "system",
"value": "Switch to updated GdsApi api\n"
},
{
"from": "human",
"value": "require 'publisher_api'\nrequire 'imminence_api'\nrequire 'panopticon_api'\n\nclass ApplicationController < ActionController::Base\n protect_from_forgery\n\n helper_method :api_host\n def api_host\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Resolve undefined method parcel items\n"
},
{
"from": "human",
"value": "class PurchaseItemDecorator < Draper::Decorator\n delegate_all\n\n def reception_number\n return \"\" if object.parcels_purchase_invoice_items.nil? || object.parcels_purchase_invoice_items... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing space after `,`\n"
},
{
"from": "human",
"value": "module Refinery\n module Admin\n module ImagesHelper\n def other_image_views\n Refinery::Images.image_views.reject { |image_view|\n image_view.to_s == Refinery::Images.preferred_... | ruby | chosen |
[
{
"from": "system",
"value": "Add model helper for creating a chat room from an invitation\n"
},
{
"from": "human",
"value": "class ChatRoom < ActiveRecord::Base\n validates_presence_of :invitee_id, :creator_id\n belongs_to :invitee, class_name: \"User\"\n belongs_to :creator, class_name: \"U... | ruby | chosen |
[
{
"from": "system",
"value": "Add support for custom time formats on date time fields."
},
{
"from": "human",
"value": "require \"formalist/element\"\nrequire \"formalist/elements\"\nrequire \"formalist/types\"\n\nmodule Formalist\n class Elements\n class DateTimeField < Field\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove faraday gem version lock\n\nThis gem is so simple there really isn't much for faraday to break.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'a... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for thread classes\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'spec_helper'\n\ndescribe RubyRabbitmqJanus::Process::Concurrencies::Concurrency, type: :thread, name: :concurrency do\n let(:concurrency) { described_class.new ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow symbols to be true by default in RSpec\n"
},
{
"from": "human",
"value": "ENV['RAILS_ENV'] ||= 'test'\n\nrequire 'dotenv'\nDotenv.load\n\nrequire 'codeclimate-test-reporter'\nCodeClimate::TestReporter.start\n\nrequire File.expand_path('../../config/environment... | ruby | chosen |
[
{
"from": "system",
"value": "Use SameSite strict for cookies\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n# Be sure to restart your server when you modify this file.\n\nRails.application.config.session_store :cookie_store,\n key: '_code_ocean_session',\n expire_after: 1... | ruby | chosen |
[
{
"from": "system",
"value": "Remove duplicate ampersand from Label title format validator\n"
},
{
"from": "human",
"value": "# == Schema Information\n#\n# Table name: labels\n#\n# id :integer not null, primary key\n# title :string(255)\n# color :string(255)\n# pro... | ruby | chosen |
[
{
"from": "system",
"value": "Fix weird order of review rules\n"
},
{
"from": "human",
"value": "class Score < ActiveRecord::Base\n belongs_to :assignment\n belongs_to :user\n serialize :practice_lesson_input, Hash\n serialize :review_lesson_input, Hash\n serialize :missed_rules, Array\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Fix failing spec for ruby 1.9\n"
},
{
"from": "human",
"value": "shared_examples 'an error' do |error|\n error_class_name = error.split(/_/).map{ |word| word.capitalize }.join('')\n exception = Object.const_get(\"Lieu::#{error_class_name}\")\n\n it \"raising #{ex... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Fix deprecation in specs\"\n\nThis reverts commit 414ead57ee294618e73ef62f521b11d98fdce3a0.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'rake'\n\ndescribe 'gitlab:app namespace rake task' do\n before :all do\n Rake.application.rake... | ruby | chosen |
[
{
"from": "system",
"value": "Add location_name in edit form.\n"
},
{
"from": "human",
"value": "ActiveAdmin.register Report do\n# See permitted parameters documentation:\n# https://github.com/activeadmin/activeadmin/blob/master/docs/2-resource-customization.md#setting-up-strong-parameters\n#\n#... | ruby | chosen |
[
{
"from": "system",
"value": "Load up subject info view\n"
},
{
"from": "human",
"value": "class AppDelegate\n attr_accessor :van_hoorden_sounds, :miller_and_heise_sounds, :window, :subject\n\n def application(application, didFinishLaunchingWithOptions:launchOptions)\n self.window = UIWindo... | ruby | chosen |
[
{
"from": "system",
"value": "Store Photo Key as key\n"
},
{
"from": "human",
"value": "class Photo\n include MongoMapper::Document\n include Plugins::Benchmarkable\n include Plugins::Couriable\n include Plugins::Fusionable\n \n key :description, String\n key :dimensions, Dimensi... | ruby | chosen |
[
{
"from": "system",
"value": "Improve system test framework reliability\n\nThe chromedriver occasionally calls out with its own API,\nwhich isn't part of the system under test. This can occasionally\ncause an error of this form:\nAn HTTP request has been made that VCR does not know how to handle:\nGET https... | ruby | chosen |
[
{
"from": "system",
"value": "Update worker count per node\n"
},
{
"from": "human",
"value": "#!/usr/bin/env puma\r\n\r\nroot = File.dirname(__FILE__) + '/../'\r\n\r\ndirectory root\r\nrackup root + 'config.ru'\r\nenvironment 'production'\r\nbind 'tcp://0.0.0.0:8080'\r\ndaemonize unless ENV['DOC... | ruby | chosen |
[
{
"from": "system",
"value": "Add sso_redirect to xhr check skip (this seems fragile)\n"
},
{
"from": "human",
"value": "# name: discourse_sso_redirect\n# about: allows a whitelist for SSO login redirects\n# version: 0.1\n# authors: Gregory Avery-Weir\n\nafter_initialize do\n Rails.application.... | ruby | chosen |
[
{
"from": "system",
"value": "Use concurrent in spec after hook\n"
},
{
"from": "human",
"value": "if RUBY_ENGINE == \"rbx\"\n require \"codeclimate-test-reporter\"\n CodeClimate::TestReporter.start\nend\n\n$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)\n\nrequire 'dry-types'\n\nbe... | ruby | chosen |
[
{
"from": "system",
"value": "Remove maintain_test_schema! its for Rails 4.1\n"
},
{
"from": "human",
"value": "require 'simplecov'\nrequire 'coveralls'\nSimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[\n SimpleCov::Formatter::HTMLFormatter,\n Coveralls::SimpleCov::Formatter\n]\nSim... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Removed unneeded factories declaration, since master loads all spec factories\"\n\nThis reverts commit b6b80ea984b4526187076c6518ccae0ae3a42801.\n"
},
{
"from": "human",
"value": "begin\n require File.dirname(__FILE__) + '/../../../../spec/spec_helper'\nre... | ruby | chosen |
[
{
"from": "system",
"value": "Fix code climate test helper\n"
},
{
"from": "human",
"value": "require 'bundler/setup'\nrequire 'rspec'\nrequire 'cs'\nrequire 'pry'\nrequire 'webmock/rspec'\n\n# code climate\nWebMock.disable_net_connect!(:allow => \"codeclimate.com\")\nrequire \"codeclimate-test-... | ruby | chosen |
[
{
"from": "system",
"value": "Package files in gem :P\n"
},
{
"from": "human",
"value": "require File.expand_path('../lib/ascii_paint/version', __FILE__)\n\nGem::Specification.new do |s|\n s.name = 'ascii_paint'\n s.version = AsciiPaint::VERSION\n s.date = '2013-12-14'\n\n s.summary = 'Paint... | ruby | chosen |
[
{
"from": "system",
"value": "Add thor gem dependency to gemspec\n"
},
{
"from": "human",
"value": "require './lib/private_gem/version'\n\nGem::Specification.new do |spec|\n spec.name = 'private_gem'\n spec.version = PrivateGem::VERSION\n spec.authors = ['Mick Staugaard']... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor - use new load/write for yml and test\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n# ruby script create temporary duplicates of smart answers\n# These are used to allow testing and fact checking on preview\n# but will not be served on live (due t... | ruby | chosen |
[
{
"from": "system",
"value": "Remove html5rocks.com from link checks\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n\nrequire 'html-proofer'\n\nHTMLProofer.check_directory('./_site', {\n\t:parallel => {\n\t\t:in_processes => 4,\n\t},\n\t:check_html => true,\n\t:cache => {\n\t\t:timefram... | ruby | chosen |
[
{
"from": "system",
"value": "Modify HTML before HTTP caching features\n"
},
{
"from": "human",
"value": "\nmodule Pagelime\n module Rails\n class Engine < ::Rails::Engine\n engine_name :pagelime\n \n initializer \"pagelime.initialize\" do |app|\n ::Pagelime::Rails.init... | ruby | chosen |
[
{
"from": "system",
"value": "Update simplecov min coverage settings\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nENV[\"RAILS_ENV\"] = ENV[\"RACK_ENV\"] = \"test\"\n\nrequire \"simplecov\"\nrequire \"coveralls\"\nSimpleCov.maximum_coverage_drop 5\nCoveralls.wear! do\n add... | ruby | chosen |
[
{
"from": "system",
"value": "Store header information in an OpenStruct\n"
},
{
"from": "human",
"value": "require 'socket'\nrequire_relative 'handler'\nrequire_relative 'parser'\n\nclass Server\n\tattr_reader :server, :client, :port, :handler\n\n\tdef initialize(port, array_of_pages, error_page... | ruby | chosen |
[
{
"from": "system",
"value": "Set public path to app/assets.\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'sinatra'\n\nset :views, ['app/views']\nset :static, true\n\nhelpers do\n def stylesheet_link_tag(name)\n \"<link href='/stylesheets/#{name}.css' media='all' rel='Style... | ruby | chosen |
[
{
"from": "system",
"value": "Include rake as a development dependency.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"awsraw/version\"\n\nGem::Specification.new do |s|\n s.name = \"awsraw\"\n s.version = Awsra... | ruby | chosen |
[
{
"from": "system",
"value": "Fix issue in rubinius (hash ordering)\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'active_support/core_ext/string'\nrequire 'uri'\nrequire 'rack/utils'\nrequire 'doorkeeper/oauth/authorization/uri_builder'\n\nmodule Doorkeeper::OAuth::Authoriza... | ruby | chosen |
[
{
"from": "human",
"value": "Add tests for http adapter\n"
},
{
"from": "gpt",
"value": "require \"graphql\"\nrequire \"graphql/client/http\"\nrequire \"minitest/autorun\"\n\nclass TestHTTP < MiniTest::Test\n def setup\n @http = GraphQL::Client::HTTP.new(\"http://graphql-swapi.parseapp.com/\... | ruby | chosen |
[
{
"from": "system",
"value": "Use constents to define default values\n"
},
{
"from": "human",
"value": "class Board\n attr_reader :width, :height\n\n def initialize(opts = {})\n @width = opts[:width] || 5\n @height = opts[:height] || 5\n end\nend\n"
},
{
"from": "gpt",
"va... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for migrations order\n"
},
{
"from": "gpt",
"value": "describe 'migrations valid order support engine' do\n before do\n $stdout = StringIO.new\n Dir.mkdir('/migrations')\n File.open('/migrations/20150305_154010_test_migration.sql', 'w') do |f|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Modify tests to match new gitlab_ci_service logic\n\nSigned-off-by: Dmitriy Zaporozhets <be23d75b156792e5acab51b196a2deb155d35d6a@gmail.com>\n"
},
{
"from": "human",
"value": "# == Schema Information\n#\n# Table name: services\n#\n# id :integer not... | ruby | chosen |
[
{
"from": "system",
"value": "Add model test for sponsership_level\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe SponsorshipLevel do\n describe 'validations' do\n\n it 'has a valid factory' do\n expect(build(:sponsorship_level)).to be_valid\n end\n\n it 'is ... | ruby | chosen |
[
{
"from": "system",
"value": "Add interaction to restaurant file creation\n"
},
{
"from": "human",
"value": "class Guide\n def initialize path = nil\n # locate the restaurant text file at path\n # or create a new file\n # exit if create fails\n end\n\n def launch!\n introduction\n... | ruby | chosen |
[
{
"from": "system",
"value": "Use simplecov only on ruby 1.9.x"
},
{
"from": "human",
"value": "# Configure Rails Envinronment\nENV[\"RAILS_ENV\"] = \"test\"\n\nrequire File.expand_path(\"../dummy/config/environment.rb\", __FILE__)\nrequire \"rails/test_help\"\nrequire \"rspec/rails\"\nrequire ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Pliny dependencies in spec helper\n"
},
{
"from": "human",
"value": "ENV['RACK_ENV'] = 'test'\n\nrequire 'bundler'\nBundler.setup(:default, :test)\n\nroot = File.expand_path(\"../../\", __FILE__)\nENV.update(Pliny::Utils.parse_env(\"#{root}/.env\")) if File.exis... | ruby | chosen |
[
{
"from": "system",
"value": "Remove gs requirement from Gregex::Map\n"
},
{
"from": "human",
"value": "require 'greek_string'\nclass Gregex\n class Map\n require 'gregex/constants'\n\n attr_reader :map\n\n def initialize(options, gs)\n @opts = options\n @gs = gs\n @rege... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for loop/recur in Fun::Fn\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe \"fn{}\" do\n it \"creates a proc\" do\n sum = fn{|a,b,c| a + b + c}\n\n expect(sum[1, 2, 3]).to eq(6)\n end\n\n it \"creates an auto-curried proc\" do\n... | ruby | chosen |
[
{
"from": "system",
"value": "Move rspec-puppet-facts to spec helper\n\nThis change updates the module to use the rspec-puppet-facts as defined\nin the puppet-openstack_spec_helper.\n\nChange-Id: I8e1aa3d0224e7574f9b7edcc2fc8c384c7ea8dcb\n"
},
{
"from": "human",
"value": "require 'puppetlabs_spe... | ruby | chosen |
[
{
"from": "system",
"value": "Disable false positive of RuboCop\n"
},
{
"from": "human",
"value": "# coding: utf-8\n\nRSpec.configure do |config|\n config.treat_symbols_as_metadata_keys_with_true_values = true\nend\n\nDir[File.join(File.dirname(__FILE__), 'support', '*')].each do |path|\n requ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix app file reference in RSpec"
},
{
"from": "human",
"value": "require File.dirname(__FILE__) + \"/../lib/rvm_fw.rb\"\nrequire 'rubygems'\nrequire 'sinatra'\nrequire 'rack/test'\nrequire 'rspec'\n\nset :environment, :test\n\nRSpec.configure do |conf|\n conf.inc... | ruby | chosen |
[
{
"from": "system",
"value": "Remove lines adding lib to the load path\n\nRSpec does this automatically now.\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'pry'\n\n$LOAD_PATH.unshift(File.dirname(__FILE__))\n$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))\n\nr... | ruby | chosen |
[
{
"from": "system",
"value": "Add require statement for matcher file\n"
},
{
"from": "human",
"value": "# This file was generated by the `rspec --init` command. Conventionally, all\n# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.\n# Require this file using `require \... | ruby | chosen |
[
{
"from": "human",
"value": "Add specs for string extensions\n\nSigned-off-by: Wincent Colaiuta <c76ac2e9cd86441713c7dfae92c451f3e6d17fdc@wincent.com>\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env ruby\n# Copyright 2009 Wincent Colaiuta\n# This program is free software: you can redistribute it... | ruby | chosen |
[
{
"from": "system",
"value": "Fix source_files value in podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n\n s.name = \"GoSquaredAPI\"\n s.version = \"0.0.1\"\n s.summary = \"GoSquared API\"\n s.author = { \"Ed Wellbrook\" => \"edwellbrook@gmail.com\" }\n\n s.license = \... | ruby | chosen |
[
{
"from": "system",
"value": "Use the new style alignment in the gemspec.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire \"librarian/version\"\n\nGem::Specification.new do ... | ruby | chosen |
[
{
"from": "system",
"value": "Enable debug logging for DataMapper (will show SQL)\n"
},
{
"from": "human",
"value": "require 'data_mapper'\nrequire 'models/term'\nrequire 'models/url'\n\nDataMapper::Logger.new(TorqueBox::Logger.new(DataMapper), :info)\nDataMapper.setup(:default, ENV['DB_URL'])\n... | ruby | chosen |
[
{
"from": "system",
"value": "Package version is increased from 0.9.0.1 to 0.9.1.0\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'evt-messaging'\n s.version = '0.9.0.1'\n s.summary = 'Messaging primitives for Eventide'\n s.description ... | ruby | chosen |
[
{
"from": "system",
"value": "Update file names and use pre-release gem"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path('../lib', __FILE__)\nrequire 'dnsimple/cli/version'\n\nGem::Specification.new do |s|\n s.name = 'dnsimple-cli'\n s.version = D... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec description and homepage\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'buffered_io/version'\n\nGem::Specification.new do |gem... | ruby | chosen |
[
{
"from": "system",
"value": "Fix dev tools name conflict and missing extra requires\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: application_zf\n# Recipe:: dev_tools\n#\n# Copyright 2013, Walter Dal Mut.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you m... | ruby | chosen |
[
{
"from": "system",
"value": "Change Rails dependency to 4.0.0"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"lint/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |s|\n s.name... | ruby | chosen |
[
{
"from": "system",
"value": "Update file list in gemspec\n"
},
{
"from": "human",
"value": "require_relative 'lib/formwandler/version'\n\nGem::Specification.new do |s|\n s.name = 'formwandler'\n s.version = Formwandler::VERSION\n s.summary = 'Form objects for rails'\n s.description = 'Creat... | ruby | chosen |
[
{
"from": "system",
"value": "Enable custom error handlers within tests\n"
},
{
"from": "human",
"value": "module Acme\n class Base < Sinatra::Base\n set :root, Dir.pwd\n set :views, 'app/views'\n set :erb, :escape_html => true\n set :static_cache_control, [:public, :max_age => (60 ... | ruby | chosen |
[
{
"from": "system",
"value": "Set rolling restarts to 24 hours\n"
},
{
"from": "human",
"value": "workers Integer(ENV['WEB_CONCURRENCY'] || 2)\nthreads_count = Integer(ENV['RAILS_MAX_THREADS'] || 2)\nthreads threads_count, threads_count\n\npreload_app!\n\nrackup DefaultRackup\nport E... | ruby | chosen |
[
{
"from": "system",
"value": "Add subnav support in the current? helper\n"
},
{
"from": "human",
"value": "module SiteHelpers\n\n # TODO: Get this supporting the subnav as well.\n def current?(nav)\n nav == data.page.nav\n end\n\n def page_title\n if data.page.title\n \"#{data.pag... | ruby | chosen |
[
{
"from": "system",
"value": "Add test regarding category callback\n\nCheck that budget is adjusted when category is deleted\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe Category do\n\n before do\n @budget = FactoryGirl.create(:budget)\n @category = FactoryGirl.cr... | ruby | chosen |
[
{
"from": "system",
"value": "Add support for pipelined events\n"
},
{
"from": "human",
"value": "require \"schlep/version\"\n\nrequire \"json\"\nrequire \"redis\"\nrequire \"uri\"\n\nmodule Schlep\n extend self\n\n attr_writer :app, :hostname, :redis_url\n\n def app\n @app ||= \"\"\n end... | ruby | chosen |
[
{
"from": "system",
"value": "Use public_send instead of send."
},
{
"from": "human",
"value": "require \"selfer/version\"\n\nmodule Selfer\n def selfer(method)\n define_singleton_method(method) do |*args|\n new(*args).send(method)\n end\n end\nend\n"
},
{
"from": "gpt",
... | ruby | chosen |
[
{
"from": "system",
"value": "Use .tap to avoid explicit return value"
},
{
"from": "human",
"value": "require 'net/https'\nrequire 'buckaroo_json/uri'\n\nmodule BuckarooJson\n module Request\n class << self\n def create(mode:, method:, endpoint:, website_key:, api_key:, content:)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "CHEF-2462: Allow for git to be uninstalled.\n"
},
{
"from": "human",
"value": "#\n# Author:: Daniel DeLeo (<dan@opscode.com>)\n# Author:: Seth Falcon (<seth@opscode.com>)\n# Author:: Chris Walters (<cw@opscode.com>)\n# Copyright:: Copyright (c) 2010-2011 Opscode, In... | ruby | chosen |
[
{
"from": "system",
"value": "Add helpers for generating titles and stuff"
},
{
"from": "human",
"value": "set :base_url, \"https://www.nomadproject.io/\"\n\nactivate :hashicorp do |h|\n h.name = \"nomad\"\n h.version = \"0.4.1\"\n h.github_slug = \"hashicorp/nomad\"\nend\n"
},
... | ruby | chosen |
[
{
"from": "system",
"value": "Split hash into several lines.\n"
},
{
"from": "human",
"value": "module Dolphy\n class Configurations\n attr_accessor :configurations\n\n def initialize\n @configurations = configuration_defaults\n end\n\n def [](element)\n configurations[ele... | ruby | chosen |
[
{
"from": "system",
"value": "Create `check!` method for displaying results\n"
},
{
"from": "human",
"value": "require 'net/http'\nrequire 'uri'\nrequire 'nokogiri'\n\nmodule EnvatoOptimiser\n class Item\n attr_reader :uri,\n :response,\n :document\n\n\n def ... | ruby | chosen |
[
{
"from": "system",
"value": "Make fact confinement ruby 1.8 compatible\n\nThis is useful for people who have both older systems (using ruby 1.8)\nand newer in the same puppet environment. They want to use\npuppet-archive on their newer OSes, but don't want their old systems to\nthrow errors when trying to ... | ruby | chosen |
[
{
"from": "system",
"value": "Add notes about API design question\n"
},
{
"from": "human",
"value": "module Fictive\n module Text\n class Compiler\n def initialize(source)\n @source = source\n end\n end\n\n class Node\n def initialize(*nodes)\n @nodes = nod... | ruby | chosen |
[
{
"from": "system",
"value": "Improve description of Consonance class.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n# Consonance describes the category or degree of harmonic pleasantness: perfect, imperfect, or dissonant\nclass HeadMusic::Consonance\n LEVELS = %w[perfect ... | ruby | chosen |
[
{
"from": "system",
"value": "Add some security group attr and matcher\n"
},
{
"from": "human",
"value": "require 'yao'\n\nmodule Stackspec::Type\n class Server\n def initialize(name)\n @name = name\n end\n\n def resource\n @resource ||= find_counterpart_resource\n end\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Make TablePrint compatible with Sequel models\n\n`Sequel::Model.columns` is array of ids, but TablePrint::Printable was trying to call `#name` on them"
},
{
"from": "human",
"value": "module TablePrint\n module Printable\n # Sniff the data class for non-standard... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.