conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add a little more info\n"
},
{
"from": "human",
"value": "require 'sinatra'\n\nget '/' do\n File.read('index.html')\nend\n\npost '/demo' do\n \"The username is #{params['username']} and the password is #{params['password']}\"\nend\n"
},
{
"from": "gpt",
... | ruby | chosen |
[
{
"from": "system",
"value": "Remove check for private requests\n\nNot used and it was showing as a passing test.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe RequestsController do\n describe 'GET #new' do\n it 'returns HTTP success' do\n get 'new'\n respons... | ruby | chosen |
[
{
"from": "system",
"value": "Implement mock version of GET /v1/mittens/:name\n"
},
{
"from": "human",
"value": "require 'sinatra'\n\nmodule ApiWrapperExample\n module Mock\n # Simple in-memory API server implementation\n class ApiServer < ::Sinatra::Base\n REPO = {}\n\n get '/v... | ruby | chosen |
[
{
"from": "system",
"value": "Fix failing error handler specs under Ruby 1.9.2.\n"
},
{
"from": "human",
"value": "module BreweryDB\n module Middleware\n class ErrorHandler < Faraday::Response::Middleware\n def on_complete(env)\n case env[:status]\n when 200\n w... | ruby | chosen |
[
{
"from": "system",
"value": "Sort metrics output by method name\n"
},
{
"from": "human",
"value": "require \"minitest/ruby_golf_metrics/character_counter\"\n\nmodule Minitest\n\n module RubyGolfMetrics\n\n class Reporter < ::Minitest::Reporter\n\n def start\n @ergs = {}\n e... | ruby | chosen |
[
{
"from": "system",
"value": "Rewrite variable_contains_dash check to use new lexer\n"
},
{
"from": "human",
"value": "class PuppetLint::Plugins::CheckVariables < PuppetLint::CheckPlugin\n check 'variable_contains_dash' do\n tokens.each_index do |token_idx|\n token = tokens[token_idx]\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix query node to remove active only filter.\n\nQuery node should not filter by active_only node.\n"
},
{
"from": "human",
"value": "Puppet::Parser::Functions.newfunction(:query_nodes, :type => :rvalue, :doc => <<-EOT\n\n accepts two arguments, a query used to disc... | ruby | chosen |
[
{
"from": "system",
"value": "Add defaults to skills migration\n"
},
{
"from": "human",
"value": "class CreateSkills < ActiveRecord::Migration\n def change\n create_table :skills do |t|\n t.string :title\n t.integer :current_streak\n t.integer :longest_streak\n t.referenc... | ruby | chosen |
[
{
"from": "human",
"value": "Add seed recipe of gobierto data with default custom fields\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nmodule GobiertoSeeds\n class Recipe\n def self.run(site)\n description = site.custom_fields.localized_string.where(class_name: \"Gob... | ruby | chosen |
[
{
"from": "system",
"value": "Fix jobs running on dead runs\n"
},
{
"from": "human",
"value": "class RunChannel < ApplicationCable::Channel\n def subscribed\n run = Run.find36(params[:run_id])\n stream_for(run)\n end\n\n class << self\n def broadcast_time_since_upload(id36)\n ru... | ruby | chosen |
[
{
"from": "human",
"value": "Test the functionality of the DocumentQueue.\n"
},
{
"from": "gpt",
"value": "require \"test_helper\"\nrequire \"elasticsearch/document_queue\"\nrequire \"elasticsearch/bulk_index_worker\"\n\nclass DocumentQueueTest < MiniTest::Unit::TestCase\n def sample_document_h... | ruby | chosen |
[
{
"from": "system",
"value": "Use multipackage installs in the test recipe\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "apt_update 'update'\n\ncase node['platform_family']\nwhen 'debian'\n %w(libxml2 libxml2-dev libxslt1-dev).... | ruby | chosen |
[
{
"from": "system",
"value": "Use asset tag from facter when logging\n"
},
{
"from": "human",
"value": "module Logging\n module Collins\n\n def self.collins\n Genesis::Framework::Utils.collins\n end\n\n def self.facter\n Genesis::Framework::Utils.facter\n end\n\n def se... | ruby | chosen |
[
{
"from": "system",
"value": "Update token for merchant 2"
},
{
"from": "human",
"value": "role :www, %w(deployer@vpn.framsteg.de)\nserver \"vpn.framsteg.de\", user: \"deployer\", roles: %w(www)\n\n# uncomment in case of travis, capistrano will have its own\nset :ssh_options, keys: [\"config/dep... | ruby | chosen |
[
{
"from": "system",
"value": "Fix RAMFS dependency problem in PostgreSQL\n\nRelated to 050c194a4be0bdcc6a6dd1bcfc61c69ffe41df97\nStill pending to check if this regression affects Chef 10 and 11\n"
},
{
"from": "human",
"value": "default['postgresql']['default_version'] = '9.1'\ndefault['post... | ruby | chosen |
[
{
"from": "human",
"value": "Add smoke tests for /cars endpoint together with import command\n"
},
{
"from": "gpt",
"value": "require \"json\"\n\nRSpec.describe \"System tests\" do\n describe \"/cars API endpoint\" do\n let!(:pipe) { open(\"|cars_api server\") }\n\n after do\n Proces... | ruby | chosen |
[
{
"from": "system",
"value": "Set the number of occurrences to 3 for the cluster status alarm.\n"
},
{
"from": "human",
"value": "# Only process if we find the monitor cookbook in the run list\nreturn unless node.recipe?('monitor::default')\n\n# Bring in the necessary ruby dependencies\nsensu_ge... | ruby | chosen |
[
{
"from": "human",
"value": "Add tests for api scope forms in admin UI too.\n"
},
{
"from": "gpt",
"value": "require_relative \"../test_helper\"\n\nclass Test::AdminUi::TestApiScopes < Minitest::Capybara::Test\n include Capybara::Screenshot::MiniTestPlugin\n include ApiUmbrellaTestHelpers::Adm... | ruby | chosen |
[
{
"from": "human",
"value": "Add multi_select prompt pagination of disabled items example\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nrequire_relative \"../lib/tty-prompt\"\n\nprompt = TTY::Prompt.new\n\nnumbers = [\n {name: '1', disabled: 'out'},\n '2',\n {name: '3', di... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Rails version requirement for Travis.\n"
},
{
"from": "human",
"value": "$LOAD_PATH << File.dirname(__FILE__) + '/lib'\nrequire 'custom_counter_cache/version'\n\nspec = Gem::Specification.new do |s|\n s.name = 'custom_counter_cache'\n s.version = CustomCounter... | ruby | chosen |
[
{
"from": "system",
"value": "Fix environment to be a hash.\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: sana-protocol-builder\n# Recipe:: default\n#\n\ngit '/opt/' do\n repository 'git@github.com:SanaMobile/sana.protocol_builder.git'\n revision 'master'\n action :sync\nend\n\ncook... | ruby | chosen |
[
{
"from": "system",
"value": "Allow as_list helper for matcher to take connectors as params\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule Pathway\n module Rspec\n module ListHelpers\n def as_list(items)\n as_sentence(items.map(&:inspect))\n end\n... | ruby | chosen |
[
{
"from": "system",
"value": "Update interactions staging deploy config\n"
},
{
"from": "human",
"value": "# interactions staging branch\nset :user, \"deploy\"\nset :domain, \"63.138.119.195\" # ruby-vm12\nset :deploy_to, \"/web/portal\"\nserver domain, :app, :web\nrole :db, domain, :primary => ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix issue with load path and lib folder.\n"
},
{
"from": "human",
"value": "require 'chaindrive/api'\nrequire 'chaindrive/web'\n\nuse Rack::Session::Cookie\nrun Rack::Cascade.new [Chaindrive::API, Chaindrive::Web]\n"
},
{
"from": "gpt",
"value": "$:.unsh... | ruby | chosen |
[
{
"from": "system",
"value": "Make example body regexp dynamically configurable.\n"
},
{
"from": "human",
"value": "require 'kramdown/parser/kramdown'\n\nmodule Docbert\n class Parser < Kramdown::Parser::Kramdown\n EXAMPLE_KEYWORDS = \"Given|When|Then|And|But|\\\\|\"\n EXAMPLE_START = ... | ruby | chosen |
[
{
"from": "system",
"value": "Add compare param to diff routes\n"
},
{
"from": "human",
"value": "require 'sinatra/base'\nrequire 'sinatra/respond_with'\nrequire 'llt/review'\n\nclass Api < Sinatra::Base\n register Sinatra::RespondWith\n\n get '/:type/diff' do\n gold = Array(params[:gold])\... | ruby | chosen |
[
{
"from": "system",
"value": "Save site object in Navigator class for subclassing use.\n"
},
{
"from": "human",
"value": "module Mill\n\n class Navigator\n\n class Item\n\n attr_accessor :uri\n attr_accessor :title\n\n def initialize(uri:, title: nil)\n @uri = Addressab... | ruby | chosen |
[
{
"from": "system",
"value": "Add two dependencies for RSpec\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'fourchan_kit/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Make the collections truncate instead of drop\n"
},
{
"from": "human",
"value": "require 'mongoid-shell'\nrequire 'mongoid'\nrequire 'fileutils'\n\nrequire_relative 'mongoid_seeder/config'\n\nmodule MongoidSeeder\n def self.before_suite\n Config.before_suite.cal... | ruby | chosen |
[
{
"from": "system",
"value": "Add load path for BCs\n"
},
{
"from": "human",
"value": "require_relative 'boot'\n\nrequire \"rails\"\n# Pick the frameworks you want:\nrequire \"active_model/railtie\"\nrequire \"active_job/railtie\"\nrequire \"active_record/railtie\"\n# require \"active_storage/en... | ruby | chosen |
[
{
"from": "system",
"value": "Update event loop to use em-synchrony\n"
},
{
"from": "human",
"value": "require 'puma'\nrequire 'eventmachine'\nrequire 'souffle/http'\n\n# The souffle server and management daemon.\nclass Souffle::Server\n\n # Creates a new souffle server.\n def initialize\n en... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration to fix primary key issue"
},
{
"from": "gpt",
"value": "class ResetPk < ActiveRecord::Migration[5.0]\n def change\n ActiveRecord::Base.connection.tables.each do |t|\n ActiveRecord::Base.connection.reset_pk_sequence!(t)\n end\n end\nend\n"
... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify page_entries_info by adding entry_name interface to each ORM\n"
},
{
"from": "human",
"value": "module Kaminari\n module MongoidCriteriaMethods\n def limit_value #:nodoc:\n options[:limit]\n end\n\n def offset_value #:nodoc:\n options[:s... | ruby | chosen |
[
{
"from": "human",
"value": "Add entities specs for resource\n"
},
{
"from": "gpt",
"value": "describe Dox::Entities::Resource do\n subject { described_class }\n\n let(:resource_name) { 'Pokemons' }\n let(:details) do\n {\n resource_desc: 'Pokemons',\n resource_endpoint: '/pokemo... | ruby | chosen |
[
{
"from": "system",
"value": "Use stupid workaround for stripe input\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nfeature 'Stripe integreation' do\n scenario 'accepts donations' do\n visit root_path\n\n page.find(:css, 'nav div', text: 'Donate').click\n\n fill_in 'amount... | ruby | chosen |
[
{
"from": "system",
"value": "Make the Camping handler smarter\n"
},
{
"from": "human",
"value": "Parkaby.load('parse_tree', 'ParseTree')\n\nmodule Parkaby::Frameworks::Camping\n def self.included(mod)\n mod.module_eval %q{\n include(CompiledViews = Module.new {\n include Views\n... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up acceptance spec helper\n"
},
{
"from": "human",
"value": "require 'beaker-rspec'\nrequire 'beaker-puppet'\nrequire 'beaker/puppet_install_helper'\nrequire 'beaker/module_install_helper'\n\nrun_puppet_install_helper unless ENV['BEAKER_provision'] == 'no'\nin... | ruby | chosen |
[
{
"from": "system",
"value": "Install puppet package from distro sources\n\nMy acceptance tests should run against the lowest common denominator on\nwhich the module is supported. This is currently puppet 2.7 as shipped\nwith Debian Wheezy. install_puppet installs from Puppetlabs repos, so switch\nto instal... | ruby | chosen |
[
{
"from": "system",
"value": "Fix \"ambiguous first argument\" warning\n"
},
{
"from": "human",
"value": "require 'helper'\n\ndescribe Twitter::Geo::Point do\n\n before do\n @point = Twitter::Geo::Point.new(:coordinates => [-122.399983, 37.788299])\n end\n\n describe \"#==\" do\n it \"r... | ruby | chosen |
[
{
"from": "system",
"value": "Fix repository url used in tests.\n"
},
{
"from": "human",
"value": "require 'test_helper'\nrequire 'citrus/repository'\n\nclass RepositoryTest < UnitTestCase\n def test_should_checkout_remote_repository\n with_citrus_root do |root|\n tmpdir = File.join(roo... | ruby | chosen |
[
{
"from": "system",
"value": "Remove page_count; it is not a concern of Collection\n"
},
{
"from": "human",
"value": "module BreweryDB\n class Collection\n include Enumerable\n\n BATCH_SIZE = 50\n\n attr_reader :size, :page_count\n alias length size\n\n def initialize(response)\n... | ruby | chosen |
[
{
"from": "human",
"value": "Set up test for initial routing\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe \"Voice Survey Interface\" do\n\n def hash_from_xml(nokogiri_doc)\n Hash.from_xml(nokogiri_doc.to_s)\n end\n\n describe \"initial call\" do\n before(:each) do\... | ruby | chosen |
[
{
"from": "system",
"value": "Test hook provides user when generating the token\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'spec_helper'\nrequire 'rack/test'\n\ndescribe Warden::JWTAuth::Hooks do\n include_context 'configuration'\n include_context 'middleware'\... | ruby | chosen |
[
{
"from": "system",
"value": "Use [] method from 2.0 openstruct rather than a different method name\n"
},
{
"from": "human",
"value": "require 'ostruct'\n\nmodule SuperSettings\n # This class handles SuperSettings Configuration. This is basically\n # an OpenStruct class with an additional exte... | ruby | chosen |
[
{
"from": "system",
"value": "Remove reset and have configure call reset client.\n\nallows configuration to be changed after tankard is already initialized. updating the configuration would reset the tankard client so next time it is called it is regenerated.\n"
},
{
"from": "human",
"value": "... | ruby | chosen |
[
{
"from": "human",
"value": "Add unoptimized solution to problem 7\n"
},
{
"from": "gpt",
"value": "=begin\n\nBy listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.\n\nWhat is the 10 001st prime number?\n\n=end\n\ndef is_prime?(n)\n !(2...n).any? { ... | ruby | chosen |
[
{
"from": "system",
"value": "Change named parameters to options hash\n"
},
{
"from": "human",
"value": "require 'whatsapp/request/base'\n\nmodule WhatsApp\n module Request\n\n class Code < WhatsApp::Request::Base\n IDENTITY = 'abcdef0123456789'\n\n def initialize(country_code, num... | ruby | chosen |
[
{
"from": "system",
"value": "Change sudo su to sudo -u.\n"
},
{
"from": "human",
"value": "# Deploy the code by copying it up to the server so the target servers don't need\n# to have access to the git repo\nset :deploy_via, :copy\nset :copy_strategy, :export\nset :copy_cache, false\n\n_cset(:s... | ruby | chosen |
[
{
"from": "human",
"value": "Add TERM condition estimation calculator\n"
},
{
"from": "gpt",
"value": "class TermEstimationCalculator < ConditionEstimationCalculator\n \n # Estimates the condition rating of an asset using approximations of\n # TERM condition decay splines. The condition is on... | ruby | chosen |
[
{
"from": "system",
"value": "FIX: Add units to teaching period serializer\n"
},
{
"from": "human",
"value": "class TeachingPeriodSerializer < ActiveModel::Serializer\n attributes :id, :period, :year, :start_date, :end_date, :active_until, :active, :breaks\n\n def active\n object.active_unt... | ruby | chosen |
[
{
"from": "system",
"value": "Enable tests for Policy => Details of votes page\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n# Compare results of rendering pages via rails and via the old php app\n\ndescribe PoliciesController do\n include HTMLCompareHelper\n fixtures :all\n\n it ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove DidYouMean fallback for Rails::Command::Spellchecker\n\nIn Ruby 2.7 DidYouMean is included as a default gem.\nThe included version of DidYouMean (1.4.0) includes DidYouMean::Spellchecker:\nhttps://github.com/ruby/did_you_mean/blob/v1.4.0/lib/did_you_mean/spell_checker.rb... | ruby | chosen |
[
{
"from": "system",
"value": "Fix specs for deprecated CI build status badge\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Ci::ProjectsController do\n let(:visibility) { :public }\n let!(:project) { create(:project, visibility, ci_id: 1) }\n let(:ci_id) { project.ci_id ... | ruby | chosen |
[
{
"from": "system",
"value": "Use 'relevance' sorting for ask.wikiedu.org queries\n\nThis sorting has better results than sorting by activity, according to Ian and Samantha.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nrequire 'uri'\n\n# Controller for ask.wikiedu.org search... | ruby | chosen |
[
{
"from": "system",
"value": "Add 'working' link for disabled agents\n"
},
{
"from": "human",
"value": "module ApplicationHelper\n def nav_link(name, path, options = {})\n (<<-HTML).html_safe\n <li class='#{(current_page?(path) ? \"active\" : \"\")}'>\n #{link_to name, path}\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change on_date lookup field to created_at for accuracy\n"
},
{
"from": "human",
"value": "class SystemActivityLog < ActiveRecord::Base\n has_paper_trail\n\n belongs_to :user\n\n validates :message, :category, presence: true\n\n scope :for_category, ->(category) ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug that user can not be specified"
},
{
"from": "human",
"value": "module Middleman\n module Deploy\n module Methods\n class Rsync < Base\n attr_reader :clean, :flags, :host, :path, :port, :user\n\n def initialize(server_instance, options... | ruby | chosen |
[
{
"from": "system",
"value": "Fix headers for token and info retrieval\n"
},
{
"from": "human",
"value": "require 'omniauth-oauth2'\n\nmodule OmniAuth\n module Strategies\n class Wunderlist < OmniAuth::Strategies::OAuth2\n option :name, 'wunderlist'\n\n option :client_options, {\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add new attribute `generate_password` according to api v3"
},
{
"from": "human",
"value": "module WoocommerceAPI\n class Meta < Resource\n attribute :timezone\n attribute :currency\n attribute :currency_format\n attribute :currency_position\n attribu... | ruby | chosen |
[
{
"from": "system",
"value": "Update HandbrakeCLI Nightly to v6685svn\n\nHandBrakeCLI Nightly v6685svn built 2015-01-05.\n"
},
{
"from": "human",
"value": "cask :v1 => 'handbrakecli-nightly' do\n version '6675svn'\n sha256 'd64d63700af9eb77ed1e90ae4288f0f8d171657d7fb91f84d519203e9458cf44'\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add ssh_username variable when execute terraform\n"
},
{
"from": "human",
"value": "module CloudConductor\n class Terraform\n class Parent\n attr_accessor :modules\n attr_reader :output\n\n def initialize(cloud)\n @cloud = cloud\n @m... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor variable names etc in search Cd methods.\n"
},
{
"from": "human",
"value": "class Cd \n\n @@all_Cds = {}\n attr_accessor :name, :artist\n\n def initialize(attributes)\n @name = attributes[:album_name]\n @artist = attributes[:artist_name]\n end\n\n... | ruby | chosen |
[
{
"from": "human",
"value": "Add test for thread issue\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\nrequire \"spec_helper\"\n\ndescribe Bundler::Fetcher::CompactIndex do\n let(:downloader) { double(:downloader) }\n let(:remote) { double(:remote, :cache_slug => \"lsjdf\... | ruby | chosen |
[
{
"from": "human",
"value": "Add specs for photo mass assignment\n"
},
{
"from": "gpt",
"value": "# Copyright (c) 2010, Diaspora Inc. This file is\n# licensed under the Affero General Public License version 3 or later. See\n# the COPYRIGHT file.\n\nrequire 'spec_helper'\n\ndescribe Photo... | ruby | chosen |
[
{
"from": "system",
"value": "Remove allowed_push_host definition in gemspec\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'increments/schedule/version'\n\nGem::Specification.new do... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for SimpleCov\nrequire minitest after simplecov\n"
},
{
"from": "human",
"value": "$:.unshift(File.join(File.dirname(__FILE__),'..','lib'))\n\nrequire 'rubygems'\nrequire 'bundler'\nrequire 'minitest/autorun'\n\nBundler.require(:default, :development)\n\nunless ... | ruby | chosen |
[
{
"from": "system",
"value": "Add unlimited descendents to temp_dir test helper\n"
},
{
"from": "human",
"value": "require 'simplecov'\nrequire 'minitest/rg'\n\nSimpleCov.minimum_coverage_by_file 100\nSimpleCov.start do\n add_filter '/test/'\nend\n\nrequire 'minitest/autorun'\nrequire 'mocha/mi... | ruby | chosen |
[
{
"from": "system",
"value": "Add Method for Trimming Content in Views\n\nAdd a helper method that can be used to trim content to a certain length\nin views and adds ellipses '...' if the content has been trimmed.\n"
},
{
"from": "human",
"value": "module ApplicationHelper\n def flash_class(lev... | ruby | chosen |
[
{
"from": "system",
"value": "Change example to use signal\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire 'tty-command'\n\ncmd = TTY::Command.new\n\ncmd.run(\"while test 1; do echo 'hello'; sleep 1; done\", timeout: 5)\n"
},
{
"from": "gpt",
"value": "# encoding: utf... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration for menus_items table\n"
},
{
"from": "gpt",
"value": "class CreateMenusItemsTable < ActiveRecord::Migration\n def up\n \tcreate_table :menus_items, :id => false do |t|\n \t\tt.references :menu\n \t\tt.references :item\n \tend\n \tadd_index :menus... | ruby | chosen |
[
{
"from": "system",
"value": "Use find to force capybara to wait for javascript\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass SearchWithTraitSetsTest < ActionDispatch::IntegrationTest\n fixtures :projects, :taxa, :trait_sets, :categorical_traits\n setup do\n Capybara.cur... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for skipping callbacks in Rails 3\n"
},
{
"from": "human",
"value": "module AuthlogicCas\n module Session\n def self.included(klass)\n klass.class_eval do\n include Methods\n end\n end\n\n module Methods\n def self.included(klass)... | ruby | chosen |
[
{
"from": "system",
"value": "Load .local.yml files in Sinatra too.\n\n.local.yml file are loaded by default in Rails. This patches loads them in Sinatra too.\n"
},
{
"from": "human",
"value": "require \"rails_config/rack/reloader\"\n\nmodule RailsConfig\n # provide helper to register within yo... | ruby | chosen |
[
{
"from": "system",
"value": "Split cleanup to it's own cd block\n"
},
{
"from": "human",
"value": "require 'boxcar/command/base'\n\n# Manage updates for Boxcar\n#\nclass Boxcar::Command::Update < Boxcar::Command::Base\n def index\n version = args.first || latest_stable\n abort \"You're o... | ruby | chosen |
[
{
"from": "system",
"value": "Add more specs for -I include_dir\n"
},
{
"from": "human",
"value": "require_relative '../spec_helper'\n\ndescribe \"The -I command line option\" do\n before :each do\n @script = fixture __FILE__, \"loadpath.rb\"\n end\n\n it \"adds the path to the load path (... | ruby | chosen |
[
{
"from": "human",
"value": "Add Surf as a CI source\n"
},
{
"from": "gpt",
"value": "# http://github.com/surf-build/surf\n\nmodule Danger\n module CISource\n class Surf < CI\n def self.validates?(env)\n return ['SURF_REPO', 'SURF_NWO'].all? {|x| env[x]}\n end\n\n def s... | ruby | chosen |
[
{
"from": "system",
"value": "Improve tests for valid html.\n"
},
{
"from": "human",
"value": "module DebugExtras\n class Injector\n def initialize(response)\n @response = response\n @result = @response.body\n end\n\n def process_response\n if response_is_html?\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix ItemsHelper spec for latest changes.\n"
},
{
"from": "human",
"value": "require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')\n\ninclude ItemsHelper\n\ndescribe ItemsHelper do\n before(:each) do\n Member.destroy_all\n end\n \n describe \"it... | ruby | chosen |
[
{
"from": "system",
"value": "Make mock buffer behave more like a real buffer\n\nIf you try to append a string with \\n newline characters in it, a real\nvim buffer will output \"^@\" in place of the newline characters. The\nmock buffer that we've been using didn't do that which led to a bug\nfixed in https... | ruby | chosen |
[
{
"from": "system",
"value": "Return early if there were no references in text\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n# This class extracts all users found in a piece of text by the username or the\n# email address\n\nmodule Gitlab\n class UserExtractor\n # Not u... | ruby | chosen |
[
{
"from": "system",
"value": "Remove skip flag from Ashcat spec\n"
},
{
"from": "human",
"value": "require 'vcr_helper'\n\nRSpec.describe Ashcat, type: :model, skip: ENV['TRAVIS'] do\n let(:profile) { Fabricate(:github_profile) }\n let(:contributor) { Fabricate(:user, github_id: profile.github... | ruby | chosen |
[
{
"from": "system",
"value": "Add pid and config type to startup message\n"
},
{
"from": "human",
"value": "module Librato\n module Rails\n class Railtie < ::Rails::Railtie\n\n # don't have any custom http vars anymore, check if hostname is UUID\n on_heroku = Socket.gethostname =~ ... | ruby | chosen |
[
{
"from": "system",
"value": "Test module inclusion using a module we still have\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\ndescribe 'et_nginx::default' do\n before do\n stub_command('which nginx').and_return(nil)\n end\n\n let(:chef_run) do\n ChefSpec::SoloRunner.new.conve... | ruby | chosen |
[
{
"from": "system",
"value": "Rework ship-v3 to properly use new packaging scripts\n\nCo-authored-by: Chhavi Kankaria <a45f933d80ef78816bcf302f872972e3887e5115@pivotal.io>\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\nrequire 'octokit'\nrequire 'toml'\nrequire 'fileutils'\n\nOctokit.au... | ruby | chosen |
[
{
"from": "system",
"value": "Split up YARD doc tasks.\n\nThis will make it easier to work on docs locally.\n"
},
{
"from": "human",
"value": "require 'yard'\nrequire 'yard/rake/yardoc_task'\nrequire File.expand_path(File.dirname(__FILE__) + '/../lib/cucumber/platform')\n\nSITE_DIR = File.ex... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake to dev dependencies\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"acts_as_shopping_cart/version\"\n\nGem::Specification.new do |s|\n s.name = \"acts_as_shopping_cart\"\n s.ve... | ruby | chosen |
[
{
"from": "system",
"value": "Rename deliver_to as 'to' coinciding with decision to change the column name in the migration\n"
},
{
"from": "human",
"value": "# require 'twilio-ruby'\n\nclass UsersController < ActionController::API\n\n def send_verification_code\n setup_sms\n send_sms(par... | ruby | chosen |
[
{
"from": "system",
"value": "Bring in first-build fixes for erchef\n"
},
{
"from": "human",
"value": "name \"opscode-erchef\"\nversion \"pc-rc-0.8.0-tag\"\n\ndependencies [\"erlang\", \"rsync\"]\n\nsource :git => \"git@github.com:opscode/opscode-chef-api-erlang\"\n\nrelative_path \"opscode-chef... | ruby | chosen |
[
{
"from": "system",
"value": "Use silence_stream to quiet output\n\nThis should behave the same as before, except output any messages\nappearing on STDERR.\n"
},
{
"from": "human",
"value": "unless defined?(Spree::InstallGenerator)\n require 'generators/spree/install/install_generator'\nend\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add an attr_reader for Celluloid::IO::Mailbox's waker object\n"
},
{
"from": "human",
"value": "require 'thread'\n\nmodule Celluloid\n module IO\n # An alternative implementation of Celluloid::Mailbox using Wakers\n class Mailbox < Celluloid::Mailbox\n a... | ruby | chosen |
[
{
"from": "system",
"value": "Update monkeypatch for multipart-post to be compatible with version 2.0\n\nJust needed to add another option to the method definition to pass along the headers hash.\n\nI made some notes in the file, but it seems like I should be able to pass along the proper content-type and r... | ruby | chosen |
[
{
"from": "human",
"value": "Add PrivateUrl class to generate signed URLs."
},
{
"from": "gpt",
"value": "module S3Relay\n class PrivateUrl < S3Relay::Base\n\n attr_reader :expires, :path\n\n def initialize(public_url, options={})\n @path = URI.parse(public_url).path\n @expir... | ruby | chosen |
[
{
"from": "system",
"value": "Remove symbolick links and replace for the path."
},
{
"from": "human",
"value": "class RailsBackend::InstallGenerator < Rails::Generators::Base\n source_root File.expand_path('../templates', __FILE__)\n\n def create\n copy_applications_file '_navigation.html.e... | ruby | chosen |
[
{
"from": "system",
"value": "Use render_file for the \"Welcome\" widget.\n\nSigned-off-by: Yorick Peterse <82349cb6397bb932b4bf3561b4ea2fad50571f50@gmail.com>"
},
{
"from": "human",
"value": "# The welcome widget shows a welcome message explaining a few things about Zen.\n# It also shows a list... | ruby | chosen |
[
{
"from": "system",
"value": "Fix eval issue if file ends in a comment\n"
},
{
"from": "human",
"value": "module Fluent\n class ScriptFilter < Filter\n Plugin.register_filter('script', self)\n\n config_param :path, :string\n\n def configure(conf)\n super\n load_script_file(co... | ruby | chosen |
[
{
"from": "system",
"value": "Add constraint for ipset types\n"
},
{
"from": "human",
"value": "\nPuppet::Type.newtype(:firewalld_ipset) do\n\n @doc =%q{\n Configure IPsets in Firewalld\n \n Example:\n \n firewalld_ipset {'internal net':\n ensure => 'present',\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add a reset method to Fog::Mock that resets all providers/services.\n"
},
{
"from": "human",
"value": "module Fog\n\n @mocking = false\n\n def self.mock!\n @mocking = true\n end\n\n def self.mock?\n @mocking\n end\n\n def self.mocking?\n @mocking\n e... | ruby | chosen |
[
{
"from": "system",
"value": "Replace query flags instead of concatenating\n\nThis allows one to remove the default flags.\n"
},
{
"from": "human",
"value": "require 'sinatra'\nrequire 'json'\n\n# A web dashboard for annotations\n# This is intended to be mounted within an application, e.g.\n#\n#... | ruby | chosen |
[
{
"from": "system",
"value": "Extend including class instead of using class_eval\n"
},
{
"from": "human",
"value": "module PartTime\n module Job\n def self.included(klass)\n klass.class_eval do\n def self.perform_async(*args)\n PartTime.queue.push([self, *args])\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use task name as recipe name in output\n"
},
{
"from": "human",
"value": "require 'chef'\n\nmodule Rake\n module DSL\n\n private\n\n def recipe(id, &block)\n namespace :chef do\n namespace :recipe do\n desc \"Run chef rake task #{id}\"\n ... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.