conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "human",
"value": "Add some specs for the argument error in the constructor\n\nSigned-off-by: Sam Phippen <e5a09176608998a68778e11d5021c871e8fae93c@googlemail.com>\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe Http::RequestStream do\n describe \"#initalize\" do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove more cruft from gemspec\n"
},
{
"from": "human",
"value": "lib = File.expand_path('../lib', __FILE__)\nrequire 'something_like_that/version'\n\nGem::Specification.new do |spec|\n spec.name = 'something_like_that'\n spec.version = SomethingLik... | ruby | chosen |
[
{
"from": "system",
"value": "Add C file to gemspec so extension is built [ninjudd]\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n\ts.name = 'fiveruns-memcache-client'\n\ts.version = '1.5.0.3'\n\ts.authors = ['Eric Hodel', 'Robert Cottrell', 'Mike Perham']\n\ts.email = 'mike@... | ruby | chosen |
[
{
"from": "system",
"value": "Remove duplicate dependency in gemspec\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'rake/multiple/version'\n\nGem::Specification.new do |spec|\n spe... | ruby | chosen |
[
{
"from": "system",
"value": "Package version is increased from 0.1.1 to 0.1.2\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'casing'\n s.version = '0.1.1'\n s.summary = 'Convert the case of strings, symbols, and hash keys, including ca... | ruby | chosen |
[
{
"from": "system",
"value": "Update 'this_week' to use beginning/end of day and proper time zones\n"
},
{
"from": "human",
"value": "class DateTime\n\n # Returns a DateTime range of the past 7 days\n def self.this_week\n (DateTime.current - 7.days)..DateTime.current\n end\n \nend\n"
},... | ruby | chosen |
[
{
"from": "system",
"value": "Allow NO_MESSENGER environment variable to run without queue\n"
},
{
"from": "human",
"value": "require 'messenger'\n\nif Rails.env.test?\n Messenger.transport = Marples::NullTransport.instance\n ActiveRecord::Base.marples_transport = Marples::NullTransport.instan... | ruby | chosen |
[
{
"from": "system",
"value": "Add more solution to problem\n"
},
{
"from": "human",
"value": "# Largest Integer\n\n# I worked on this challenge [by myself, with: ].\n\n# largest_integer is a method that takes an array of integers as its input\n# and returns the largest integer in the array\n#\n#... | ruby | chosen |
[
{
"from": "system",
"value": "Remove notification in lwrp as this is in provider now.\n"
},
{
"from": "human",
"value": "# Cookbook Name:: rs_utils\n# Recipe:: setup_hostname\n#\n# Copyright (c) 2011 RightScale Inc\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a ... | ruby | chosen |
[
{
"from": "system",
"value": "Add pry-doc to the development dependencies.\n"
},
{
"from": "human",
"value": "require File.expand_path(\"../lib/pry-vterm_aliases/version\", __FILE__)\n\nGem::Specification.new do |s|\n s.version = Pry::VTermAliases::VERSION\n s.email = [\"jordon@envygeeks.com\"... | ruby | chosen |
[
{
"from": "system",
"value": "Allow refinerycms-core versions from >= 3.0.0 to < 5.0\n"
},
{
"from": "human",
"value": "# Encoding: UTF-8\nGem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s.name = %q{refinerycms-authentication-devise}\n s.version ... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec with new download location\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n\n s.name = 'Tangram-es'\n s.version = '0.9.1-dev'\n\n s.summary = 'Open source C++ library for rendering 2D and 3D maps from vector data using OpenGL ... | ruby | chosen |
[
{
"from": "system",
"value": "Update renamed class in script\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nrequire_relative 'server/test_base'\n\nclass ImagePrePuller < TestBase\n\n def initialize(arg)\n super(arg)\n end\n\n def pull_images\n context = Context.new(sh... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure dnsmasq is killed after all tests\n"
},
{
"from": "human",
"value": "require 'test/unit'\n\nrequire 'wasd'\n\nclass Test::Unit::TestCase\n def with_test_dns_server\n cmd = File.expand_path(\"../bin/dnsmasq-#{RUBY_PLATFORM}\", __FILE__)\n unless File... | ruby | chosen |
[
{
"from": "system",
"value": "Test to see if owserver is installed.\n"
},
{
"from": "human",
"value": "require 'test/unit'\nrequire 'yaml'\nrequire 'fileutils'\nrequire File.dirname(__FILE__)+'/../lib/ownet.rb'\n\nclass Test::Unit::TestCase \n def with_fake_owserver\n pid = fork do \n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add Sinatra app for testing."
},
{
"from": "gpt",
"value": "require 'sinatra'\nrequire 'sinatra_more/markup_plugin'\nrequire 'json'\nrequire 'rack-flash'\n\nuse Rack::Session::Cookie, secret: SecureRandom.hex\nuse Rack::Flash, sweep: true\n\n$LOAD_PATH.unshift(File.e... | ruby | chosen |
[
{
"from": "system",
"value": "Remove Nokogiri dependency, which is huge\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nGem::Specification.new do |spec|\n spec.name = 'chess_openi... | ruby | chosen |
[
{
"from": "system",
"value": "Change test to not depend on random library's source\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire_relative 'spec_helper'\n\nRSpec.describe DeepCover do\n describe 'cover' do\n after { DeepCover.reset }\n it 'temporarily override... | ruby | chosen |
[
{
"from": "system",
"value": "Make it work even if preferred_enterprise_id is null\n"
},
{
"from": "human",
"value": "module OpenFoodNetwork\n class AvailablePaymentMethodFilter\n def filter!(payment_methods)\n if stripe_enabled?\n payment_methods.reject!{ |p| p.type.ends_with?(\... | ruby | chosen |
[
{
"from": "human",
"value": "Set area and site wide accounting tariffs to be defaults\n"
},
{
"from": "gpt",
"value": "namespace :after_party do\n desc 'Deployment task: tariff_defaults'\n task tariff_defaults: :environment do\n puts \"Running deploy task 'tariff_defaults'\"\n\n [GlobalM... | ruby | chosen |
[
{
"from": "system",
"value": "Fix spec fail with taxons by id\n"
},
{
"from": "human",
"value": "#require 'spec_helper'\n\ndescribe Api::EnterpriseSerializer do\n let(:enterprise) { create(:distributor_enterprise) }\n let(:taxon) { create(:taxon) }\n it \"serializes an enterprise\" do\n se... | ruby | chosen |
[
{
"from": "system",
"value": "Set timeout as 20 sec\n"
},
{
"from": "human",
"value": "require 'faraday'\nrequire 'faraday_middleware'\nrequire 'croudia/configurable'\nrequire 'croudia/version'\n\nmodule Croudia\n module Default\n ENDPOINT = 'https://api.croudia.com' unless defined? Croudia:... | ruby | chosen |
[
{
"from": "system",
"value": "Improve release abort error message\n"
},
{
"from": "human",
"value": "module Shuttle\n module Helpers\n LEVEL_COLORS = {\n 'info' => :green,\n 'warning' => :yellow,\n 'error' => :red\n }\n\n def log(message, level='info')\n prefix... | ruby | chosen |
[
{
"from": "system",
"value": "Define required ruby version in gemspec\n\nRecommended and checked by rubocop.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nlib = File.expand_path('lib', __dir__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'mnemosyne/ver... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up cookie serialization script\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n\nRails.application.config.action_dispatch.cookies_serializer = :json\n"
},
{
"from": "gpt",
"value": "# Encoding: utf-8\... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec with readme project description"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/newrelic_moped/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Stephen Bartholomew\", \"Piotr... | ruby | chosen |
[
{
"from": "system",
"value": "Create Cast root directory on provisioning.\n"
},
{
"from": "human",
"value": "# vagrant_main cookbook\ninclude_recipe \"apt\"\ninclude_recipe \"build-essential\"\ninclude_recipe \"openssl\"\ninclude_recipe \"runit\"\ninclude_recipe \"nodejs\"\ninclude_recipe \"npm\... | ruby | chosen |
[
{
"from": "system",
"value": "Update chef client to 12.2.1\n"
},
{
"from": "human",
"value": "# Add the opscode APT source for chef\ndefault[:apt][:sources] = node[:apt][:sources] | [\"opscode\"]\n\n# Set the default server version\ndefault[:chef][:server][:version] = \"11.1.3-1\"\n\n# Set the d... | ruby | chosen |
[
{
"from": "human",
"value": "Add common helper method kml_colour\n"
},
{
"from": "gpt",
"value": "module KmzCompressor\n module KmlHelper\n # Converts KML colours which are BBGGRR into web colours which are RRGGBB\n def kml_colour(html_hex_colour)\n html_hex_colour.gsub(/([0-9A-F][0-... | ruby | chosen |
[
{
"from": "system",
"value": "Add concrete version number for development dependency pry-byebug.\n"
},
{
"from": "human",
"value": "require File.expand_path('../lib/daemons/version', __FILE__)\n\nGem::Specification.new do |s|\n s.name = %q{daemons}\n s.version = Daemons::VERSION\n s.date = %q... | ruby | chosen |
[
{
"from": "system",
"value": "Add oauth redirect after successful log in\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n protect_from_forgery with: :exception\n before_action :configure_permitted_parameters, if: :devise_controller?\n\n private\n\n de... | ruby | chosen |
[
{
"from": "system",
"value": "Fix grabbing friendship for removal\n\nThe passed parameter is the `friend_id`, not the `id`. As a matter of\nfact, the friendships table has no `id` column.\n"
},
{
"from": "human",
"value": "class FriendshipsController < ApplicationController\n\n before_filter :a... | ruby | chosen |
[
{
"from": "system",
"value": "Add validation concern to person post\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire_dependency \"gobierto_people\"\n\nmodule GobiertoPeople\n class PersonPost < ApplicationRecord\n include User::Subscribable\n include GobiertoCom... | ruby | chosen |
[
{
"from": "system",
"value": "ADd fields to schools table for high school performance data\n"
},
{
"from": "human",
"value": "class CreateSchools < ActiveRecord::Migration\n def change\n create_table :schools do |t|\n \tt.string :phone_number\n \tt.string :grade_span_min\n \tt.strin... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure the home and envdir directories exist\n"
},
{
"from": "human",
"value": "if node['uncrate']['user'].nil?\n Chef::Application.fatal!(\"The node['uncrate']['user'] must be set\")\nend\n\n#node.default['uncrate']['current_user_home'] = node['etc']['passwd'][... | ruby | chosen |
[
{
"from": "system",
"value": "Add some more hosts to test\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Gethostname do\n it 'has a version number' do\n expect(Gethostname::VERSION).not_to be nil\n end\n\n it 'returns nil with a bunk address' do\n expect(Gethostnam... | ruby | chosen |
[
{
"from": "system",
"value": "Remove lingering comma in the array\n"
},
{
"from": "human",
"value": "require_relative '../lib/tic_tac_toe.rb'\n\ndescribe TicTacToe do\n describe '#initialize' do\n it 'creates a empty board represented by an array of 9 slots' do\n ttt = TicTacToe.new\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Load fixture ports from the docker-compose file\n"
},
{
"from": "human",
"value": "require 'net/http'\n\nclass Laravel\n class << self\n attr_reader :last_response\n\n def reset!\n @last_response = nil\n end\n\n def navigate_to(route, attempts = 0)... | ruby | chosen |
[
{
"from": "system",
"value": "Fix some cukes on 1.9.2.\n\nSome were failing with \"no such file to load -- vcr\", so this ensures vcr is on the load path."
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'bundler'\nBundler.setup\n\nrequire 'aruba'\n\nBefore do\n this_dir = File.dirn... | ruby | chosen |
[
{
"from": "system",
"value": "Increase capybara default wait time\n\nWe see intermittent timeout errors when running our cucumber features.\n"
},
{
"from": "human",
"value": "require 'capybara/cucumber'\nrequire 'capybara/poltergeist'\nrequire 'rspec/expectations'\nrequire 'json'\nrequire 'pry-d... | ruby | chosen |
[
{
"from": "system",
"value": "Update Homebrew formula for v0.8.1\n"
},
{
"from": "human",
"value": "class ChrubyFish < Formula\n desc \"Thin wrapper around chruby to make it work with the Fish shell\"\n homepage \"https://github.com/JeanMertz/chruby-fish#readme\"\n url \"https://github.com/Je... | ruby | chosen |
[
{
"from": "system",
"value": "Handle possible error case in tariff synchronizer.\n"
},
{
"from": "human",
"value": "module TariffSynchronizer\n class PendingUpdate\n attr_reader :update,\n :file_name\n\n delegate :apply, :issue_date, :update_type, :update_priority, to: :upd... | ruby | chosen |
[
{
"from": "human",
"value": "Add controller helpers to set up a functional test.\n"
},
{
"from": "gpt",
"value": "module Test\n module Spec\n module Rails\n module Controller\n module ClassMethods\n # Sets up the test environment before every functional test\n d... | ruby | chosen |
[
{
"from": "system",
"value": "Package version is increased from 0.1.2 to 0.1.3\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'identifier-uuid'\n s.version = '0.1.2'\n s.summary = 'UUID identifier generator with support for dependency co... | ruby | chosen |
[
{
"from": "system",
"value": "Allow runtime switch of environment\n"
},
{
"from": "human",
"value": "require 'bigdecimal'\nrequire 'time'\nrequire 'cassandra'\n\nclass Cassandra::Mapper\n require_relative 'mapper/convert'\n require_relative 'mapper/request_data'\n require_relative 'mapper/ins... | ruby | chosen |
[
{
"from": "system",
"value": "Define single entry for DTO request method\n"
},
{
"from": "human",
"value": "require 'cloud_scrape/api'\n\nclass CloudScrape\n class DTO\n attr_reader :options\n\n def initialize(options:)\n @options = options\n end\n\n def self.get(options = {})\... | ruby | chosen |
[
{
"from": "human",
"value": "Add local path source handler.\n"
},
{
"from": "gpt",
"value": "require 'fpm/cookery/source_handler/template'\nrequire 'fpm/cookery/log'\nrequire 'fileutils'\n\nmodule FPM\n module Cookery\n class SourceHandler\n class LocalPath < FPM::Cookery::SourceHandler... | ruby | chosen |
[
{
"from": "system",
"value": "Remove errant quote from generator\n"
},
{
"from": "human",
"value": "require_relative './client_generator.rb'\nmodule Rockauth\n class InstallGenerator < Rails::Generators::Base\n source_root File.expand_path('../../templates', __FILE__)\n\n desc 'Installs R... | ruby | chosen |
[
{
"from": "system",
"value": "Return the value that was set.\n"
},
{
"from": "human",
"value": "class Hey::ThreadCargo\n\n # Sets a namespaced value on the current thread\n def self.set(name, value)\n Thread.current[:hey] = {} if Thread.current[:hey].nil?\n Thread.current[:hey][name] = v... | ruby | chosen |
[
{
"from": "human",
"value": "Add packages for Vanguard Technologies.\n"
},
{
"from": "gpt",
"value": "class VanguardTechnologies < Kosmos::Package\n title 'Vanguard Technologies'\n url 'http://kerbalspaceport.com/wp/wp-content/themes/kerbal/inc/download.php?f=uploads/2013/12/VNG-Plugin_0.7.2.z... | ruby | chosen |
[
{
"from": "system",
"value": "Improve invalid list value error message\n"
},
{
"from": "human",
"value": "# coding: utf-8\n\nmodule ONIX\n module ListWriter\n \n def list_writer(name, options = {})\n options.symbolize_keys!\n unless options.is_a?(Hash) && options[:list].is_a?(In... | ruby | chosen |
[
{
"from": "system",
"value": "Use a better name for numeric input in get_move\n"
},
{
"from": "human",
"value": "module TicTacToe\n class Game\n attr_reader :current_mark\n\n NEXT_PLAYER = {\"X\" => \"O\",\n \"O\" => \"X\"}\n\n def initialize(console, board)\n @c... | ruby | chosen |
[
{
"from": "system",
"value": "Support non-verbose mode(*) and old metadata(!)\n\nRelates: 35f6f6bf\n"
},
{
"from": "human",
"value": "class Specinfra::Command::Redhat::Base::Yumrepo < Specinfra::Command::Linux::Base::Yumrepo\n class << self\n def check_exists(repository)\n \"yum repolis... | ruby | chosen |
[
{
"from": "system",
"value": "Load the session store, UI constants and other UI things in console.\n\nDraper was added in #5946.\n\nIt provides helpers in rails console, which depend on\nActionController::TestRequest.new, which requires a session store.\n"
},
{
"from": "human",
"value": "module ... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec to support OS X\n"
},
{
"from": "human",
"value": "\nPod::Spec.new do |s|\n s.name = 'TBURLRequestOptions'\n s.version = '0.1.0'\n s.summary = 'A small, handy library to make HTTP networking easier.'\n\n s.homepage ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a bad classname that prevented cache_counters from working\n"
},
{
"from": "human",
"value": "module MetasploitDataModels::ActiveRecordModels::VulnAttempt\n def self.included(base)\n base.class_eval {\n belongs_to :vuln, :class_name => \"Mdm::VulnAttemp... | ruby | chosen |
[
{
"from": "human",
"value": "Add redesign summary feature spec\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\nRSpec.feature \"Faculty Redesign Management\" do\n\n feature \"add new redesign summary\" do\n let(:redesign_summaries) { create(:redesign_summaries) }\n let(:redesign_... | ruby | chosen |
[
{
"from": "system",
"value": "Update Logitech Gaming Software to v8.53.10\n\nChange url and pkg info.\n"
},
{
"from": "human",
"value": "class LogitechGamingSoftware < Cask\n version '8.50.133'\n sha256 '1f1930563a6c254fc9ed65e5a6bcfb47c2f7b7395933486aedc5ab71da1a3c01'\n\n url \"http://logite... | ruby | chosen |
[
{
"from": "system",
"value": "Use number_to_currency (required by Spree 1.0.0\n"
},
{
"from": "human",
"value": "Deface::Override.new(:virtual_path => 'spree/shared/_products',\n :name => 'tweak_product_list_item',\n :replace => '[data-hook=\"products_list... | ruby | chosen |
[
{
"from": "system",
"value": "Use read-only audit status on the show page\n\nA port of https://github.com/projecthydra/sufia/pull/1178\n"
},
{
"from": "human",
"value": "module Sufia\n class FileSetPresenter < ::CurationConcerns::FileSetPresenter\n delegate :depositor, :tag, :date_created, t... | ruby | chosen |
[
{
"from": "system",
"value": "Tweak default ability so all board members have it\n"
},
{
"from": "human",
"value": "# Other authorizers should subclass this one\nclass ApplicationAuthorizer < Authority::Authorizer\n\n # Any class method from Authority::Authorizer that isn't overridden\n # will... | ruby | chosen |
[
{
"from": "system",
"value": "Reduce sql calls in api people show\n"
},
{
"from": "human",
"value": "json.partial! \"person\", person: @person\n\n# Extra information that's not on the index action\n\njson.rebellions @person.rebellions\njson.votes_attended @person.votes_attended\njson.votes_possi... | ruby | chosen |
[
{
"from": "system",
"value": "Remove mobile mentions for now.\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n protect_from_forgery\n helper :all\n layout 'application'\n\n before_filter :prepare_for_mobile\n\n private\n\n def mobile_device?\n if... | ruby | chosen |
[
{
"from": "system",
"value": "Add analytics helper to Enterprises Controller\n"
},
{
"from": "human",
"value": "include Spree::ProductsHelper\nclass EnterprisesController < BaseController\n def index\n @enterprises = Enterprise.all\n end\n\n def suppliers\n @suppliers = Enterprise.is_pr... | ruby | chosen |
[
{
"from": "system",
"value": "Add destroy action so that a creator can delete their soundtrek\n"
},
{
"from": "human",
"value": "class SoundTreksController < ApplicationController\n include SoundTreksHelper\n\n def index\n\n end\n\n def show\n @sound_trek = SoundTrek.find(params[:id])\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Set redcarpet config to block XSS exploits\n\n - should be redcarpet default"
},
{
"from": "human",
"value": "module Discuss\n module ApplicationHelper\n def message_person(mailbox_name, message)\n mailbox_name == 'inbox' ? message.sender : message.recipien... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure decider ranges are unique"
},
{
"from": "human",
"value": "# This class is used to determine the rate at which emails are sent.\n# We look at two parameters, the last day the user clicked on a link and the\n# last day we sent them an email. The idea is tha... | ruby | chosen |
[
{
"from": "system",
"value": "Add logic mapping feature values to enumerations\n"
},
{
"from": "human",
"value": "class LogicMapping < ActiveRecord::Base\n include Resourcable\n include Permissionable\n \n FAITHFULNESSES = %w( none faithful model_expansive model_bijective embedding sublogic ... | ruby | chosen |
[
{
"from": "human",
"value": "Add 3 tests, POST DELETE and PUT for Answer; Post is broken because of redirect to parent question\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\ndescribe AnswersController do\n describe \"POST create\" do\n question = Question.create(title:'Title', c... | ruby | chosen |
[
{
"from": "system",
"value": "Replace object_id for equal? in Matrix specs\n"
},
{
"from": "human",
"value": "require File.dirname(__FILE__) + '/../../spec_helper'\nrequire 'matrix'\n\ndescribe \"Matrix#clone\" do\n before(:each) do\n @a = Matrix[[1, 2], [3, 4], [5, 6]]\n end\n \n it \"re... | ruby | chosen |
[
{
"from": "system",
"value": "Remove old common steps from cuke\n"
},
{
"from": "human",
"value": "When(/^I see the home page$/) do\n visit root_path\nend\n\nWhen(/^I click \"([^\"]*)\"$/) do |link|\n click_on link\nend\n\nWhen(/^I click \"([^\"]*)\" next to a (.*)$/) do |link, thing_to_ignore... | ruby | chosen |
[
{
"from": "human",
"value": "Add the WindowHelper module to close popup windows\n"
},
{
"from": "gpt",
"value": "module GetItFeatures\n module WindowHelper\n def close_popup\n # Close the popup window assuming the popup is to another system\n windows.each do |window|\n page.... | ruby | chosen |
[
{
"from": "system",
"value": "Add author info to podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"PFIncrementalStore\"\n s.version = \"0.0.1\"\n s.summary = \"Core Data Persistence with Parse, an NSIncrementalStore subclass.\"\n s.homepage = ... | ruby | chosen |
[
{
"from": "human",
"value": "Add test for disabled features\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe 'Disabled shibboleth features' do\n subject { page }\n before(:all) {\n @attrs = FactoryGirl.attributes_for(:user, :email => \"user@mconf.org\")\n }\n\n context \... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary namespace when initializing new RNG instance\n"
},
{
"from": "human",
"value": "module LootSystem\n class Drop\n attr_accessor :item\n attr_accessor :chance\n attr_accessor :random_number_generator\n\n # Assign information about the d... | ruby | chosen |
[
{
"from": "system",
"value": "Add code accessor to NeographyError.\n"
},
{
"from": "human",
"value": "module Neography\n\n class NeographyError < StandardError\n attr_reader :message, :stacktrace\n\n def initialize(message = nil, code = nil, stacktrace = nil)\n @message = message\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Hotfix: Remove Webmock from Rake task\n"
},
{
"from": "human",
"value": "require 'webmock/rspec'\n\nnamespace :db do\n desc 'Drop, create, migrate then seed the database'\n task recreate: :environment do\n WebMock.allow_net_connect!\n Rake::Task['log:clear']... | ruby | chosen |
[
{
"from": "system",
"value": "Add method for rending a TodoList to plain text"
},
{
"from": "human",
"value": "module Todotxt\n class TodoList\n include Enumerable\n\n attr_accessor :todos\n\n def initialize\n @todos = []\n end\n\n def add str\n todo = Todo.new str, (@t... | ruby | chosen |
[
{
"from": "system",
"value": "Fix validation to cover a free form edge case\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n# VALIDATED_CHECKSUM: Isys/3jd2iKpxQYjj30pLNba1cQOHiPhSXIiL4W9Ays=\n# See LICENSE.txt for license\n\nrequire 'ansible/ruby/modules/generated/core/utilitie... | ruby | chosen |
[
{
"from": "system",
"value": "Add releases log to the package\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n$LOAD_PATH.unshift(File.expand_path(\"lib\", __dir__))\nrequire \"jekyll/cloudinary/version\"\n\nGem::Specification.new do |spec|\n spec.version = Jekyll::Cloudinary... | ruby | chosen |
[
{
"from": "system",
"value": "Include validate doc note on class\n"
},
{
"from": "human",
"value": "require 'pathname'\nrequire 'sparkle_formation'\nrequire 'knife-cloudformation'\n\nclass Chef\n class Knife\n class CloudformationValidate < Knife\n\n include KnifeCloudformation::Knife::... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor to a composed method\n\n[#26437519]\n"
},
{
"from": "human",
"value": "require 'git_tracker/branch'\nrequire 'git_tracker/commit_message'\n\nmodule GitTracker\n class PrepareCommitMessage\n attr_reader :file, :source, :commit_sha\n\n def self.run(fil... | ruby | chosen |
[
{
"from": "system",
"value": "Add options to stream operations\n"
},
{
"from": "human",
"value": "# @see https://developers.podio.com/doc/stream\nclass Podio::StreamActivityGroup < ActivePodio::Base\n\n property :group_id, :integer\n property :kind, :string\n property :type, :string\n proper... | ruby | chosen |
[
{
"from": "system",
"value": "Enhance exception message for debugging purposes"
},
{
"from": "human",
"value": "module Restforce\n\n module DB\n\n # Restforce::DB::SynchronizationError is a thin wrapper for any sort of\n # exception that might crop up during our record synchronization. It... | ruby | chosen |
[
{
"from": "system",
"value": "Fix spec dependent on Hash ordering\n"
},
{
"from": "human",
"value": "require File.dirname(__FILE__) + '/../../../spec_helper'\nrequire 'rexml/document'\n\ndescribe \"REXML::Attributes#prefixes\" do\n before :each do\n @e = REXML::Element.new(\"root\")\n a1 ... | ruby | chosen |
[
{
"from": "human",
"value": "Add File that allows explicit path setting\n"
},
{
"from": "gpt",
"value": "require 'time'\nrequire 'rack/utils'\nrequire 'rack/mime'\n\nmodule DAV4Rack\n # DAV4Rack::File simply allows us to use Rack::File but with the\n # specific location we deem appropriate\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Raise error if student_id params don't match\n"
},
{
"from": "human",
"value": "class TransitionNotesController < ApplicationController\n before_action :authorize!\n\n def authorize!\n student = Student.find(params[:student_id])\n educator = current_educator... | ruby | chosen |
[
{
"from": "system",
"value": "Return '' when there's a error rendering a time\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule Results\n module Renderers\n class TimeRenderer < DefaultResultRenderer\n def self.render(column, row)\n time = row[key(column)... | ruby | chosen |
[
{
"from": "system",
"value": "Make long running tests time out, helps to make mutant terminate\n"
},
{
"from": "human",
"value": "require 'hexp'\nrequire 'rspec/its'\n\nRSpec::Matchers.define :dom_eq do |other_dom|\n match do |dom|\n Hexp::Nokogiri::Equality.new(dom, other_dom).call\n end\n... | ruby | chosen |
[
{
"from": "system",
"value": "Comment out example of experiment define\n"
},
{
"from": "human",
"value": "EasyAb.configure do |config|\n # Define how to check whether current user is signed in or not\n config.user_signed_in_method = -> { user_signed_in? }\n\n # Define how to get current user'... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor to remove feature envy from DataSummarizer\n"
},
{
"from": "human",
"value": "module NutritionCalculator\n class DataSummarizer\n def initialize(source_data:, diet_period:)\n self.source_data = source_data\n self.diet_period = diet_period\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add back in the platform specification.\n"
},
{
"from": "human",
"value": "\n$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + '/lib'))\n\nrequire 'hermann/version'\n\nSPEC = Gem::Specification.new do |s|\n s.name = \"hermann\"\n s.version... | ruby | chosen |
[
{
"from": "system",
"value": "Fix LICENSE file name in gemspec.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib/', __FILE__)\n$:.unshift lib unless $:.include?(lib)\n\nrequire 'hpcloud/version'\n\nGem::Specification.new do |s|\n \n s.name = 'hp... | ruby | chosen |
[
{
"from": "system",
"value": "Support ruby 1.9 where 'lines' returns an Enumerator\n"
},
{
"from": "human",
"value": "gem 'minitest'\nrequire 'minitest/autorun'\nrequire 'rack/test'\nrequire_relative '../app'\n\nclear_packages\npackage = File.read('test/test-logs/1/package').lines.each(&:strip!)... | ruby | chosen |
[
{
"from": "system",
"value": "Replace non-working homepage link in gemspec\n\nThis link is used by rubygems.org and thus it's important to keep it up\nto date, otherwise we are confusing users.\n\nFixes #119\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('... | ruby | chosen |
[
{
"from": "system",
"value": "Remove smart trick that caused a segfault on mri 2.3.1\n"
},
{
"from": "human",
"value": "require 'rom/types'\n\nmodule ROM\n module SQL\n module Types\n include ROM::Types\n\n singleton_class.send(:define_method, :Constructor, &ROM::Types.method(:Cons... | ruby | chosen |
[
{
"from": "system",
"value": "Revert cookie serilizer format for compatibility\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n\n# Specify a serializer for the signed and encrypted cookie jars.\n# Valid options are :json, :marshal, and :hybrid.\nRa... | ruby | chosen |
[
{
"from": "system",
"value": "Remove prerender option for follow user and follow tag components\n"
},
{
"from": "human",
"value": "module ApplicationHelper\n\n def follow_button_for(user)\n if user_signed_in?\n unless current_user?(user)\n react_component('UserFollowButton', { fo... | ruby | chosen |
[
{
"from": "system",
"value": "Add .pre for next release\n"
},
{
"from": "human",
"value": "module EY\n module Serverside\n class Adapter\n VERSION = \"2.0.7\"\n # For backwards compatibility, the serverside version default will be maintained until 2.1\n # It is recommended tha... | ruby | chosen |
[
{
"from": "system",
"value": "Patch for newer Rails versions not supporting text option for render\n"
},
{
"from": "human",
"value": "require \"html_page/capture\"\n\nmodule EmberRailsHelper\n def render_ember_app(name, &block)\n EmberCli[name].build\n\n markup_capturer = HtmlPage::Captur... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.