conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Update Podpsec with new repo name\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"RQVisual\"\n s.version = \"0.0.1\"\n s.summary = \"A tool for laying out views in code.\"\n\n s.description = <<-DESC\n V...
ruby
chosen
[ { "from": "system", "value": "Add comment to document `oauth_dance_id`\n" }, { "from": "human", "value": "module Identity\n module LogHelpers\n def log(action, data={}, &block)\n data.merge! app: \"identity\", request_id: request_ids\n data.merge! oauth_dance_id: @oauth_dance_id if...
ruby
chosen
[ { "from": "system", "value": "Update alias spec error message expectation for PUP-7371\n\nThe fix for PUP-7371 adds the missing `Undef` into the error message\nbeing tested in type aliases specs, fixing the following failure against\nPuppet's master branch:\n\n test::string rejects other values [] should...
ruby
chosen
[ { "from": "system", "value": "Update to conform to ABC metric cop\n" }, { "from": "human", "value": "require 'openssl'\n\nFactoryGirl.define do\n subject = \"CN=#{Faker::Lorem.word}/DC=#{Faker::Lorem.word}\"\n issuer = \"CN=#{Faker::Lorem.word}/DC=#{Faker::Lorem.word}\"\n trait :base_key_info...
ruby
chosen
[ { "from": "system", "value": "Add connection for compute service.\n" }, { "from": "human", "value": "\n\nRSpec.configure do |config|\n \n # Create a new Storage service connection - maybe memoize later\n def storage_connection(user = :primary)\n if user == :primary\n Fog::Storage.new(...
ruby
chosen
[ { "from": "system", "value": "Remove code related to actionmailer version not supported anymore\n" }, { "from": "human", "value": "class TestMailer < ActionMailer::Base\n # template root must be set for multipart emails, or ActionMailer will throw an exception.\n if ActionMailer::VERSION::MAJO...
ruby
chosen
[ { "from": "human", "value": "Create incoming projects for companies.\n" }, { "from": "gpt", "value": "class CreateIncomingEmailProjectsForCompanies < ActiveRecord::Migration\n \n def change\n Company.find_each do |company|\n unless company.preference('incoming_email_project').present?\...
ruby
chosen
[ { "from": "system", "value": "Fix Nokogiri parser processing xml entity encoded characters\n" }, { "from": "human", "value": "require \"nokogiri\"\n\nclass Nori\n module Parser\n\n # = Nori::Parser::Nokogiri\n #\n # Nokogiri SAX parser.\n module Nokogiri\n\n class Document < ::...
ruby
chosen
[ { "from": "system", "value": "Add a task to gracefully restart workers using god\n" }, { "from": "human", "value": "module RPCapistrano\n module Resque\n def self.load_into(configuration)\n configuration.load do\n after 'deploy:restart', 'rp:resque:load_god_config'\n after...
ruby
chosen
[ { "from": "system", "value": "[Sass] Convert Sass::Script::Variable docs to YARD.\n" }, { "from": "human", "value": "module Sass\n module Script\n class Variable # :nodoc:\n attr_reader :name\n\n def initialize(name)\n @name = name\n end\n\n def inspect\n \"...
ruby
chosen
[ { "from": "system", "value": "Add support in perl, python, ruby drivers for per-session extension Javascript.\n\ngit-svn-id: 02f00ad323e9b09c2b4a77fafb42ebb04c4508ab@2295 0891141a-5dea-0310-ad27-ebc607f31677\n" }, { "from": "human", "value": "# Copyright 2006 ThoughtWorks, Inc\n#\n# Licensed un...
ruby
chosen
[ { "from": "system", "value": "Update gir_ffi to version 0.15.1" }, { "from": "human", "value": "# frozen_string_literal: true\n\nGem::Specification.new do |s|\n s.name = 'gir_ffi-gnome_keyring'\n s.version = '0.0.10'\n\n s.summary = 'GirFFI-based binding to GnomeKeyring'\n s.description = 'B...
ruby
chosen
[ { "from": "system", "value": "Add more paths to config file\n" }, { "from": "human", "value": "require 'yaml'\n\nmodule PKGConfig\n class NoConfig < Exception; end\n class NoVariables < Exception; end\n\n def load_config(file, pkg_variables)\n config = YAML.load_file(file)\n\n pkg_varia...
ruby
chosen
[ { "from": "system", "value": "Add rake task to regenerate all the content image versions.\n" }, { "from": "human", "value": "require File.join(Udongo::PATH, 'lib/tasks/task_extras.rb')\n\nnamespace :udongo do\n include TaskExtras\n\n namespace :sortable do\n desc 'Generates new positions fo...
ruby
chosen
[ { "from": "system", "value": "Set cookie expiry to 1 day in the past to ensure deletion\n" }, { "from": "human", "value": "module TestWrangler\n module Helper\n BLANK_SELECTION = HashWithIndifferentAccess.new({cohort: nil, experiment: nil, variant: nil})\n \n def test_wrangler_selectio...
ruby
chosen
[ { "from": "human", "value": "Add test example experiment for defApplication and addApplication\n" }, { "from": "gpt", "value": "#\n# Test 7\n#\n# Testing one node in one group running two instance of the same app, previously defined with defApplication\n#\n\ndefProperty('res1', \"unconfigured-no...
ruby
chosen
[ { "from": "system", "value": "[gemspec] Add homepage and requirement for capybara\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'handy_feature_helpers/version'\n\nGem::Specification...
ruby
chosen
[ { "from": "system", "value": "Return the count without fetching all pages.\n\nProperly adhere the Enumerable#count interface.\nProvide Collection#length alias for #size.\n" }, { "from": "human", "value": "module BreweryDB\n class Collection\n include Enumerable\n\n BATCH_SIZE = 50\n at...
ruby
chosen
[ { "from": "system", "value": "Change route to share application\n" }, { "from": "human", "value": "#module CatarseStripe\n #class Engine < ::Rails::Engine\n #isolate_namespace CatarseStripe\n #end\n#end\nmodule ActionDispatch::Routing\n class Mapper\n def mount_catarse_stripe_at(catarse...
ruby
chosen
[ { "from": "human", "value": "Create unit test to java interface model builder.\n" }, { "from": "gpt", "value": "require 'test/unit'\nrequire 'logging'\nrequire File.expand_path '../../../../../test_helper.rb', __FILE__\nrequire File.expand_path '../../../../../../lib/configuration/app_logger.rb'...
ruby
chosen
[ { "from": "system", "value": "Update PHPUnit documentation (5.5, 4.8)\n" }, { "from": "human", "value": "module Docs\n class Phpunit < UrlScraper\n self.name = 'PHPUnit'\n self.type = 'phpunit'\n self.root_path = 'index.html'\n self.links = {\n home: 'https://phpunit.de/',\n ...
ruby
chosen
[ { "from": "system", "value": "Add simple game loop with no error checking\n" }, { "from": "human", "value": "module Checkers\nend\n" }, { "from": "gpt", "value": "require_relative \"./board\"\n\nmodule Checkers\n class Game\n INPUT_MAP = {\n \"1\" => 0, \"2\" => 1, \"3\" => ...
ruby
chosen
[ { "from": "system", "value": "Fix the video settings title in lesson plan\n" }, { "from": "human", "value": "json.partial! 'course/lesson_plan/items/item.json.jbuilder', item: item\n\njson.item_path course_videos_path(current_course)\njson.description item.description\njson.edit_path edit_course...
ruby
chosen
[ { "from": "system", "value": "Use require_relative instead of File.expand_path\n" }, { "from": "human", "value": "require \"judopay/version\"\nrequire File.expand_path('../judopay/api', __FILE__)\nrequire File.expand_path('../judopay/payment', __FILE__)\nrequire File.expand_path('../judopay/tran...
ruby
chosen
[ { "from": "system", "value": "Add alias method to start game\n\n* after testing in irb, the first thing I wrote was start game. So...\n" }, { "from": "human", "value": "require 'kenny_g/quick_game_setup'\nrequire 'kenny_g/game_setup'\n\nmodule KennyG\n class << self\n def setup_game(game_par...
ruby
chosen
[ { "from": "system", "value": "Swap module definition and require lines.\n" }, { "from": "human", "value": "require 'uri'\nrequire 'json'\nrequire 'faraday'\n\nrequire 'todoist/http'\nrequire 'todoist/configuration'\n\nrequire 'todoist/base'\nrequire 'todoist/project'\nrequire 'todoist/item'\nreq...
ruby
chosen
[ { "from": "system", "value": "Rewrite post test for ssl keys saving task\n\nChange-Id: I4fa25b87c4a5f31a92a266c3b31fba6698f13807\nCloses-Bug: #1523465\n" }, { "from": "human", "value": "require File.join File.dirname(__FILE__), '../test_common.rb'\n\nclass SslKeysSavingPostTest < Test::Unit::Tes...
ruby
chosen
[ { "from": "human", "value": "Fix nil organisations for HtmlPublicationPresenter\n\nSome HtmlPublication were provoking an error on government frontend due to nil organisations for the attachment attachable.\n\nWe are fixing this adding an organisation to the attachable which\nhas no one, selecting it from t...
ruby
chosen
[ { "from": "human", "value": "Move Entry Date & Time query tool field migration to core.\n" }, { "from": "gpt", "value": "class AddEntryDateAndTimeToQueryTool < ActiveRecord::DataMigration\n def up\n qf = QueryField.find_or_create_by(\n name: 'updated_at',\n label: 'Entry Date &...
ruby
chosen
[ { "from": "system", "value": "Update framework file name in podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n\n s.name = 'Tangram-es'\n s.version = '0.14.1'\n\n s.summary = 'Open source C++ library for rendering 2D and 3D maps from vector data using OpenGL ES.'\n ...
ruby
chosen
[ { "from": "system", "value": "Fix executables dir in gemspec and add new author\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'logr/version'\n\nGem::Specification.new do |spec|\n s...
ruby
chosen
[ { "from": "human", "value": "Add an update path for entities\n" }, { "from": "gpt", "value": "module Fog\n module Monitoring\n class Rackspace\n class Real\n\n def update_entity(entity_id, options = {})\n data = {}\n data['label'] = options['label']\n d...
ruby
chosen
[ { "from": "system", "value": "Change a port number in the specs to avoid a potential conflict\n" }, { "from": "human", "value": "# encoding: utf-8\nrequire 'helper'\nrequire 'json'\nrequire 'memcached_mock'\n\ndescribe 'Serializer' do\n\n it 'default to Marshal' do\n memcached(29198) do |dc|...
ruby
chosen
[ { "from": "system", "value": "Add do_not_validate_attachment_file_type to dummy Photo model to keep newer Paperclip from raising errors since we don't validate the attachment\n" }, { "from": "human", "value": "class Photo < ActiveRecord::Base\n has_dynamic_attached_file :image, styles: { thumb:...
ruby
chosen
[ { "from": "system", "value": "Move Oid filtering logic into KnownDevice." }, { "from": "human", "value": "class DeviceOidLookup\n include java.lang.Runnable\n def initialize known_device, local_device\n @device = known_device\n @local_device = local_device\n end\n def run\n begin\n ...
ruby
chosen
[ { "from": "system", "value": "Add cucumber as a development dependency.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'gitnesse/version'\n\nGem::Specification.new do |gem|...
ruby
chosen
[ { "from": "system", "value": "Use raw SQL instead of Rails models in 20130403003950 migration\n\nCloses gitlab-org/gitlab-development-kit#109\n\nCloses https://github.com/gitlabhq/gitlabhq/issues/10123\n" }, { "from": "human", "value": "class AddLastActivityColumnIntoProject < ActiveRecord::Migr...
ruby
chosen
[ { "from": "system", "value": "Fix checksum in Vivaldi Cask" }, { "from": "human", "value": "cask :v1 => 'vivaldi' do\n version '1.0.83.38'\n sha256 '84153229b9d59561c9d6f570aa77875ed8b410ff43d2b4298167a0dc300b2a59'\n\n url \"http://vivaldi.com/download/Vivaldi_TP_#{version}.dmg\"\n name 'Viv...
ruby
chosen
[ { "from": "system", "value": "Update db model to match build_db.rb\n" }, { "from": "human", "value": "class Package\n include DataMapper::Resource\n property :id, Serial\n property :category, String\n property :packagename, String\n property :versions, String\n property :keywords, String\n...
ruby
chosen
[ { "from": "system", "value": "Set the value from the coins cache\n" }, { "from": "human", "value": "class SetValueAsEarnableCoins < ActiveRecord::Migration\n def change\n Wip.find_each do |wip|\n begin\n wip.value = wip.respond_to?(:contracts) && wip.contracts.earnable_cents.to_i...
ruby
chosen
[ { "from": "human", "value": "Add migration that renames tracks -> enclosures, track_like -> enclosure_like, entry_track -> entry_enclosure\n" }, { "from": "gpt", "value": "class RenameTracksToEnclosures < ActiveRecord::Migration[5.0]\n def change\n rename_table :tracks , :enclosures\n ...
ruby
chosen
[ { "from": "system", "value": "Fix interface on configure method. [bug]\n" }, { "from": "human", "value": "module DotOpts\n require 'dotopts/parser'\n\n #\n CONFIG_FILE = '.options'\n\n # Configure\n def self.configure!(config_file)\n if config_file = config_file || config_file()\n t...
ruby
chosen
[ { "from": "system", "value": "Use the correct table name\n" }, { "from": "human", "value": "require \"email_trail/version\"\nrequire \"email_trail/railtie\" if defined?(Rails::Railtie)\n\nmodule EmailTrail\n class Base\n\n def self.delivering_email(message)\n EmailTrailMessage.create(\n...
ruby
chosen
[ { "from": "system", "value": "Prepend the root route instead of appending it\n\nBy prepending the /erd route instead of appending it we can simply give this route the highest priority.\r\nThat way it won't get overridden by other, more generic route definitions.\r\n\r\nfix #25" }, { "from": "human",...
ruby
chosen
[ { "from": "system", "value": "Fix more typos about the encryption protocol.\n" }, { "from": "human", "value": "module GitHub\n class Ldap\n require 'net/ldap'\n require 'github/ldap/domain'\n\n def initialize(options = {})\n @uid = options[:uid] || \"sAMAccountName\"\n\n @con...
ruby
chosen
[ { "from": "system", "value": "Fix payment sample card for 2015\n\nFixes #5845\n" }, { "from": "human", "value": "# create payments based on the totals since they can't be known in YAML (quantities are random)\nmethod = Spree::PaymentMethod.where(:name => 'Credit Card', :active => true).first\n\n...
ruby
chosen
[ { "from": "system", "value": "Add summary, description and homepage 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 'pry-power_assert/version'\n\nGem::Specification.new do ...
ruby
chosen
[ { "from": "human", "value": "Add tests for kernel modules\n" }, { "from": "gpt", "value": "Specinfra::Runner.run_command('modprobe snd_bcm2835')\nSpecinfra::Runner.run_command('modprobe bcm2835_rng')\n\ndescribe kernel_module('snd_bcm2835') do\n it { should be_loaded }\nend\n\ndescribe kernel_m...
ruby
chosen
[ { "from": "system", "value": "Fix postgres build after e2ba584 by fixing ilegal use of SQL's \"GROUP BY\"\n" }, { "from": "human", "value": "# Before the 'notify' permission was added, only users with the first relation in each group where notified by email\n# This migration preserves the old be...
ruby
chosen
[ { "from": "system", "value": "Add hack to recognize perl5 test suite\n" }, { "from": "human", "value": "module ExercismWeb\n module Routes\n class Metadata < Core\n get '/exercises/:language/:slug' do |language, slug|\n _, response = Xapi.get(\"problems\", language, slug)\n ...
ruby
chosen
[ { "from": "system", "value": "Remove espaços em branco e comentários\n" }, { "from": "human", "value": "require \"postmon_cli/version\"\nrequire \"postmon_cli/wrapper\"\n\nmodule PostmonCli\n # Your code goes here...\nend\n" }, { "from": "gpt", "value": "require \"postmon_cli/versio...
ruby
chosen
[ { "from": "system", "value": "Fix detecting extra args that don't have a left-hand/right-hand side\n" }, { "from": "human", "value": "require 'English'\nrequire 'thor'\n\nmodule Psychic\n class CLI < Thor\n BUILT_IN_TASKS = %w(bootstrap)\n\n class << self\n # Override Thor's start to...
ruby
chosen
[ { "from": "system", "value": "Handle occasional command error when discarding a transaction.\n\nThere seems to be a bug in the Redis client, where a multi may return without\nsuccessfully executing the call. Only appears to happen when redis is\npersisting.\n" }, { "from": "human", "value": "req...
ruby
chosen
[ { "from": "system", "value": "Use tracker code in Root\n" }, { "from": "human", "value": "require 'backports/2.1.0/enumerable/to_h'\n\nmodule DeepCover\n class AstRoot\n attr_reader :file_coverage, :nb\n\n def initialize(file_coverage)\n @file_coverage = file_coverage\n @nb = fi...
ruby
chosen
[ { "from": "human", "value": "Add basic test for short track\n" }, { "from": "gpt", "value": "require \"test_helper\"\n\nmodule Competitions\n # :stopdoc:\n class PortlandShortTrackSeriesTest < ActiveSupport::TestCase\n test \"calculate\" do\n PortlandShortTrackSeries::Overall.calculate...
ruby
chosen
[ { "from": "system", "value": "Raise error unless we get a 201 - Created response\n" }, { "from": "human", "value": "require 'multi_json'\n\nmodule StackDriver\n POST_URI = \"https://custom-gateway.stackdriver.com/v1/custom\"\n \n def self.init customer_id, api_key\n @customer_id = customer...
ruby
chosen
[ { "from": "system", "value": "Add books_by_creator doc region for book querying in 4-auth\n" }, { "from": "human", "value": "# Copyright 2015, Google, Inc.\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# ...
ruby
chosen
[ { "from": "system", "value": "Fix the cleanup of cached gems\n\nMake sure we expand the path first so this works\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "from": "human", "value": "#\n# Copyright:: Copyright (c) Chef Software Inc.\n# License:: Apache...
ruby
chosen
[ { "from": "human", "value": "Create test for `Crawler` class\n" }, { "from": "gpt", "value": "require 'test_helper'\n\nclass ProviderMock\n include Celluloid\n def load_events; end\nend\n\nclass CrawlerTest < ActiveSupport::TestCase\n test '#initialize' do\n mock = ProviderMock.new\n cr...
ruby
chosen
[ { "from": "system", "value": "Fix compatibility issue for sidekiq v6.1.0+\n\nSince v6.1.0 Sidekiq::BasicFetcher doesn't support class-level method\nbulk_requeue. See https://github.com/mperham/sidekiq/pull/4602 for details.\n\nFor backwards compatibility we should support both interfaces\ndepending on class...
ruby
chosen
[ { "from": "system", "value": "Use blank object as a missing translation so that it is unique.\n" }, { "from": "human", "value": "module SmartTitles\n module Helper\n MISSING_TRANSLATION = 0\n\n # <title><%= head_title %></title>\n # Will return title if it was set for the current page....
ruby
chosen
[ { "from": "system", "value": "Use layout and better message for not authorized page\n" }, { "from": "human", "value": "require \"godmin/authorization/policy\"\nrequire \"godmin/authorization/policy_finder\"\n\nmodule Godmin\n module Authorization\n extend ActiveSupport::Concern\n\n includ...
ruby
chosen
[ { "from": "system", "value": "Use 'attr_reader' in Gravatar API\n" }, { "from": "human", "value": "module Looks\n module Gravatar\n class Image\n include Comparable\n\n def self.new_from_addresses(value)\n id = value['userimage']\n\n if not id.empty?\n url ...
ruby
chosen
[ { "from": "system", "value": "Update platform-api requirement from ~> 2.0.0 to >= 2.0, < 2.3\n\nUpdates the requirements on [platform-api](https://github.com/heroku/platform-api) to permit the latest version.\n- [Release notes](https://github.com/heroku/platform-api/releases)\n- [Commits](https://github.com...
ruby
chosen
[ { "from": "system", "value": "Fix thread dump on TRAP signal\n" }, { "from": "human", "value": "require \"ostruct\"\nrequire \"thread\"\n\nrequire \"protobuf/nats\"\n\nmodule Protobuf\n module Nats\n class Runner\n\n def initialize(options)\n @options = case\n w...
ruby
chosen
[ { "from": "system", "value": "Move event logging to debug\n" }, { "from": "human", "value": "#\n# Simple SQS\n#\n# This is used to process SQS notifications\n#\nrequire 'logger'\n\nclass SimpleSqs::Processor\n def process_sqs_message sqs_message\n if Object.const_defined?(\"ActiveRecord\")\n...
ruby
chosen
[ { "from": "human", "value": "Write up acceptance spec for image/show\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe 'image show page controls', :type => :feature do\n before(:each) do\n @you = create(:user)\n login_as(@you, :scope => :user)\n upload_test_file\n l...
ruby
chosen
[ { "from": "human", "value": "Add a spec for encoding and decoding a message\n" }, { "from": "gpt", "value": "describe Kafka::Protocol::Message do\n it \"encodes and decodes messages\" do\n message = Kafka::Protocol::Message.new(\n value: \"yolo\",\n key: \"xx\",\n )\n\n io = ...
ruby
chosen
[ { "from": "system", "value": "Create an idea owner for Tag view specs\n\nCreate a user record to act as the owner of ideas belonging to the tag\nrecords.\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe \"TagViews\" do\n before(:each) do\n @tag1 = create(:tag, name: \"tag...
ruby
chosen
[ { "from": "system", "value": "Isolate global state (env vars) for a mailer configuration test, by running it in a separated process\n" }, { "from": "human", "value": "RSpec.describe \"Components: mailer.configuration\", type: :cli do\n context \"with hanami-mailer\" do\n it \"resolves mailer...
ruby
chosen
[ { "from": "human", "value": "Add feature spec to cover deleting a challenge\n" }, { "from": "gpt", "value": "require \"spec_helper\"\n\nfeature \"Deleting a challenege\" do\n include OmniAuthHelper\n\n before(:each) do\n mock_omni_auth\n end\n\n scenario \"as the owner of the challenge\" ...
ruby
chosen
[ { "from": "system", "value": "Call original on event_register spec\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Webhook::EventRegister do\n let(:record) { FactoryGirl.create(:user) }\n\n describe '#type' do\n it 'returns the model name with the event type as created'...
ruby
chosen
[ { "from": "system", "value": "Create tests for valid and invalid authentication\n" }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe \"Authentication\" do\n\n subject { page }\n\n describe \"signin page\" do\n before { visit signin_path }\n\n it { should have_content('Si...
ruby
chosen
[ { "from": "system", "value": "Add assertion to confirm token presence\n" }, { "from": "human", "value": "describe Travis::API::V3::Services::Preference::Update, set_app: true do\n let(:user) { Travis::API::V3::Models::User.create!(name: 'svenfuchs') }\n let(:token) { Travis::Api::App::AccessTo...
ruby
chosen
[ { "from": "system", "value": "Use density instead of normed\n" }, { "from": "human", "value": "require 'pycall/import'\ninclude PyCall::Import\n\npyimport 'numpy', as: 'np'\n\n# FIXME: MacOSX backend is not usable through pycall. I want to fix this issue but the reason is unclear.\npyimport 'ma...
ruby
chosen
[ { "from": "human", "value": "Add gps 2.3 - second go around\n" }, { "from": "gpt", "value": "# Your Names\n# 1)\n# 2)\n\n# We spent [#] hours on this challenge.\n\n# Bakery Serving Size portion calculator.\n\ndef serving_size_calc(item_to_make, num_of_ingredients)\n library = {\"cookie\" => 1, ...
ruby
chosen
[ { "from": "human", "value": "Convert html report integration test to RSpec\n" }, { "from": "gpt", "value": "require 'spec_helper'\nrequire './features/step_definitions/testing_dsl'\n\ndescribe \"HTML report\" do\n # As a non-technical application product owner\n # I want license finder to gene...
ruby
chosen
[ { "from": "system", "value": "Change TODO to point to the COLLATE NOCASE issue\n" }, { "from": "human", "value": "require 'db_text_search/case_insensitive_string_finder/adapter'\nmodule DbTextSearch\n class CaseInsensitiveStringFinder\n class CollateNocaseAdapter < Adapter\n # (see Adap...
ruby
chosen
[ { "from": "system", "value": "Fix Dirty Work B&R link\n" }, { "from": "human", "value": "BanList.for_format(\"custom standard\") do\n change(\n \"2017-06-27\",\n nil,\n \"Dreamheart Mox\" => \"banned\",\n )\n\n change(\n \"2017-12-15\",\n nil,\n \"Reev, Equinox Prophet\" => ...
ruby
chosen
[ { "from": "system", "value": "Add rspec as a development dependency\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"moby/version\"\n\nGem::Specification.new do |s|\n s.name = \"moby\"\n s.version = Moby::VERSION...
ruby
chosen
[ { "from": "system", "value": "Remove unncessary before hook from example.\n\n- Closes #348\n" }, { "from": "human", "value": "require \"spec_helper\"\nrequire \"autotest/rails_rspec2\"\n\ndescribe Autotest::RailsRspec2 do\n\n let(:rails_rspec2_autotest) { Autotest::RailsRspec2.new }\n\n descri...
ruby
chosen
[ { "from": "system", "value": "Add validation for action section field\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Checklists::Action do\n describe '#applicable_criteria?' do\n subject do\n described_class.new(\n 'applicable_criteria' => applicable_criteri...
ruby
chosen
[ { "from": "system", "value": "Add FakeWeb.clean_registry for right use of FakeWeb\n" }, { "from": "human", "value": "require 'spec_helper'\nrequire 'pavlov_rss'\nrequire 'fake_web'\n\ndescribe PavlovRss::Reader do\n\tdescribe \"#fetch\" do\n\t\tbefore :each do \n FakeWeb.register_uri(:get, ...
ruby
chosen
[ { "from": "system", "value": "Add basic test for !dice\n" }, { "from": "human", "value": "require \"spec_helper\"\n\ndescribe Lita::Handlers::Diceman, lita_handler: true do\nend\n" }, { "from": "gpt", "value": "require \"spec_helper\"\n\ndescribe Lita::Handlers::Diceman, lita_handler...
ruby
chosen
[ { "from": "system", "value": "Remove the test for my last commit" }, { "from": "human", "value": "require \"rails_helper\"\n\nRSpec.describe Talk, type: :model do\n it { is_expected.to belong_to :event }\n it { is_expected.to belong_to :member }\n\n describe \"attributes validation\" do\n ...
ruby
chosen
[ { "from": "system", "value": "Remove deprecation messages on factory_girl\n" }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.describe User do\n it '#push works' do\n FakeWeb.register_uri(\n :post,\n %r{/shards$},\n content_type: 'application/json',\n body:...
ruby
chosen
[ { "from": "system", "value": "Add support for named header expectations\n" }, { "from": "human", "value": "module TentValidator\n class ResponseExpectation\n\n class HeaderValidator < BaseValidator\n def validate(response)\n response_headers = response.env.response_headers\n ...
ruby
chosen
[ { "from": "system", "value": "Fix error when running ./bin/setup with Rails 5.0.0.1\n\nWhen trying to set up development environment via `./bin/setup` using\na new RVM gemset with Ruby 2.3.0 and Rails 5.0.0.1, the\nfollowing error occures:\n\n```\nResolving dependencies...\nThe Gemfile's dependencies are sa...
ruby
chosen
[ { "from": "system", "value": "Add gem Ruby version requirement\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 = 'pingboard'\n s.version = '0.0.1'\n ...
ruby
chosen
[ { "from": "system", "value": "Refactor: Update tests for 'Molecule' to the new format\n\n--------------------------------------------------------------------------------\nBranch: refactor/massive-update\nSigned-off-by: Jeff Felchner <8a84c204e2d4c387d61d20f7892a2bbbf0bc8ae8@thekompanee.com>\n" }, ...
ruby
chosen
[ { "from": "system", "value": "Isolate another spec's config file\n\nSharing configs across tests suffers from another shared state problem\nwhere the config incorporates access/refresh token caching so an access\ntoken is cached with sanitised values \"<TOKEN>\" and used to replay and\nfailing.\n\nSeems the...
ruby
chosen
[ { "from": "system", "value": "Fix for warning on install - The validation message from Rubygems was: authors may not be empty" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s.name = 'spree_postal_service'\n s.version = '0.0.2'...
ruby
chosen
[ { "from": "system", "value": "Allow mw server reports work with mw_server_eap and mw_server_wildfly\n" }, { "from": "human", "value": "module ManageIQ::Providers\n class Hawkular::MiddlewareManager::MiddlewareServer < MiddlewareServer\n AVAIL_TYPE_ID = 'Server%20Availability~Server%20Availab...
ruby
chosen
[ { "from": "human", "value": "Remove all previous ways of linking things. part of OBE-105\n" }, { "from": "gpt", "value": "class RemoveLinksThroughHasMany < ActiveRecord::Migration\n def self.up\n drop_table \"script_lists\"\n drop_table \"survey_lists\"\n drop_table \"survey_to_script...
ruby
chosen
[ { "from": "system", "value": "Increase error rate in example app\n" }, { "from": "human", "value": "require 'pry'\nrequire 'aws-xray'\n\nuse Aws::Xray::Rack, name: 'campain-app'\n\nrun Proc.new {|env|\n if rand(0..5) == 0\n ['500', {'Content-Type' => 'text/plain'}, ['-1']]\n else\n ['200...
ruby
chosen
[ { "from": "system", "value": "Tweak EmbeddedFormRenderer API a little\n\nMake the container a single, positional parameter, followed by a splat of options.\n" }, { "from": "human", "value": "module Formalist\n module RichText\n module Rendering\n class EmbeddedFormRenderer\n attr...
ruby
chosen
[ { "from": "system", "value": "Use \"mystery man\" if there's no Gravatar image\n\nUse a simple (not distracting) \"mystery man\" image if there's\nno gravatar image for a given user.\n\nSigned-off-by: David A. Wheeler <9ae72d22d8b894b865a7a496af4fab6320e6abb2@dwheeler.com>\n" }, { "from": "human", ...
ruby
chosen
[ { "from": "system", "value": "Remove explicit requiring of campaign id for links\n" }, { "from": "human", "value": "class CampaignLink < ActiveRecord::Base\n belongs_to :campaign\n\n validates :title, length: { maximum: 77 }\n validates :campaign_id, presence: true\nend\n" }, { "from"...
ruby
chosen
[ { "from": "system", "value": "Fix error when trying to update user profile\n" }, { "from": "human", "value": "class UserPolicy < Struct.new(:current_user, :target_user)\n def update?\n target_user == current_user || Role.user_is_at_least_a?(user, :admin)\n end\n\n def destroy?\n target_...
ruby
chosen
[ { "from": "system", "value": "Fix `url` stanza comment for Avira Antivirus.\n" }, { "from": "human", "value": "cask 'avira-antivirus' do\n version :latest\n sha256 :no_check\n\n url 'https://install.avira-update.com/package/wks_avira/osx/int/pecl/Avira_Free_Antivirus_for_Mac.pkg'\n name 'Avi...
ruby
chosen