conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add additional acceptable license strings\n\nFixes #1585\n\nSigned-off-by: Nathen Harvey <f3cabdeba0e84594589839e3e1ff17618f7c11d9@chef.io>\n" }, { "from": "human", "value": "require 'sidekiq'\nrequire 'net/http'\n\nclass LicenseWorker\n include ::Sidekiq::Worker\n...
ruby
chosen
[ { "from": "system", "value": "Swap out .configure! for .available?, and use alias_method\n" }, { "from": "human", "value": "module Webhookr\n class Service\n attr_reader :service_name\n\n def initialize(service_name, options = Hash.new(\"\"))\n @service_name = service_name || \"\"\n ...
ruby
chosen
[ { "from": "human", "value": "Swap content for locale and debs tests\n\npart 2\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe file('/etc/apt/sources.list') do\n\tit { should be_file }\n\tit { should contain \"deb http://archive.ubuntu.com/ubuntu trusty main\" }\n it { should ...
ruby
chosen
[ { "from": "system", "value": "Test image counts on user profiles\n" }, { "from": "human", "value": "require 'spec_helper'\n\ninclude UploadHelper\n\ndescribe 'correct routing to profile', :type => :feature do\n it 'will load the profile at the correct path' do\n user = create(:user)\n vis...
ruby
chosen
[ { "from": "system", "value": "Fix access to default system.\n" }, { "from": "human", "value": "require 'set'\nrequire 'time'\n\nmodule Finitio\n\n DSL_METHODS = [\n :attribute,\n :heading,\n :constraints,\n :any,\n :builtin,\n :adt,\n :subtype,\n :union,\n :seq,\n ...
ruby
chosen
[ { "from": "system", "value": "Remove extra true value from connection_established method in ApiRequester class\n" }, { "from": "human", "value": "require 'httparty'\n\nmodule CodeclimateCi\n class ApiRequester\n include HTTParty\n CODECLIMATE_URI = 'https://codeclimate.com/api/repos'\n\n...
ruby
chosen
[ { "from": "system", "value": "Remove pry require from production code\n" }, { "from": "human", "value": "require 'sinatra/base'\nrequire 'oj'\nrequire 'webhook/settings'\nrequire 'webhook/logging'\nrequire 'webhook/status_check'\nrequire 'publishers'\nrequire 'pry'\n\nOj.default_options = {:mode...
ruby
chosen
[ { "from": "system", "value": "Add license information to the gemspec.\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = \"shield\"\n s.version = \"2.1.0\"\n s.summary = %{Generic authentication protocol for rack applications.}\n s.description = %Q{\n Provides all...
ruby
chosen
[ { "from": "system", "value": "Fix to identify ifd style based on L2NG system" }, { "from": "human", "value": "\r\nJunos::Ez::Facts::Keeper.define( :ifd_style ) do |ndev, facts|\r\n persona = uses :personality\r\n \r\n facts[:ifd_style] = case persona\r\n when :SWITCH\r\n :SWITCH\r\n els...
ruby
chosen
[ { "from": "system", "value": "Fix headers not passing during rack-test request\n\nWhen making a rack-test request (Rack app is mounted during airborne\nconfig), the parameters were not passed into the request. For example:\n\n```\nget '/endpoint', { 'Content-Type' => 'text/plain' }\n```\n\nWould result in t...
ruby
chosen
[ { "from": "system", "value": "Fix according to recent change of itamae\n" }, { "from": "human", "value": "require 'itamae/plugin/resource/mail_alias/version'\nrequire 'itamae'\n\nmodule Itamae\n module Plugin\n module Resource\n class MailAlias < Itamae::Resource::Base\n define_a...
ruby
chosen
[ { "from": "system", "value": "Fix typo in Order ContactWish\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule PlentyClient\n module Order\n module ContactWish\n include PlentyClient::Endpoint\n include PlentyClient::Request\n\n FIND_ORDER_COTACT_WISH =...
ruby
chosen
[ { "from": "system", "value": "Allow passing in an actual virtualenv resource object." }, { "from": "human", "value": "#\n# Copyright 2015, Noah Kantrowitz\n#\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": "Refactor branch fetching method in Configuration class\n" }, { "from": "human", "value": "require 'git'\n\nmodule CodeclimateCi\n class Configuration\n OPTIONS = %i(codeclimate_api_token repo_id branch_name retry_count sleep_time)\n DEFAULTS = {\n 'retry...
ruby
chosen
[ { "from": "system", "value": "Modify Rails/RequestReferer to use NodePattern\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule RuboCop\n module Cop\n module Rails\n # This cop checks for consistent uses of request.referrer or\n # request.referrer, depending...
ruby
chosen
[ { "from": "system", "value": "Add a default puppetversion fact value as the apt module requires it\n" }, { "from": "human", "value": "require 'rspec-puppet'\nrequire 'puppet'\nrequire 'puppetlabs_spec_helper/module_spec_helper'\n\nHERE = File.expand_path(File.dirname(__FILE__))\n\nRSpec.configur...
ruby
chosen
[ { "from": "system", "value": "Revert \"Work around codeclimate-test-reporter deficiency\"\n\nThis reverts commit fb98b858ebd106d02e4a7e39fdd590375e3c9834.\n\nApparently fixed in codeclimate-test-reporter v1.0.4\nSee https://github.com/codeclimate/ruby-test-reporter/issues/162#issuecomment-269668880\n" }, ...
ruby
chosen
[ { "from": "system", "value": "Add test for parsing amounts\n\nThis will likely need to use BigDecimal eventually, but works for now.\n" }, { "from": "human", "value": "require 'ynab'\n\ndescribe Ynab do\n let(:ynab) { Ynab.open('./spec/fixtures/Test~E8570C74.ynab4') }\n\n describe '.transactio...
ruby
chosen
[ { "from": "human", "value": "Add test coverage for GlobalID extensions (find!, find_many, find_many!)\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\nRSpec.describe 'GlobalID extensions' do\n describe 'GlobalID::Locator.locate' do\n it 'invokes GlobalIdUtils::Locator.locate' do\n ...
ruby
chosen
[ { "from": "system", "value": "Update example use in choice list spec\n" }, { "from": "human", "value": "require 'spec_helper'\n\ninclude Support::ResourceExamples\n\ndescribe Fulcrum::ChoiceList do\n include_context 'with client'\n include_context 'with resource'\n\n let(:resource) { client.c...
ruby
chosen
[ { "from": "system", "value": "Add test for model method\n" }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.describe Question, type: :model do\n pending \"add some examples to (or delete) #{__FILE__}\"\nend\n" }, { "from": "gpt", "value": "require 'rails_helper'\n\nRS...
ruby
chosen
[ { "from": "system", "value": "Complete tests for when initialized.\n" }, { "from": "human", "value": "require 'rack/quote_displayer'\n\ndescribe \"QuoteDisplayer\" do\n\n context \"when initialized\" do\n it \"retrieves quotes from fixtures directory\"\n it \"retrieves one line from the ...
ruby
chosen
[ { "from": "system", "value": "Add a begin/end block to keep the code compat between ruby 2.4 & 2.5\n\nSee https://github.com/ruby/ruby/blob/v2_5_0/NEWS#label-Language+changes\n\n> rescue/else/ensure are allowed inside do/end blocks.\n\nWe still have some CI machines using 2.4.\n" }, { "from": "human...
ruby
chosen
[ { "from": "system", "value": "Update PropagateInstance action to handle new model structure.\n" }, { "from": "human", "value": "module Wakame\n module Actions\n class PropagateInstances < Action\n\n def initialize(resource, propagate_num=0)\n raise ArgumentError unless resource.i...
ruby
chosen
[ { "from": "system", "value": "Fix specs to not access uninitialized ivars\n" }, { "from": "human", "value": "# encoding: utf-8\n\nshared_examples 'IceNine::Freezer::NoFreeze.deep_freeze' do\n before do\n value.instance_eval { @a = '1' } unless value.frozen?\n end\n\n it 'returns the object...
ruby
chosen
[ { "from": "system", "value": "Create fallback for removal of callback_url in omniauth-oauth2 dependency." }, { "from": "human", "value": "require 'omniauth/strategies/oauth2'\n\nmodule OmniAuth\n module Strategies\n class LaunchPass < OmniAuth::Strategies::OAuth2\n option :name, 'launch...
ruby
chosen
[ { "from": "system", "value": "Remove comparison for presence validations" }, { "from": "human", "value": "module Plugins\n module Core\n class Cell < FieldCell\n view_paths << \"#{Cortex::Plugins::Core::Engine.root}/app/cells\"\n\n def required?\n field_item.field.validation...
ruby
chosen
[ { "from": "system", "value": "Fix reference for HTML5 Vaidations\n" }, { "from": "human", "value": "module Plugins\n module Core\n class Cell < FieldCell\n view_paths << \"#{Cortex::Plugins::Core::Engine.root}/app/cells\"\n\n def required?\n field_item.field.validations[\"pr...
ruby
chosen
[ { "from": "system", "value": "Fix edition id in rake task\n\nEdition id was incorrect. Updated.\n" }, { "from": "human", "value": "require_relative \"../../db/migrate/helpers/delete_content\"\n\nnamespace :tmp do\n task fix_invalid_document: :environment do\n document_created_by_whitehall_bu...
ruby
chosen
[ { "from": "system", "value": "Fix whitespace and spelling error in Definition.\n" }, { "from": "human", "value": "module Vanity\n module Experiment\n # These methods are available from experiment definitions (files located in\n # the experiments directory, automatically loaded by Vanity)....
ruby
chosen
[ { "from": "system", "value": "Fix stub response for monitoring service\n" }, { "from": "human", "value": "require_relative \"../../features/backdrop_stub/backdrop_stub\"\nrequire_relative \"../../features/backdrop_stub/stub_config\"\nrequire_relative \"../../features/backdrop_stub/fixture_loader...
ruby
chosen
[ { "from": "system", "value": "Allow plan to be submitted upon organization creation\n" }, { "from": "human", "value": "class OrganizationsController < ApplicationController\n before_action :authenticate, only: [:create]\n\n def create\n @organization = Organization.new organization_params.m...
ruby
chosen
[ { "from": "system", "value": "Fix project_limit being ignored on signup\n" }, { "from": "human", "value": "class RegistrationsController < Devise::RegistrationsController\n before_filter :signup_enabled?\n\n def destroy\n if current_user.owned_projects.count > 0\n redirect_to account_p...
ruby
chosen
[ { "from": "system", "value": "Remove KLHD mention in Instagram\n" }, { "from": "human", "value": "module Mingle::Instagram\n\n def self.table_name_prefix\n \"#{Mingle.table_name_prefix}instagram_\"\n end\n\n # Fetch recent photos tagged with 'klhd'\n def self.fetch hashtags = Mingle::Hash...
ruby
chosen
[ { "from": "system", "value": "Update install generator with new brightcontent_resources block\n" }, { "from": "human", "value": "module Brightcontent\n module Generators\n class InstallGenerator < Rails::Generators::Base\n include Rails::Generators::Migration\n source_root File.exp...
ruby
chosen
[ { "from": "human", "value": "Add gift and gift_text to line_item\n" }, { "from": "gpt", "value": "class AddGiftAndGiftTexttoSpreeLineItem < ActiveRecord::Migration\n def change\n add_column :spree_line_items, :gift, :boolean\n add_column :spree_line_items, :gift_text, :text\n end\nend\n"...
ruby
chosen
[ { "from": "system", "value": "Fix style of this file\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire \"erb\"\nrequire \"uri\"\nrequire \"action_dispatch/http/request\"\nrequire \"active_support/actionable_error\"\n\nmodule ActionDispatch\n class ActionableExceptions ...
ruby
chosen
[ { "from": "system", "value": "Add an x-callback-url for VLC\n" }, { "from": "human", "value": "require \"./lib/message\"\nrequire \"./lib/command_runner\"\nrequire \"./lib/uploader\"\n\nclass Downloader\n def initialize(settings: settings)\n @settings = settings\n end\n\n def run(url:, to:...
ruby
chosen
[ { "from": "system", "value": "Add error message for backwards compatibility\n" }, { "from": "human", "value": "require \"fit-commit/runner\"\n\nmodule FitCommit\n def self.run\n exit_code = runner.run\n exit(exit_code)\n end\n\n private\n\n def self.runner\n FitCommit::Runner.new(me...
ruby
chosen
[ { "from": "human", "value": "Add integration test for asset manager\n\nThis is a happy-path test for uploading assets to asset manager. We're\ncurrently using the Organisation model but this could be replaced with any\nother model that mounts an uploader.\n\nThis should give us some confidence that we haven...
ruby
chosen
[ { "from": "system", "value": "Fix TuneUp to use app installer" }, { "from": "human", "value": "cask :v1 => 'tuneup' do\n version :latest\n sha256 :no_check\n\n url 'http://www.tuneupmedia.com/redirect/mac-download'\n name 'TuneUp'\n homepage 'http://www.tuneupmedia.com/'\n license :unknown...
ruby
chosen
[ { "from": "system", "value": "Remove needless `:env => :win`\n\n`:env => :win` means that the example doesn't run on Windows. The\nexample should work on Windows. So `:env => :win` should not be\nspecified.\n\nReported by Masahiro Nakagawa. Thanks!!!\n" }, { "from": "human", "value": "require Fi...
ruby
chosen
[ { "from": "system", "value": "Add specs for FIFO order and rate-limit\n" }, { "from": "human", "value": "require 'em/throttled_queue'\nrequire 'minitest/autorun'\nrequire 'minitest/spec'\n\nclass << MiniTest::Spec\n def it_enhanced(*args, &block)\n it_original(*args) do\n EM::run_block(...
ruby
chosen
[ { "from": "system", "value": "Call the provider the correct way\n\nThe template should be loaded from the dotfiles-cookbook" }, { "from": "human", "value": "include_recipe 'applications::git'\ninclude_recipe 'dotfiles::bash_it'\n\n# Getting the kms sources\n\ngit \"/opt/kms\" do\n repository \"...
ruby
chosen
[ { "from": "system", "value": "Put ANSI under a namespace so that it doesn't conflict with other code\n" }, { "from": "human", "value": "module ANSI\n CLEAR = \"\\e[0m\"\n BOLD = \"\\e[1m\"\n\n RED = \"\\e[31m\"\n GREEN = \"\\e[32m\"\n YELLOW = \"\\e[33m\"\n BLUE = \"\\e[34m\"\n MAGENTA = ...
ruby
chosen
[ { "from": "system", "value": "Add Rails 3 to gem dependencies" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"tablebuilder/version\"\n\nGem::Specification.new do |s|\n s.name = \"tablebuilder\"\n s.version = Table...
ruby
chosen
[ { "from": "system", "value": "Add fake extension compilation. Try 3.\n" }, { "from": "human", "value": "\n=begin\n\n Fake extension building\n\n This allows for putting our bash scripts on the path, letting rubygems\n think we are compiling something...\n\n To fool rubygems we need a fake Ma...
ruby
chosen
[ { "from": "system", "value": "Disable use of /usr/lib/libffi.dylib on MacOS as it does not have ffi_raw_call\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\nrequire 'mkmf'\nrequire 'rbconfig'\ndir_config(\"ffi_c\")\nIS_MAC = Config::CONFIG['host_os'] =~ /^darwin/\nif IS_MAC\n $CPPFLAGS ...
ruby
chosen
[ { "from": "human", "value": "Add a test for adding a main method\n" }, { "from": "gpt", "value": "require 'spec_helper'\nrequire 'support/editor'\n\nRSpec.feature \"Editor assistance for common code modifications\", type: :feature, js: true do\n before { visit '/' }\n\n scenario \"building cod...
ruby
chosen
[ { "from": "system", "value": "Add Rake to bundle for Travis\n" }, { "from": "human", "value": "require File.expand_path(\"../lib/norman/version\", __FILE__)\n\nGem::Specification.new do |s|\n s.authors = \"Norman Clarke\"\n s.email = \"norman@njclarke.com\"\n s.files ...
ruby
chosen
[ { "from": "system", "value": "Switch to Pingometer's v1.1 API\n" }, { "from": "human", "value": "require 'httparty'\n\nclass Pingometer\n include HTTParty\n base_uri 'https://app.pingometer.com/api/v1.0'\n headers 'Accept' => 'application/json'\n\n def initialize(user, pass)\n @auth = {us...
ruby
chosen
[ { "from": "system", "value": "Add validation for QRDA Cat1" }, { "from": "human", "value": "require 'minitest_helper'\n\nclass GoExporterTest < Minitest::Test\n def test_valid_cda\n cda = GoCDATools::Export::GoExporter.instance.export_with_ffi(File.read('test/fixtures/records/barry_berry.jso...
ruby
chosen
[ { "from": "system", "value": "Use service command to restart docker, not upstart.\n\nupstart ships by default on Ubuntu, but not on Debian, and service works\neverywhere. Fixes #5245.\n" }, { "from": "human", "value": "module VagrantPlugins\n module DockerProvisioner\n module Cap\n modu...
ruby
chosen
[ { "from": "system", "value": "Update requirements to permit rubocop 0.49.1\n\nUpdates requirements to permit [rubocop 0.49.1](https://github.com/bbatsov/rubocop).\n- [Release notes](https://github.com/bbatsov/rubocop/releases/tag/v0.49.1)\n- [Changelog](https://github.com/bbatsov/rubocop/blob/master/CHANGEL...
ruby
chosen
[ { "from": "system", "value": "Build FreeTDS 0.83.dev using MiniPortile\n" }, { "from": "human", "value": "require File.expand_path(\"mini_portile\", File.dirname(__FILE__))\n\nnamespace :ports do\n directory \"ports\"\n file \"ports/.libiconv.timestamp\" => [\"ports\"] do |f|\n recipe = Min...
ruby
chosen
[ { "from": "system", "value": "Correct way to check if its defined.\n" }, { "from": "human", "value": "# To check if its defined? is not required if you use gem outside groups.\n# In current demonstration we use it only within development environment due to\n# that many users seems to do so.\nif ...
ruby
chosen
[ { "from": "system", "value": "Delete dependency in demo test\n" }, { "from": "human", "value": "require './test/approval_helper'\nrequire './test/fixtures/fake_curricula'\n\nrequire 'exercism/exercise'\nrequire 'exercism/trail'\nrequire 'exercism/curriculum'\nrequire 'exercism/assignment'\nrequi...
ruby
chosen
[ { "from": "system", "value": "Update rubocop-rspec dependency version to >= 1.11.0\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path(\"../lib\", __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire \"onkcop/version\"\n\nGem::Specification.new do |s...
ruby
chosen
[ { "from": "system", "value": "Return a 404 if the domain does no exist\n" }, { "from": "human", "value": "module Fog\n module DNS\n class DNSimple\n class Real\n\n # Gets record from given domain.\n #\n # ==== Parameters\n # * domain<~String>\n # * rec...
ruby
chosen
[ { "from": "system", "value": "Remove indirection to a response method;\nFix url parsing\n" }, { "from": "human", "value": "module HealthCheck\n class MiddlewareHealthcheck\n\n def initialize(app)\n @app = app\n end\n\n def call(env)\n uri = env['PATH_INFO']\n if uri =~ /...
ruby
chosen
[ { "from": "system", "value": "Add shebang line to /usr/bin/sudo replacement script\n\nSo that when it is invoked directly no syntax error is shown\n" }, { "from": "human", "value": "require 'travis/build/appliances/base'\n\nmodule Travis\n module Build\n module Appliances\n class Disabl...
ruby
chosen
[ { "from": "system", "value": "Create indexes in development as well\n" }, { "from": "human", "value": "module BSON\n class ObjectId\n def to_json(*args)\n to_s.to_json\n end\n\n def as_json(*args)\n to_s.as_json\n end\n end\nend\n\nMongoid::Tasks::Database.create_indexes ...
ruby
chosen
[ { "from": "system", "value": "Fix spec instance~class matchers for Array.[]\n" }, { "from": "human", "value": "require File.expand_path('../../../spec_helper', __FILE__)\nrequire File.expand_path('../fixtures/classes', __FILE__)\n\ndescribe \"Array.[]\" do\n it \"returns a new array populated w...
ruby
chosen
[ { "from": "system", "value": "Hide other occurrences of the same user from appearing in wrong StudyGroup\n" }, { "from": "human", "value": "class StudyGroupsController < ApplicationController\n include CommonBehavior\n\n before_action :set_group, only: MEMBER_ACTIONS\n\n def index\n @searc...
ruby
chosen
[ { "from": "system", "value": "Clean rbenv out of environment as well\n" }, { "from": "human", "value": "require 'aruba/rspec'\n\nmodule BrewGemBin\n def brew_gem\n File.expand_path('../../../bin/brew-gem', __FILE__)\n end\nend\n\nmodule CleanEnv\n def run(*args)\n clean_env = Bundler.cl...
ruby
chosen
[ { "from": "human", "value": "Add basic integration test for signup form on the example static site.\n" }, { "from": "gpt", "value": "require_relative \"../test_helper\"\n\nclass Test::StaticSite::TestSignup < Minitest::Capybara::Test\n include Capybara::Screenshot::MiniTestPlugin\n include Api...
ruby
chosen
[ { "from": "system", "value": "Add test cases for basic listing\n" }, { "from": "human", "value": "# ~*~ encoding: utf-8 ~*~\nrequire File.expand_path(File.join(File.dirname(__FILE__), \"helper\"))\n\ncontext \"Frontend\" do\n include Rack::Test::Methods\n\n setup do\n @path = cloned_testpat...
ruby
chosen
[ { "from": "system", "value": "Package version established at 0.1.0.0\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'messaging'\n s.version = '0.0.0.0'\n s.summary = 'Messaging primitives for Eventide'\n s.description = ' '\n\n s.autho...
ruby
chosen
[ { "from": "system", "value": "Set password_changed_at to confirmation date for new users\n\nSo that we don't force users who've joined in the past 90 days to change their\npassphrase too soon.\n" }, { "from": "human", "value": "class AddPasswordChangedAtToUsers < ActiveRecord::Migration\n def c...
ruby
chosen
[ { "from": "system", "value": "Change the remove_global_http_status_column migration to be reversible\n\n- Following me making this only a `change` migration in #319, a discussion\n happened in which it was decided that it is important that it is\n reversible, otherwise things break in the event of an abor...
ruby
chosen
[ { "from": "system", "value": "Add refactored shortest string solution\n" }, { "from": "human", "value": "# Shortest String\n\n# I worked on this challenge by myself.\n\n# shortest_string is a method that takes an array of strings as its input\n# and returns the shortest string\n#\n# +list_of_wor...
ruby
chosen
[ { "from": "human", "value": "[CONF] Add _plugins folder and the first plugin of Tag Generator\n" }, { "from": "gpt", "value": "module Jekyll\n class TagIndex < Page\n def initialize(site, base, dir, tag)\n @site = site\n @base = base\n @dir = dir\n @name = 'index.html'\n ...
ruby
chosen
[ { "from": "system", "value": "Add code for button down function\n" }, { "from": "human", "value": "require 'gosu'\nrequire_relative 'tile'\nrequire_relative 'player'\n\nclass Level\n def initialize(window, player, level_data)\n @window = window\n @tiles = []\n @player = player\n @le...
ruby
chosen
[ { "from": "system", "value": "Add development_dependency gem\n* rspec\n* pry\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'enchant_encoder/version'\n\nGem::Specification.new do |sp...
ruby
chosen
[ { "from": "system", "value": "Add support for ActiveRecord 5.2\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire 'rubygems' unless defined? Gem\nrequire File.dirname(__FILE__) + \"/lib/seeder/version\"\n\nGem::Specification.new do |s|\n s.name = \"seeder\"\n s.version = See...
ruby
chosen
[ { "from": "system", "value": "Update gemspec to include more files.\n" }, { "from": "human", "value": "# encoding: utf-8\n\n$:.unshift File.expand_path('../lib', __FILE__)\nrequire 'typhoeus/version'\n\nGem::Specification.new do |s|\n s.name = \"typhoeus\"\n s.version = Typhoeus::...
ruby
chosen
[ { "from": "system", "value": "Use --convert-stub-with-hash option in demo task\n" }, { "from": "human", "value": "# coding: utf-8\n\nrequire_relative 'transpec_test'\n\nclass TranspecDemo < TranspecTest\n DEMO_BRANCH = 'transpec-demo'\n\n def self.base_dir_path\n @base_dir_path = File.join(...
ruby
chosen
[ { "from": "system", "value": "Change WorldwideOrganisation to Organisation in chief inspector redirect data migration\n" }, { "from": "human", "value": "chief_inspector = WorldwideOrganisation.find_by(slug: \"chief-inspector-of-the-uk-border-agency\")\n\nnew_slug = \"independent-chief-inspector-...
ruby
chosen
[ { "from": "system", "value": "Add rest-client, active_support and hashie to dependency.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"tinami/version\"\n\nGem::Specification.new do |s|\n s.name = \"tinami\"\n s.ver...
ruby
chosen
[ { "from": "human", "value": "Add scenario for getting a single message header\n" }, { "from": "gpt", "value": "require 'helper'\n\ndescribe 'getting a message' do\n let(:username) { String.generate }\n let(:password) { String.generate }\n subject { Esendex.new(username, password) }\n\n let(:...
ruby
chosen
[ { "from": "system", "value": "Support a fallback number if no one is scheduled\n" }, { "from": "human", "value": "require 'icalendar'\nrequire 'sinatra'\nrequire 'twilio-ruby'\nrequire 'json'\n\nFEED_MAP = JSON.parse(ENV[\"FEED_MAP\"])\nputs \"Loaded feed map: #{FEED_MAP.inspect}\"\n\ndef find_o...
ruby
chosen
[ { "from": "system", "value": "Order pictures by date descending\n" }, { "from": "human", "value": "class Tweet < ActiveRecord::Base\n\n def self.published\n where(published: true)\n end\n\n mount_uploader :image, ImageUploader\n\nend\n" }, { "from": "gpt", "value": "class Tweet...
ruby
chosen
[ { "from": "system", "value": "Add failing should return player's name followed by position.\n" }, { "from": "human", "value": "require 'spec_helper'\nrequire_relative '../src/player.rb'\n\ndescribe Player do\n\tdescribe '#name' do\n\t\tit \"Should return a player's name.\" do\n\t\t\tp = Player....
ruby
chosen
[ { "from": "system", "value": "Make api_url helper to accept path\n" }, { "from": "human", "value": "$:.unshift File.expand_path(\"../..\", __FILE__)\n\nrequire 'webmock'\nrequire 'webmock/rspec'\nrequire 'json'\nrequire 'lib/arrow_payments'\n\ndef fixture_path(filename=nil)\n path = File.expand...
ruby
chosen
[ { "from": "system", "value": "Introduce a DSL for controllers to \"inject\" materialized relations\n\nThanks to this approach no database interaction will take place on the\nview and/or helper layers.\n" }, { "from": "human", "value": "# This file is copied to spec/ when you run 'rails generate ...
ruby
chosen
[ { "from": "system", "value": "Make sure Coveralls only runs in CI\n" }, { "from": "human", "value": "require \"coveralls\"\n\nCoveralls.wear! if ENV[\"COVERAGE\"]\n\nrequire \"rspec\"\nrequire \"rspec/expectations\"\nrequire \"rspec/mocks\"\n" }, { "from": "gpt", "value": "require \"...
ruby
chosen
[ { "from": "system", "value": "Change to remove unnecessary load\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nif ENV['COVERAGE'] || ENV['TRAVIS']\n require 'simplecov'\n require 'coveralls'\n\n SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([\n SimpleC...
ruby
chosen
[ { "from": "system", "value": "Use Dir.chdir to switch directories.\n" }, { "from": "human", "value": "require 'tmpdir'\nrequire 'fileutils'\nrequire 'vimrunner'\n\nVIM = Vimrunner::Runner.start_gvim\nVIM.add_plugin(File.expand_path('../..', __FILE__), 'plugin/runspec.vim')\n\nRSpec.configure do ...
ruby
chosen
[ { "from": "system", "value": "Fix deprecation warning of rspec\n\nRSpec::Core::Configuration#treat_symbols_as_metadata_keys_with_true_values=\nis now set to true as default\n" }, { "from": "human", "value": "require File.expand_path(\"../../lib/github-pages.rb\", __FILE__)\n\nRSpec.configure do ...
ruby
chosen
[ { "from": "system", "value": "Revert \"Increase rspec-retry to 5\"\n\nThis reverts commit 5ce2049b8034aa57704f4b1be56a920c7757f2db.\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'coveralls'\nCoveralls.wear!\n\nrequire 'listen'\n\nDir[\"#{File.dirname(__FILE__)}/support/**/*.rb\"...
ruby
chosen
[ { "from": "system", "value": "Use local version of rdf-n3, if it exists.\n" }, { "from": "human", "value": "$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))\n$:.unshift File.dirname(__FILE__)\n\nrequire 'rubygems'\nrequire 'spec'\nrequire 'matchers'\nrequire 'bigdecimal' # XXX Remove ...
ruby
chosen
[ { "from": "system", "value": "Change to remove Ruby limit and use new syntax\n" }, { "from": "human", "value": "# coding: utf-8\n\nif RUBY_VERSION > '1.9' and (ENV['COVERAGE'] || ENV['TRAVIS'])\n require 'simplecov'\n require 'coveralls'\n\n SimpleCov.formatter = SimpleCov::Formatter::MultiFo...
ruby
chosen
[ { "from": "system", "value": "Add minimum spec coverage threshold\n" }, { "from": "human", "value": "require 'simplecov'\nrequire 'coveralls'\n\nSimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[\n SimpleCov::Formatter::HTMLFormatter,\n Coveralls::SimpleCov::Formatter\n]\nSimpleCov.st...
ruby
chosen
[ { "from": "system", "value": "Fix error- placed clause under correct blocks now\n" }, { "from": "human", "value": "include_recipe 'storm-cluster::common'\n\n# Optionally enable the log viewer service on worker nodes\n\ntemplate '/etc/init/storm-logviewer.conf' do\n source 'storm-daemon.conf.erb...
ruby
chosen
[ { "from": "system", "value": "[packaging] Move debian into ext, not top level\n\nper packaging repo expectations, which wants ext/{redhat,debian}\n\nSigned-off-by: Moses Mendoza <76c580f0e3e4c9061b71a0636aee421ebf678b6e@puppetlabs.com>\n" }, { "from": "human", "value": "# The tar task for creati...
ruby
chosen
[ { "from": "system", "value": "Handle formats at the controller level in Projects::BoardListsController\n" }, { "from": "human", "value": "class Projects::BoardListsController < Projects::ApplicationController\n rescue_from ActiveRecord::RecordNotFound, with: :record_not_found\n\n def create\n ...
ruby
chosen
[ { "from": "system", "value": "Change admin table default sort to be :subject, :asc\n" }, { "from": "human", "value": "if defined?(EffectiveDatatables)\n module Effective\n module Datatables\n class EmailTemplates < Effective::Datatable\n default_order :id, :desc\n\n table_...
ruby
chosen
[ { "from": "system", "value": "Update gemspec > 2.0.0 🎆\n" }, { "from": "human", "value": "# coding: utf-8\n# frozen_string_literal: true\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 ...
ruby
chosen
[ { "from": "system", "value": "Fix test failed for 2.3.0" }, { "from": "human", "value": "require 'rubygems'\n\nbegin\n require 'bundler'\nrescue LoadError => e\n STDERR.puts e.message\n STDERR.puts \"Run `gem install bundler` to install Bundler.\"\n exit e.status_code\nend\n\nbegin\n Bundle...
ruby
chosen
[ { "from": "system", "value": "Make sure role.rb is required.\n\ngit-svn-id: 02c4f2b41924253e56e2511452a55f2dbba1b96a@62 ab2ce248-d915-0410-80fa-b7cb84e05f00\n" }, { "from": "human", "value": "require File.dirname(__FILE__) + '/lib/authorization'\n\nActionController::Base.send( :include, Authoriz...
ruby
chosen