conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Add example of selecting from a paged menu with disabled items\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\n\nrequire_relative \"../lib/tty-prompt\"\n\nprompt = TTY::Prompt.new\n\nnumbers = [\n {name: '1', disabled: 'out'},\n '2',\n {name: '3', ...
ruby
chosen
[ { "from": "system", "value": "Create first test for the comments controller\n" }, { "from": "human", "value": "comments_controller_spec.rb\n" }, { "from": "gpt", "value": "describe CommentsController do\n let!(:comment) { Comment.create!(text: \"Great game!\", game_id: 4, user_id: 4...
ruby
chosen
[ { "from": "system", "value": "Add spec for matching an empty string\n" }, { "from": "human", "value": "require File.expand_path('../../../spec_helper', __FILE__)\nrequire 'strscan'\n\ndescribe \"StringScanner#scan\" do\n before :each do\n @s = StringScanner.new(\"This is a test\")\n end\n\n...
ruby
chosen
[ { "from": "human", "value": "Add script to convert template from aws format to openstack format\n" }, { "from": "gpt", "value": "#!/bin/env ruby\n\nrequire './src/helpers/loader'\n\nif ARGV.size != 1\n puts 'bundle exec scripts/convert_to_open_stack.rb aws-template-file'\n exit 1\nend\n\ntempl...
ruby
chosen
[ { "from": "system", "value": "Fix issue found by travis again\n" }, { "from": "human", "value": "require 'spec_helper'\n\nmodule LicenseFinder\n describe BundlerPackage do\n subject { described_class.new(gemspec, bundler_dependency) }\n\n let(:gemspec) do\n Gem::Specification.new do ...
ruby
chosen
[ { "from": "human", "value": "Add a spec to explain how league search requests work\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\n\nrequire 'spec_helper'\n\ndescribe LeagueRequest do\n let(:user) { create(:user, name: 'Admin') }\n\n describe '#search' do\n it 'finds players...
ruby
chosen
[ { "from": "system", "value": "Fix describe text on spec." }, { "from": "human", "value": "# encoding: UTF-8\nrequire 'spec_helper'\n\ndescribe Grim do\n it \"should have a VERSION constant\" do\n Grim.const_defined?('VERSION').should be_true\n end\n\n it \"should have WIDTH constant set to...
ruby
chosen
[ { "from": "system", "value": "Add set output to help test\n" }, { "from": "human", "value": "require File.expand_path(\"#{File.dirname(__FILE__)}/../../../spec_helper.rb\")\nrequire 'ghost/cli'\n\ndescribe Ghost::Cli, :type => :cli do\n describe \"help\" do\n let(:overview) do\n <<-EOF....
ruby
chosen
[ { "from": "system", "value": "Set required Ruby version in gemspec\n" }, { "from": "human", "value": "# encoding: utf-8\n\n$: << File.expand_path('../lib', __FILE__)\n\nrequire 'tara/version'\n\n\nGem::Specification.new do |s|\n s.name = 'tara'\n s.version = Tara::VERSION.dup\n s.p...
ruby
chosen
[ { "from": "system", "value": "Add explicit require for yaml library.\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'oauth'\nrequire 'optparse'\nrequire 'ostruct'\nrequire 'stringio'\n\nlibrary_files = Dir[File.join(File.dirname(__FILE__), \"/twurl/**/*.rb\")]\nlibrary_files.each...
ruby
chosen
[ { "from": "system", "value": "Fix typo on S3 Direct Upload configuration\n\nAn unecessary comma caused an Invalid Policy error while trying to\nupload files do Amazon S3.\n" }, { "from": "human", "value": "S3DirectUpload.config do |c|\n c.access_key_id = ENV['AWS_ACCESS_KEY']\n c.secret_access...
ruby
chosen
[ { "from": "system", "value": "Add CHANGES.md and README.md to RDoc.\n" }, { "from": "human", "value": "require File.expand_path(File.join('..', 'lib', 'bzip2', 'ffi', 'version'), __FILE__)\n\nGem::Specification.new do |s|\n s.name = 'bzip2-ffi'\n s.version = Bzip2::FFI::VERSION\n s.summary = ...
ruby
chosen
[ { "from": "system", "value": "Fix RSpec deprecation by removing stub\n" }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe Admin::BaseController do\n controller(Admin::BaseController) do\n def index\n render text: 'index body'\n end\n end\n\n let(:account) { create ...
ruby
chosen
[ { "from": "system", "value": "Add it block to spec to separate expects\n" }, { "from": "human", "value": "RSpec.shared_examples 'a message processing worker' do\n it \"pops the latest unprocessed message from the user's queue\" do\n # TODO: two expectations in one it block is poor form\n ...
ruby
chosen
[ { "from": "system", "value": "Upgrade inch and bump version\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'inch_ci/worker/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Use PATCH HTTP method because Rails 4 now uses that by default over PUT.\n" }, { "from": "human", "value": "Refinery::Core::Engine.routes.draw do\n root :to => 'pages#home', :via => :get\n get '/pages/:id', :to => 'pages#show', :as => :page\n\n namespace :pages,...
ruby
chosen
[ { "from": "human", "value": "Add code wars (7) - find duplicated number\n" }, { "from": "gpt", "value": "# http://www.codewars.com/kata/558dd9a1b3f79dc88e000001/\n# --- iteration 1 ---\ndef find_dup(arr)\n arr.map{ |x| [x, arr.count(x)] }.select{ |x| x[1] == 2 }[0][0]\nend\n" } ]
ruby
chosen
[ { "from": "human", "value": "Access modifiers - protected method is an important example in ruby\n" }, { "from": "gpt", "value": "# Access modifiers in Ruby\n\nclass MyClass\n\n private # access modifier\n def priv\n puts(\"private\")\n end\n\n protected\n def prot\n puts(\"...
ruby
chosen
[ { "from": "human", "value": "Add tests for the calling conventions" }, { "from": "gpt", "value": "require 'helper'\n\nmodule RCPU\n class TestABI < TestCase\n def test_call\n rcpu do\n block :main do\n call :_library, 1, 2, 3, 4, 5\n data :done, [123]\n e...
ruby
chosen
[ { "from": "human", "value": "Add spec for delay controller get request; cant really test the delay atm; and need to implement some\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe Slowwly::DelayController do\n context 'with a GET request' do\n context 'with delay time' do\n...
ruby
chosen
[ { "from": "human", "value": "Add Users Controller Spec for Profile\n\nAdd a Users controller spec to account for editing/viewing the Users'\nprofile pages.\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe UsersController do\n let(:user) { FactoryGirl.create :user }\n\n descri...
ruby
chosen
[ { "from": "system", "value": "Remove the code to prevent pushing to a public server\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'conoha/version'\n\nGem::Specification.new do |spec...
ruby
chosen
[ { "from": "system", "value": "Revert \"Add basic Capybara tests for log in\"\n\nThis reverts commit 637e272204b80850238c64bc8042a8bc66c155d2.\n\nConflicts:\n\ttest/features/sign_in_sign_out_test.rb\n" }, { "from": "human", "value": "require \"test_helper\"\ninclude Devise::TestHelpers\ninclude W...
ruby
chosen
[ { "from": "system", "value": "Stop stubbing an imminence data set URL in all tests\n\nRemoving the stub doesn't seem to cause a problem and it looks like this\nstub hasn't been needed since 2011 (see:\nb3e0c8aefa2cb3b6c85d67c384f31dcb746ff268).\n" }, { "from": "human", "value": "require 'webmock...
ruby
chosen
[ { "from": "system", "value": "Change from process to file/dir check\n" }, { "from": "human", "value": "describe processes('exabgp') do\n it { should exist }\nend\n" }, { "from": "gpt", "value": "describe directory('/usr/src/exabgp') do\n it { should exist }\nend\n\ndescribe file('/...
ruby
chosen
[ { "from": "human", "value": "Add publish_last_version_automatically column to plans\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\n\nclass AddPublishLastVersionAutomaticallyColumnToPlans < ActiveRecord::Migration[5.2]\n def change\n add_column :gplan_plans, :publish_last_ver...
ruby
chosen
[ { "from": "human", "value": "Add unit tests for resolv recipe\n" }, { "from": "gpt", "value": "describe 'sys::resolv' do\n\n before do\n stub_command(\"test -L /etc/resolv.conf\").and_return(false)\n end\n\n let(:chef_run) do\n ChefSpec::SoloRunner.new do |node|\n node.default['sys...
ruby
chosen
[ { "from": "system", "value": "Disable scaling of typical_input_capacity and electricity_output_capacity\n" }, { "from": "human", "value": "module Atlas\n class Scaler::GraphScaler\n # Edge attributes which must be scaled.\n EDGE_ATTRIBUTES = [:demand].freeze\n\n # Node attributes which...
ruby
chosen
[ { "from": "system", "value": "Remove the redundant encoding comment\n\nThe encoding is utf-8 in Ruby 2+\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nreq...
ruby
chosen
[ { "from": "system", "value": "Add more variables to template resource for gitlab.rb.\n" }, { "from": "human", "value": "# Encoding: utf-8\n#\n# Cookbook Name:: gitlab-omnibus\n# Recipe:: configure\n#\n# Copyright 2014, Chris Fordham\n#\n# Licensed under the Apache License, Version 2.0 (the \"Lic...
ruby
chosen
[ { "from": "system", "value": "Add precompiling of user-styles.css again.\n" }, { "from": "human", "value": "# Be sure to restart your server when you modify this file.\n\n# Version of your assets, change this if you want to expire all your assets.\nRails.application.config.assets.version = '1.0'...
ruby
chosen
[ { "from": "system", "value": "Add in Watir tests to the test runner\n" }, { "from": "human", "value": "require 'test/unit'\n\n# make it possible to load the test cases from the local directory\n$:.unshift File.dirname(__FILE__)\n\nrequire 'basics'\nrequire 'info_pages'\nrequire 'hosting'\nrequir...
ruby
chosen
[ { "from": "system", "value": "Fix caching attempts when directory missing\n\nRunning specs in a random order could trigger a number of failures\nrelated to naughty API classes attempting to cache IDs whilst the\ndirectory used did not exist.\n\nThis alters the `#cache_path` method to be read only without si...
ruby
chosen
[ { "from": "system", "value": "Fix check for presence of explicitly set option.\n" }, { "from": "human", "value": "module Clamp\n class Subcommand\n\n module Execution\n\n protected\n \n def execute_subcommand\n signal_usage_error \"no subcommand specified\" unless subco...
ruby
chosen
[ { "from": "system", "value": "Remove async call thread syncing.\n" }, { "from": "human", "value": "# encoding: utf-8\n\nmodule FiniteMachine\n # An asynchronouse call representation\n #\n # Used internally by {EventQueue} to schedule events\n #\n # @api private\n class AsyncCall\n inclu...
ruby
chosen
[ { "from": "system", "value": "Update React Native documentation (0.41)\n" }, { "from": "human", "value": "module Docs\n class ReactNative < React\n self.name = 'React Native'\n self.slug = 'react_native'\n self.type = 'react'\n self.release = '0.40'\n self.base_url = 'https://fac...
ruby
chosen
[ { "from": "system", "value": "Rewrite Process.euid= spec without fork\n" }, { "from": "human", "value": "require_relative '../../spec_helper'\n\ndescribe \"Process.euid\" do\n it \"returns the effective user ID for this process\" do\n Process.euid.should be_kind_of(Fixnum)\n end\n\n it \"a...
ruby
chosen
[ { "from": "system", "value": "Change args order in allocator builder\n" }, { "from": "human", "value": "module Knapsack\n class AllocatorBuilder\n def initialize(adapter_class)\n @adapter_class = adapter_class\n set_report_path\n end\n\n def allocator\n Knapsack::Allocat...
ruby
chosen
[ { "from": "system", "value": "Update Podspec to version 0.0.3\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"CCKit\"\n s.version = \"0.0.2\"\n s.summary = \"Cliq Consulting reusable components for iOS.\"\n\n s.description = <<-DESC\n ...
ruby
chosen
[ { "from": "system", "value": "Use correct Unicorn config method\n" }, { "from": "human", "value": "preload_app true\nworker_count 2\ntimeout 30\n\ncheck_client_connection true\n\nlisten '/u/apps/handy/shared/sockets/unicorn.sock', backlog: 2048\npid '/u/apps/handy/shared/pids/unicorn.pid'\nstder...
ruby
chosen
[ { "from": "system", "value": "Create invoice payments (to set an invoice's status to paid)\n" }, { "from": "human", "value": "# encoding: utf-8\n\nclass BadBill\n # The InvoicePayment resource handles all invoice payments.\n #\n # See http://www.billomat.com/en/api/invoices/payments/\n class...
ruby
chosen
[ { "from": "system", "value": "Make sure get_model_classes is not ActiveRecord compliant only\n" }, { "from": "human", "value": "module AlgoliaSearch\n module Utilities\n class << self\n def get_model_classes\n Rails.application.eager_load! # Ensure all models are loaded (not nece...
ruby
chosen
[ { "from": "system", "value": "Simplify code in event processor\n" }, { "from": "human", "value": "module Chatrix\n # Keeps track of what events have already been processed.\n class EventProcessor\n def initialize\n @processed = []\n end\n\n def processed(event)\n @processed....
ruby
chosen
[ { "from": "system", "value": "Handle errors during startup better and fixed a race condition with :stop being called before the Sidekiq launcher finishes booting.\n" }, { "from": "human", "value": "module TorqueBox\n class SidekiqService\n attr_accessor :config, :launcher\n\n CONFIG_OPTIO...
ruby
chosen
[ { "from": "system", "value": "Update default admin set creation call in rake job\n" }, { "from": "human", "value": "namespace :hyrax do\n namespace :default_admin_set do\n desc \"Create the Default Admin Set\"\n task create: :environment do\n AdminSet.create_default!\n end\n end\...
ruby
chosen
[ { "from": "system", "value": "Remove explicit dependency on minitest\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'scopy/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "human", "value": "[TTPLAT-1044] Add organization role mapping for grantors to super manager role.\n" }, { "from": "gpt", "value": "class AddOrganizationRoleMappingForSuperManager < ActiveRecord::DataMigration\n def up\n Grantor.all.each do |g|\n OrganizationRoleMapping.create...
ruby
chosen
[ { "from": "system", "value": "Add validation that Overheard must have a body\n\nHere we're doing two things:\n1. We're creating a validation that will prevent an overheard from being\n created if a body isn't provided\n2. We're only redirecting if the creation was successful; otherwise we\n re-render th...
ruby
chosen
[ { "from": "system", "value": "Add initializer to Policy class\n" }, { "from": "human", "value": "require 'base64'\nrequire 'openssl'\n\nmodule Filepicker\n module Rails\n class Policy\n attr_accessor :expiry, :call, :handle, :maxsize, :minsize\n\n def policy\n Base64.urlsafe...
ruby
chosen
[ { "from": "system", "value": "Add ability to dump backtrace.\n" }, { "from": "human", "value": "module GraphQL\n # If a field's resolve function returns a {ExecutionError},\n # the error will be inserted into the response's `\"errors\"` key\n # and the field will resolve to `nil`.\n class Ex...
ruby
chosen
[ { "from": "system", "value": "Put monitrc files in proper folder\n" }, { "from": "human", "value": "#\n# Cookbook Name:: sidekiq\n# Recipe:: default\n#\n\nnode[:deploy].each do |application, deploy|\n process_name = \"sidekiq_#{application}\"\n\n template \"/etc/monit/#{process_name}.monitrc\"...
ruby
chosen
[ { "from": "human", "value": "Patch to render willpaginate with Twitter Bootstrap\n" }, { "from": "gpt", "value": "module WillPaginate\n module ViewHelpers\n # This class does the heavy lifting of actually building the pagination\n # links. It is used by +will_paginate+ helper internally.\...
ruby
chosen
[ { "from": "system", "value": "Add a \"made in\" label to the about view.\n" }, { "from": "human", "value": "class AboutScreen < PM::WebScreen\n\n title \"About BJCP Styles\"\n\n def content\n \"AboutScreen.html\"\n end\n\n def will_appear\n @view_loaded ||= begin\n set_nav_bar_rig...
ruby
chosen
[ { "from": "human", "value": "Set missing content ids for organisations\n\nThe previous data migration skipped over any organisations that failed\nvalidation. This meant that at least one (FCO Services) was left without a\ncontent_id as it failed validation due to not having an alternative format\nprovider e...
ruby
chosen
[ { "from": "system", "value": "Fix hbase test, makes sure to kill off java when done so test is repeatable\n" }, { "from": "human", "value": "require 'spec_helper'\n\n# Check to see if hbase starts without error\ndescribe command('start-hbase.sh') do\n it { should return_exit_status 0 }\nend\n\n...
ruby
chosen
[ { "from": "system", "value": "Change the order of models\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\nrequire File.join(File.dirname(__FILE__), 'spec_helper')\n\ndescribe SchemaComments::SchemaComment do\n\n before(:each) do\n SchemaComments.yaml_path = File.expand_path('../lo...
ruby
chosen
[ { "from": "system", "value": "Remove duplicate OpenStruct monkey patch for specs\n" }, { "from": "human", "value": "require 'backports'\nrequire 'backports/basic_object' unless defined?(BasicObject)\nrequire 'rubygems'\n\nif ENV['COVERAGE']\n require 'simplecov'\n SimpleCov.start do\n add_f...
ruby
chosen
[ { "from": "system", "value": "Make the specs work with ObjectiveBacon as well.\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'mac_bacon'\n\nrequire 'pathname'\nROOT = Pathname.new(File.expand_path('../../', __FILE__))\n\n$:.unshift((ROOT + 'lib').to_s)\nrequire 'cocoa_pods'\n\n$...
ruby
chosen
[ { "from": "system", "value": "Use Struct as backend for HashObject.\n" }, { "from": "human", "value": "require 'minitest/autorun'\nrequire 'minitest/spec'\n\nrequire 'bound'\n\n# HashObject behaves like an OpenStruct\n# but there is no method_missing involved.\n#\n# Missing keys in the source ha...
ruby
chosen
[ { "from": "system", "value": "Use dummy command factory in topicz spec.\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Topicz do\n it 'has a version number' do\n expect(Topicz::VERSION).not_to be nil\n end\n\n it 'prints help when called with -h' do\n begin\n ...
ruby
chosen
[ { "from": "system", "value": "Add additional helper methods to Rails Adapter\n" }, { "from": "human", "value": "module Registrar\n class Profile < OpenStruct\n end\n\n module Adapter\n module Rails\n def self.included(klass)\n klass.include InstanceMethods\n klass.before...
ruby
chosen
[ { "from": "system", "value": "Remove related discussion fields from diffs\n\nThese are no longer used and are planned to be removed completely.\n" }, { "from": "human", "value": "class EditionDiff\n TRACKABLE_FIELDS = [:title, :related_discussion_title, :related_discussion_href, :content_owner_...
ruby
chosen
[ { "from": "system", "value": "Add spec the case of valid parameter\n" }, { "from": "human", "value": "RSpec.describe Valanga::Music do\n describe '#list_musics' do\n # NOTE: Spec is too slow, so caches the capybara session.\n before(:all) do\n session = Valanga::Client.new(ENV['KID']...
ruby
chosen
[ { "from": "system", "value": "Fix incorrect constant reference on Ruby 1.8.\n\nCloses #132.\n" }, { "from": "human", "value": "module Watir\n class Cookies\n def initialize(control)\n @control = control\n end\n\n def to_a\n @control.all_cookies.each do |e|\n e[:expires...
ruby
chosen
[ { "from": "human", "value": "Create RelatedMainstream record for existing guides\n\nPublished detailed guides with related mainstream urls need to\nfind the content_id of the content item and persist it.\n" }, { "from": "gpt", "value": "RelatedMainstream.destroy_all\n\nguides = DetailedGuide.whe...
ruby
chosen
[ { "from": "system", "value": "Revert \"Revert \"prevent find_method test running on MRI 1.8\"\"\n\nThis reverts commit c2f06f3da27e30fa2ebdb68ba4f9e384df64607f.\n\nShould not have been reverted...\n" }, { "from": "human", "value": "require 'helper'\n\nMyKlass = Class.new do\n def hello\n \"t...
ruby
chosen
[ { "from": "system", "value": "Disable /announce logging monitor so production env works\n\nThis bug in faye-rails is preventing us from starting in production mode:\nhttps://github.com/jamesotron/faye-rails/issues/27\n" }, { "from": "human", "value": "class AnnounceController < FayeRails::Contro...
ruby
chosen
[ { "from": "system", "value": "Add authentication to Feedback form\n\nrefs #1554\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\n# This file is part of Mconf-Web, a web application that provides access\n# to the Mconf webconferencing system. Copyright (C) 2010-2012 Mconf\n#\n# This fi...
ruby
chosen
[ { "from": "system", "value": "Add private declaration to patients controller\n" }, { "from": "human", "value": "class PatientsController < ApplicationController\n\n def index\n therapist = Therapist.find(session[:therapist_id])\n @patients = Patient.all\n end\n\n def create\n therapi...
ruby
chosen
[ { "from": "system", "value": "Integrate the helper methods back into the projects controller and remove the p params\n" }, { "from": "human", "value": "class ProjectsController < ApplicationController\r\n \r\n def new\r\n \tif true #is_professor?\r\n \t\t#@professor = current_professor\r\n ...
ruby
chosen
[ { "from": "system", "value": "Allow make_teachers to make students\n" }, { "from": "human", "value": "class StudentsController < ApplicationController\n\n def account_settings\n @current_user = current_user\n @js_file = 'student'\n end\n\n def make_teacher\n if current_user.update(ro...
ruby
chosen
[ { "from": "system", "value": "Remove mapping kind 'import' restriction.\n" }, { "from": "human", "value": "class Ontology\n module ImportMappings\n extend ActiveSupport::Concern\n\n included do\n def is_imported?\n import_mappings.present?\n end\n\n def is_imported_f...
ruby
chosen
[ { "from": "system", "value": "Support grouping by \"endpoint\" with skylight instrumentation\n\nThis will cause queries with the same name to be grouped together" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule GraphQL\n module Tracing\n class SkylightTracing < Platfo...
ruby
chosen
[ { "from": "system", "value": "Add support for X.509 encrypted private key\n\nX509PrivateKey#valid?\n- uses the @options[:passin] as the argument for \"openssl rsa -passin\" option\n- if the @options[:passin] is set, it requires that the private key be encrypted\n- if the @options[:passin] is not set, \"echo...
ruby
chosen
[ { "from": "system", "value": "Support specifying port in Trogdir URL\n" }, { "from": "human", "value": "require 'uri'\n\nmodule TrogdirAPIClient\n class Configuration\n attr_accessor :access_id\n attr_accessor :secret_key\n\n attr_accessor :scheme\n attr_accessor :host\n attr_acc...
ruby
chosen
[ { "from": "system", "value": "Change worker id to executor id key name\n" }, { "from": "human", "value": "require 'amqp'\nrequire 'json'\nrequire 'recursive-open-struct'\nrequire 'open3'\nrequire 'tmpdir'\nrequire 'logger'\n\nrequire_relative 'hyperflow-amqp-executor/helpers'\nrequire_relative '...
ruby
chosen
[ { "from": "system", "value": "Allow config to read from hidden .rehearsal user config\n" }, { "from": "human", "value": "module Rehearsal\n class Configuration\n attr_accessor :auth_envs, :banner_envs, :enabled\n\n def initialize\n @auth_envs ||= [:staging]\n @banner_envs ||= ...
ruby
chosen
[ { "from": "system", "value": "Allow any non-space characters in URL path\n" }, { "from": "human", "value": "require \"rspec/request_describer/version\"\n\nmodule RSpec\n module RequestDescriber\n RESERVED_HEADER_NAMES = %w(\n Content-Type\n Host\n HTTPS\n )\n\n SUPPORTED...
ruby
chosen
[ { "from": "system", "value": "Add test for full test coverage\n" }, { "from": "human", "value": "require 'spec_helper'\n\nclass Validatable\n include ActiveModel::Validations\n attr_accessor :ico\n validates :ico, ico: true\nend\n\ndescribe IcoValidator do\n subject { Validatable.new }\n\n ...
ruby
chosen
[ { "from": "system", "value": "Add model test for uppercase callback\n" }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.describe Course, :type => :model do\n it \"has a valid factory\" do\n factory = FactoryGirl.create(:course)\n expect(factory).to be_valid, lambda { factor...
ruby
chosen
[ { "from": "human", "value": "Delete all supporting page and policy data.\n\nThis needs to execute before the code is loaded\nin order to prevent STI issues when the editions\ntry to be loaded via associations such as featuring.\n\nKeeps documents, editions, and edition translations\nas per usual deletion me...
ruby
chosen
[ { "from": "human", "value": "10398: Add migration to move configatron default settings to root config\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\n\nclass MoveDefaultSettingsToRootConfig < ActiveRecord::Migration[6.0]\n def up\n return unless configatron.key?(:default_sett...
ruby
chosen
[ { "from": "human", "value": "Add specs for wire to guard constant change\n" }, { "from": "gpt", "value": "require \"spec_helper\"\n\ndescribe Protocop::Wire do\n\n describe \"::VARINT\" do\n\n it \"returns 0\" do\n expect(Protocop::Wire::VARINT).to eq(0)\n end\n end\n\n describe \"...
ruby
chosen
[ { "from": "system", "value": "Move member logic into seperate task\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire_relative './upgrader/member'\n\nmodule GraphQL\n class Railtie < Rails::Railtie\n rake_tasks do\n namespace :graphql do\n task :upgrade, ...
ruby
chosen
[ { "from": "system", "value": "Add method to read in the _alignment_qc.txt data\n\nLet the library know how to read in its own data file & put them in a\nhandy hash for use down the road in the report\n" }, { "from": "human", "value": "# Copyright (c) 2014, Stuart Glenn, OMRF\n# Distributed under...
ruby
chosen
[ { "from": "system", "value": "Handle errors during compilation of CoffeeScript.\n" }, { "from": "human", "value": "# -*- encoding: UTF-8 -*-\n\nrequire 'rack'\nrequire 'coffee-script'\nrequire 'sprockets'\n\nmodule Peaberry\n class DotJs\n\n def initialize\n @sprockets = Sprockets::Envi...
ruby
chosen
[ { "from": "system", "value": "Print usage message only when there is a file\n" }, { "from": "human", "value": "module Spicerack\n class Usage\n\n attr_accessor :spice\n\n def initialize(spice)\n self.spice = spice\n end\n\n def display_message\n puts (\"\\n\" + usage_file)...
ruby
chosen
[ { "from": "system", "value": "Use public github url format.\n" }, { "from": "human", "value": "#\n# Copyright 2012-2014 Chef Software, Inc.\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# You may obtai...
ruby
chosen
[ { "from": "system", "value": "Add rspec dependency for testing\n\nSigned-off-by: Aniket Pant <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@aniketpant.com>\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include...
ruby
chosen
[ { "from": "human", "value": "Add ChiefTransformer tame update spec\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe ChiefTransformer::Processor::TameUpdate do\n before(:all) { preload_standing_data }\n after(:all) { clear_standing_data }\n\n let(:sample_operation_date) { Da...
ruby
chosen
[ { "from": "system", "value": "Fix searching elements by class name from a tree including a text node by implementing the missing class_list method\n" }, { "from": "human", "value": "require 'erb'\n\nmodule Arbre\n module HTML\n\n class TextNode < Element\n\n builder_method :text_node\n\...
ruby
chosen
[ { "from": "system", "value": "Remove leading \"if\" decreased coverage\n" }, { "from": "human", "value": "module Bundle\n class BrewServices\n def self.stop(name)\n started = `brew services list`.lines.grep(/^#{Regexp.escape(name)} +started/).any?\n return true unless started\n ...
ruby
chosen
[ { "from": "system", "value": "Create placeholder JS manifest file.\n\nAs discussed in #102.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire \"thor/group\"\n\nmodule Combustion\n class Generator < Thor::Group\n include Thor::Actions\n\n def self.source_root\n ...
ruby
chosen
[ { "from": "system", "value": "Revert incorrect changes to Python3 Cask\n\nLeave updated homepage URL in place" }, { "from": "human", "value": "cask :v1 => 'python33' do\n version '3.4.3'\n sha256 '7e59f823f82da5ec7e2af4449a5e33c09f5b755a8acd9cec98371da8c2b2b52b'\n\n url \"https://www.python.o...
ruby
chosen
[ { "from": "system", "value": "Fix Rubocop warnings - indentation\n" }, { "from": "human", "value": "require 'spec_helper'\nrequire 'test_doubles'\n\ndescribe LightService::Orchestrator do\n class OrchestratorTestReduce\n extend LightService::Orchestrator\n\n def self.run(context, steps)\n...
ruby
chosen
[ { "from": "system", "value": "Remove unnecessary conditional in cookie setting for 2SV\n\nThis conditional is always true, since `expires_seconds` is a constant\nthat is set in the User model, and never overridden.\n\nI'm unsure why this conditional ever existed - ideas welcome.\n" }, { "from": "hum...
ruby
chosen
[ { "from": "system", "value": "Call permissions rake from migration\n" }, { "from": "human", "value": "Sequel.migration do\n up do\n alter_table :visualizations do\n set_column_allow_null :permission_id, false\n add_foreign_key [:permission_id], :permissions, null: false\n end\n ...
ruby
chosen
[ { "from": "system", "value": "Fix inverse logic in MigrationDateChecker\n" }, { "from": "human", "value": "require 'time'\n\nmodule CommitMonitorHandlers::Batch\n class GithubPrCommenter::MigrationDateChecker\n include Sidekiq::Worker\n sidekiq_options :queue => :miq_bot\n\n include Ba...
ruby
chosen
[ { "from": "system", "value": "Change titlefmt of API parameter\n" }, { "from": "human", "value": "#\n# Syoboemon::QueryGenerator::TodaysPrograms\n#\n\n# コンストラクタに渡されたユーザネームからrss2.phpのクエリを生成する\n\nmodule Syoboemon\n\tmodule QueryGenerator\n\t\tclass TodaysPrograms\n\t\t\tattr_accessor :usr\n\t\t\t\...
ruby
chosen
[ { "from": "system", "value": "Fix firefox undefined symbol: g_type_check_instance_is_fundamentally_a\n" }, { "from": "human", "value": "case node[:platform_family]\nwhen 'debian'\n # firefox runs at compile time and firefox package is not up to date on Ubuntu 14.04-1\n execute 'sudo apt-get up...
ruby
chosen