conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Remove milliseconds part of the time and create new jobs for assessments\n"
},
{
"from": "human",
"value": "class AddTokensToCourseLessonPlanItems < ActiveRecord::Migration\n def change\n add_column :course_lesson_plan_items, :opening_reminder_token, :float\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Store uri rather than id for config blobs.\n"
},
{
"from": "human",
"value": "module Cradlepointr\n class Router < CradlepointObject\n\n attr_accessor :id, :data, :ecm_firmware_id\n\n def initialize(id = nil)\n self.id = id\n end\n\n def self.rel_u... | ruby | chosen |
[
{
"from": "system",
"value": "Use parse_domain methods to obtain domains variable"
},
{
"from": "human",
"value": " begin\n Capistrano::Configuration.instance.load do\n namespace :nginx do\n desc \"Install latest stable release of nginx\"\n task :install, roles: :web do\n ru... | ruby | chosen |
[
{
"from": "system",
"value": "Add touch after failing cuke\n"
},
{
"from": "human",
"value": "require 'relish/commands/base'\nrequire 'yaml'\n\nmodule Relish\n\n # Represents a .relish file\n class OptionsFile\n\n def initialize(path)\n @path = path\n end\n \n # Store the give... | ruby | chosen |
[
{
"from": "system",
"value": "Return nil in retry_key_for_job if the application code is not loaded.\n"
},
{
"from": "human",
"value": "# Extend Resque::Server to add tabs.\nmodule ResqueRetry\n module Server\n\n def self.included(base)\n base.class_eval {\n helpers do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Move readline initialization to initialize\n"
},
{
"from": "human",
"value": "module RySafe\n class Shell\n def initialize\n init_readline\n end\n\n def prompt\n while line = Readline.readline(prompt_string, true) do\n begin\n eva... | ruby | chosen |
[
{
"from": "system",
"value": "Break configuration attributes into multiple lines\n"
},
{
"from": "human",
"value": "module Liftoff\n class ProjectConfiguration\n LATEST_IOS = 7.0\n\n attr_accessor :project_name, :company, :prefix, :configure_git, :warnings_as_errors, :enable_static_analyz... | ruby | chosen |
[
{
"from": "system",
"value": "Switch to using metadata.json instead of Modulefile\n\nThis should be faster and more compatible with custom code in the\nModulefile.\n"
},
{
"from": "human",
"value": "require 'spikor_forge'\nrequire 'puppet'\nrequire 'puppet/module_tool/metadata'\nrequire 'puppet/... | ruby | chosen |
[
{
"from": "system",
"value": "Add timeout avoiding long time loading in webkit\n"
},
{
"from": "human",
"value": "require 'erb'\nrequire 'pp'\n\nmodule Neighborparrot\n\n SERVER_URL = \"https://neighborparrot.net\"\n ASSETS_URL = \"https://neighborparrot.com\"\n\n\n\n def get_index_template(e... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor migration for destroying useless roles.\n\nSame behaviour, better performance.\n"
},
{
"from": "human",
"value": "class RemoveExtMemberships < ActiveRecord::Migration\n def self.up\n Membership.find_all_by_role(10).each{|d|d.destroy}\n end\n\n def sel... | ruby | chosen |
[
{
"from": "system",
"value": "Use mock_numeric rather than NumericSub\n"
},
{
"from": "human",
"value": "require File.dirname(__FILE__) + '/../../spec_helper'\nrequire File.dirname(__FILE__) + '/fixtures/classes'\n\ndescribe \"Numeric#ceil\" do\n before(:each) do\n @obj = NumericSub.new\n e... | ruby | chosen |
[
{
"from": "system",
"value": "Add content extra to node display\n"
},
{
"from": "human",
"value": "module Synergy\n module PagesHelper\n\n def node_path(node)\n '/synergy' + node.path\n end\n\n def node_html(node)\n if node.content\n if node.content['body']\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix YAML load which doesn't seem to be working\n"
},
{
"from": "human",
"value": "class UpdateAuditsSlowly < ActiveRecord::Migration[5.2]\n def up\n change_column_type(:jsonb) { |audit| YAML.load(audit.old_changes) }\n end\n\n def down\n change_column_type(... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify stage_id migration as we now use relations\n"
},
{
"from": "human",
"value": "module Gitlab\n module BackgroundMigration\n class MigrateBuildStageIdReference\n def perform(start_id, stop_id)\n scope = if stop_id.to_i.nonzero?\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add small description to gemspec.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'svgo_wrapper/version'\n\nGem::Specification.new do |spec|\n spec.name... | ruby | chosen |
[
{
"from": "system",
"value": "Remove Rails 3.1 config setting"
},
{
"from": "human",
"value": "Dummy::Application.configure do\n # Settings specified here will take precedence over those in config/application.rb\n\n # In the development environment your application's code is reloaded on\n # e... | ruby | chosen |
[
{
"from": "system",
"value": "Add back rake development_dependency for Travis\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 = \"leag... | ruby | chosen |
[
{
"from": "system",
"value": "Allow true and yes to match the correct settings\n\nhttps://puppet.com/docs/puppet/5.5/types/yumrepo.html#yumrepo-attribute-gpgcheck states:\n\ngpgcheck\n\n(Property: This attribute represents concrete state on the target system.)\n\nWhether to check the GPG signature on packag... | ruby | chosen |
[
{
"from": "system",
"value": "tests: Create ~/.rbld dir if it does not exist\n\nSigned-off-by: Dmitry Fleytman <a8cf97adadec4e1b734a39bc5aea71b5741cfca1@daynix.com>\n"
},
{
"from": "human",
"value": "class RebuildConfFile\n def initialize\n require 'ptools'\n require 'pathname'\n\n @pa... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a bug, loaded non-existing file: integrator.rb\n"
},
{
"from": "human",
"value": "require 'open-uri'\nrequire 'rubygems'\nrequire 'nokogiri'\nrequire 'css_inliner/version'\nrequire 'css_inliner/integrator'\nrequire 'css_inliner/inliner'\n\nmodule CSSInliner\n c... | ruby | chosen |
[
{
"from": "system",
"value": "Use same code for find_in and find_all_in\n"
},
{
"from": "human",
"value": "require \"name_finder/version\"\nrequire \"name_finder/node_proxy\"\n\nclass NameFinder\n def initialize(tree={})\n @tree = tree\n @root = NodeProxy.new(tree, delimiter)\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make helper methods both class and instance methods\n"
},
{
"from": "human",
"value": "module Nod\n # lib/nod/helpers.rb\n module Helpers\n\n def asset_exists?(name)\n Dir.new(Dir.pwd).each do |asset|\n return true if asset == name\n end\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Swap conditional args for consistency\n"
},
{
"from": "human",
"value": "module Owners\n # Accepts a single file and returns an array of OWNERS\n # files found when searching recursively up the directory\n # tree.\n #\n # @api private\n class Path\n CONFIG ... | ruby | chosen |
[
{
"from": "system",
"value": "Use polymorphic urls for default actions so they work properly when nested\n"
},
{
"from": "human",
"value": "module DisplayFor\n module Builder\n class CollectionBase < Base\n attr_reader :collection\n \n def initialize(resource_class, collection... | ruby | chosen |
[
{
"from": "system",
"value": "Add rspec color & remove backtrace with /rorr/\n"
},
{
"from": "human",
"value": "RSpec.configure do |config|\n config.backtrace_exclusion_patterns = [/lib/, /spec/]\nend\n"
},
{
"from": "gpt",
"value": "RSpec.configure do |config|\n config.backtrace_e... | ruby | chosen |
[
{
"from": "system",
"value": "Add `name` param for countries and remove unused Canadian params\n"
},
{
"from": "human",
"value": "require 'taxjar/base'\n\nmodule Taxjar\n class Rate < Taxjar::Base\n extend ModelAttribute\n\n attribute :zip, :string\n attribute :stat... | ruby | chosen |
[
{
"from": "system",
"value": "Clarify notes for helper method.\n"
},
{
"from": "human",
"value": "require \"analytics-js/version\"\nrequire \"analytics-js/engine\"\n\nmodule AnalyticsJs\n # Unfortunately Rails doesn't provide a helper for this. So this is it.\n # http://stackoverflow.com/q/759... | ruby | chosen |
[
{
"from": "system",
"value": "Set RUNTIME_FILTER_MODE only if asked\n"
},
{
"from": "human",
"value": "require 'facets/hash/revalue'\n\nmodule ConceptQL\n class Database\n attr :db, :opts\n\n def initialize(db, opts={})\n @db = db\n db_type = :impala\n if db\n extens... | ruby | chosen |
[
{
"from": "system",
"value": "Add of_user support to Time Entry\n"
},
{
"from": "human",
"value": "module Harvest\n class TimeEntry < BaseModel\n include HappyMapper\n \n tag 'day_entry'\n \n element :id, Integer\n element :client, String\n element :project, String\n ele... | ruby | chosen |
[
{
"from": "system",
"value": "Fix to react only when the message was a command\n"
},
{
"from": "human",
"value": "require 'docomoru'\n\nmodule Lita\n module Handlers\n class Talk < Handler\n\n config :docomo_api_key, type: String, required: true\n\n on :unhandled_message, :talk\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Rollback to CarrierWave 0.5.8 problem.\n"
},
{
"from": "human",
"value": "require 'active_support/concern'\nrequire 'carrierwave/mongoid'\nrequire 'media_magick/attachment_uploader'\nrequire 'mongoid'\n\nmodule CarrierWave\n module Uploader\n module Url\n e... | ruby | chosen |
[
{
"from": "system",
"value": "Move require statement to top of file\n"
},
{
"from": "human",
"value": "require 'rspec/core/formatters/base_formatter'\n\nclass MountainBerryFields\n class Test\n class RSpec\n class Formatter < ::RSpec::Core::Formatters::BaseFormatter\n def example... | ruby | chosen |
[
{
"from": "system",
"value": "Use double quotes and add missing escapes\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\n# Test to ensure bash isn't susceptible to Shellshock (CVE-2014-6271)\n\n# CVE-2014-6271\ndescribe command('env x='() { :;}; echo vulnerable' bash -c \"echo this is... | ruby | chosen |
[
{
"from": "system",
"value": "Make test description more accurate\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe GraphQL::EnumType do\n let(:enum) { DairyAnimalEnum }\n\n it 'coerces names to underlying values' do\n assert_equal(\"YAK\", enum.coerce_input(\"YAK\"))\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix broken spec on loopless array\n"
},
{
"from": "human",
"value": "describe LooplessArray do\n let(:list) { [1, 2] }\n let(:la) { LooplessArray.new(list) }\n\n describe 'new' do\n it 'takes an optional array' do\n expect(LooplessArray.new([1])[0]).to eq... | ruby | chosen |
[
{
"from": "system",
"value": "Add in dnsimple_token to the shared Fog call\n\nThis simulates passing in the token as a credential, but mind you all of\nthis is Mocked so it's not quite a real-world test, just a unit. :)\n"
},
{
"from": "human",
"value": "shared_context \"dnsimple\" do\n let(:ch... | ruby | chosen |
[
{
"from": "system",
"value": "Update R version for default\n"
},
{
"from": "human",
"value": "require \"minitest/autorun\"\nrequire \"minitest/reporters\"\nMinitest::Reporters.use! [Minitest::Reporters::JUnitReporter.new(reports_dir=\"/tmp/result/junit\")]\n\ndescribe 'check R version' do\n\n i... | ruby | chosen |
[
{
"from": "system",
"value": "Make send testscript more relevant.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\nrequire 'json'\nrequire 'bunny'\n\nconn = Bunny.new 'amqp://guest:guest@172.23.25.65:5672'\nconn.start\n\nch = conn.create_channel\ntqone = ch.queue(ARGV.first)\nx = ch.def... | ruby | chosen |
[
{
"from": "system",
"value": "Add dependency for py2app to work.\n"
},
{
"from": "human",
"value": "class YoutubeDlGui < Formula\n desc \"A cross platform front-end GUI of the popular youtube-dl.\"\n homepage \"https://github.com/MrS0m30n3/youtube-dl-gui\"\n url \"https://github.com/pr0d1r2/y... | ruby | chosen |
[
{
"from": "human",
"value": "Add rake task to strip prefixes from activity names\n"
},
{
"from": "gpt",
"value": "namespace :activities do\n desc 'Strip name prefixes like Sentence Writing: and Passage Proofreading: '\n task :strip_name_prefixes => :environment do\n prefixes = [\n 'Sen... | ruby | chosen |
[
{
"from": "system",
"value": "Make Pantography calls to Twitter API less frequent\n\nAvoid exceeding rate limit.\n"
},
{
"from": "human",
"value": "namespace :joegattnet do\n\n desc 'Tasks grouped by interval to avoid reloading environment'\n\n task one_minute: :environment do |t, args|\n E... | ruby | chosen |
[
{
"from": "system",
"value": "Add rspec and GLI gems"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'stack_master/version'\n\nGem::Specification.new do |spec|\n spec.name = \... | ruby | chosen |
[
{
"from": "system",
"value": "Put the rakudobrew steps into a fold\n"
},
{
"from": "human",
"value": "# Maintained by:\n# Paul Cochrane @paultcochrane paul@liekut.de\n\nmodule Travis\n module Build\n class Script\n class Perl6 < Script\n DEFAULTS = {\n perl6: 'lates... | ruby | chosen |
[
{
"from": "system",
"value": "Add source bridge to interface\n"
},
{
"from": "human",
"value": "#!/usr/bin/ruby\n#\n# :Author: Garry Dolley\n# :Date: 03-11-2014\n\nrequire 'rubygems'\nrequire 'nokogiri'\n\nXML_FILE_OLD=ARGV[0].to_s\nXML_FILE_NEW=ARGV[1].to_s\n\ndef usage\n puts \"./migrate-inte... | ruby | chosen |
[
{
"from": "human",
"value": "Correct start: Use the built-in RSS library & Iconv\n"
},
{
"from": "gpt",
"value": "require 'iconv'\nrequire 'sinatra'\nrequire 'rss/1.0'\nrequire 'rss/2.0'\nrequire 'open-uri'\n\n@@rss_url = \"http://feeds.pinboard.in/rss/u:evaryont/\"\nic = Iconv.new('UTF-8//IGNOR... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"fixed intellisms bug again\"\n\nThis reverts commit 6a7829dcab147602c3f2b439f8962e623afccffe.\n"
},
{
"from": "human",
"value": "class Sms::Adapters::IntelliSmsAdapter < Sms::Adapters::Adapter\n require 'open-uri'\n require 'uri'\n \n def service_name\n... | ruby | chosen |
[
{
"from": "system",
"value": "Update rails dependency to include rails > 3.1"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"tandem/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new ... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade Waterfox App to version 38.1.0\n"
},
{
"from": "human",
"value": "cask :v1 => 'waterfox' do\n version '36.0.1'\n sha256 '5fa1c8c402aab32e0cfc98b1c46e81265055cda51956f29ddd03c8fb7f1e33ae'\n\n # cloudfront.net is the official download host per the vendor ho... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for Spree 4.1+ plus this should be only available for paid orders\n"
},
{
"from": "human",
"value": "Deface::Override.new(\n virtual_path: 'spree/shared/_order_details',\n name: 'add_digital_downloads_to_invoice',\n insert_bottom: 'td[data-hook=\"order_item_d... | ruby | chosen |
[
{
"from": "human",
"value": "Add experimental json library benchmarks\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env ruby\n# frozen_string_literals: true\n\nrequire 'benchmark'\nrequire 'yajl'\nrequire 'oj'\n\nDEFAULT_ITERATIONS = 10_000\n\njson = if (( filename = ARGV.shift ))\n\t\tFile.read( ... | ruby | chosen |
[
{
"from": "human",
"value": "Add specs for unauthenticated responses"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\nRSpec.describe AuthenticatedController, type: :controller do\n describe \"GET index\" do\n context \"when engine is embedded\" do\n before { BookingSync::Engine.e... | ruby | chosen |
[
{
"from": "system",
"value": "Add packages for Debian Wheezy\n"
},
{
"from": "human",
"value": "\ndep_pkgs = %w[]\n\ncase node['platform']\nwhen 'debian'\n case node['platform_version'].to_i\n when 6\n dep_pkgs = %w[python-cairo python-django python-django-tagging python-flup python-memcach... | ruby | chosen |
[
{
"from": "human",
"value": "Add cask for Chromatic version 0.2.3\n"
},
{
"from": "gpt",
"value": "class Chromatic < Cask\n url 'http://download.mrgeckosmedia.com/Chromatic.zip'\n homepage 'https://mrgeckosmedia.com/applications/info/Chromatic'\n version '0.2.3'\n sha1 '5b28e43f89480d339a5f3... | ruby | chosen |
[
{
"from": "human",
"value": "Add Garmin Connect IQ SDK v1.1.4\n"
},
{
"from": "gpt",
"value": "cask :v1 => 'connectiq' do\n version '1.1.4'\n sha256 '9994f96668615ad7a5ce875b1db81475c240ffb9934cb16e822bd01e22c5d8c4'\n\n url \"http://developer.garmin.com/downloads/connect-iq/sdks/connectiq-sdk... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec's summary & description\n"
},
{
"from": "human",
"value": "lib = File.expand_path(\"../lib\", __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nGem::Specification.new do |s|\n s.name = \"xp\"\n s.version = \"2.0.0\"\n s.authors ... | ruby | chosen |
[
{
"from": "system",
"value": "Use engine routes in functional specs\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe BestBoy::EventsController, type: :controller do\n describe 'GET index' do\n it \"renders the template\" do\n get :index, { use_route: :best_boy }\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix customer_id in payload for loggin\n"
},
{
"from": "human",
"value": "# Copyright © Mapotempo, 2013-2014\n#\n# This file is part of Mapotempo.\n#\n# Mapotempo is free software. You can redistribute it and/or\n# modify since you respect the terms of the GNU Affero... | ruby | chosen |
[
{
"from": "system",
"value": "Fix redirect after login method."
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n protect_from_forgery\n\n before_filter :mailer_set_url_options\n\n def mailer_set_url_options\n ActionMailer::Base.default_url_options[:hos... | ruby | chosen |
[
{
"from": "system",
"value": "Update after sign up and sign in path\n"
},
{
"from": "human",
"value": "# The parent controller for all controllers\nclass ApplicationController < ActionController::Base\n protect_from_forgery with: :exception\n\n # render 404 pages\n def not_found\n raise Ac... | ruby | chosen |
[
{
"from": "human",
"value": "Add Wacom Graphire4 legacy drivers\n"
},
{
"from": "gpt",
"value": "cask :v1 => 'wacom-graphire4-tablet' do\n version '5.3.0-3'\n sha256 '0299398282cf86d56bd8f0701ef9c3140e901b8ea72ec6821a00871acdd25e76'\n\n url \"http://cdn.wacom.com/U/Drivers/Mac/Consumer/#{vers... | ruby | chosen |
[
{
"from": "human",
"value": "Create a folder to store helper methods for rspec\nCreated a module weather symbol\nadded method cloudy, sunny, partial_rainy, partial_cloudy\n"
},
{
"from": "gpt",
"value": "module Helpers\n module WeatherSymbol\n def sunny\n '\n \\ /\n -... | ruby | chosen |
[
{
"from": "system",
"value": "Create a helper to match regular expressions."
},
{
"from": "human",
"value": "module CustomHelpers\n\n def use_cassette(name, options = {})\n VCR.use_cassette(name, options) { yield }\n end\n\n def authorized_connection\n connection = SpBus::Connection.new... | ruby | chosen |
[
{
"from": "system",
"value": "Remove TODO at \"make -f Makefile.cvs\" invocation\n\nThere is no CMake-based module among the translated ones, so we won't be\nadding CMake support.\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire_relative \"command\"\nrequire_relative \"../yast_mod... | ruby | chosen |
[
{
"from": "system",
"value": "Add the ability to use a global content snipperts page.\n"
},
{
"from": "human",
"value": "Spree::BaseController.class_eval do\n\n before_filter :get_pages\n helper_method :current_page\n \n def current_page\n @page ||= Spree::Page.find_by_path(request.path)\... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Add dummy test for power hour\"\n\nThis reverts commit e1f82e117be009f4208fee0aa209c4db304e95aa.\n"
},
{
"from": "human",
"value": "require 'rails_helper'\nrequire 'net/http'\n\nRSpec.describe Api::DropsController, :vcr, type: :request do\n context 'with s... | ruby | chosen |
[
{
"from": "system",
"value": "Use raw SQL commands for 20140502125220 MigrateRepoSize\n\nPartial fix for #15210\n"
},
{
"from": "human",
"value": "class MigrateRepoSize < ActiveRecord::Migration\n def up\n Project.reset_column_information\n Project.find_each(batch_size: 500) do |project|\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix name listing in rake task\n"
},
{
"from": "human",
"value": "desc \"Removes users with suspicious names that indicate they were generated by bots\"\ntask :remove_bot_users, [:model] => :environment do\n puts \"Searching for suspected bot users\"\n\n suspected_... | ruby | chosen |
[
{
"from": "system",
"value": "Include module direclty even if spring is present\n"
},
{
"from": "human",
"value": "module ActsAsHavingStringId\n class Railtie < Rails::Railtie\n initializer \"railtie.include_in_application_record\" do\n if defined?(Spring)\n Spring.after_fork do\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix flash message for invalid credentials.\n\nfixes #52\n"
},
{
"from": "human",
"value": "class SessionsController < ApplicationController\n skip_before_filter :require_provider_authentication\n\n def new\n end\n\n def create\n if current_provider.valid_cred... | ruby | chosen |
[
{
"from": "system",
"value": "Use more precise variable and method names\n"
},
{
"from": "human",
"value": "module MultiJson\n module ConvertibleHashKeys\n private\n\n def symbolize_keys(object)\n prepare_object(object) do |key|\n key.respond_to?(:to_sym) ? key.to_sym : key\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec to reproduce FilterPraser.parse fails with multibyte char\n"
},
{
"from": "gpt",
"value": "# encoding: utf-8\nrequire 'spec_helper'\n\ndescribe Net::LDAP::Filter::FilterParser do\n\n describe \"#parse\" do\n context \"Given ASCIIs as filter string\" do\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add Swift version to Podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"FuntastyKit\"\n s.version = \"1.3.0\"\n s.summary = \"A collection of Swift utilities and protocols used in our projects.\"\n s.description = <<-DESC\n MVVM-C a... | ruby | chosen |
[
{
"from": "system",
"value": "Align {Transformer, Wrapper} for future de-duplication"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nmodule Substation\n module Processor\n\n # A processor that transforms output data into something else\n module Transformer\n\n # A transformer u... | ruby | chosen |
[
{
"from": "human",
"value": "Allow for versioned asset paths to get automatic cache busting of assets using a CDN that ignores querystrings\n"
},
{
"from": "gpt",
"value": "# A monkey-patch to AssetTagHelper that prepends a directory with the rails asset it \n# to asset paths as well as using an... | ruby | chosen |
[
{
"from": "system",
"value": "Add a \"real\" test for ?dice\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe Lita::Handlers::Diceman, lita_handler: true do\n\n it { is_expected.to route_command(\"!dice answer one;answer two\").to(:dice!) }\n it { is_expected.to route_... | ruby | chosen |
[
{
"from": "system",
"value": "Disable mailer tests due to ongoing configuration\n"
},
{
"from": "human",
"value": "require \"rails_helper\"\n\nRSpec.describe MemberMailer, :type => :mailer do\n describe \"notify\" do\n let(:member) { FactoryBot.create :member }\n let(:leader) { FactoryBot... | ruby | chosen |
[
{
"from": "system",
"value": "Remove useless test that behaves differently in different Rails versions\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nmodule ActiveModel\n class DefaultSerializer\n class Test < ActiveModel::TestCase\n def test_serialize_objects\n asse... | ruby | chosen |
[
{
"from": "human",
"value": "Handle upgraded projects with an old initializer with a nice warning.\n"
},
{
"from": "gpt",
"value": "module Compass\n module AppIntegration\n module Rails\n extend self\n def initialize!\n Compass::Util.compass_warn(\"WARNING: Please remove th... | ruby | chosen |
[
{
"from": "system",
"value": "Handle different names for nodejs executable\n\nSigned-off-by: Jesse Stuart <a5c95b3d7cb4d0ae05a15c79c79ab458dc2c8f9e@jessestuart.ca>\n"
},
{
"from": "human",
"value": "require 'es6-module-mapper/js_runner'\nrequire 'yajl'\n\nmodule ES6ModuleMapper\n class Transfor... | ruby | chosen |
[
{
"from": "human",
"value": "Add new exception handling methods\n"
},
{
"from": "gpt",
"value": "require 'action_dispatch/http/request'\nrequire 'action_dispatch/middleware/exception_wrapper'\n\n# Since we are taking over exception handling, make sure we log exceptions\n# https://github.com/rail... | ruby | chosen |
[
{
"from": "system",
"value": "Add versionomy and version nums\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'yesman/version'\n\nGem::Specification.new do |gem|\n gem.name... | ruby | chosen |
[
{
"from": "system",
"value": "Use wordsmith.org since dictionary.com no longer has RSS feed\n"
},
{
"from": "human",
"value": "require 'net/http'\nrequire 'uri'\nrequire 'rexml/document'\n\nmodule Lita\n module Handlers\n class Wotd < Handler\n route(/wotd/, :wotd, command: true, help: ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow multiple messages in log calls\n"
},
{
"from": "human",
"value": "module SecondMate\n\n class Finder\n \n attr_accessor :request, :root\n\n def initialize(root = '')\n @root = File.expand_path root\n end\n\n def call(env)\n @request =... | ruby | chosen |
[
{
"from": "system",
"value": "Update expectation syntax for wrapper specs\n"
},
{
"from": "human",
"value": "require 'fragmenter/wrapper'\n\ndescribe Fragmenter::Wrapper do\n let(:object) { double(:object, id: 1001) }\n let(:engine_class) { double(:engine_class, new: engine) }\n let(:en... | ruby | chosen |
[
{
"from": "system",
"value": "Allow stubs on nil, again. But just here.\n"
},
{
"from": "human",
"value": "require 'git_tracker/branch'\n\ndescribe GitTracker::Branch do\n subject { described_class }\n\n def stub_branch(ref, exit_status = 0)\n subject.stub(:`) { ref }\n $?.stub(:exitstat... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing require for pdfkit\n"
},
{
"from": "human",
"value": "# config/initializers/pdfkit.rb\nPDFKit.configure do |config|\n config.wkhtmltopdf = File.expand_path \"../../bin/wkhtmltopdf-linux-amd64\", __FILE__\n # config.default_options = {\n # :page_size... | ruby | chosen |
[
{
"from": "system",
"value": "Update the gemspec with the correct readme\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = \"toadhopper-sinatra\"\n s.version = \"0.3\"\n s.extra_rdoc_files = [\"Readme.md\"]\n s.summary = \"Post Hopt... | ruby | chosen |
[
{
"from": "system",
"value": "Update attr directly in db\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nmodule HumanID\n module Extension\n module Persistence\n class << self\n def assign!(human_id, model)\n if Generation.ready_to_generate?(model)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Set main scope for function calls\n"
},
{
"from": "human",
"value": "module RSpec::Puppet\n module FunctionExampleGroup\n include RSpec::Puppet::FunctionMatchers\n include RSpec::Puppet::ManifestMatchers\n include RSpec::Puppet::Support\n\n def subject\... | ruby | chosen |
[
{
"from": "system",
"value": "Add webmock and vcr to gemspec dev dependencies\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'tunefish/version'\n\nGem::Specification.new do |spec|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Improve message for property format linter\n\nChanges the lint error description for the property format linter to\nsuggest that the user is missing a semi-colon, as that usually is the\nreason they are seeing the lint, and the more general language of the\nerror can be confusi... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Ridley error when reading client_key\n"
},
{
"from": "human",
"value": "user_email = `git config --get user.email`\nhome_dir = ENV['HOME'] || ENV['HOMEDRIVE']\norg = ENV['CHEF_ORG'] || 'daptiv'\nknife_override = \"#{home_dir}/.chef/knife_ove... | ruby | chosen |
[
{
"from": "system",
"value": "Use class in describe for spec\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nmodule DbdDataEngine\n describe 'Resources' do\n describe 'GET /data/resources' do\n context 'routing' do\n it 'resources_path is correct' do\n dbd_da... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for customers API endpoint\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\nRSpec.describe 'Customers', type: :request do\n describe 'GET /customers' do\n it 'successful request' do\n get '/api/customers'\n expect(response).to have_ht... | ruby | chosen |
[
{
"from": "system",
"value": "Fix incorrect variable in search test\n"
},
{
"from": "human",
"value": "require 'yelp'\n\ndescribe Yelp::Client::Search do\n let(:keys) { Hash[consumer_key: ENV['YELP_CONSUMER_KEY'],\n consumer_secret: ENV['YELP_CONSUMER_SECRET'],\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add homepage url to Perian caveat to assist users in finding a replacement. (Perian is no longer maintained.)\n"
},
{
"from": "human",
"value": "cask :v1 => 'perian' do\n version '1.2.3'\n sha256 '4d1738104613ab4a7322637584ce7b851e4ef85888895360ad827a5f27c62e08'\n... | ruby | chosen |
[
{
"from": "human",
"value": "Add controller for blog author page\n"
},
{
"from": "gpt",
"value": "class Monologue::AuthorPostsController < Monologue::ApplicationController\n\n\tdef index\n\t\t@user = Monologue::User.find(params[:user_id])\n @posts = @user.posts.page(@page).includes(:user).pub... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo: CoruseUser -> CourseUser\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n# Allows querying of group managers of users in a given collection without generating N+1 queries.\nclass Course::GroupManagerPreloadService\n # Sets the collecti... | ruby | chosen |
[
{
"from": "system",
"value": "Add basic tests for cloud spec\n"
},
{
"from": "human",
"value": "require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))\n\ndescribe Cabinet::Cloud do\n before(:all) do\n credentials = YAML.load_file(File.expand_path(File.join(File.di... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a change in Guard::UI api\n"
},
{
"from": "human",
"value": "module Guard\n class Guard\n def info(msg, options = {})\n ui :info, msg, options\n end\n\n def error(msg, options = {})\n ui :error, msg, options\n end\n\n def debug(msg, opt... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.