conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add spec for ranges as object literals.\n"
},
{
"from": "human",
"value": "require_relative '../spec_helper'\nrequire_relative 'fixtures/classes'\n\ndescribe \"Literal Ranges\" do\n it \"creates range object\" do\n (1..10).should == Range.new(1, 10)\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use Struct instead of OpenStruct\n"
},
{
"from": "human",
"value": "class DistanceCalculatorService\n def self.call(claim, params)\n new(claim, params).call\n end\n\n def initialize(claim, params)\n @claim = claim\n @params = params\n end\n\n def call\... | ruby | chosen |
[
{
"from": "system",
"value": "Allow newer versions of http_parser\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"em-websocket/version\"\n\nGem::Specification.new do |s|\n s.name = \"em-websocket\"\n s.version =... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test case that was changed and actually broke it\n"
},
{
"from": "human",
"value": "require File.dirname(__FILE__) + '/../test_helper'\n\nclass MenuItemTest < ActiveSupport::TestCase\n \n #test that name must always be present for a menu\n def test_name\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change gemspec to add metadata, remove test artefacts and load version directly\n"
},
{
"from": "human",
"value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'tty/spinner/version'\n\nGem::Specificatio... | ruby | chosen |
[
{
"from": "system",
"value": "Make the form slightly fancier."
},
{
"from": "human",
"value": "require \"formalist\"\n\nmodule Forms\n class Demo < Formalist::Form\n field :title, type: \"string\"\n end\nend\n"
},
{
"from": "gpt",
"value": "require \"formalist\"\n\nmodule Forms\... | ruby | chosen |
[
{
"from": "system",
"value": "Update combustion for rails 5.2 compat\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"err_merchant/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new ... | ruby | chosen |
[
{
"from": "system",
"value": "Update Billing Schedule to Run Daily at 1AM\n\nUpdate the Billing schedule to ensure billing occurs daily at 1AM.\n"
},
{
"from": "human",
"value": "set :output, \"log/whenever.log\"\n\n# Perform billing operations every day at 1AM\n# every 1.day, :at => '1:00am' do... | ruby | chosen |
[
{
"from": "system",
"value": "Remove env from rake task\n\nWhenever adds it automatically.\n"
},
{
"from": "human",
"value": "set :output, \"#{ path }/log/sync.log\"\n\n# REVIEW:\n# require File.expand_path(File.join(File.dirname(__FILE__), '..', 'config', 'environment'))\n# require 'rubygems'... | ruby | chosen |
[
{
"from": "system",
"value": "Add initialize implementation for Base\n"
},
{
"from": "human",
"value": "require 'time'\n\nmodule AmazonDrs\n class Base\n attr_accessor :request_id, :date, :error_type, :error_description_url\n\n def initialize\n end\n\n def parse_headers(headers)\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add User entity to pull from the database.\n"
},
{
"from": "gpt",
"value": "require 'sequel'\n\nmodule Chaindrive\n class User < Sequel::Model\n def exists?(name)\n super.find(:name => name).exists?\n end\n\n class Entity < Grape::Entity\n expose ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Selenium deprecation warnings in CI.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire \"webdrivers\"\nrequire_relative \"test_run\"\n\ndriver = if ARGV[1]\n ::Selenium::WebDriver.for(:remote, url: ARGV[1], desired_capabilities: :chrom... | ruby | chosen |
[
{
"from": "system",
"value": "Test current_legislative_period and current_term return the same\n\nThese methods are aliases, so should always return the same thing.\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass Everypolitician::Popolo::JsonTest < Minitest::Test\n def popolo_... | ruby | chosen |
[
{
"from": "system",
"value": "Change default format to XML\n\nThe default format for ActiveResource objects was XML prior to 3.1,\nbut has since changed. Unfortunately, additional work would be needed\nto correctly parse the JSON coming back from the API, as it includes\nthe root class name in the returned ... | ruby | chosen |
[
{
"from": "system",
"value": "Check for valid position in placement in Simulation Class\n"
},
{
"from": "human",
"value": "class Simulation\n\n def initialize\n @table = Table.new(5,5)\n @robot = Robot.new\n end\n\n def process(command)\n begin\n read_command(command)\n # i... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure lists are closed off\n"
},
{
"from": "human",
"value": "require 'html/pipeline'\n\nclass PageTocFilter < HTML::Pipeline::Filter\n\n def call\n doc.search('p').each do |node|\n content = node.to_html\n next unless content == '<p>{:toc}</p>'\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use *_action instead of *_filter when possible\n\nFixes deprecation warning on Rails master.\n"
},
{
"from": "human",
"value": "require 'turbolinks/version'\nrequire 'turbolinks/xhr_headers'\nrequire 'turbolinks/xhr_url_for'\nrequire 'turbolinks/cookies'\nrequire 't... | ruby | chosen |
[
{
"from": "system",
"value": "Make test suite run without failing tests\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe NetSuite::Actions::Login do\n before(:all) { savon.mock! }\n after(:all) { savon.unmock! }\n\n it 'properly executes a login call' do\n message = {\"... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor: Remove login field duplication in providet setup module\n"
},
{
"from": "human",
"value": "module TaskMapper::Provider\n # This is the Github Provider for taskmapper\n module Github\n include TaskMapper::Provider::Base\n\n class << self\n attr... | ruby | chosen |
[
{
"from": "human",
"value": "Add class to represent data from sunriseset gem.\n"
},
{
"from": "gpt",
"value": "require 'sunriseset'\nrequire_relative 'my_data'\n\nclass SunRiseSetData < MyData\n def calculate\n @times = []\n\n (Date.new(year, 1, 1)..Date.new(year, 12, 31)).each do |date|\... | ruby | chosen |
[
{
"from": "human",
"value": "Add `rake spec:db:all` and others to run tests against all or specific databases.\n"
},
{
"from": "gpt",
"value": "namespace :spec do\n namespace :db do\n databases = [:postgresql, :mysql, :sqlite3]\n\n desc \"Run specs against all databases\"\n task :all d... | ruby | chosen |
[
{
"from": "system",
"value": "Return to using `git ls-files` for files.\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"link_to_action/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification... | ruby | chosen |
[
{
"from": "system",
"value": "Add .pre for next release\n"
},
{
"from": "human",
"value": "# This file is maintained by a herd of rabid monkeys with Rakes.\nmodule EY\n class CloudClient\n VERSION = '1.0.10'\n end\nend\n# Please be aware that the monkeys like tho throw poo sometimes.\n"
}... | ruby | chosen |
[
{
"from": "system",
"value": "Remove irrelevant lines from the backtrace."
},
{
"from": "human",
"value": "require 'honeybadger'\n\nmodule Exceptions\n module Backends\n # Public: The Honeybadger backend is a Backend implementation that sends the \n # exception to Honeybadger.\n class ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix missing support for Fixnum::positive?\n\nPuppet 4.10.12 runs Ruby 2.1 and lacks this property.\n\n Failed to load feature test for facter_cacheable: undefined method `positive?' for -1:Fixnum\n"
},
{
"from": "human",
"value": "#!/usr/bin/ruby\n# frozen_string... | ruby | chosen |
[
{
"from": "system",
"value": "Add init method for DM\n"
},
{
"from": "human",
"value": "module SparkpostRails\n class DeliveryMethod\n include HTTParty\n base_uri \"https://api.sparkpost.com/api/v1\"\n\n def deliver!(mail)\n data = {\n :options => {\n :open_trackin... | ruby | chosen |
[
{
"from": "system",
"value": "Allow multiple subdomain levels, i.e. x.staging.spree.mx\n"
},
{
"from": "human",
"value": "module Apartment\n module Elevators\n # Provides a rack based db switching solution based on subdomains\n # Assumes that database name should match subdomain\n clas... | ruby | chosen |
[
{
"from": "system",
"value": "Bring generators tests back to life.\n"
},
{
"from": "human",
"value": "# TODO: Fix this RAILS_ENV stuff\nRAILS_ENV = 'test' unless defined?(RAILS_ENV)\nrequire 'abstract_unit'\n\nmodule Rails\n def self.root\n @root ||= File.expand_path(File.join(File.dirname(_... | ruby | chosen |
[
{
"from": "system",
"value": "Adjust commits to encompass the full scope of the project\n"
},
{
"from": "human",
"value": "class ChartsController < ApplicationController\n def commits\n render json: Commit.group_by_day(:author_datetime).count\n end\nend\n"
},
{
"from": "gpt",
"v... | ruby | chosen |
[
{
"from": "system",
"value": "Convert params to hex digest\n"
},
{
"from": "human",
"value": "class SearchController < ApplicationController\n before_action :authenticate_user!\n before_action :prepare_search_params!, :cache_query_metadata,\n :enqueue_search_worker\n\n protecte... | ruby | chosen |
[
{
"from": "system",
"value": "Add event in welcom page\n"
},
{
"from": "human",
"value": "class WelcomController < ApplicationController\n def index\n end\nend\n"
},
{
"from": "gpt",
"value": "class WelcomController < ApplicationController\n def index\n @events = Event.where('s... | ruby | chosen |
[
{
"from": "system",
"value": "Use image styles for badge generation in tests here too\n\nThis is a follow-up commit to f86afe3\n"
},
{
"from": "human",
"value": "require File.expand_path(File.dirname(__FILE__) + '/../test_helper')\n\ndescribe ::InchCI::Badge do\n fixtures :all\n\n let(:describ... | ruby | chosen |
[
{
"from": "system",
"value": "Use new accessor to set success\n"
},
{
"from": "human",
"value": "module Cooperator\n class Context\n def initialize(attributes = {})\n @_attributes = {_failure: false}\n\n attributes.each do |k, v|\n self[k] = v\n end\n end\n\n def ... | ruby | chosen |
[
{
"from": "system",
"value": "Stop appium once we're done\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nmodule Flaky\n def self.run_one_test opts={}\n raise 'Must pass :count and :name' unless opts && opts[:count] && opts[:os] && opts[:name]\n\n count = opts[:count].to_i\n os =... | ruby | chosen |
[
{
"from": "system",
"value": "Use the full path to build the partial name\n"
},
{
"from": "human",
"value": "module Glimpse\n module Views\n class View\n def initialize(options = {})\n @options = options\n end\n\n def enabled?\n true\n end\n\n def parti... | ruby | chosen |
[
{
"from": "system",
"value": "Use shared code rather than pasted code.\n"
},
{
"from": "human",
"value": "require 'tsort'\n\nrequire 'librarian/dependency'\n\nmodule Librarian\n class Resolver\n\n class GraphHash < Hash\n include TSort\n alias tsort_each_node each_key\n def ts... | ruby | chosen |
[
{
"from": "human",
"value": "Add unit test for openldap_global_conf type\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe Puppet::Type.type(:openldap_global_conf) do\n on_supported_os.each do |os, facts|\n context \"on #{os}\" do\n before :each do\n Facter.clear... | ruby | chosen |
[
{
"from": "system",
"value": "Use Gem::Version to compare ActiveSupport.version\n"
},
{
"from": "human",
"value": "module MongoMapper\n module Utils\n def self.get_safe_options(options)\n return {} unless options and options.key? :safe\n safe = options[:safe]\n safe = {:w => 1... | ruby | chosen |
[
{
"from": "system",
"value": "Make terminal character a class variable to allow for different terminals per set.\n"
},
{
"from": "human",
"value": "require 'redis'\n\nclass RedisAutocomplete\n TERMINAL = '+'\n\n attr_reader :redis\n\n def initialize(set, disallowed_chars = nil)\n @set = se... | ruby | chosen |
[
{
"from": "system",
"value": "Implement bass list and messener list\n"
},
{
"from": "human",
"value": "require 'seven_summits/asia'\n\nmodule SevenSummits\n require 'singleton'\n\n class Core\n include Singleton\n\n def definition\n \"The Seven Summits are composed of each of the hi... | ruby | chosen |
[
{
"from": "human",
"value": "Add rake tasks to change the blog base_url on stag/prod\n"
},
{
"from": "gpt",
"value": "namespace :change_url do\n task production: :environment do\n ActiveRecord::Base.logger = Logger.new(STDOUT)\n Blog.first.update(base_url: 'https://moneyadviceservice.org.... | ruby | chosen |
[
{
"from": "system",
"value": "Change default timeout from 5000 to 5 seconds\n\nTyphoeus timeout is in seconds (https://github.com/typhoeus/typhoeus#timeouts), so 5000 is almost the same as no timeout."
},
{
"from": "human",
"value": "module USPS\n # Configuration options:\n # username: Provi... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug in cucumber humpyard steps "
},
{
"from": "human",
"value": "require 'pickle'\n\nGiven /^the standard pages$/ do\n Factory :page, :id => 42, :name => 'index', :title => 'My Homepage', :position => 1\n Factory :page, :id => 45, :name => 'about', :title => '... | ruby | chosen |
[
{
"from": "human",
"value": "Remove fkey constraint so that deployment can be deleted for existing deployments\n\n[#112100849](https://www.pivotaltracker.com/story/show/112100849)\n\nSigned-off-by: William Lindner <07e881a60bf9e51606643ece30b1d2ad0de68928@pivotal.io>\n"
},
{
"from": "gpt",
"valu... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"A total f'ing shot in the dark.\"\n\nThis reverts commit c04c63fd9d0160bb5b22dc475e64eb7e64a196ef.\n"
},
{
"from": "human",
"value": "##\n## This file executes only on the client side, and\n## is not shipped to the server for execution, ever.\n##\n\nrequire... | ruby | chosen |
[
{
"from": "system",
"value": "Delete the encoding header because pivotal doesn't like it\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\n# see http://stackoverflow.com/questions/11057905/how-do-i-use-rackproxy-within-rails-to-proxy-requests-to-a-specific-path-to-an\nrequire 'rack-proxy'\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Set library local domain up for session cookie\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n\nRooms::Application.config.session_store :cookie_store, key: '_room_reservation_session', domain: :all\n\n# Use the databa... | ruby | chosen |
[
{
"from": "system",
"value": "Check for empty registration form fields\n"
},
{
"from": "human",
"value": "module FluffyPaws\n module Interactions\n class Register\n def initialize(user_repository)\n @user_repository = user_repository\n @session = nil\n @error = nil\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a bug where cdn state was not preserved.\n"
},
{
"from": "human",
"value": "require 'fog/core/collection'\nrequire 'fog/hp/models/storage/directory'\n\nmodule Fog\n module Storage\n class HP\n\n class Directories < Fog::Collection\n\n model Fog::... | ruby | chosen |
[
{
"from": "system",
"value": "JariBakken: Fix wrong ivar usage in SocketLock.\n\nThis passed the tests since nil is a valid argument for TCPServer.new,\ndefaulting to 0.0.0.0.\n\nr9900\n"
},
{
"from": "human",
"value": "require \"fcntl\"\n\nmodule Selenium\n module WebDriver\n module Firefox... | ruby | chosen |
[
{
"from": "system",
"value": "Armadillo: Remove boost dep and add arpack.\n\nCloses #619.\n"
},
{
"from": "human",
"value": "require 'formula'\n\nclass Armadillo < Formula\n homepage 'http://arma.sourceforge.net/'\n url 'http://downloads.sourceforge.net/project/arma/armadillo-4.000.0.tar.gz'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add rdoc dependency for developers using Ruby 1.8.7\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire 'system_metrics/version'\n \nGem::Specification.new do |s|\n s.name = \"system-metrics\"... | ruby | chosen |
[
{
"from": "human",
"value": "Add confirmation API authentication specs\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nrequire 'rails_helper'\n\nRSpec.describe Api::ConfirmationController do\n let(:user) { create :user, :confirmed }\n\n describe 'authentication' do\n descr... | ruby | chosen |
[
{
"from": "system",
"value": "Add basic CRUD test for partner type\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'rails_helper'\n\nRSpec.feature 'Admin::PartnerTypes', type: :feature do\n let(:admin) { create(:admin_user) }\n let(:partner_type) { create(:partner_t... | ruby | chosen |
[
{
"from": "human",
"value": "Add specs for authorization commands.\n"
},
{
"from": "gpt",
"value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\ndescribe GithubCLI::Commands::Authorizations do\n let(:format) { 'table' }\n let(:id) { 1 }\n let(:api_class) { GithubCLI::Authorization }\n\n it ... | ruby | chosen |
[
{
"from": "human",
"value": "Add specs for nested layouts.\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\ndescribe 'Inherited Nested Layouts', type: :controller do\n class ControllerA < ApplicationController\n layout 'testA'\n end\n\n class ControllerB < ControllerA\n layout... | ruby | chosen |
[
{
"from": "system",
"value": "Add :arm_vortex_tempest as CPU family\n"
},
{
"from": "human",
"value": "# typed: false\n# frozen_string_literal: true\n\nrequire \"hardware\"\n\ndescribe Hardware::CPU do\n describe \"::type\" do\n let(:cpu_types) {\n [\n :arm,\n :intel,\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix spec to check for correct type of package\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'whatpulse' do\n it do\n should contain_package('Whatpulse').with({\n :source => 'http://amcdn.whatpulse.org/files/whatpulse-mac-2.2.1.dmg',... | ruby | chosen |
[
{
"from": "system",
"value": "Use excerpts from the style guide to document the tests\n"
},
{
"from": "human",
"value": "class PuppetLint::Plugins::CheckWhitespace < PuppetLint::CheckPlugin\n def test(data)\n line_no = 0\n data.split(\"\\n\").each do |line|\n line_no += 1\n erro... | ruby | chosen |
[
{
"from": "system",
"value": "Check a word is nil or not before adding it to dictionary\n"
},
{
"from": "human",
"value": "module Sastrawi\n module Dictionary\n class ArrayDictionary\n attr_reader :words\n\n def initialize(words = [])\n @words = []\n\n add_words(words... | ruby | chosen |
[
{
"from": "system",
"value": "Add a default implementation to the current_user for the administrator\nevent control. This keeps the action from crashing when we go to it.\n"
},
{
"from": "human",
"value": "module Admin\n class EventsController < ApplicationController\n\n def index\n @ev... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unneccesary actions from InstitutionsController\n"
},
{
"from": "human",
"value": "class InstitutionsController < ApplicationController\n before_action :authenticate_user!\n before_action :set_institution, only: [:show, :edit, :update, :destroy]\n\n respon... | ruby | chosen |
[
{
"from": "system",
"value": "Update Neo4J Server to 1.6.M03\n"
},
{
"from": "human",
"value": "default[:neo4j][:server] = {\n :version => \"1.6.M02\",\n :installation_dir => \"/usr/local/neo4j-server\",\n :tarball => {\n :url => \"http://dist.neo4j.org/neo4j-community-1.6.M02-unix.tar.gz\... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec for the contract of a real configuration option\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nRSpec.describe Aruba::Configuration do\n it_behaves_like 'a basic configuration'\nend\n"
},
{
"from": "gpt",
"value": "require 'spec_hel... | ruby | chosen |
[
{
"from": "system",
"value": "Add country information to cinema"
},
{
"from": "human",
"value": "FactoryGirl.define do\n factory :cinema do\n name { %w(Cineworld Odeon Vue).sample + \" #{locality}\" }\n street_address { Faker::Address.street_address }\n locality {... | ruby | chosen |
[
{
"from": "system",
"value": "Use truncation for database cleaning in tests\n\nPostgres will complain about nested transactions\nin tests including dscc number generation. Tests\nare slightly slower, switching between strategies\ndepending on test content doesn't seem worth the\nobfuscation it would cause.\... | ruby | chosen |
[
{
"from": "system",
"value": "Change method from dig to deep fetch\n"
},
{
"from": "human",
"value": "module Fog\n module Compute\n class DigitalOceanV2\n class PagingCollection < Fog::Collection\n\n attribute :next\n attribute :last\n\n def next_page\n all... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unneeded notifier method from DeviceToken\n"
},
{
"from": "human",
"value": "module FwtPushNotificationServer\n \n class DeviceToken < ActiveRecord::Base\n \n \tvalidates_uniqueness_of :token\n validates_presence_of :token\n validates_presence_of :p... | ruby | chosen |
[
{
"from": "system",
"value": "Delete comma at the end of street suffix.\n"
},
{
"from": "human",
"value": "class CreateGroups < ActiveRecord::Migration\n def change\n create_table :groups do |t|\n t.string :primary_number, null: false\n t.string :street_name, null: fal... | ruby | chosen |
[
{
"from": "system",
"value": "Fix link_to_canvas? checking for param as symbol but getting it as string\n\ngit-svn-id: abd3364c23bece18756deaf5558fcfa62d3b1b71@96 06148572-b36b-44fe-9aa8-f68b04d8b080\n"
},
{
"from": "human",
"value": "require 'facebooker/rails/controller'\nrequire 'ruby-debug'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Copy paste error from since, improve names\n"
},
{
"from": "human",
"value": "require 'chronic'\n\nmodule Chronosphere\n module Middleware\n class Until < Base\n def call(env)\n\n cli_date = env[\"date\"]\n\n parsed_date = Chronic.parse(cli_da... | ruby | chosen |
[
{
"from": "system",
"value": "Add read methods to stream views for reading numbers and ascii text\n"
},
{
"from": "human",
"value": "require 'forwardable'\n\nmodule Helpers\n class BaseStreamView\n extend Forwardable\n\n attr_reader :stream, :start_pos\n\n def initialize(stream, start_... | ruby | chosen |
[
{
"from": "system",
"value": "Correct UTF-8 bug on strings that come from .zip files\n"
},
{
"from": "human",
"value": "require 'zip'\n\nmodule FileExtractor\n\n class ZipExtractor\n\n def initialize file\n @file = file\n end\n\n def file_list\n list = []\n\n begin\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add the settings method on delivery method\n"
},
{
"from": "human",
"value": "require \"rails_courier/service_locator\"\n\nmodule RailsCourier\n class DeliveryMethod\n include RailsCourier::ServiceLocator\n include RailsCourier::Configurable\n\n attr_reade... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure the auth_token is never nil in Cucumber tests\n"
},
{
"from": "human",
"value": "include Devise::TestHelpers\n\nGiven /^I am signed in as \"([^\"]*)\"$/ do |email|\n @current_user = Crowdblog::User.create!(email: email)\n @current_user.reset_authenticati... | ruby | chosen |
[
{
"from": "human",
"value": "Add specs for `Spree::Event module'\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nrequire 'spec_helper'\nrequire 'spree/event'\n\nRSpec.describe Spree::Event do\n let(:subscription_name) { 'foo_bar' }\n let(:item) { spy('object') }\n let(:notif... | ruby | chosen |
[
{
"from": "system",
"value": "Update Astah Community to v7.0.0\n"
},
{
"from": "human",
"value": "cask :v1 => 'astah-community' do\n version '6.9.0'\n sha256 '6e3119f2a723a4a8975583d6693bae975e95fd3339666c07cfb16dd4138e7ceb'\n\n url \"http://cdn.astah.net/downloads/astah-community-#{version.g... | ruby | chosen |
[
{
"from": "system",
"value": "Add description to HavePublished matcher for doc format\n"
},
{
"from": "human",
"value": "module RailsEventStore\n module RSpec\n class HavePublished\n def initialize(mandatory_expected, *optional_expected, differ:)\n @expected = [mandatory_expected... | ruby | chosen |
[
{
"from": "system",
"value": "Fix homepage address in gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"mailchimp/version\"\n\nGem::Specification.new do |s|\n s.name = \"mailchimp\"\n s.version = Mailchimp... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure the idea codestyle aligns annotations on local vars as expected\n"
},
{
"from": "human",
"value": "#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain ... | ruby | chosen |
[
{
"from": "system",
"value": "Make logger work again (h/t Sam Ruby)\n"
},
{
"from": "human",
"value": "module ActiveSupport\n module Deprecation\n class << self\n # Behavior is a block that takes a message argument.\n attr_writer :behavior\n\n # Whether to print a backtrace al... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor exception handling into its own method.\n"
},
{
"from": "human",
"value": "module ApiControllerConcerns\n module ExceptionHandling\n extend ActiveSupport::Concern\n\n included do\n rescue_from Exception do |exception|\n if Rails.env.devel... | ruby | chosen |
[
{
"from": "system",
"value": "Tweak calculation of consumption loss share\n\nThe loss share is a share of the total energy consumption (including the\nloss), not just the share of non-loss consumption.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule Qernel\n module Me... | ruby | chosen |
[
{
"from": "system",
"value": "Update spec with real user agent\n"
},
{
"from": "human",
"value": "module HotelsCombined\n describe Request do\n describe \".city_search\" do\n let(:parameters) {\n { :city_id => 1948,\n :arrival => \"2013-01-01\",\n :departure => ... | ruby | chosen |
[
{
"from": "human",
"value": "Add api key generation to admin panel\n"
},
{
"from": "gpt",
"value": "ActiveAdmin.register ApiKey do\n\n index do\n column :id\n column :access_token\n default_actions\n end\n\n filter :access_token\n \n show do |user|\n attributes_table do\n r... | ruby | chosen |
[
{
"from": "system",
"value": "Fix expected value on series name spec\n"
},
{
"from": "human",
"value": "RSpec.describe Amakanize::SeriesName do\n let(:series_name) do\n described_class.new(raw)\n end\n\n describe \"#to_s\" do\n subject do\n series_name.to_s\n end\n\n {\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix rspec2 deprecated syntax in example tests\n\nexpect should be used instead of should.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe UbuntuUnusedKernels do\n it 'should have a version number' do\n UbuntuUnusedKernels::VERSION.should_not... | ruby | chosen |
[
{
"from": "system",
"value": "Make spec passed on travis-ci.org\n"
},
{
"from": "human",
"value": "require \"open3\"\n\nRSpec.describe \"Executable\" do\n let(:root) { File.expand_path \"../../..\", File.dirname(__FILE__) }\n\n it \"works\" do\n stdout, stderr, status = Open3.capture3(\"#{r... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure Yaks::Changelog can be used without requiring yaks\n\nPreferably we don't load the whole of Yaks in the gemspec, this makes\nYaks::Changelog self contained\n"
},
{
"from": "human",
"value": "module Yaks\n module Changelog\n extend self\n\n def curre... | ruby | chosen |
[
{
"from": "human",
"value": "Add primary key to `owners_pods` to get an index and guard against dupes.\n"
},
{
"from": "gpt",
"value": "Sequel.migration do\n change do\n alter_table :owners_pods do\n add_primary_key [:owner_id, :pod_id] # Also ensures we don't insert duplicate associati... | ruby | chosen |
[
{
"from": "system",
"value": "Remove need for docker gem\n"
},
{
"from": "human",
"value": "class DockerHelper\n attr :c\n\n def initialize(common)\n @c = common\n end\n\n def requires_docker()\n status = c.run %W{which docker}\n unless status.success?\n c.error \"docker not in... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"[CA-4145] Added last_call_count in V2 account manager metrics\"\n\nThis reverts commit 6ca9cc9a87ffe7b172f782271d901627feca7593.\n"
},
{
"from": "human",
"value": "module Lobbyist\n module V2\n\n class AccountManagerMetrics < Lobbyist::V2::Base\n a... | ruby | chosen |
[
{
"from": "system",
"value": "Fix copy and paste error\n\nMSP-12217\n\nMissed changing Auxiliary to Encoder in described class and shared\nexample options.\n"
},
{
"from": "human",
"value": "RSpec.describe Metasploit::Cache::Auxiliary::Ancestor do\n it_should_behave_like 'Metasploit::Cache::Mod... | ruby | chosen |
[
{
"from": "system",
"value": "Use @order.display_total.to_html in place of order_subtotal\n\nFixes #17\n"
},
{
"from": "human",
"value": "Deface::Override.new(:virtual_path => %q{spree/orders/_form},\n :name => %q{replace_cart_detail},\n :replace... | ruby | chosen |
[
{
"from": "system",
"value": "Include runtime dependencies on rspec-core and rspec-expectations\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'rspec/its/version'\n\nGem::Specificati... | ruby | chosen |
[
{
"from": "system",
"value": "Fix directory leak in test_cleanup\n"
},
{
"from": "human",
"value": "require 'testing_env'\nrequire 'test/testball'\nrequire 'cmd/cleanup'\n\nclass CleanupTests < Homebrew::TestCase\n def test_cleanup\n f1 = Class.new(TestBall) { version '0.1' }.new\n f2 = C... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a bug where adult game's tags wrong to be fetched\n"
},
{
"from": "human",
"value": "module DMMCrawler\n module Attributes\n class AdultGameAttributes < BaseAttributes\n def to_a\n [\n title,\n title_link,\n main_image_... | ruby | chosen |
[
{
"from": "system",
"value": "Update the Podspec's version to 2.0.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'DateRangePicker'\n s.version = '1.0.1'\n\n s.homepage = 'https://github.com/MrMage/DateRangePicker'\n s.s... | ruby | chosen |
[
{
"from": "system",
"value": "Tag Utils class as private in the documentation\n"
},
{
"from": "human",
"value": "module Draper\n module Utils\n extend self\n\n def decorators_of(decorated_instance)\n decorators = []\n instance = decorated_instance\n while instance.kind_of?(... | ruby | chosen |
[
{
"from": "system",
"value": "Reorder a private method in `Sub`\n"
},
{
"from": "human",
"value": "require 'forwardable'\nrequire_relative 'cache'\nrequire_relative 'diff_builder'\n\nmodule SubDiff\n class Sub\n extend Forwardable\n include Cache\n\n def initialize(diffable)\n @bu... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.