conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Change eq matcher to match_array\n\nMatch array does not care about the order of the elements in the array.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'pry'\n\nmodule ArangoI18n\n RSpec.describe Store do\n\n let :db do\n Ashikawa::Cor... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for unauthorized bids.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe BidsController do\n before :all do\n @model = Bid\n @generator = Factory :auction_generator\n end\n\n before do\n @generator.bids.delete\n end\n\n cont... | ruby | chosen |
[
{
"from": "system",
"value": "Fix factory inheritence to fix issues with defaults (zone)\n"
},
{
"from": "human",
"value": "FactoryBot.define do\n factory :physical_infra,\n :class => \"ManageIQ::Providers::Lenovo::PhysicalInfraManager\" do\n end\n\n factory :physical_infra_with_auth... | ruby | chosen |
[
{
"from": "system",
"value": "Use do/end block instead of curly braces\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe FooterPresenter do\n let!(:setting) { FactoryGirl.create(:setting,\n event_start_date: \"2016-07-09\",\n eve... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake as a dvelopment dependency.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"sort_it_out/version\"\n\nGem::Specification.new do |s|\n s.name = \"sort_it_out\"\n s.version = ... | ruby | chosen |
[
{
"from": "system",
"value": "Use \"specify\" instead of \"it\" for exception specifications\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire 'spec_helper'\nrequire File.expand_path('../fixtures/classes', __FILE__)\n\ndescribe Function::Predicate, '#inverse' do\n subject { object... | ruby | chosen |
[
{
"from": "system",
"value": "Change VCR to allow request without recording cassettes\n\nThis is needed in order to write new specs without having to delete\ncassettes\n"
},
{
"from": "human",
"value": "require 'iugu'\nrequire 'vcr'\nrequire 'byebug'\n\nVCR.configure do |config|\n config.casset... | ruby | chosen |
[
{
"from": "system",
"value": "Include httplog library in coverage reports\n"
},
{
"from": "human",
"value": "$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))\n$:.unshift(File.dirname(__FILE__))\nrequire 'rspec'\nrequire 'httpclient'\nrequire 'excon'\nrequire 'typhoeus'\nrequire 'ethon'... | ruby | chosen |
[
{
"from": "system",
"value": "Rename module in spec helper\n"
},
{
"from": "human",
"value": "require 'pp'\nrequire 'stringio'\nrequire 'tempfile'\n\nrequire 'facebook_test_users'\nrequire 'facebook_test_users/cli'\n\nmodule FBTU\n module SpecHelpers\n module SemanticNames\n\n def given... | ruby | chosen |
[
{
"from": "system",
"value": "Remove a deprecation warning when establishing a database connection\n"
},
{
"from": "human",
"value": "require 'acts_as_geocodable'\n\nrequire 'bundler'\nBundler.require(:test)\n\nplugin_test_dir = File.dirname(__FILE__)\nActiveRecord::Base.logger = Logger.new(plug... | ruby | chosen |
[
{
"from": "system",
"value": "Change api call to fix warning\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nif ENV['COVERAGE'] || ENV['TRAVIS']\n require 'simplecov'\n require 'coveralls'\n\n SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[\n SimpleCov::Form... | ruby | chosen |
[
{
"from": "system",
"value": "Remove explicit loading of rubygems\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'bundler/setup'\n\n\nrequire 'mocha'\nrequire 'minitest'\nrequire 'minitest/autorun'\nrequire 'active_support'\nrequire 'active_support/test_case'\nrequire 'mocha/mini... | ruby | chosen |
[
{
"from": "system",
"value": "Use :via option to suppress an error\n\nnormalize_conditions!: You should not use the `match` method in your router without specifying an HTTP method. (RuntimeError)\n"
},
{
"from": "human",
"value": "require 'bundler/setup'\nrequire 'test/unit'\nrequire 'mocha/setu... | ruby | chosen |
[
{
"from": "system",
"value": "Create tmpdir if not exists in order to autrun tests\n"
},
{
"from": "human",
"value": "require 'minitest/autorun'\nrequire 'shoulda'\nrequire 'yaml_record'\n\nclass Minitest::Test\n def clean_yaml_record(class_record)\n File.open(class_record.source, 'w') {|f| ... | ruby | chosen |
[
{
"from": "human",
"value": "Add user creation script for student\n"
},
{
"from": "gpt",
"value": "#############################################\n# DevSecOps Bootcamp - user creation script #\n#############################################\n#\n# Usage: ruby bootcamp-create-students > creds.csv\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure class is in clean state for test."
},
{
"from": "human",
"value": "require 'rspec'\n\n$:.unshift File.expand_path('../../../../../lib/active_mocker/', __FILE__)\nrequire 'logger'\nrequire 'mock'\nrequire_relative 'queriable_shared_example'\ndescribe Active... | ruby | chosen |
[
{
"from": "system",
"value": "Make `initialize!` take an optional config block.\n\nThe initializer now takes an optional block that is passed to\n`configure` which simplifies the Firebolt setup.\n"
},
{
"from": "human",
"value": "require 'json'\nrequire 'secure_random'\n\nrequire 'firebolt/cache... | ruby | chosen |
[
{
"from": "system",
"value": "[CSC] Add basic test for render :update\n"
},
{
"from": "human",
"value": "class OtherController < ApplicationController\n def test_locals\n render :locals => { :input => params[:user_input] }\n end\n\n def test_object\n render :partial => \"account\", :obj... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test for ssl option for bunny\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nif RUBY_PLATFORM != 'java'\n\n describe \"Bunny AMQP Config\" do\n it \"converts :username in the config to :user\" do\n Travis::Amqp.config = { :username => 'user... | ruby | chosen |
[
{
"from": "system",
"value": "Tidy up things a bit.\n"
},
{
"from": "human",
"value": "# perform a deploy\n#\nclass Heroku::Command::Deploy < Heroku::Command::Base\n # deploy\n #\n # deploy a ref (usually, the current HEAD)\n #\n # -m, --migrate # run migrations after deploy\n # -b, --bac... | ruby | chosen |
[
{
"from": "system",
"value": "Increase the timeout waiting for gem servers.\n"
},
{
"from": "human",
"value": "module Rip\n module Gems\n extend self\n\n def check?\n `which #{gembin}`.strip.any?\n end\n \n def rgem(command)\n Timeout.timeout(5) do\n `#{gembin} #{co... | ruby | chosen |
[
{
"from": "system",
"value": "Change rescue order so that CanCan::AccessDenied is handled.\n"
},
{
"from": "human",
"value": "class Api::V1::BaseController < InheritedResources::Base\n load_and_authorize_resource\n\n respond_to :json, except: [:new, :edit]\n\n rescue_from CanCan::AccessDenied... | ruby | chosen |
[
{
"from": "system",
"value": "Add an explanation to the `document_types` method\n\nThis commit adds an explanation to how we generate the different forms\nof the names for each format.\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n # Prevent CSRF attac... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Show profiler info to mlandauer in production\"\n\nThis reverts commit 59900c62bffccafc458c12fac37ac9ca3be5026b.\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n # Prevent CSRF attacks by raising an exception.\n # ... | ruby | chosen |
[
{
"from": "system",
"value": "Add firebase registration token to sign_up params filter.\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n include DeviseTokenAuth::Concerns::SetUserByToken\n # Prevent CSRF attacks by raising an exception.\n # For APIs, y... | ruby | chosen |
[
{
"from": "system",
"value": "Make domain-name check use environment variable\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_forge... | ruby | chosen |
[
{
"from": "system",
"value": "Update migration to remove redundancy\n"
},
{
"from": "human",
"value": "class RemoveUnnecessaryClientAppFields < ActiveRecord::Migration\n def change\n remove_reference :messages, :oauth_application\n remove_column :oauth_application, :endpoint_email, :strin... | ruby | chosen |
[
{
"from": "system",
"value": "Add another stub for Entitlement to avoid loading from app folder\n"
},
{
"from": "human",
"value": "class RemoveMiqUserRoleFromMiqGroups < ActiveRecord::Migration[5.0]\n class MiqGroup < ActiveRecord::Base\n has_one :entitlement, :class_name => RemoveMiqUserRol... | ruby | chosen |
[
{
"from": "system",
"value": "Remove NOT NULL constraint from photos_count\n\nIt is initially NULL and only set after all photos have been scanned.\n"
},
{
"from": "human",
"value": "require 'logger'\nrequire 'sequel'\n\nDB = Sequel.connect(\n adapter: 'sqlite',\n database: File.expand_path('.... | ruby | chosen |
[
{
"from": "system",
"value": "Return error message when creating user failed\n"
},
{
"from": "human",
"value": "class API < Grape::API\n prefix 'api'\n version 'v0', using: :path\n format :json\n rescue_from :all do |e|\n error_response({ message: e.message })\n end\n\n resource :user d... | ruby | chosen |
[
{
"from": "system",
"value": "Develop using latest version of Rake\n"
},
{
"from": "human",
"value": "require File.expand_path('../lib/clavius/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = 'clavius'\n gem.version = Clavius::VERSION\n gem.authors = ['Craig ... | ruby | chosen |
[
{
"from": "system",
"value": "Handle ActiveRecord::RecordNotFound as 404 in api calls.\n"
},
{
"from": "human",
"value": "module ApiControllerConcerns\n module ExceptionHandling\n extend ActiveSupport::Concern\n\n included do\n rescue_from Exception do |exception|\n handle_exc... | ruby | chosen |
[
{
"from": "system",
"value": "Fix initialization defaults ( not needed ) for Spawner\n"
},
{
"from": "human",
"value": "require 'thread'\n\nmodule Celluloid\n class Group\n class Spawner < Group\n\n class NoBlock < StandardError; end\n\n attr_accessor :finalizer\n\n def initia... | ruby | chosen |
[
{
"from": "system",
"value": "Split up kalibro_processor Repository factory trait\n\nSo it can be used directly by some tests later\n"
},
{
"from": "human",
"value": "# Read about factories at https://github.com/thoughtbot/factory_girl\n\nFactoryGirl.define do\n factory :repository do\n name... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Add randomize to user factory\"\n\nThis reverts commit 2ccf40ea591a8590e6481a4bc3670b4a3ad5e104.\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n factory :user, class: Kuroko2::User do\n sequence(:uid) { |n| \"#{n}#{Time.now.to_i}#{rand(100000... | ruby | chosen |
[
{
"from": "system",
"value": "Use right module name for acceptance test\n"
},
{
"from": "human",
"value": "require 'beaker-rspec'\nrequire 'pry'\n\nhosts.each do |host|\n # Install Puppet\n on host, install_puppet\nend\n\nRSpec.configure do |c|\n module_root = File.expand_path(File.join(File.... | ruby | chosen |
[
{
"from": "system",
"value": "Reformat the code snippet in the doc\n"
},
{
"from": "human",
"value": "module ModelPresenter\n module HasMany\n # The DSL adds an instance method `relation` to represnet a `has_many` relationship\n #\n # ```ruby\n # class User\n # include ModelPre... | ruby | chosen |
[
{
"from": "system",
"value": "Add hostname and path fields display to container routes UI\n"
},
{
"from": "human",
"value": "module ContainerRouteHelper::TextualSummary\n #\n # Groups\n #\n\n def textual_group_properties\n %i(name creation_timestamp resource_version)\n end\n\n def textu... | ruby | chosen |
[
{
"from": "system",
"value": "Add env attr to NotifierBase.rb\n"
},
{
"from": "human",
"value": "module Notifiable\n\n\tclass NotifierBase\n \n\t\tdef send_notification(notification, device_token)\n # todo - add before hook\n enqueue(notification, device_token)\n # todo - add a... | ruby | chosen |
[
{
"from": "system",
"value": "Fix order of arguments in scrobble method.\n"
},
{
"from": "human",
"value": "require 'lastfm'\n\nmodule Scrapescrobbler\n class Listener\n attr_accessor :lastfm, :station, :started\n\n def initialize(station)\n @lastfm = Listener.authenticate\n @st... | ruby | chosen |
[
{
"from": "system",
"value": "Add foreing key option in belongs_to"
},
{
"from": "human",
"value": "require 'active_force/query'\n\nmodule ActiveForce\n module Association\n module ClassMethods\n def has_many relation_name, options = {}\n model = options[:model] || relation_model... | ruby | chosen |
[
{
"from": "system",
"value": "Whitelist params for members' controller.\n"
},
{
"from": "human",
"value": "class MembersController < ApplicationController\n def index\n\n query = Member.all\n query = query.search(params[:q])\n\n ids = params.slice(:party_id, :assembly_id).values.delete... | ruby | chosen |
[
{
"from": "system",
"value": "Move old data to new type\n"
},
{
"from": "human",
"value": "class ChangeFeedbackFieldToInteger < ActiveRecord::Migration\n def self.up\n add_column :feedbacks, :feedback_int, :integer\n feedbacks = Feedback.all\n feedbacks.each do |f|\n case f.feedba... | ruby | chosen |
[
{
"from": "human",
"value": "Make sure all artifacts have titles.\n"
},
{
"from": "gpt",
"value": "class MakeSureAllArtifactsHaveName < ActiveRecord::Migration\n def up\n execute(\"update artifacts set std_term='Untitled' where std_term is null;\")\n Artifact.find_by_std_term('Untitled').... | ruby | chosen |
[
{
"from": "system",
"value": "Handle public application in development\n"
},
{
"from": "human",
"value": "require \"omniauth/strategies/oauth\"\n\nmodule OmniAuth\n module Strategies\n class Xero < OmniAuth::Strategies::OAuth\n\n args [:consumer_key, :consumer_secret]\n\n option :c... | ruby | chosen |
[
{
"from": "system",
"value": "Fix spec for Ruby 1.9.2 compatibility\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe \"Rack::NoWWW\" do\n\n include Rack::Test::Methods\n\n def app\n mock_endpoint = lambda { [200, {}, ['Hello, world.']] }\n app = Rack::NoWWW.new(mock_e... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a couple syntax errors.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby -wKU\nrequire \"erb\"\nrequire \"enumerator\"\n\ninclude ERB::Util\n\nPREFIX = \"data:,\".freeze\nLENGTH = (2000 - PREFIX.size).freeze # Internet Explorer 2KB URI limit\n\ndef encode(... | ruby | chosen |
[
{
"from": "system",
"value": "Use TTYFormatter instead of BaseFormatter where applicable\n"
},
{
"from": "human",
"value": "module USaidWat\n module CLI\n class TallyFormatter < BaseFormatter\n def format(partition_data)\n out = StringIO.new\n longest_subreddit = partition... | ruby | chosen |
[
{
"from": "human",
"value": "Test that all components render without error\n\n* Require webmock minitest for `stub_request` in\nstub_shared_component_locales\n* Add an ActiveSupport concern to avoid hitting Slimmer for component\nguide requests (this matches the way we avoid hitting Slimmer when\nusing Jasm... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary queries in search API controller\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule GobiertoCommon\n module Api\n module V1\n class SearchController < ApiBaseController\n\n # GET /api/v1/search?query=term&fi... | ruby | chosen |
[
{
"from": "system",
"value": "Add script used for final stretch of cleanup.\n"
},
{
"from": "human",
"value": "require \"#{Rails.root}/lib/article_status_manager\"\nrequire \"#{Rails.root}/lib/duplicate_article_deleter\"\n\nclass DuplicatePageIdHandler\n def self.process_all\n duplicate_coun... | ruby | chosen |
[
{
"from": "human",
"value": "Remove logos from 'exempt' organisations\n\nWe don't want to have to maintain logos for exempt organisations, so we're\nnot going to show them.\n"
},
{
"from": "gpt",
"value": "Organisation.where(govuk_status: 'exempt').each do |organisation|\n @logger.info \"Proces... | ruby | chosen |
[
{
"from": "system",
"value": "Fix migration for removing MR diff indexes\n\nFor whatever reason on some PostgreSQL installations there would be a\nseparate UNIQUE constraint on the merge_request_id column. Rails'\nindex_exists?() returns false for this constraint (even when using the\nfull name), yet the in... | ruby | chosen |
[
{
"from": "system",
"value": "Stop depending on an outdated Java installation for tests\n"
},
{
"from": "human",
"value": "default['nexus3']['api']['username'] = 'admin'\ndefault['nexus3']['api']['password'] = 'admin123'\ndefault['nexus3']['api']['endpoint'] = 'http://localhost:8081/service/rest... | ruby | chosen |
[
{
"from": "system",
"value": "Replace to_f with BigDecimal for ratio calculation\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\ninclude ActionView::Helpers::NumberHelper\n\nmodule SmartAnswer::Calculators\n class RedundancyCalculator\n def pay(age, years, weekly_pay)\n pay ... | ruby | chosen |
[
{
"from": "system",
"value": "Use full host instead of domain.\n"
},
{
"from": "human",
"value": "Spree::Core::ControllerHelpers::Common.class_eval do\n def current_currency\n Spree::Store.current(request.domain).try(:currency) || Spree::Config[:currency]\n end\nend\n"
},
{
"from": ... | ruby | chosen |
[
{
"from": "system",
"value": "Bump podspec to latest version\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n\n s.name = \"SwiftMath\"\n s.version = \"3.0.1\"\n s.summary = \"Floating point math library written using idiomatic Swift\"\n\n s.description = <<-DESC\n... | ruby | chosen |
[
{
"from": "system",
"value": "Remove `?` memberships_apply is not a method.\n"
},
{
"from": "human",
"value": "module Tray\n module Calculator\n module Discounters\n class Subscriptions < Discounter\n def call\n return unless @cart.customer\n @cart.customer.subs... | ruby | chosen |
[
{
"from": "system",
"value": "Rewrite Robot to pass RobotTest\n"
},
{
"from": "human",
"value": "require 'forwardable'\n\nclass Robot\n extend Forwardable\n\n def_delegator :placement, :update!, :place\n def_delegator :placement, :report\n\n def initialize(args)\n @placement = args[:place... | ruby | chosen |
[
{
"from": "system",
"value": "Change author email in gemspec\n"
},
{
"from": "human",
"value": "require './lib/responsive-modular-scale'\n\nGem::Specification.new do |s|\n s.name = 'responsive-modular-scale'\n s.version = ResponsiveModularScale::VERSION\n s.date = Responsive... | ruby | chosen |
[
{
"from": "system",
"value": "Revert db46230 to fix restored spec.\n"
},
{
"from": "human",
"value": "module Polyamorous\n module JoinAssociationExtensions\n include SwappingReflectionClass\n def self.prepended(base)\n base.class_eval { attr_reader :join_type }\n end\n\n def in... | ruby | chosen |
[
{
"from": "human",
"value": "Delete favourited topics from redis\n"
},
{
"from": "gpt",
"value": "class RemoveFavouritedTopics < Mongoid::Migration\n def self.up\n Redis.current.keys('user:favourited_topics:*').each do |key|\n Redis.current.del key\n end\n end\n\n def self.down\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use redis backend for rack-mini-profiler in production\n"
},
{
"from": "human",
"value": "require 'rack-mini-profiler'\n\nRack::MiniProfilerRails.initialize!(Rails.application)\n\n# heroku-deflater gem inserts Rack::Deflater\n# We need to mount Rack::MiniProfiler af... | ruby | chosen |
[
{
"from": "human",
"value": "Add cli start integration test.\n"
},
{
"from": "gpt",
"value": "# encoding: utf-8\n\nRSpec.describe 'rtty' do\n it \"prints available commands and global options\" do\n output = <<-OUT\n\\e[31m ┏━━━┓\n ┏━┳╋┳┳━┻━━┓\n ┣━┫┗┫┗┳┳┳━┫\n ┃ ┃┏┫┏┫┃┃★┃\n ┃ ┗━┻━╋┓┃ ... | ruby | chosen |
[
{
"from": "system",
"value": "Make command not found work cross OS/Shell\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'stringio'\n\ndescribe Permpress::Command do\n let(:file){'fake file.txt'}\n let(:command){Permpress::Command.new('cat', [file], %w(-b))}\n\n describe '#r... | ruby | chosen |
[
{
"from": "system",
"value": "Update dependencies in acceptance tests\n"
},
{
"from": "human",
"value": "require 'beaker-rspec'\nrequire 'beaker-puppet'\nrequire 'beaker/puppet_install_helper'\nrequire 'beaker/module_install_helper'\n\n# collection: puppet - latest, puppet6 is the current versio... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a sporadic test error\n\nI observed builds randomly failing, mostly on linux with EPIPE errors.\nI *think* this is webrick closing the connection before the client\nhas sent the request. This change makes webrick wait for the first\nbyte of the request before sending a resp... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration for CP asset planning\n"
},
{
"from": "gpt",
"value": "class AddReplacementCostsToAssets < ActiveRecord::Migration\n def change\n add_column :assets, :scheduled_replacement_cost, :integer, :after => :scheduled_by_user\n add_column :asse... | ruby | chosen |
[
{
"from": "system",
"value": "Update gir_ffi and gir_ffi-gtk to 0.12.0\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nGem::Specification.new do |s|\n s.name = 'atspi_app_driver'\n s.version = '0.2.0'\n\n s.summary = 'Test GirFFI-based applications using Atspi'\n s.requir... | ruby | chosen |
[
{
"from": "system",
"value": "JariBakken: Add remote server class/backtrace to the raised Ruby exception.\n\ngit-svn-id: 4179480af2c2519a5eb5e1e9b541cbdf5cf27696@9509 07704840-8298-11de-bf8c-fd130f914ac9\n"
},
{
"from": "human",
"value": "module Selenium\n module WebDriver\n module Remote\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Remove use of returning as it's been depreciated in newer Rails. (tap could be used, but then you'd break Rails versions prior to 2.3). Or should the plugin simply check and define Object.tap if it's not already defined?"
},
{
"from": "human",
"value": "module Arde... | ruby | chosen |
[
{
"from": "system",
"value": "Add a humanize method in TextHelpers.\n"
},
{
"from": "human",
"value": "class Cuba\n module TextHelpers\n def markdown(str)\n require \"bluecloth\"\n\n BlueCloth.new(str).to_html\n end\n\n def truncate(str, length, ellipses = \"...\")\n ret... | ruby | chosen |
[
{
"from": "system",
"value": "Change to the Interaction nodes\n"
},
{
"from": "human",
"value": "require 'drugbank/base'\nmodule Drugbank\n class DrugInteraction < Drugbank::Base\n include SaxStream::Mapper\n\n node 'drug-interaction'\n map :interaction_drug_id, :to => 'drug'\n map ... | ruby | chosen |
[
{
"from": "system",
"value": "Load user configuration from ~/.config vs ~/config.\n\nSome people don't like lowercase dirnames, and I'm one of them. This fixes that.\n"
},
{
"from": "human",
"value": "# lib/frecon/configuration_file.rb\n#\n# Copyright (C) 2015 Christopher Cooper, Sam Craig, Tig... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for data value sets\n"
},
{
"from": "gpt",
"value": "\n# frozen_string_literal: true\n\nrequire \"spec_helper\"\n\nRSpec.describe Dhis2::Api::DataValueSet do\n describe \"#list\" do\n it \"should support by data_sets, orgUnit, periods\" do\n stub_re... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure python is installed\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe package('acpid') do\n it { should be_installed }\nend\n\ndescribe package('bzip2') do\n it { should be_installed }\nend\n\ndescribe package('curl') do\n it { should... | ruby | chosen |
[
{
"from": "system",
"value": "Fix require order of dummy app for test"
},
{
"from": "human",
"value": "require_relative 'boot'\n\nrequire 'active_record/railtie'\nrequire 'active_job/railtie'\n\nBundler.require(*Rails.groups)\nrequire 'delayed_job'\nrequire 'delayed_job_active_record'\n\nmodule ... | ruby | chosen |
[
{
"from": "human",
"value": "Add coverage for zine admin index page\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\nfeature 'As a user' do\n\n before do\n sign_in\n\n create(:zine_with_authors,\n title: 'Zine 1',\n subtitle: 'Subtitle 1')\n end\n\n context ... | ruby | chosen |
[
{
"from": "system",
"value": "Add :credit_card attribute to Customer model.\n\nThis allows for creation of a credit card with a customer using\nnested forms.\n"
},
{
"from": "human",
"value": "module BraintreeRails\n class Customer\n include Model\n\n define_attributes(\n :create => ... | ruby | chosen |
[
{
"from": "system",
"value": "Use @strategies instead of global @@strategies\n"
},
{
"from": "human",
"value": "module BunnyCarrot\n class BaseWorker\n include BunnyCarrot::Logger\n\n def self.error_handling_strategies(hash)\n raise 'Invalid strategies hash' unless hash.kind_of? Hash... | ruby | chosen |
[
{
"from": "system",
"value": "Substitute instance variable used once with method\n\nOr in technical terms: \"Replace Temp with Query\".\n"
},
{
"from": "human",
"value": "require \"rubycritic/reporters/base\"\nrequire \"rubycritic/report_generators/overview\"\nrequire \"rubycritic/report_generat... | ruby | chosen |
[
{
"from": "system",
"value": "Remove creating of empty errors object for a ValueObject"
},
{
"from": "human",
"value": "require 'active_model'\nrequire_relative 'helpers/string_support'\nrequire_relative 'helpers/equal_support'\nrequire_relative 'helpers/copyable'\nrequire_relative 'helpers/attr... | ruby | chosen |
[
{
"from": "system",
"value": "Format code, remove new line from banner\n"
},
{
"from": "human",
"value": "module ConfigureS3Website\n class CLI\n def self.optparse_and_options\n options = {}\n optparse = OptionParser.new do |opts|\n opts.banner = banner\n opts.on('-f'... | ruby | chosen |
[
{
"from": "system",
"value": "Update theme activation to work with WordPress 3.8\n"
},
{
"from": "human",
"value": "module WpWrapper\n module Modules\n \n module Themes\n \n def activate_theme(theme_identifier = 'twentytwelve')\n success = false\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add hashie/mash dependency to Rashify response middleware\n"
},
{
"from": "human",
"value": "require 'faraday'\n\nmodule Faraday\n class Response::Rashify < Response::Middleware\n dependency 'rash'\n\n def parse(body)\n case body\n when Hash\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use only topmost version definition to build docs\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nnamespace :flappi do\n namespace :doc do\n desc 'Extract API documentation from Flappi definitions into ApiDoc. Use VERBOSE=v* to increase log l... | ruby | chosen |
[
{
"from": "system",
"value": "Remove nodes accessor from Model\n"
},
{
"from": "human",
"value": "class Model\n\n def self.apply(*args)\n self.new(*args).apply\n end\n\n def initialize(graph)\n puts \"Applying #{self.class.name} model to graph\"\n @graph = graph\n @nodes = graph.n... | ruby | chosen |
[
{
"from": "system",
"value": "Add some docs for the URLArbiter client.\n"
},
{
"from": "human",
"value": "require \"govuk/client/url_arbiter/version\"\n\nrequire \"rest-client\"\nrequire \"multi_json\"\nrequire \"govuk/client/errors\"\n\nmodule GOVUK\n module Client\n class URLArbiter\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add proxy functionality to base class\n"
},
{
"from": "human",
"value": "module Prospecto\n class PresenterView\n def initialize(args={})\n args.each do |name, value|\n if respond_to? name\n instance_variable_set(\"@#{name}\", value)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use File.basename instead of '/' splitting\n"
},
{
"from": "human",
"value": "module Rip\n class DirPackage < Package\n handles do |source|\n File.directory? source\n end\n\n def initialize(source, *args)\n super\n @source = File.expand_path... | ruby | chosen |
[
{
"from": "system",
"value": "Make presenter reload correctly when in isolation\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nRSpec.describe FinderSignupContentItemPresenter do\n describe \"#to_json\" do\n Dir[\"lib/documents/schemas/*.json\"].each do |file|\n it \"is vali... | ruby | chosen |
[
{
"from": "system",
"value": "Update AppCode EAP to version 142.4675.7\n\nThis commit updates the version, sha256 and url stanzas. I've also\nremoved the caveats about needing a Java install as this EAP only\nfeatures the bundled JDK version now.\n"
},
{
"from": "human",
"value": "cask :v1 => 'a... | ruby | chosen |
[
{
"from": "human",
"value": "Add PS4 Remote Play latest"
},
{
"from": "gpt",
"value": "cask 'remote-play' do\n version :latest\n sha256 :no_check\n\n url 'https://remoteplay.dl.playstation.net/remoteplay/module/mac/RemotePlayInstaller.pkg'\n name 'PS4 Remote Play'\n homepage 'https://remote... | ruby | chosen |
[
{
"from": "human",
"value": "Add \"close_default\" fields to custom fields.\n"
},
{
"from": "gpt",
"value": "class AddCustomFieldsCloseDefaults < ActiveRecord::Migration\n def self.up\n add_column :custom_fields, :close_default, :string, :null => \"\", :default => \"\"\n end\n\n def self.d... | ruby | chosen |
[
{
"from": "human",
"value": "Revert \"Remove gemspec, not required\"\n\nThis reverts commit 8c5b9c3337f51e8e4f86ad9eabf898943571dd1d.\n"
},
{
"from": "gpt",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'he... | ruby | chosen |
[
{
"from": "system",
"value": "Change gem name case to something more friendly"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"kepler_processor/version\"\n\nGem::Specification.new do |s|\n s.name = \"KeplerProcessor\"\n... | ruby | chosen |
[
{
"from": "system",
"value": "Use 'step' instead of Steps.add\n"
},
{
"from": "human",
"value": "Steps.add /^The new ticket should have a status of (.+)$/ do |status_name|\n # do something\nend"
},
{
"from": "gpt",
"value": "step /^The new ticket should have a status of (.+)$/ do |s... | ruby | chosen |
[
{
"from": "system",
"value": "Add analytics account email to setup\n"
},
{
"from": "human",
"value": "module Adminpanel\n class Engine < ::Rails::Engine\n isolate_namespace Adminpanel\n end\n\n class << self\n \tmattr_accessor :analytics_profile_id,\n :analytics_key_path,\n :analyti... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor header reading a little\n"
},
{
"from": "human",
"value": "module Archive\n module Ar\n class Format\n class << self\n def read_global_header(io)\n io.read(8).tap do |global_header|\n raise \"Invalid header\" unless globa... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Puma restart after deploy\n"
},
{
"from": "human",
"value": "workers Integer(ENV['WEB_CONCURRENCY'] || 2)\nthreads_count = Integer(ENV['MAX_THREADS'] || 5)\nthreads threads_count, threads_count\n\ntag 'deploy-it'\nrackup DefaultRackup\nenvironment E... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.