conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Modify `pwd` command in the root dir.\n" }, { "from": "human", "value": "module InteractiveS3::Commands\n module InternalCommand\n def self.fetch(name, default = nil)\n COMMAND_CLASSES.fetch(name, default)\n end\n\n class Chdir < Base\n def execu...
ruby
chosen
[ { "from": "system", "value": "Add repo scope to github\n" }, { "from": "human", "value": "require File.expand_path('../boot', __FILE__)\n\n# Pick the frameworks you want:\nrequire \"active_record/railtie\"\nrequire \"action_controller/railtie\"\nrequire \"action_mailer/railtie\"\n# require \"spr...
ruby
chosen
[ { "from": "system", "value": "Configure Rspec as default test framework for Rails generators\n" }, { "from": "human", "value": "require File.expand_path('../boot', __FILE__)\n\nrequire 'rails/all'\n\n# Require the gems listed in Gemfile, including any gems\n# you've limited to :test, :developmen...
ruby
chosen
[ { "from": "system", "value": "Fix mongoid config loading after ruby 1.9.2 upgrade\n" }, { "from": "human", "value": "require File.expand_path('../boot', __FILE__)\n\n# Pick the frameworks you want:\n# require \"active_record/railtie\"\nrequire \"action_controller/railtie\"\nrequire \"action_mail...
ruby
chosen
[ { "from": "system", "value": "Test for converting to back to pull type.\n" }, { "from": "human", "value": "gem 'test-unit'\nrequire 'test/unit'\nrequire 'yaml'\nrequire_relative 'test_base'\n\nclass IronMQTests < TestBase\n def setup\n super\n\n end\n\n def test_converting_types\n queue...
ruby
chosen
[ { "from": "system", "value": "Add darkmode.css to precompilation list\n" }, { "from": "human", "value": "require File.expand_path('../boot', __FILE__)\n\nrequire 'rails/all'\n\nBundler.require(:default, Rails.env)\n\nmodule SplitsIO\n class Application < Rails::Application\n config.autoload_...
ruby
chosen
[ { "from": "system", "value": "Revert \"removing requirement for now\"\n\nThis reverts commit 1b66bdec303e2c5e515fccd609100118c5b86967.\n\nConflicts:\n\n\tconfig/environment.rb\n" }, { "from": "human", "value": "# ENV['RAILS_ENV'] ||= 'production'\nRAILS_GEM_VERSION = '2.1'\n\nrequire File.join(F...
ruby
chosen
[ { "from": "system", "value": "Fix pattern to match various magic comment formats\n" }, { "from": "human", "value": "require 'active_support/core_ext/class/attribute_accessors'\n\nmodule ActionView\n module TemplateHandlers\n class ERB < TemplateHandler\n include Compilable\n\n ##\n...
ruby
chosen
[ { "from": "system", "value": "Add whole module optimization to the podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |spec|\n spec.name = 'Runes'\n spec.version = '3.2.1'\n spec.summary = 'Functional operators for Swift'\n spec.homepage = 'https://github.com/thoughtbot/runes'\n sp...
ruby
chosen
[ { "from": "system", "value": "Update podspec with platform specific files\n" }, { "from": "human", "value": "#!/usr/bin/ruby\n\nrequire 'dotenv/load'\n\nPod::Spec.new do |spec|\n spec.name = \"Contentful\"\n spec.version = ENV['CONTENTFUL_SDK_VERSION']\n spec.summary ...
ruby
chosen
[ { "from": "system", "value": "Add div wrapper for the flash message\n" }, { "from": "human", "value": "module ExpressAdmin\n class FlashMessageComponent < ExpressTemplates::Components::Base\n\n Helper = ExpressAdmin::FlashMessageComponent # for convenience\n\n helper(:safe_message) {|mes...
ruby
chosen
[ { "from": "system", "value": "Add association of Ahoy::Visit model with Site\n" }, { "from": "human", "value": "class Ahoy::Visit < ApplicationRecord\n self.table_name = \"ahoy_visits\"\n\n has_many :events, class_name: \"Ahoy::Event\"\n belongs_to :user, optional: true\nend\n" }, { "...
ruby
chosen
[ { "from": "system", "value": "Use options instead of arguments\n" }, { "from": "human", "value": "module ElectricSheep\n module Commands\n module Database\n class MySQLDump\n include Command\n include Helpers::ShellSafe\n\n register as: \"mysql_dump\"\n\n opt...
ruby
chosen
[ { "from": "human", "value": "Create view generator in the rule engine\n\nThis generator will copy the user view files to the\nparent app for customization\n\nSigned-off-by: Joan Tiffany Siy <e0397393f2258e8c6ee68e35ceb46d86a4ac5382@teamcodeflux.com>\n" }, { "from": "gpt", "value": "module UserMa...
ruby
chosen
[ { "from": "system", "value": "Add missing return code check\n" }, { "from": "human", "value": "module GPhoto2\n class ToggleCameraWidget < CameraWidget\n protected\n\n def get_value\n val = FFI::MemoryPointer.new(:int)\n rc = gp_widget_get_value(ptr, val)\n (val.read_int ==...
ruby
chosen
[ { "from": "system", "value": "Append to gitignore dot file instead of create a new one\n" }, { "from": "human", "value": "def source_paths\n [File.expand_path(File.dirname(__FILE__))]\nend\n\ngit :init\nrun 'git flow init' if yes? 'Initialize with Git Flow support? [yN] '\ngit add: '.', commit:...
ruby
chosen
[ { "from": "system", "value": "Revert \"Use sinatra/reloader in development mode\"\n(doesn't seem to work easily. Just drop it for now)\n\nThis reverts commit afaeb0eb5180d36c7464d04641582932d8ad0c91.\n" }, { "from": "human", "value": "require 'sinatra'\nrequire 'sinatra/reloader' if development?...
ruby
chosen
[ { "from": "system", "value": "Add extra spacing for street_predirection in group name.\n" }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe Group do\n context \"validations\" do\n it { should validate_presence_of :primary_number }\n it { should validate_presence_of :stree...
ruby
chosen
[ { "from": "system", "value": "Put the password in the setup method\n" }, { "from": "human", "value": "\nperiod_dir = File.expand_path('.')\n$LOAD_PATH.unshift(period_dir) unless $LOAD_PATH.include?(period_dir)\n\nbegin\n require File.expand_path(\".bundle/environment\", __FILE__)\nrescue LoadEr...
ruby
chosen
[ { "from": "system", "value": "Change podspec version -> 1.2.1\n" }, { "from": "human", "value": "Pod::Spec.new do |spec|\n spec.name = \"Framezilla\"\n spec.version = \"1.2.0\"\n spec.summary = \"Comfortable syntax for working with frames.\"\n\n spec.homepage ...
ruby
chosen
[ { "from": "system", "value": "Add a first spec. We need to start somewhere, right?" }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.describe Post, :type => :model do\n pending \"add some examples to (or delete) #{__FILE__}\"\nend\n" }, { "from": "gpt", "value": "requ...
ruby
chosen
[ { "from": "system", "value": "Add a note to self\n" }, { "from": "human", "value": "require 'tmpdir'\nrequire 'test/unit/assertions'\nWorld(Test::Unit::Assertions)\n\n\nmodule RepositoryHelper\n REPO_PATH = File.join(Dir::tmpdir, \"git-pair-test-repo\")\n REPO_GIT_DIR = File.join(REPO_PATH, \"...
ruby
chosen
[ { "from": "system", "value": "Create the tmp/ directory when running tests.\n\nIf there is no top-level tmp/ directory, the tests would fail when it\ntried to create tmp/fixtures.\n" }, { "from": "human", "value": "def use_fixtures\n copy_fixtures_to_tmp\n stub_directories\nend\n\n# copy files...
ruby
chosen
[ { "from": "system", "value": "Return target document_type and language from the API\n" }, { "from": "human", "value": "module Api\n module V1\n module NdcSdg\n class TargetSerializer < ActiveModel::Serializer\n attribute :title\n attribute :sectors\n\n def sectors\n...
ruby
chosen
[ { "from": "system", "value": "Update order destroy check as order is not acts_as_paranoid\n" }, { "from": "human", "value": "Spree::LineItem.class_eval do\n after_commit :mailchimp_sync\n\n def mailchimp_sync\n unless order.deleted?\n # If a LineItem changes, tell the order to Sync for...
ruby
chosen
[ { "from": "human", "value": "Add a Capybara finder for forms.\n" }, { "from": "gpt", "value": "# Adds extra matchers for Capybara\nmodule Capybara::TestGroupHelpers\n module FeatureHelpers\n # Finds the given form with the given selector and target.\n #\n # @param selector [String|nil]...
ruby
chosen
[ { "from": "human", "value": "Add unit tests of ceph::rgw::keystone::auth\n\nChange-Id: I9efcb0657fea134e423a5c95682f81ba9ffd78de\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe 'ceph::rgw::keystone::auth' do\n\n shared_examples 'ceph::rgw::keystone::auth' do\n let :params ...
ruby
chosen
[ { "from": "human", "value": "Add Capybara spec for collection\n\nUse Capybara to simulate user interaction with ELN application and do\na testing automation.\n\nCreate a collection_management_spec and add two scenarios, one is for\ncreating a collection and the other is for deleting a collection.\n" }, ...
ruby
chosen
[ { "from": "system", "value": "Modify describe recipe, from setup to default\n" }, { "from": "human", "value": "require_relative '../spec_helper'\n\ndescribe 'backup_restore::setup' do\n let(:chef_run) do\n ChefSpec::Runner.new(\n cookbook_path: %w(site-cookbooks cookbooks),\n platf...
ruby
chosen
[ { "from": "system", "value": "Fix encoding error in ruby 1.9.2" }, { "from": "human", "value": "# encoding: UTF-8\nGem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s.name = 'spree_contact_us'\n s.version = '0.70.1'\n s.summary = 'Contact Us'\n s.descripti...
ruby
chosen
[ { "from": "system", "value": "Add find methods to Track class.\n" }, { "from": "human", "value": "module CapsuleCRM\n class Track\n include Virtus.model\n\n extend ActiveModel::Naming\n include ActiveModel::Conversion\n include ActiveModel::Validations\n\n include CapsuleCRM::As...
ruby
chosen
[ { "from": "system", "value": "Fix ForkTracker on ruby <= 2.5.3\n\nMaking the fork method private by calling `private :fork` raises a\n\"no superclass method `fork'\" error when calling super in a subclass on\nruby <= 2.5.3. The error doesn't occur on ruby 2.5.4 and higher.\nMaking the method private by rede...
ruby
chosen
[ { "from": "system", "value": "feat: Create new tag version to update the pod\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n\t# 1\n s.name = 'UrbandManager'\n s.version = '0.0.2'\n s.ios.deployment_target = '10.0'\n s.summary = 'By far the most fantastic urband manager I have seen ...
ruby
chosen
[ { "from": "system", "value": "Remove appid and afid literal\n" }, { "from": "human", "value": "class SearchController < ApplicationController\n def search\n httpClient = HTTPClient.new\n appid = ENV[\"APPID\"]\n afid = ENV[\"AFID\"]\n appid = '1015756569079501204'\n afid = '131eb...
ruby
chosen
[ { "from": "system", "value": "Fix bug in rake task\n" }, { "from": "human", "value": "# This is a temporary rake task that should be deleted\n# once it has been run in all environments.\n\nrequire 'active_record'\n\nnamespace :temp do\n desc \"calculates elapsed_seconds for all split times\"\n ...
ruby
chosen
[ { "from": "system", "value": "Fix up attendance row import code with help from spec\n\n+ Improve handling of non-absence, non-tardy rows\n" }, { "from": "human", "value": "class AttendanceRow < Struct.new(:row)\n # Represents a row in a CSV export from Somerville's Aspen X2 student information ...
ruby
chosen
[ { "from": "system", "value": "Fix Content-Length computation mode to be based on bytes number rather than on characters number (which is not the same, e.g. with accented characters)\n" }, { "from": "human", "value": "module HtmlCompressor\n\n class Rack\n\n DEFAULT_OPTIONS = {\n :enable...
ruby
chosen
[ { "from": "system", "value": "Add API version for TechniciansController\n" }, { "from": "human", "value": "module Api\n\tmodule V1\n\t\tclass TechniciansController < ApplicationController\n\t\t\trespond_to :json\n\t\tend\n\tend\nend" }, { "from": "gpt", "value": "module Api\n\tmodule...
ruby
chosen
[ { "from": "system", "value": "Add permitted_params to company contact\n" }, { "from": "human", "value": "class Companies::ContactsController < ApplicationController\n inherit_resources\n defaults class_name: 'CompanyContact'\n actions :new, :create\n\n def create\n create! do\n flash...
ruby
chosen
[ { "from": "system", "value": "Check authorisation for sapi user\n" }, { "from": "human", "value": "class SapiUser::SessionsController < ::Devise::SessionsController\n def new\n @email = params[:user]\n @autofocus_email = !@email.present?\n super\n end\nend\n" }, { "from": "gpt...
ruby
chosen
[ { "from": "system", "value": "Add shortcut_path to GonHelper module\n" }, { "from": "human", "value": "module Gitlab\n module GonHelper\n def add_gon_variables\n gon.api_version = API::API.version\n gon.default_avatar_url = URI::join(Gitlab.config.gitlab.url, ActionC...
ruby
chosen
[ { "from": "system", "value": "Clean mission result serializer spec\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe MissionResultSerializer, type: :controller do\n\n #include Warden::Test::Helpers\n #Warden.test_mode!\n\n it \"should include success\" do\n mission_resul...
ruby
chosen
[ { "from": "system", "value": "Add a rewind to fix access grants on first chef run when root password is set.\n" }, { "from": "human", "value": "passwords = EncryptedPasswords.new(node, node[\"percona\"][\"encrypted_data_bag\"])\n\n# define access grants\ntemplate \"/etc/mysql/grants.sql\" do\n ...
ruby
chosen
[ { "from": "system", "value": "Remove positionable from here for now\n\nDoesn't work - update_position route isn't added in the Positionable included callback\n" }, { "from": "human", "value": "require 'railgun/resources_controller/positionable'\n\nmodule RailgunContent\n module Page\n\n def ...
ruby
chosen
[ { "from": "system", "value": "Fix error class name typo" }, { "from": "human", "value": "module Lumberjack\n # This is an abstract class for logging devices. Subclasses must implement the +write+ method and\n # may implement the +close+ and +flush+ methods if applicable.\n class Device\n a...
ruby
chosen
[ { "from": "system", "value": "Fix bug where if neither UPC/ISBN present, exception was raised.\n" }, { "from": "human", "value": "module BiblioCommons\n class Title\n BASE_ITEM_URI = URI.parse(\"http://nypl.bibliocommons.com/item/show\")\n\n # Extracts a BiblioCommons title ID from the gi...
ruby
chosen
[ { "from": "system", "value": "Change the order of layers\n" }, { "from": "human", "value": "require 'RMagick'\nrequire 'open-uri'\n\nmodule Ramesh::ImageUtil\n MESH_URL_BASE ='http://tokyo-ame.jwa.or.jp/mesh/000/'\n BACKGROUND_IMAGE_URL = 'http://tokyo-ame.jwa.or.jp/map/map000.jpg'\n MAP_MASK...
ruby
chosen
[ { "from": "system", "value": "Create tests for friendship deletion\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe FriendshipsController do\n describe \"POST #create\" do\n let(:user) { FactoryGirl.create :user }\n let(:user_two) { FactoryGirl.create :user }\n it \...
ruby
chosen
[ { "from": "system", "value": "Fix wrong feature flag in RetirementsController spec.\n" }, { "from": "human", "value": "RSpec.describe RetirementsController, type: :controller, features: [:rio] do\n describe '#index' do\n it 'responds with success' do\n get :index, locale: :en\n exp...
ruby
chosen
[ { "from": "system", "value": "Implement Receipt class, green specs\n" }, { "from": "human", "value": "module SalesTax\n class Receipt\n def add_item(item)\n end\n\n def print\n end\n end\nend\n" }, { "from": "gpt", "value": "module SalesTax\n class Receipt\n def ini...
ruby
chosen
[ { "from": "human", "value": "Add basic feature tests for user login; all tests pass\n" }, { "from": "gpt", "value": "require 'rails_helper'\ndescribe \"the sign in process\", :type => :feature do\n\tbackground do \n\t\tcreate(:user)\n\tend\n\n\tscenario 'signing in with valid credentials' do \n\...
ruby
chosen
[ { "from": "system", "value": "Use clearer class name in HTTP client\n\nWe create our own special HTTP request subclass in order to send a GET\nrequest without reading the body but the class name misleadingly says it\nis without response (which isn't true).\n\nRename the class to GetWithoutBody which hopeful...
ruby
chosen
[ { "from": "system", "value": "Fix attachment hash keys to symbolize\n" }, { "from": "human", "value": "module SendgridNotification\n class SendmailJob < ApplicationJob\n class HTTPException < StandardError; end\n\n queue_as :sendmail\n\n MailerClass = Rails.application.config.sendgrid_...
ruby
chosen
[ { "from": "system", "value": "Introduce LoadError, mixing in Terrestrial::Error\n" }, { "from": "human", "value": "module Terrestrial\n Error = Module.new\nend\n" }, { "from": "gpt", "value": "module Terrestrial\n Error = Module.new\n\n class LoadError < RuntimeError\n include ...
ruby
chosen
[ { "from": "system", "value": "Return false if the number passed to GlobalPhone.validate is invalid. Currently the code returns either true or nil\n" }, { "from": "human", "value": "require 'global_phone/database'\n\nmodule GlobalPhone\n module Context\n attr_accessor :db_path\n\n def db\n...
ruby
chosen
[ { "from": "system", "value": "Create route for scss assets." }, { "from": "human", "value": "require 'rubygems'\nrequire 'sinatra'\nrequire 'glorify'\nrequire 'sass'\nrequire 'compass'\n\nconfigure do\n Compass.configuration do |config|\n config.project_path = File.dirname(__FILE__)\n con...
ruby
chosen
[ { "from": "system", "value": "Add infinite loop to test Signals\n" }, { "from": "human", "value": "require 'sidekiq'\n\nclass OurWorker\n include Sidekiq::Worker\n\n def perform(work)\n case work\n when \"super_hard\"\n puts \"Charging credit card\"\n sleep 20\n puts \"Doi...
ruby
chosen
[ { "from": "system", "value": "Convert ?s in collection dropbox name\n" }, { "from": "human", "value": "# Copyright 2011-2017, The Trustees of Indiana University and Northwestern\n# University. Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file exc...
ruby
chosen
[ { "from": "system", "value": "Update uniqieness lookup by id to use neo4j's id(n)\n" }, { "from": "human", "value": "module ActiveNode\n module Validations\n class UniquenessValidator < ActiveModel::EachValidator # :nodoc:\n def validate_each(record, attribute, value)\n if value ...
ruby
chosen
[ { "from": "system", "value": "Include Hashie::Extensions::MergeInitializer in base object\n" }, { "from": "human", "value": "module Openlogi\n class BaseObject < Hashie::Dash\n include Hashie::Extensions::Dash::Coercion\n include Hashie::Extensions::IndifferentAccess\n\n def initialize...
ruby
chosen
[ { "from": "system", "value": "Fix .spec summary and description\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'adash/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Add helper for setting a raw post body\n" }, { "from": "human", "value": "require 'action_controller'\nrequire 'action_controller/test_case'\n\nmodule RSpec\n module Rails\n module ControllerExampleGroup\n extend ActiveSupport::Concern\n include RailsE...
ruby
chosen
[ { "from": "system", "value": "Return metadata embedded when loading a particular corpus\n" }, { "from": "human", "value": "module Rglossa\n class CorporaController < ApplicationController\n respond_to :json, :xml\n\n def index\n @corpora = Corpus.scoped\n set_query_params\n\n ...
ruby
chosen
[ { "from": "human", "value": "Add test for creating/updating with an invalid includes\n" }, { "from": "gpt", "value": "require 'standard_api/test_helper'\n\nclass PropertiesControllerTest < ActionDispatch::IntegrationTest\n\n # = Include Test\n \n class Property < ActiveRecord::Base\n has_m...
ruby
chosen
[ { "from": "human", "value": "Check to make sure bounties are filtered correctly\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe 'showing all bounties' do\n let!(:user) { User.make! }\n let!(:product) { Product.make! }\n let!(:chat_room) { ChatRoom.make!(slug: product.slug, ...
ruby
chosen
[ { "from": "system", "value": "Fix gemspec desc and sum\n" }, { "from": "human", "value": "# Encoding: UTF-8\n\nGem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s.name = 'refinerycms-multisites'\n s.version = '1.0'\n s.description = %q{A...
ruby
chosen
[ { "from": "system", "value": "Add test for sending unknown command\n" }, { "from": "human", "value": "require \"spec_helper\"\n\ndescribe Lita::Handlers::Hal9000, lita_handler: true do\n it { is_expected.to route_event(:unhandled_message) }\nend\n" }, { "from": "gpt", "value": "requ...
ruby
chosen
[ { "from": "system", "value": "Use double quotes for @houndci\n" }, { "from": "human", "value": "describe EmailProcessor do\n describe \"#process\" do\n it \"creates an entry based on the email\" do\n user = create(:user)\n email = double('email', from: { email: user.email }, body: ...
ruby
chosen
[ { "from": "system", "value": "Create basic specs for LabDescription, all validations passes\n" }, { "from": "human", "value": "describe LabDescription do\n it \"defaults to true\" do\n create(:lab_description).should be_valid\n end\n\n it \"should have a 'when'\" do\n create(:lab_descri...
ruby
chosen
[ { "from": "system", "value": "Include non-Ruby files in gem package\n\nThe interactive mode was not working because the gem package did not\ncontain the non-Ruby files needed to run it. This commit opens up the\nfile inclusion to anything under lib and spec.\n" }, { "from": "human", "value": "# ...
ruby
chosen
[ { "from": "system", "value": "Update gemspec for Lita 3.0 compatibility.\n" }, { "from": "human", "value": "Gem::Specification.new do |spec|\n spec.name = \"lita-github-commits\"\n spec.version = \"0.0.1\"\n spec.authors = [\"Mitch Dempsey\"]\n spec.email = [\"mr...
ruby
chosen
[ { "from": "system", "value": "Revert \"support for rails w/compass\"\n\nThis reverts commit 0cea6384c87fc88ba3503999ed808f3f833c7b43.\n\nI had not considered the side effect of loading all the compass setup,\nsince this will mean that Rails' asset-url is overridden, or some side\neffect will come about as a...
ruby
chosen
[ { "from": "system", "value": "Use remote_file instead of execute-n-curl\n\nCheck that the docker-compose we download is the one we expect with\na checksum.\n\nAlso don't need to uname things because we only use 64-bit Linux\nbuilders for this pipeline.\n\nSigned-off-by: Robb Kidd <11cd4f9ba93acb67080ee4dad8...
ruby
chosen
[ { "from": "system", "value": "Use summary rather than motion text in api\n" }, { "from": "human", "value": "json.id @division.id\njson.house @division.australian_house\njson.name @division.name\njson.date @division.date\njson.number @division.number\njson.clock_time (@division.clock_time ? @divi...
ruby
chosen
[ { "from": "system", "value": "Upgrade chef client to 11.8.0\n" }, { "from": "human", "value": "# Add the opscode APT source for chef\ndefault[:apt][:sources] = node[:apt][:sources] | [ \"opscode\" ]\n\n# Set the default client version\ndefault[:chef][:client][:version] = \"11.6.0-1\"\n\n# A list...
ruby
chosen
[ { "from": "system", "value": "Clean up a leaky pipe.\n" }, { "from": "human", "value": "module Resqued\n class Daemon\n def initialize(master)\n @master = master\n end\n\n # Public: daemonize and run the master process.\n def run\n rd, wr = IO.pipe\n if fork\n ...
ruby
chosen
[ { "from": "system", "value": "Fix requires to get everything working\n" }, { "from": "human", "value": "require 'right_on/role_model'\nrequire 'right_on/right'\nrequire 'right_on/role'\nrequire 'right_on/right_allowed'\nrequire 'right_on/by_group'\nrequire 'right_on/action_controller_extensions'...
ruby
chosen
[ { "from": "system", "value": "Sort keys in rummager payload\n" }, { "from": "human", "value": "FinderRummagerPresenter = Struct.new(:file, :timestamp) do\n def type\n \"edition\"\n end\n\n def id\n file.fetch(\"base_path\")\n end\n\n def to_json\n {\n title: file.fetch(\"name\...
ruby
chosen
[ { "from": "system", "value": "Add EXE_NAME and SIGN_UP_URL to MrMurano module.\n\n- Also add copyright and license header.\n- Rubocop: Add `# frozen_string_literal: true` header comment.\n- Rubocop: Do not `.freeze` immutable object.\n" }, { "from": "human", "value": "module MrMurano\n VERSION ...
ruby
chosen
[ { "from": "system", "value": "Refactor and correct ttl for when max-age is defined\n" }, { "from": "human", "value": "module Caching\n class Response\n attr_accessor :response\n\n def initialize(response)\n self.response = response\n validate!\n end\n\n def body\n res...
ruby
chosen
[ { "from": "system", "value": "Add preparation methods to Cassandra" }, { "from": "human", "value": "require 'pools'\nrequire 'cassandra/0.7'\n\nclass Cassandra\n class Pooled\n include ::Pools::Pooled\n\n def initialize(*args)\n @cassandra_args = args.dup\n super\n end\n\n ...
ruby
chosen
[ { "from": "human", "value": "Add test coverage for existing observer behaviour\n\nThe existing UpdateRouterObserver didn't have any unit tests. I've \nwritten some retrospectively so that it will be easier to change its\nbehaviour." }, { "from": "gpt", "value": "require_relative '../../test_help...
ruby
chosen
[ { "from": "system", "value": "Add unroutable tests for plants\n" }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe PlantsController do\n it 'routes GET /plants/new' do\n expect(get: '/plants/new').to route_to('plants#new')\n end\n\n it 'routes POST /plants' do\n expect(...
ruby
chosen
[ { "from": "system", "value": "Use let and adapt name in dashboard spec\n" }, { "from": "human", "value": "describe ReportController do\n context \"::Dashboards\" do\n before do\n login_as user\n @db = FactoryGirl.create(:miq_widget_set,\n :owner => ...
ruby
chosen
[ { "from": "human", "value": "Add workers index filters controller test.\n" }, { "from": "gpt", "value": "require 'rails_helper'\n\nmodule RocketJobMissionControl\n module Workers\n RSpec.describe IndexFiltersController do\n routes { Engine.routes }\n\n states = %w(starting running ...
ruby
chosen
[ { "from": "system", "value": "Change requires from absolute to relative paths\n" }, { "from": "human", "value": "require 'mongo'\n\nrequire 'dm-core'\nrequire 'dm-aggregates'\n\ndir = Pathname(__FILE__).dirname.expand_path + 'dm-mongo-adapter'\n\nrequire dir + 'query'\nrequire dir + 'query' + 'j...
ruby
chosen
[ { "from": "system", "value": "Add rspec-core, rspec-expectations, rspec-mock as 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 'dmarc_inspector/version'\n\nGem::Spec...
ruby
chosen
[ { "from": "system", "value": "Refactor hook execution for symbols\n" }, { "from": "human", "value": "module Interactor\n module Hooks\n def self.included(base)\n base.class_eval do\n extend ClassMethods\n end\n end\n\n module ClassMethods\n def before(*hooks, &blo...
ruby
chosen
[ { "from": "system", "value": "Remove other_party getter from model\"\n" }, { "from": "human", "value": "class Request < ActiveRecord::Base\n before_create :defaultly_unfulfilled\n\n has_many :messages\n has_many :transactions\n\n belongs_to :requester, class_name: 'User'\n belongs_to :respo...
ruby
chosen
[ { "from": "system", "value": "Fix remaining failure for circle when trying to remove containers.\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe LintTrap::Command do\n let(:file){fixture_path('lint.txt')}\n let(:command){described_class.new('cat', %w(-b), [file])}\n let(:...
ruby
chosen
[ { "from": "human", "value": "Add in message spec for reals\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe DripDrop::Message do\n describe \"basic message\" do\n def create_basic\n attrs = {\n :name => 'test',\n :head => {:foo => :bar},\n :body =>...
ruby
chosen
[ { "from": "system", "value": "Tag classnames should always be lowercase\n\nThe development seeds have tags that are title case: \"Ember\", \"Rails\",\netc. As such, the tags had the classnames `Ember`, `Rails`.\n\nThis change forces tags to use the downcase for classnames.\n" }, { "from": "human", ...
ruby
chosen
[ { "from": "system", "value": "Fix welcome email logo url\n" }, { "from": "human", "value": "class UserMailer < ActionMailer::Base\n default from: \"notifications@prepared.ly\"\n\n def welcome_email(user)\n \t@user \t\t\t\t= user\n \t@url \t\t\t\t\t= \"http://prepared.ly/users/sign_in\"\n \t...
ruby
chosen
[ { "from": "system", "value": "Use Opal::REGEXP_START in path reader\n\nAt least until we'll be able to compile `\\A` and `\\z`.\nAlso moved it to a constant.\n\nRef: https://github.com/opal/opal/issues/1630" }, { "from": "human", "value": "require 'opal/hike_path_finder'\n\nmodule Opal\n class ...
ruby
chosen
[ { "from": "system", "value": "ADD bfs in (POST /api/vi/results)\n" }, { "from": "human", "value": "class Api::V1::ResultsController < ApplicationController\n protect_from_forgery except: [:index, :create, :show]\n\n def index\n hs = Result.all\n render :json => hs\n end\n\n def create\...
ruby
chosen
[ { "from": "system", "value": "[api] Return display_single_amount and display_total_amount in LineItems responses\n\nThis is useful if the API client wants to display a well-formatted version of the price\n" }, { "from": "human", "value": "object @line_item\nattributes *line_item_attributes\nchil...
ruby
chosen
[ { "from": "system", "value": "Fix README file in gemspec." }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib/', __FILE__)\n$:.unshift lib unless $:.include?(lib)\n\nrequire \"magick/version\"\n\nGem::Specification.new do |s|\n s.name = \"streamio-m...
ruby
chosen
[ { "from": "system", "value": "Add CORS support to API class\n" }, { "from": "human", "value": "require 'sinatra/base'\nrequire 'color_divider'\n\nclass ColorDivider\n class API < Sinatra::Base\n # Idea from http://www.recursion.org/2011/7/21/modular-sinatra-foreman\n configure do\n s...
ruby
chosen
[ { "from": "system", "value": "Update tests to use a more flexible match to get around multi-system line endings\n" }, { "from": "human", "value": "require 'test_helper'\nrequire 'action_controller'\nrequire 'typescript-rails'\n\nclass SiteController < ActionController::Base\n self.view_paths = ...
ruby
chosen
[ { "from": "human", "value": "Add some basic specs for the ancestry of SystemStackError\n" }, { "from": "gpt", "value": "require File.expand_path('../../../spec_helper', __FILE__)\n\ndescribe \"SystemStackError\" do\n ruby_version_is \"\"...\"1.9\" do\n it \"is a subclass of StandardError\" d...
ruby
chosen