conversations listlengths 2 3 | source stringclasses 1 value | stack stringclasses 1 value |
|---|---|---|
[
{
"from": "system",
"value": "Add actions in orders controller and authenticate user.\n"
},
{
"from": "human",
"value": "class OrdersController < ApplicationController\nend\n"
},
{
"from": "gpt",
"value": "class OrdersController < ApplicationController\n before_action :authenticate_... | ruby | chosen |
[
{
"from": "system",
"value": "Fix deprecated NOR in where query\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass SearchController < ApplicationController\n def index\n permitted = params.require(:search).permit(:email)\n raise ActionController::ParameterMissing if... | ruby | chosen |
[
{
"from": "system",
"value": "Change the way of config"
},
{
"from": "human",
"value": "module LastHit\n class Configure\n @test_command = \"bundle exec rspec\"\n @default_base_branch = \"development\"\n\n class << self\n attr_accessor :test_command, :default_base_branch\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Replace .es6.js extension to .js.es6 in JSHint check\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nmodule Phare\n class Check\n class JSHint < Check\n attr_reader :config, :path\n\n def initialize(directory, options = {})\n @config = Fil... | ruby | chosen |
[
{
"from": "system",
"value": "Enable use helper methods in rambulance view\n"
},
{
"from": "human",
"value": "module Rambulance\n class Railtie < Rails::Railtie\n initializer 'rambulance' do |app|\n require \"rambulance/exceptions_app\"\n\n app.config.exceptions_app =\n begi... | ruby | chosen |
[
{
"from": "system",
"value": "Move the entire folder at once\n"
},
{
"from": "human",
"value": "namespace :resource_monitor do\n task :console do\n require 'irb'\n require 'irb/completion'\n require 'resource_monitor' # You know what to do.\n ARGV.clear\n IRB.start\n end\n\n ta... | ruby | chosen |
[
{
"from": "system",
"value": "Use symbols instead of strings\n"
},
{
"from": "human",
"value": "require 'faraday_middleware'\nrequire 'faraday/request/multipart_with_file'\nrequire 'faraday/request/gateway'\nrequire 'faraday/request/twitter_oauth'\nrequire 'faraday/response/raise_http_4xx'\nrequ... | ruby | chosen |
[
{
"from": "human",
"value": "Add testing for plugin expunge command\n"
},
{
"from": "gpt",
"value": "require File.expand_path(\"../../../../../base\", __FILE__)\n\ndescribe VagrantPlugins::CommandPlugin::Action::ExpungePlugins do\n let(:app) { lambda { |env| } }\n let(:home_path){ '/fake/file/... | ruby | chosen |
[
{
"from": "system",
"value": "Fix fatal spec mistake and write right spec\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\nrequire \"tempfile\"\n\ndescribe Dotremap do\n let!(:config) { Tempfile.new(\".remap\") }\n let(:xml_dir) { \"/tmp\" }\n let(:xml_path) { File.join(xml_dir, Do... | ruby | chosen |
[
{
"from": "system",
"value": "Tweak spec to add dependent destroy relationship\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe Event, type: :model do\n\n it { is_expected.to validate_presence_of(:category)}\n it { is_expected.to validate_presence_of(:volunteers_need... | ruby | chosen |
[
{
"from": "system",
"value": "Add a goofy update_all method to Topic that is basically what we'll be calling from a cron job.\n"
},
{
"from": "human",
"value": "require 'xmlrpc/client'\n\nclass Topic\n FORUM_IDS = [6, 21, 45, 44] # Review, Archives, Denied, Waiting\n\n class << self\n def f... | ruby | chosen |
[
{
"from": "system",
"value": "Fix callback in a dummy application used in specs\n\nRails 5 has changed the way how callbacks chain should be stopped.\nReturning false no longer works. Now one should throw an :abort symbol.\n"
},
{
"from": "human",
"value": "class ParanoidPhone\n include Mongoi... | ruby | chosen |
[
{
"from": "system",
"value": "Comment out final failing spec\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe StanceChoice do\n let(:poll) { create :poll }\n let(:choice) { build :stance_choice, poll: poll, score: 1 }\n\n it 'allows scores == 1' do\n expect(choice).to ... | ruby | chosen |
[
{
"from": "system",
"value": "Add comment to bounce controller, specifying it's for SES\n"
},
{
"from": "human",
"value": "class BounceController < ApplicationController\n skip_before_filter :verify_authenticity_token\n\n def index\n begin\n success = true\n raise ActiveRecord::Re... | ruby | chosen |
[
{
"from": "human",
"value": "Add JRuby and Rubinius tweaks for Aruba\n"
},
{
"from": "gpt",
"value": "require 'aruba/cucumber'\n\nBefore do\n if RUBY_PLATFORM =~ /java/ || defined?(Rubinius)\n @aruba_timeout_seconds = 60\n else\n @aruba_timeout_seconds = 10\n end\nend\n\nAruba.configure... | ruby | chosen |
[
{
"from": "human",
"value": "Add the specs for the helper\n"
},
{
"from": "gpt",
"value": "require \"spec_helper\"\n\ndescribe S3Sign::Helper do\n include S3Sign::Helper\n\n describe \"#s3_signed_url_for_key\" do\n it \"calls S3Sign.url with the given key and expires in\" do\n expect(S... | ruby | chosen |
[
{
"from": "system",
"value": "Update spec helper to use FactoryGirl\n"
},
{
"from": "human",
"value": "# Configure Rails Envinronment\nENV[\"RAILS_ENV\"] = \"test\"\nrequire File.expand_path(\"../dummy/config/environment.rb\", __FILE__)\n\nrequire 'rspec/rails'\n\nrequire 'dataset'\nrequire 'da... | ruby | chosen |
[
{
"from": "system",
"value": "Add Pry to test environment\n"
},
{
"from": "human",
"value": "require 'tmdb-api'\nrequire 'rspec'\nrequire 'webmock/rspec'\n\n# Load all support files\nDir[File.dirname(__FILE__) + \"/support/**/*.rb\"].each {|r| require r}\n\n# Fake API Key\nTMDb.api_key = '565659... | ruby | chosen |
[
{
"from": "system",
"value": "Disable pry-rescue when $NO_RESCUE is true.\n"
},
{
"from": "human",
"value": "lib = File.expand_path('../../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'brainfuck'\n\nRSpec.configure do |config|\n config.around(:each) do |exam... | ruby | chosen |
[
{
"from": "system",
"value": "Add RSpec appboy_test_segment global test method\n"
},
{
"from": "human",
"value": "require 'pry'\nrequire 'dotenv'\nrequire 'bundler/setup'\n\nBundler.setup\nDotenv.load\n\nrequire 'appboy'\nrequire 'support/vcr'\nrequire 'support/factory_girl'\nrequire 'support/in... | ruby | chosen |
[
{
"from": "human",
"value": "Remove exchange_rate and currency fields from orders\n"
},
{
"from": "gpt",
"value": "Sequel.migration do\n up do\n drop_column :orders, :exchange_rate\n drop_column :orders, :currency\n end\n\n down do\n add_column :orders, :exchange_rate, BigDecimal\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use the built-in be_between matcher.\n"
},
{
"from": "human",
"value": "require 'rspec'\nrequire 'simplecov'\nSimpleCov.start\n\nrequire 'nmap/version'\nrequire 'nmap/xml'\ninclude Nmap\n\nRSpec::Matchers.define :be_between do |min,max|\n match do |value|\n (val... | ruby | chosen |
[
{
"from": "system",
"value": "Move Client configs before VCR configs\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'bundler/setup'\nrequire 'cgi'\nrequire 'vcr'\n\n$:.unshift(File.dirname(__FILE__) + '/lib')\nrequire 'dnsimple'\n\nVCR.configure do |c|\n c.cassette_library_dir =... | ruby | chosen |
[
{
"from": "system",
"value": "Delete logger statement from sample\n"
},
{
"from": "human",
"value": "Shoes.app do\n flow margin: 12 do\n # Set up three buttons\n button \"Stop\" do\n @anim.stop\n end\n @two = button \"Watch Me!\"\n button \"Start\" do\n @anim.start\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the try, because we are converting to string now\n"
},
{
"from": "human",
"value": "class BelongsToTokenInput < Formtastic::Inputs::StringInput\n\n\tdef input_html_options\n\t\tsuper.merge(\n\t\t\t\"data-token-limit\" => 1,\n\t\t\t\"class\" => \"active-admin-... | ruby | chosen |
[
{
"from": "system",
"value": "Add test helper to gemspec\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path(\"../lib\", __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire \"invenio/version\"\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Add a new id object to answers\n"
},
{
"from": "human",
"value": "module Stackoverflow\n extend ActiveSupport::Concern\n\n included do\n STACKOVERFLOW_ANSWERS_URI = 'https://api.stackexchange.com/2.2/me/answers'.freeze\n end\n\n def fetch_answers\n agent =... | ruby | chosen |
[
{
"from": "system",
"value": "Update Macros to use HasFriendship::Friendship rather than Friendship\n"
},
{
"from": "human",
"value": "module FriendshipMacros\n def create_request(friendable, friend)\n Friendship.create(friendable_id: friendable.id, friendable_type: friendable.class.base_cla... | ruby | chosen |
[
{
"from": "system",
"value": "Remove polluting data method. Use last to allow to template files\n"
},
{
"from": "human",
"value": "require 'haml'\nrequire 'tilt/haml'\n\nmodule EndView\n class << self\n attr_writer :default_engine\n\n def default_engine\n @default_engine ||= Tilt::Ha... | ruby | chosen |
[
{
"from": "system",
"value": "Use the generic Chef inc e-mail\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path(\"../lib\", __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.inclu... | ruby | chosen |
[
{
"from": "system",
"value": "Remove display of results from command line\n"
},
{
"from": "human",
"value": "require \"thor\"\nrequire \"resr\"\n\nmodule Resr\n class CLI < Thor\n map %w[--version -v] => :__print_version\n\n desc 'take SERVER', 'Take ownership of the SERVER'\n option a... | ruby | chosen |
[
{
"from": "system",
"value": "Change the podspec homepage to point to the github repo\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"ETA-SDK\"\n s.version = \"2.0.0\"\n s.summary = \"eTilbudsavis iOS SDK.\"\n s.description = <<-DESC\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add secure flag to cookie\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n\nDiscourse::Application.config.session_store :cookie_store, key: '_forum_session'\n\n# Use the database for sessions instead of the cookie-base... | ruby | chosen |
[
{
"from": "system",
"value": "Fix `url` stanza comment for Chatty.\n"
},
{
"from": "human",
"value": "cask 'chatty' do\n version '0.8.3'\n sha256 'e62c3409fd42e76a1c73a4a31076a4169162a566bd4c9e659cc30e31706bbbc6'\n\n url \"https://github.com/chatty/chatty/releases/download/v#{version}/Chatty_... | ruby | chosen |
[
{
"from": "human",
"value": "Add cask for OmegaT (latest)\n\nAdded a cask for OmegaT computer-aided translation software\n"
},
{
"from": "gpt",
"value": "cask 'omegat' do\n version :latest\n sha256 :no_check\n\n # sourceforge.net/projects/omegat was verified as official when first introduced ... | ruby | chosen |
[
{
"from": "system",
"value": "Add file_format to list of properties to migrate for master files\n"
},
{
"from": "human",
"value": "module FedoraMigrate\n module MasterFile\n class DescMetadataDatastreamMover < FedoraMigrate::SimpleXmlDatastreamMover\n\n def fields_to_copy\n %w(fi... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor Pharrell global object to use Environment instance :neckbeard:\n\nThis means that the configuration state is all held within an instance\nthat is held in one static reference rather than having multiple static\nvariables hanging around. Might allow for a cleaner intern... | ruby | chosen |
[
{
"from": "system",
"value": "Add text method and private methods for Texticle module\n"
},
{
"from": "human",
"value": "require \"texticle/version\"\n\nmodule Texticle\n # Your code goes here...\nend\n"
},
{
"from": "gpt",
"value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD... | ruby | chosen |
[
{
"from": "system",
"value": "Fix edge case for language\n"
},
{
"from": "human",
"value": "require 'yaml'\nrequire_relative File.join(File.dirname(__FILE__)) + '/../lib/funky_world_cup'\n\nmodule FunkyWorldCup\n ALLOWED_LOCALES = [:en, :es]\n DEFAULT_LOCALE = :en\n\n module Helpers\n def ... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing dependency to Thor\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'chroot/repository/client/version'\n\nGem::Specification.new do |spec|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix `url` stanza comment for Flymaster Designer.\n"
},
{
"from": "human",
"value": "cask 'flymaster-designer' do\n version :latest\n sha256 :no_check\n\n url 'http://downloads.flymaster.net/FmDesigner.dmg'\n name 'Flymaster Designer'\n name 'B2designer'\n home... | ruby | chosen |
[
{
"from": "system",
"value": "Use Chartkick with defer option\n"
},
{
"from": "human",
"value": "Chartkick.options = {\n content_for: :charts_js,\n colors: [\"rgba(61, 149, 236, 1)\"]\n}\n"
},
{
"from": "gpt",
"value": "Chartkick.options = {\n content_for: :charts_js,\n defer: tr... | ruby | chosen |
[
{
"from": "system",
"value": "Add customized key loader for namespaced file loading\n"
},
{
"from": "human",
"value": "require \"sparkle_formation\"\n\nclass SparkleFormation\n\n # Resources helper\n class Resources\n\n # Terraform specific resources collection\n class Terraform < Resour... | ruby | chosen |
[
{
"from": "system",
"value": "Use strings instead of symbols for param keys\n"
},
{
"from": "human",
"value": "require 'sinatra'\nrequire 'digest'\nrequire 'prime'\nrequire 'json'\n\nset :bind, '0.0.0.0'\n\ndef decode(request)\n JSON.parse(request.body.read).symbolize_keys\nend\n\nget '/' do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix CocoaPods ReactiveCocoa dependency version\n\nSigned-off-by: Karl Bowden <4c8060af93345c2cc416ee6aa55bceec4e5cc9d4@karlbowden.com>\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |spec|\n spec.name = 'ReduxKitReactiveCocoa'\n spec.version ... | ruby | chosen |
[
{
"from": "system",
"value": "Add event streaming for plos_authors destroy"
},
{
"from": "human",
"value": "TahiNotifier.subscribe(\"author:created\") do |subscription_name, payload|\n klass = payload[:klass]\n id = payload[:id]\n\n # generic Authors may have been created in a di... | ruby | chosen |
[
{
"from": "system",
"value": "Change respond_to method to original\n"
},
{
"from": "human",
"value": "require_dependency 'landable/api_controller'\n\nmodule Landable\n module Api\n class AccessTokensController < ApiController\n skip_before_filter :require_author!, only: [:create]\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix override for Spree 1.3\n"
},
{
"from": "human",
"value": "Deface::Override.new(:virtual_path => 'spree/shared/_footer',\n :name => 'add_newsletter_form_to_footer',\n :insert_top => 'div#footer_left',\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use message_id_regexp variable for the regexp\n\nFeedback:\nhttps://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8620#note_22021001\n"
},
{
"from": "human",
"value": "module Gitlab\n module IncomingEmail\n UNSUBSCRIBE_SUFFIX = '+unsubscribe'.freeze\n WILDCA... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing index for pgroonga\n"
},
{
"from": "human",
"value": "class AddIndexToIssueContents < ActiveRecord::Migration\n def change\n reversible do |d|\n case\n when Redmine::Database.postgresql?\n opclass = \"pgroonga.varchar_full_text_searc... | ruby | chosen |
[
{
"from": "human",
"value": "Add basic coverage for generator\n"
},
{
"from": "gpt",
"value": "require \"rails_helper\"\nrequire \"generator_spec\"\nrequire \"generators/paul_revere/paul_revere_generator\"\n\ndescribe PaulRevereGenerator, type: :generator do\n\n destination File.expand_path(\".... | ruby | chosen |
[
{
"from": "system",
"value": "Allow quirky-api access to cookies\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nmodule QuirkyApi\n require 'will_paginate'\n\n # The base class provides the standard functionality that every API requires.\n # Inherit your contorller from QuirkyApi::Bas... | ruby | chosen |
[
{
"from": "system",
"value": "Rewrite versioned asset paths coming in\n"
},
{
"from": "human",
"value": "# A monkey-patch to AssetTagHelper that prepends a directory with the rails asset it \n# to asset paths as well as using an asset query string. CDNs may ignore the querystring\n# so this is b... | ruby | chosen |
[
{
"from": "system",
"value": "Change updated_at on app when source files change\n"
},
{
"from": "human",
"value": "class FilesController < ApplicationController\n respond_to :json\n\n before_action :authenticate_user!\n\n # TODO: use the CSRF token since we want high security for uploading fi... | ruby | chosen |
[
{
"from": "system",
"value": "Convert to new hash syntax\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nclass GroupController < ApplicationController\n def index\n @branch = Branch.where(:name => params[:branch], :vendor => 'ALT Linux').first\n @groups = @branch.groups.where(:par... | ruby | chosen |
[
{
"from": "system",
"value": "Use head() instead of render(nothing: true).\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\n\n# Stats controller for sending arbitrary data to statsd from the web.\n#\n# The initial use case is deploy tracking.\nclass StatsController < ApplicationController\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add additional info to repositories in user endpoint\n"
},
{
"from": "human",
"value": "class UsersController < ApplicationController\n before_filter :authenticate!, :only => [:show]\n\n def show\n render json: {\n repositories: current_user.github.reposit... | ruby | chosen |
[
{
"from": "system",
"value": "Update Gitter to version 1.153.\n"
},
{
"from": "human",
"value": "class Gitter < Cask\n version '1.141'\n sha256 '6254727d8e7efe48cac27d6194a11a303fc5b61f4b93b9fc49061b11ea47dfac'\n\n url 'http://update.gitter.im/osx/Gitter-1.141.dmg'\n appcast 'http://update.g... | ruby | chosen |
[
{
"from": "system",
"value": "Add actions in user controller.\n"
},
{
"from": "human",
"value": "class UsersController < ApplicationController\nend\n"
},
{
"from": "gpt",
"value": "class UsersController < ApplicationController\n def index\n @users = User.all\n end\n\n def new\n... | ruby | chosen |
[
{
"from": "system",
"value": "Use program version same as gem version\n"
},
{
"from": "human",
"value": "require 'commander'\n\nmodule BackupRepos\n class Commander\n include ::Commander::Methods\n\n def run\n program :name, 'Backup Repos'\n program :version, '0.1.0'\n prog... | ruby | chosen |
[
{
"from": "system",
"value": "Exclude archived content from 'relatable_items'\n\nThis shrinks the list by ~5%, and might avoid creating an incorrect\nrelationship.\n"
},
{
"from": "human",
"value": "require \"artefact\"\n\nclass Artefact\n # Add a non-field attribute so we can pass indexable co... | ruby | chosen |
[
{
"from": "system",
"value": "Check [:nothing] as viable actions\n"
},
{
"from": "human",
"value": "module ChefSpec::Matchers\n class DoNothingMatcher\n def matches?(resource)\n @resource = resource\n @resource && @resource.performed_actions.empty?\n end\n\n def description\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing columns to display proper similar issues\n"
},
{
"from": "human",
"value": "class CreateIssueContents < ActiveRecord::Migration\n def change\n reversible do |d|\n d.up do\n case\n when Redmine::Database.postgresql?\n creat... | ruby | chosen |
[
{
"from": "system",
"value": "Allow synths to sneakily be added to tracker without blowing things up.\n\nThis is possible (in a with_fx block), although extremely unlikely. \nThe UDP packet would need to be delayed by more than half a second..."
},
{
"from": "human",
"value": "#--\n# This file i... | ruby | chosen |
[
{
"from": "system",
"value": "Remove static variable cache from CodeObject::Proxy\n\nThis is obsolete and was replaced by the +object_lookup+ attribute.\n"
},
{
"from": "human",
"value": "module Inch\n module CodeObject\n # CodeObject::Proxy object represent code objects in the analaysed\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Set deb_user and deb_group attributes to root.\n"
},
{
"from": "human",
"value": "require 'fpm/package/dir'\nrequire 'delegate'\n\nmodule FPM\n module Cookery\n module Package\n class Dir < SimpleDelegator\n def initialize(recipe)\n super(FP... | ruby | chosen |
[
{
"from": "system",
"value": "Add a private method for less lines.\n"
},
{
"from": "human",
"value": "class Gravatar\n\tdef self.url(email, options = { :size => 80 })\n\t\thash = Gravatar.hash!(email)\n\t\treturn \"http://www.gravatar.com/avatar/#{hash}/#{options[:size]}\"\n\tend\n\n\tdef url(em... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration to add salary specific flags to booking templates.\n"
},
{
"from": "gpt",
"value": "class AddSalarySpecificFlagsToBookingTemplates < ActiveRecord::Migration\n def change\n add_column :booking_templates, :for_gross_income, :boolean\n add_column :b... | ruby | chosen |
[
{
"from": "system",
"value": "Revert to prod learn url\n"
},
{
"from": "human",
"value": "require 'learn_web/client/request'\nrequire 'learn_web/client/connection'\nrequire 'learn_web/client/user'\nrequire 'learn_web/client/pull_request'\nrequire 'learn_web/client/lesson'\nrequire 'learn_web/cli... | ruby | chosen |
[
{
"from": "system",
"value": "Fix issue that disabled Username/Password authentication\n"
},
{
"from": "human",
"value": "module TaskMapper::Provider\n # This is the Pivotal Tracker Provider for taskmapper\n module Pivotal\n include TaskMapper::Provider::Base\n TICKET_API = PivotalAPI::S... | ruby | chosen |
[
{
"from": "system",
"value": "Move comment to PR body\n"
},
{
"from": "human",
"value": "class UserGroupPolicy < ApplicationPolicy\n # The old can_by_role scopes used to take into accuont a `project_editor` and `collection_editor`.\n # Neither of these exist in the database, and therefore thes... | ruby | chosen |
[
{
"from": "system",
"value": "Remove a duplication of Agent klass\n"
},
{
"from": "human",
"value": "module Ruboty\n module DMM\n class Agent\n attr_accessor :agent\n\n def initialize\n @agent = ::Mechanize.new\n @agent.ignore_bad_chunking = true\n @agent.reque... | ruby | chosen |
[
{
"from": "system",
"value": "Add parse_header method to Response\n"
},
{
"from": "human",
"value": "module HTTP\n module Protocol\n class Response\n include Message\n\n attr_reader :status_code\n attr_reader :reason_phrase\n\n def initialize(status_code, reason_phrase)\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add I18n support, rename/reformat some code\n"
},
{
"from": "human",
"value": "module VagrantPlugins\n module Blocker\n class VagrantBlocker < Vagrant.plugin('2')\n name 'Vagrant Blocker'\n\n config(:blocker) do\n require_relative 'config'\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use \"RSpec\" insted of \"Rspec\" as its deprecated in v2.x\n"
},
{
"from": "human",
"value": "require 'webmock'\n\n# RSpec 1.x and 2.x compatibility\nif defined?(Rspec)\n RSPEC_NAMESPACE = RSPEC_CONFIGURER = Rspec\nelsif defined?(Spec)\n RSPEC_NAMESPACE = Spec\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Increase the size of the medium thumbnail, to fill more of the overlay.\n"
},
{
"from": "human",
"value": "# == Schema Information\n#\n# Table name: photo_messages\n#\n# id :integer not null, primary key\n# thread_id :integer not nul... | ruby | chosen |
[
{
"from": "system",
"value": "Create tmp dir for Brakeman output\n"
},
{
"from": "human",
"value": "task :brakeman do\n sh <<END\n(brakeman --no-progress --quiet --output tmp/brakeman.out --exit-on-warn && \\\necho \"No warnings or errors\") || \\\n(cat tmp/brakeman.out; exit 1)\nEND\nend\n\nif... | ruby | chosen |
[
{
"from": "system",
"value": "Use Truncate instead of delete while clearing sessions\n\nTruncate table is more efficient when deleting all table data\n"
},
{
"from": "human",
"value": "namespace 'db:sessions' do\n desc \"Creates a sessions migration for use with ActiveRecord::SessionStore\"\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Test file for Simple Calc\n"
},
{
"from": "human",
"value": "require \"test/unit\"\nrequire \"./simplecalc\"\n"
},
{
"from": "gpt",
"value": "require \"test/unit\"\nrequire \"./simplecalc\"\n\n\nclass Testcalc < Test::Unit::TestCase\n \n def test_conver... | ruby | chosen |
[
{
"from": "system",
"value": "Fix document collection group membership test\n\nAssociation was not being reloaded after first document was added.\nRejigged the test to add both documents at once.\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass DocumentCollectionGroupMembershipT... | ruby | chosen |
[
{
"from": "system",
"value": "Add a little debugging output.\n\nWhile testing it is helpful to be able to set VAGRANT_LOG and get debug\noutput from the settings. This is mainly to verify that proxy is\nactually getting down into Fog objects.\n"
},
{
"from": "human",
"value": "require \"fog\"\nr... | ruby | chosen |
[
{
"from": "system",
"value": "Handle characters without a cloak equipped.\n"
},
{
"from": "human",
"value": "module Audit\n class ArtifactData < Data\n ESSENTIAL = true\n\n def add\n neck = @data[:equipment]['equipped_items']&.select{ |item| item['slot']['name'] == \"Neck\" }&.first\... | ruby | chosen |
[
{
"from": "system",
"value": "Set Git name & email for Cucumber\n"
},
{
"from": "human",
"value": "require 'fileutils'\nrequire 'pathname'\nrequire 'tmpdir'\n\nrequire 'aruba/cucumber'\nrequire 'wrong'\n\nWorld(Wrong)\n\nENV['FIXTURES_DIR'] = Pathname.new(__FILE__).\n dirname.join('..', 'fixtur... | ruby | chosen |
[
{
"from": "system",
"value": "Normalize strings used in metrics\n\nLibrato does not like spaces and such, and this will look better too\n(with everything lowercased).\n"
},
{
"from": "human",
"value": "require \"metriks\"\n\nmodule Travis\n class TravisYmlStats\n def self.store_stats(request... | ruby | chosen |
[
{
"from": "system",
"value": "Copy contents of source_path rather than source_path itself\n"
},
{
"from": "human",
"value": "module Dsb\n class StageFiles\n include Dsb::Daemon\n\n def initialize options\n @client = options[:client]\n @type = \"Stage Files\"\n end\n\n def ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix RubyDns registry match block\n"
},
{
"from": "human",
"value": "module VagrantPlugins\n module DNS\n class DNSServer\n def initialize(options)\n @config = options.fetch(:config) { raise \"\" }\n @dir = options.fetch(:dir) { raise \"\"... | ruby | chosen |
[
{
"from": "system",
"value": "Speed up tests be calling EM.run_deferred_callbacks instead of setting a timer\n\nThe run_in_eventmachine test helper method is setting a 0.1 second timer to stop the event machine loop. This causes each test that requires an event machine loop to wait for 0.1 second regardless... | ruby | chosen |
[
{
"from": "system",
"value": "Change the minimum code coverage percentage\n"
},
{
"from": "human",
"value": "require 'simplecov'\nrequire 'simplecov-rcov'\nSimpleCov.formatter = SimpleCov::Formatter::RcovFormatter\nSimpleCov.start\nSimpleCov.minimum_coverage 90\n\nrequire 'vcr'\nVCR.configure d... | ruby | chosen |
[
{
"from": "system",
"value": "Add workaround minitest 4 + rr bug\n"
},
{
"from": "human",
"value": "ENV[\"RAILS_ENV\"] ||= \"test\"\nrequire File.expand_path('../../config/environment', __FILE__)\n\nrequire 'minitest/autorun'\nrequire 'rails/test_help'\nrequire 'rr'\nrequire 'capybara/rails'\nre... | ruby | chosen |
[
{
"from": "system",
"value": "Fix version numbers of rspec and rr\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib/', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nrequire 'prequel/version'\n\nGem::Specification.new do |s|\n s.... | ruby | chosen |
[
{
"from": "system",
"value": "Add GlobalID::find! and override GlobalID::Locator::locate to handle namespaced model lookups.\n"
},
{
"from": "human",
"value": "require 'active_support'\nrequire 'active_model'\nrequire 'globalid'\n\nrequire 'global_id_model'\nrequire 'global_id_validator'\nrequir... | ruby | chosen |
[
{
"from": "system",
"value": "Add comprehensive handling of plain text commands\n"
},
{
"from": "human",
"value": "module Grunt\n class Evaluator\n include Wheaties::Concerns::Messaging\n \n attr_reader :name, :locals\n \n def initialize(name, locals)\n @name = name\n @... | ruby | chosen |
[
{
"from": "system",
"value": "CREATE TABLE IF NOT EXISTS\n"
},
{
"from": "human",
"value": "require 'jvertica'\nrequire 'dotenv'\n\n# Create .env file like\n# HOSTNAME=\n# USERNAME=\n# PASSWORD=\nDotenv.load\n\nparams = {\n host: ENV['HOSTNAME'],\n port: 5433,\n user: ENV['USERNAME'],\n pass... | ruby | chosen |
[
{
"from": "system",
"value": "Use fully-qualified path in file_name()\n"
},
{
"from": "human",
"value": "module Runtest\n class Command\n SYNTAX = /^(test|should)\\s(\\\"|\\')|(\\\"|\\')\\sdo$/\n attr_accessor :file_name, :line_number, :options\n\n def initialize argument\n argume... | ruby | chosen |
[
{
"from": "human",
"value": "Add Initial Billing bill_users Rake Task\n\nAdd an initial bill_users Rake task to perform billing operations on\nusers.\n"
},
{
"from": "gpt",
"value": "namespace :billing do\n desc 'Task to bill all paying members'\n task :bill_users => :environment do\n Clubs... | ruby | chosen |
[
{
"from": "human",
"value": "Add a task to run the collection migration\n"
},
{
"from": "gpt",
"value": "namespace :migrate do\n desc \"Rename collection in local publisher database from whole_editions to editions\"\n task :editions do\n Mongoid.load!(\"config/mongoid.yml\")\n whole_edit... | ruby | chosen |
[
{
"from": "system",
"value": "Make `rake spec` depend on `rake assets:precompile`\n"
},
{
"from": "human",
"value": "require 'rake'\nbegin\n require 'rspec/core/rake_task'\n task(:spec).clear\n RSpec::Core::RakeTask.new(spec: ['db:create', 'db:test:prepare']) do |t|\n t.verbose = false\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix an error where NameError occurred because Forwardable does not exist\n"
},
{
"from": "human",
"value": "require 'ostruct'\n\nmodule Telegram\n # Telegram client config\n #\n # Available options:\n #\n # * daemon: path to telegram-cli binary\n # * key: ... | ruby | chosen |
[
{
"from": "system",
"value": "Change the Test result classes hierarchy\n\nBecause really, FailedTest < PassedTest doesn't make sense\n"
},
{
"from": "human",
"value": "module Testicles\n # Encapsulate the relevant information for a test that passed.\n class PassedTest\n # Name of the test t... | ruby | chosen |
[
{
"from": "system",
"value": "Add class qualifier for icon finding\n"
},
{
"from": "human",
"value": "module CapybaraExt\n def page!\n save_and_open_page\n end\n\n # A hack so that we can test select2 things within our integration tests\n def select2(within, value)\n script = %Q{\n ... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.