conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Improve rake detection to avoid connecting to twitter\n" }, { "from": "human", "value": "if defined?(Rake) || Rails.env.test?\n Rails.logger.warn { \"Using hardcoded values for twitter url length\" }\n TootTransformer::twitter_short_url_length = 23\n TootTransfor...
ruby
chosen
[ { "from": "system", "value": "Allow Avatar to simply use a string instead of gravatar\n\nuse for my own app\n" }, { "from": "human", "value": "module Commontator\n module SharedHelper\n def commontator_thread(commontable)\n user = Commontator.current_user_proc.call(self)\n thread =...
ruby
chosen
[ { "from": "system", "value": "Add ability to flush per request for local testing.\n" }, { "from": "human", "value": "class ApplicationController < ActionController::Base\n protect_from_forgery\nend\n" }, { "from": "gpt", "value": "class ApplicationController < ActionController::Base...
ruby
chosen
[ { "from": "system", "value": "Make sure data is loaded before removing file\n\nOtherwise there will be nothing to sync\n" }, { "from": "human", "value": "require 'digest/md5'\nrequire 'yaml'\n\nmodule Feed2Email\n class FeedDataFile\n def initialize(uri)\n @uri = uri\n @dirty = fal...
ruby
chosen
[ { "from": "system", "value": "Stop coercing form post data in the output compiler\n\nNow that we require a schema, we can depend on that for form post data type coercions. Avoiding the coercions here means we also avoid errors due to the naive approach we’d taken so far. This was actually manifested in the ...
ruby
chosen
[ { "from": "human", "value": "Add a package for Hyperedit.\n" }, { "from": "gpt", "value": "class Hyperedit < Kosmos::Package\n title 'Hyperedit'\n url 'http://www.kerbaltekaerospace.com/?download=hyperedit%2FHyperEdit-1.2.4.2_for-KSP-0.21.1%2B.zip'\n\n def install\n merge_directory 'GameDa...
ruby
chosen
[ { "from": "system", "value": "Support `install` command on FreeBSD\n" }, { "from": "human", "value": "module SpecInfra\n module Command\n class FreeBSD < Base\n def check_enabled(service, level=3)\n \"service -e | grep -- #{escape(service)}\"\n end\n\n def check_install...
ruby
chosen
[ { "from": "human", "value": "Add spec to test fib.rb.\n" }, { "from": "gpt", "value": "require 'rspec'\nrequire './fib'\n\ndescribe '#fib(n)' do\n context 'When given 0' do\n let(:value) { fib(0) }\n\n it 'returns 0' do\n expect(value).to eq 0\n end\n end\n\n context 'When given...
ruby
chosen
[ { "from": "system", "value": "Update Apache Directory Studio (2.0.0.v20151221-M10)\n" }, { "from": "human", "value": "cask 'apache-directory-studio' do\n version '2.0.0.v20150606-M9'\n sha256 '9eca84d081a500fec84943600723782a6edac05eeab6791fe8a964e49c6d834e'\n\n # apache.org is the official d...
ruby
chosen
[ { "from": "system", "value": "Use magic number for Adobe Air.\n" }, { "from": "human", "value": "module UnpackStrategy\n class Air\n include UnpackStrategy\n\n using Magic\n\n def self.can_extract?(path)\n path.extname == \".air\"\n end\n\n def dependencies\n @dependenc...
ruby
chosen
[ { "from": "system", "value": "Fix iOS deployment target version in podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"SwiftJSONRPC\"\n s.version = \"0.7.0\"\n s.summary = \"Swift JSON-RPC client based on Alamofire\"\n s.homepage ...
ruby
chosen
[ { "from": "system", "value": "Correct syntax for gh markdown\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'hubdown/version'\n\nGem::Specification.new do |gem|\n gem.name...
ruby
chosen
[ { "from": "system", "value": "Refactor BinNumberList to use Support::Lists\n" }, { "from": "human", "value": "module NetSuite\n module Records\n # TODO this is fairly messy: shouldn't mix multiple classes in one file\n # might be possible to trash the GenericField as well\n \n class...
ruby
chosen
[ { "from": "system", "value": "Revert - we will not work with table dumps\n" }, { "from": "human", "value": "require \"active_record\"\nrequire \"active_record/base\"\nrequire \"active_record/schema_dumper\"\n\nmodule ActiveRecord\n class SchemaDumper\n def self.dump_with_fk(connection=Active...
ruby
chosen
[ { "from": "system", "value": "Allow to be used with Rails 4" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/swipe-rails/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Delian Asparouhov\"]\n gem.email = [\"me@...
ruby
chosen
[ { "from": "human", "value": "Add local CocoaPods spec file.\n" }, { "from": "gpt", "value": "Pod::Spec.new do |spec|\n spec.name = 'EventEmitter'\n spec.summary = 'Node.js inspired EventEmitter for Objective C.'\n spec.version = '0.1.2'\n spec.license =...
ruby
chosen
[ { "from": "system", "value": "Rework to make it clearer what this is doing\n" }, { "from": "human", "value": "require 'open-uri'\n\nclass HomeController < ApplicationController\n def index\n @divisions = Division.with_rebellions.order(\"division_date DESC\", \"clock_time DESC\", \"division_n...
ruby
chosen
[ { "from": "system", "value": "JariBakken: Reduce the polling interval in Ruby's Wait class.\n\n\ngit-svn-id: aa1aa1384423cb28c2b1e29129bb3a91de1d9196@15890 07704840-8298-11de-bf8c-fd130f914ac9\n" }, { "from": "human", "value": "module Selenium\n module WebDriver\n class Wait\n\n DEFAULT...
ruby
chosen
[ { "from": "system", "value": "Add tests for files that were lacking them\n" }, { "from": "human", "value": "module SavedGardens\n class SnapShot < Mutations::Command\n required do\n string :name\n model :device, class: Device\n end\n\n def execute\n SavedGarden.transact...
ruby
chosen
[ { "from": "system", "value": "Change endpoint for generating standard set from query\n" }, { "from": "human", "value": "require 'grape'\nrequire_relative '../config/mongo'\nrequire_relative 'entities/standard_set'\nrequire_relative '../importer/transformers/query_to_standard_set'\n\nmodule API\n...
ruby
chosen
[ { "from": "system", "value": "Fix some random test failures\n" }, { "from": "human", "value": "require 'test_helper'\n\nmodule SnipSnip\n class FilterTest < ActiveSupport::TestCase\n Post = Class.new\n Comment = Class.new\n\n class FilterDouble\n def filtered?(_)\n true\n ...
ruby
chosen
[ { "from": "system", "value": "Refactor and clean up diff model a little\n" }, { "from": "human", "value": "class Commit < ActiveRecord::Base\n validates_format_of :sha1, :with => /^[a-z0-9]+$/\n validates_length_of :sha1, :is => 40\n\n def repository_dir\n \"/home/todd/arb/arb\"\n end\n\n...
ruby
chosen
[ { "from": "system", "value": "Fix deprecation warnings in tests\n" }, { "from": "human", "value": "require 'minitest/autorun'\nrequire 'sqlite3'\nrequire 'active_record'\nrequire 'acts_as_learnable'\n\nActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:')\n\ndef setup...
ruby
chosen
[ { "from": "system", "value": "Change to reduce test time\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nRSpec.describe Benchmark::Perf, 'assertions' do\n it \"passes asertion by performing under threshold\" do\n bench = Benchmark::Perf\n assertion = bench.assert_perfo...
ruby
chosen
[ { "from": "system", "value": "Update Playback.app to version 1.3.1\n" }, { "from": "human", "value": "cask :v1 => 'playback' do\n version '1.3.0'\n sha256 'e161c0589f57f840428e946f3d12301377cdcb9aaba79a5f39c1a5048314b944'\n\n # github.com is the official download host per the vendor homepage\...
ruby
chosen
[ { "from": "human", "value": "Add basic specs for source recipe" }, { "from": "gpt", "value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\ndescribe 'kafka::source' do\n let :chef_run do\n ChefSpec::ChefRunner.new(platform: 'centos', version: '6.4').converge(described_recipe)\n end\n\n it ...
ruby
chosen
[ { "from": "system", "value": "Enable running specific tests with focus: true" }, { "from": "human", "value": "# encoding: UTF-8\nrequire 'uglifier'\nrequire 'rspec'\nrequire 'sourcemap'\n\n# Requires supporting files with custom matchers and macros, etc,\n# in ./support/ and its subdirectories.\...
ruby
chosen
[ { "from": "system", "value": "Fix deprecation warning on treat_symbols_as_metadata_keys_with_true_values\n\nIt is now set to true as default and setting it to false has no effect.\n" }, { "from": "human", "value": "require \"coveralls\"\nCoveralls.wear!\n\nrequire \"simplecov\"\nSimpleCov.start ...
ruby
chosen
[ { "from": "system", "value": "Create a namespace for spec environment helpers." }, { "from": "human", "value": "require \"rubygems\"\nrequire \"bundler/setup\"\nrequire \"vcr\"\nrequire \"webmock\"\n\nrequire \"spbus\"\n\nDir[\"./spec/support/**/*.rb\"].sort.each { |f| require f }\n\nVCR.configu...
ruby
chosen
[ { "from": "system", "value": "Use the vcr helper for rspec, to make testing easier.\n" }, { "from": "human", "value": "$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)\nrequire 'particle'\n\nrequire 'vcr'\n\nVCR.configure do |c|\n c.cassette_library_dir = 'spec/testdata/vcr_cassettes'...
ruby
chosen
[ { "from": "system", "value": "Use RSpec >= 1.1.12 so 1.2 can be used as well\n" }, { "from": "human", "value": "require 'pathname'\nrequire 'rubygems'\n\ngem 'rspec', '~>1.1.12'\nrequire 'spec'\n\nrequire Pathname(__FILE__).dirname.expand_path.parent + 'lib/dm-is-state_machine'\n\ndef load_drive...
ruby
chosen
[ { "from": "system", "value": "Use RSpec >= 1.1.12 so 1.2 can be used as well\n" }, { "from": "human", "value": "require 'pathname'\nrequire 'rubygems'\n\ngem 'rspec', '~>1.1.12'\nrequire 'spec'\n\nROOT = Pathname(__FILE__).dirname.parent.expand_path\n\n# use local dm-adjust if running from dm-mo...
ruby
chosen
[ { "from": "system", "value": "Add tempfile require - need for older ruby versions\n" }, { "from": "human", "value": "require 'simplecov'\nSimpleCov.start\n\n$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)\n\nrequire 'port_map'\n" }, { "from": "gpt", "value": "require 'simp...
ruby
chosen
[ { "from": "system", "value": "Allow any ruby 2.3 version\n" }, { "from": "human", "value": "require File.expand_path('../lib/trans_forms/version', __FILE__)\n\nGem::Specification.new do |s|\n s.authors = ['Daniel Viklund']\n s.email = ['dannemanne@gmail.com']\n s.summary = 'Gem ...
ruby
chosen
[ { "from": "system", "value": "Add secret_key_base since not adding it causes depreciation errors in rails 4.\n" }, { "from": "human", "value": "# Be sure to restart your server when you modify this file.\n\n# Your secret key for verifying the integrity of signed cookies.\n# If you change this ke...
ruby
chosen
[ { "from": "human", "value": "Add user mailer from spree_auth_devise\n" }, { "from": "gpt", "value": "module Spree\n class UserMailer < BaseMailer\n def reset_password_instructions(user)\n recipient = user.respond_to?(:id) ? user : Spree.user_class.find(user)\n @edit_password_reset_...
ruby
chosen
[ { "from": "system", "value": "Update minitest version in scaffold dependancies\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"siba-c6y-demo/version\"\n\nGem::Specification.new do |s|\n s.name = \"siba-c6y-demo\"\n ...
ruby
chosen
[ { "from": "system", "value": "Use VCR for Twilio Service Integration Test\n" }, { "from": "human", "value": "require \"rails_helper\"\n\nRSpec.feature 'SMS notifications', :type => :feature do\n let(:password) { 'asdfasdf' }\n let(:admin) { create :admin, :password => password }\n let!(:tourn...
ruby
chosen
[ { "from": "system", "value": "Correct Typo in User Mailer Spec.\n" }, { "from": "human", "value": "require \"rails_helper\"\n\nRSpec.describe UserMailerMailer, type: :mailer do\n pending \"add some examples to (or delete) #{__FILE__}\"\nend\n" }, { "from": "gpt", "value": "require \...
ruby
chosen
[ { "from": "system", "value": "Move version checking into extension.\n" }, { "from": "human", "value": "require 'ffi'\n\nrequire 'harfbuzz/ffi_additions'\n\nmodule Harfbuzz\n\n extend FFI::Library\n\n ffi_lib 'harfbuzz'\n\n typedef :pointer, :hb_destroy_func_t\n typedef :uint32, :hb_codepoint...
ruby
chosen
[ { "from": "system", "value": "Update summary/description in gemspec; more to follow\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'adjustable_image/version'\n\nGem::Specification.ne...
ruby
chosen
[ { "from": "system", "value": "Handle Oga edge cases where parsing throws an error\n" }, { "from": "human", "value": "require 'open-uri'\nrequire 'open_uri_redirections'\n\nclass Link\n\n attr_reader :title\n\n def initialize(url)\n @url = url\n @title = self.grab_title\n end\n\n def gr...
ruby
chosen
[ { "from": "system", "value": "Include test-unit as development dependency\n\nTests were failing with ruby 2.3.3.\ntest-unit was removed from ruby in 2.2.\n" }, { "from": "human", "value": "$LOAD_PATH.unshift 'lib'\nrequire \"agile_serializer/version\"\n\nGem::Specification.new do |s|\n s.name ...
ruby
chosen
[ { "from": "system", "value": "Fix ssh recipe: mkdir_p /var/run/sshd\n" }, { "from": "human", "value": "#\n# Cookbook Name:: ssh\n# Recipe:: default\n#\n# Copyright 2013, YOUR_COMPANY_NAME\n#\n# All rights reserved - Do Not Redistribute\n#\npackage \"ssh\" do\n action :install\nend\n\ntemplate \...
ruby
chosen
[ { "from": "system", "value": "Raise early if no block or character device could be found\n" }, { "from": "human", "value": "module FileSpecs\n def self.configure_types\n return if @configured\n\n @file = tmp(\"test.txt\")\n @dir = Dir.pwd\n @fifo = tmp(\"test_fifo\")\n @li...
ruby
chosen
[ { "from": "system", "value": "Update ARM gcc to `6-2016-q6-update`\n\nThe precompiled download is now hosted on developer.arm.com." }, { "from": "human", "value": "require 'formula'\n\nclass ArmNoneEabiGcc < Formula\n\n homepage 'https://launchpad.net/gcc-arm-embedded'\n version '5-2016-q3-upd...
ruby
chosen
[ { "from": "system", "value": "Clean up podspec and add platform info.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'PSAutolayout'\n s.version = '1.0'\n s.license = { :type => 'Apache', :file => 'LICENSE' }\n s.homepage = 'https://github.com/shepting...
ruby
chosen
[ { "from": "system", "value": "Update wording in ActiveAdmin specs.\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'Active Admin' do\n\n before(:all) do\n I18n.locale = :en\n end\n\n it \"authorizes a superadmin\" do\n @user = create(:superadmin)\n sign_in @user\...
ruby
chosen
[ { "from": "system", "value": "Change miniprofiler shortcut to Shift+P\n" }, { "from": "human", "value": "if Rails.env.development?\n require 'rack-mini-profiler'\n\n # initialization is skipped so trigger it\n Rack::MiniProfilerRails.initialize!(Rails.application)\n Rack::MiniProfiler.config...
ruby
chosen
[ { "from": "system", "value": "Update gitlab-grit dependency to 2.7.1\n\nChanges to gitlab-grit since 2.6.5 included below.\n\n== 2.7.1\n * Suppress 'unkown header' warnings\n * Add process.out to CommandFailed error\n\n== 2.7.0\n * Remove the `chdir:` option for thread-safety\n * Automatically set the `...
ruby
chosen
[ { "from": "system", "value": "Use the correct certificate name to sign Mac installer\n" }, { "from": "human", "value": "# The path where the installer will be outputted to\ndefault[:package][:output_dir] = File.expand_path(\"../../../../dist\", __FILE__)\ndefault[:package][:support_dir] = File.e...
ruby
chosen
[ { "from": "system", "value": "Use the parameter in error reporting for checking the amount\n" }, { "from": "human", "value": "require_relative 'spinach_runner'\n\nmodule Integration\n module ErrorReporting\n include Filesystem\n\n def check_error_messages(n = 1)\n @stderr.must_match ...
ruby
chosen
[ { "from": "system", "value": "Add data_formatter.rb to gemspec file\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 'pandata'\n s.version = '1.0.0'\n s.date = '2013-01-27'\n s.summary = 'A Pandora web scraper'\n s.description...
ruby
chosen
[ { "from": "system", "value": "Revert bad idea (originating from @hmans)\n" }, { "from": "human", "value": "# A simple wrapper around HTTParty with the single purpose of setting some\n# default options. And doing some wrapping.\n#\nclass HTTP\n include HTTParty\n\n # Don't verify SSL certificat...
ruby
chosen
[ { "from": "system", "value": "Include the files in the spec list\n\nFix #2\r\nFix #1" }, { "from": "human", "value": "# coding: utf-8\nlib = \"hurley-excon\"\nlib_file = File.expand_path(\"../lib/#{lib}.rb\", __FILE__)\nFile.read(lib_file) =~ /\\bVERSION\\s*=\\s*[\"'](.+?)[\"']/\nversion = $1\n\...
ruby
chosen
[ { "from": "human", "value": "Support applying advice to implicit method/methods option\n" }, { "from": "gpt", "value": "class A\n def test\n puts 'test'\n end\nend\n\n##############################\n\n$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))\n\nrequire 'aspector'\n...
ruby
chosen
[ { "from": "system", "value": "Make sure we connect to the database before loading models\n" }, { "from": "human", "value": "require './mini_record'\nrequire './user'\nrequire './blog_post'\n\nMiniRecord::Database.database = 'blog.db'\n\njesse = User.where('email = ?', 'jesse@codeunion.io').first...
ruby
chosen
[ { "from": "system", "value": "Remove checks on constants that are true.\n" }, { "from": "human", "value": "require 'digest/crc16_ccitt'\n\nmodule Digest\n #\n # Implements the CRC16_CCITT algorithm used in QT algorithms.\n #\n # @author Matthew Bednarski\n #\n class CRC16QT < CRC16CCITT\n\...
ruby
chosen
[ { "from": "system", "value": "Set serialization level to sequential\n" }, { "from": "human", "value": "require 'forwardable'\n\nmodule Abid\n class StateManager\n # StateService updates the job status in a transaction.\n class StateService\n def initialize(model, signature)\n ...
ruby
chosen
[ { "from": "system", "value": "Remove to_boolean method. Improve the Ruby code a bit.\n\n* Use .each instead of .find_all\n* Remove useless intermediary variable in the iterator.\n" }, { "from": "human", "value": "require 'puppet'\n\n# Possible values for an enabled repo are 'yes', '1', and 'true...
ruby
chosen
[ { "from": "system", "value": "Change where we hook into SecureRandom to the gen_random function\n" }, { "from": "human", "value": "require \"securerandom\"\n\nmodule SecureRandom\n def self.random_bytes(n = nil)\n n = n ? n.to_int : 16\n Array.new(n) { Kernel.rand(256) }.pack(\"C*\")\n e...
ruby
chosen
[ { "from": "human", "value": "Add DSL for handling XML\n" }, { "from": "gpt", "value": "module Parser\n\n class XMLBuilderEngine\n\n attr_reader :tag\n attr_reader :betweenTag\n attr_reader :ident\n attr_accessor :identIncrement\n\n public\n\n def initialize(pBaseSpaceIdent =...
ruby
chosen
[ { "from": "system", "value": "Mark start of 2.4.5 dev\n" }, { "from": "human", "value": "# encoding: utf-8\nmodule Mongoid #:nodoc\n VERSION = \"2.4.4\"\nend\n" }, { "from": "gpt", "value": "# encoding: utf-8\nmodule Mongoid #:nodoc\n VERSION = \"2.4.5\"\nend\n" } ]
ruby
chosen
[ { "from": "system", "value": "Create folder for version api docs\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'json'\n\nmodule SwaggerDocsGenerator\n # # Generate JSON file\n #\n # Create a json file for swagger-ui service\n #\n # @!attribute [r] swagger_file\...
ruby
chosen
[ { "from": "system", "value": "Add Icinga status for start of link checker\n\nWe want to be a bit more clear about which server is running the link checker\ntask. We were a bit confused this morning because the \"freshold\" had been\nexceeded and we weren't sure what was happening.\n" }, { "from": "h...
ruby
chosen
[ { "from": "system", "value": "Add docs for RSpec extension\n" }, { "from": "human", "value": "require 'resubject'\n\nmodule Resubject\n module RspecHelpers\n def self.included(base)\n base.instance_eval do\n let(:template) do\n if defined? ActionView\n ActionV...
ruby
chosen
[ { "from": "system", "value": "Include code for concatenate array\n" }, { "from": "human", "value": "# Concatenate Two Arrays\n\n# I worked on this challenge [by myself, with: ].\n\n\n# Your Solution Below\n\ndef array_concat(array_1, array_2)\n # Your code here\nend\n" }, { "from": "gpt...
ruby
chosen
[ { "from": "human", "value": "Add some tests for behavior of a header block." }, { "from": "gpt", "value": "require 'test_helper'\n\nmodule RubyDiff\n class HeaderBlockTest < Test::Unit::TestCase\n def test_header_block_should_identify_left_and_right_file\n header = Block.header\n h...
ruby
chosen
[ { "from": "system", "value": "Add error_description test for 404\n" }, { "from": "human", "value": "require 'helper'\nrequire 'deviantart'\n\ndescribe DeviantArt::Error do\n before(:all) do\n @da = DeviantArt.new\n end\n describe '#get_deviation' do\n before do\n @error = fixture('...
ruby
chosen
[ { "from": "system", "value": "Update gemspec author and added ActiveSupport and ActiveRecord as dependencies.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'has_breadcrumb...
ruby
chosen
[ { "from": "system", "value": "Add some extra comments to explaining everything happening in the code.\n" }, { "from": "human", "value": "# reverse_string.rb\n\nmodule ReverseString\n\n def self.reverse_string(string)\n string.reverse\n end\n\n def self.prompt_user\n print 'Enter a strin...
ruby
chosen
[ { "from": "system", "value": "Update handling of session secret\n" }, { "from": "human", "value": "require 'sinatra/base'\nrequire 'sinatra/asset_pipeline'\n\nclass ApplicationController < Sinatra::Base\n set :assets_paths, %w(./../assets/stylesheets ./../assets/images)\n set :assets_precompil...
ruby
chosen
[ { "from": "system", "value": "Remove redundant production 'def new'\n" }, { "from": "human", "value": "class ProductionsController < ApplicationController\n before_action :set_production, only: [:show, :update, :destroy]\n\n def index\n @productions = Production.all\n @productions = curr...
ruby
chosen
[ { "from": "human", "value": "Add example demonstrating all spinners\n" }, { "from": "gpt", "value": "require_relative \"../lib/whirly\"\nrequire \"paint\"\n\nWhirly::SPINNERS.keys.sort.each{ |spinner_name|\n Whirly.start(spinner: spinner_name, status: spinner_name){\n sleep 1\n }\n}\n" } ...
ruby
chosen
[ { "from": "system", "value": "Add Spec for Trimming Content in View\n\nAdd spec tests for trimming content to a specific length in the views.\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe ApplicationHelper do\n describe \"flash_class\" do\n it { flash_class(:notice).sh...
ruby
chosen
[ { "from": "system", "value": "Define webhook class methods by opening the singleton class\n" }, { "from": "human", "value": "require 'shipit/webhooks/handlers'\n\nmodule Shipit\n module Webhooks\n def self.default_handlers\n {\n 'push' => [Handlers::PushHandler],\n 'status...
ruby
chosen
[ { "from": "system", "value": "Fix to use agree command\n" }, { "from": "human", "value": "require 'travis/cli'\n\nmodule Travis\n module CLI\n class Init < Command\n def run\n check_already_exists\n create_travis_file\n end\n\n private\n\n def check_already_...
ruby
chosen
[ { "from": "system", "value": "Fix logger spam caused by Hashie used in Ridley\n\nSee Hashie [issue](https://github.com/intridea/hashie/issues/394)\nSolution based on the Hashie recommendation to disable warnings:\nhttps://github.com/intridea/hashie#how-does-mash-handle-conflicts-with-pre-existing-methods\n\...
ruby
chosen
[ { "from": "system", "value": "Print all existing printers in array for debugging\n" }, { "from": "human", "value": "module Zebra\n class PrintJob\n class UnknownPrinter < StandardError\n def initialize(printer)\n super(\"Could not find a printer named #{printer}\")\n end\n ...
ruby
chosen
[ { "from": "system", "value": "Upgrade foodcritic dependency to allow also v2.x\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/guard/foodcritic/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Chris Griego\"]\n gem.e...
ruby
chosen
[ { "from": "system", "value": "Fix extraction of existing dynamic styles from FS when style name is used as the file name\n\nIf we have a dynamic style, dynamic_42x42, and the style name\nis used as the file name, the file name may be dynamic_42x42.jpg,\nso when looking at the FS and pulling out our existing...
ruby
chosen
[ { "from": "system", "value": "Correct the number of args" }, { "from": "human", "value": "# encoding: utf-8\n\nclass OpenGraphElement < ::HTMLProofer::Element\n def src\n @content\n end\n\n def url\n src\n end\nend\n\nclass OpenGraphCheck < ::HTMLProofer::Check\n def missing_src?\n ...
ruby
chosen
[ { "from": "system", "value": "Remove helper method used by deprecated code.\n" }, { "from": "human", "value": "module Neography\n class PropertyContainer < OpenStruct\n attr_reader :neo_id\n\n def initialize(hash=nil)\n @table = {}\n if hash\n @neo_id = hash[\"self\"].spl...
ruby
chosen
[ { "from": "system", "value": "Add debugging and task management to CreateDisk\n" }, { "from": "human", "value": "require 'methadone'\nrequire 'vcloud/core'\nrequire 'pp'\n\nmodule Vcloud\n module CLI\n module Utils\n class CreateDisk\n\n include Methadone::Main\n include M...
ruby
chosen
[ { "from": "system", "value": "Fix invitation migration script\n* The migration failed due to association removed\n" }, { "from": "human", "value": "class ChangeCourseUserInvitations < ActiveRecord::Migration\n def up\n add_column :course_user_invitations, :course_id, :integer\n add_column...
ruby
chosen
[ { "from": "system", "value": "Prepare for next development cycle\n" }, { "from": "human", "value": "module Asciidoctor\n module Mathematical\n VERSION = \"0.1.0\"\n end\nend\n" }, { "from": "gpt", "value": "module Asciidoctor\n module Mathematical\n VERSION = \"0.2.0.dev\"\n...
ruby
chosen
[ { "from": "system", "value": "Handle broken repositories even better.\n" }, { "from": "human", "value": "module MGit\n module Registry\n def self.all\n self.load.map { |name, path| Repository.new(name, path) }.sort_by(&:path).select(&:available?)\n end\n\n def self.each(&block)\n ...
ruby
chosen
[ { "from": "system", "value": "Fix ARC setting in podspec.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"CDEvents\"\n s.version = \"1.1.2\"\n s.summary = \"An Objective-C wrapper for Mac OS X’s FSEvents C API.\"\n s.homepage = \"http://rastersize.g...
ruby
chosen
[ { "from": "system", "value": "Update default migration version to include retryable column\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nclass AddQue < ActiveRecord::Migration\n def self.up\n # The current version as of this migration's creation.\n Que.migrate! :vers...
ruby
chosen
[ { "from": "system", "value": "Fix brew audit: sourceforge.io url preferred\n" }, { "from": "human", "value": "class Unfs3 < Formula\n desc \"User-space NFSv3 server\"\n homepage \"http://unfs3.sourceforge.net\"\n url \"https://downloads.sourceforge.net/project/unfs3/unfs3/0.9.22/unfs3-0.9.22....
ruby
chosen
[ { "from": "human", "value": "Test for manual links exporter\n" }, { "from": "gpt", "value": "require \"fast_spec_helper\"\nrequire \"support/govuk_content_schema_helpers\"\n\nrequire \"manual_publishing_api_links_exporter\"\n\ndescribe ManualPublishingAPILinksExporter do\n subject {\n Manual...
ruby
chosen
[ { "from": "system", "value": "Add test to allow trailing whitespace\n" }, { "from": "human", "value": "require_relative \"../../../test_helper\"\n\ndescribe Eye::Patch::ValueParser do\n\n it \"parses time values\" do\n assert_equal 2.weeks, Eye::Patch::ValueParser.parse(\"2 weeks\")\n ass...
ruby
chosen
[ { "from": "system", "value": "Remove the AWS_ACCESS_KEY_ID stuff, which should be set up in ENV anyway\n" }, { "from": "human", "value": "require \"rubygems\"\nrequire \"test/unit\"\nrequire \"shoulda\"\nrequire \"mocha\"\n\n$LOAD_PATH.unshift(File.join(File.dirname(__FILE__) , '..', 'lib'))\n$L...
ruby
chosen
[ { "from": "system", "value": "Add flexmock assertion heleprs to minitest specs\n" }, { "from": "human", "value": "ENV[\"RAILS_ENV\"] = \"test\"\nENV['ELASTICSEARCH_URL'] = setting_to_nil_to_disable_search_in_test = nil\n\nrequire File.expand_path(\"../../config/environment\", __FILE__)\nrequire ...
ruby
chosen
[ { "from": "human", "value": "Add Jenkins ver. 1.658 recipe.\n" }, { "from": "gpt", "value": "package \"java-1.8.0-openjdk\" do\n action :install\nend\n\nremote_file \"#{Chef::Config[:file_cache_path]}/jenkins-1.658-1.1.noarch.rpm\" do\n source \"http://pkg.jenkins-ci.org/redhat/jenkins-1.658-1...
ruby
chosen
[ { "from": "system", "value": "Fix spec & and specs\n" }, { "from": "human", "value": "require 'spec_helper'\n\nRSpec.describe FlexibleConfig::Overview do\n subject(:instance) { described_class.new }\n\n specify { expect(subject.call).to be_an Hash }\n\n describe \"example category\" do\n s...
ruby
chosen
[ { "from": "system", "value": "Update helper tests to include tooltip added in dfc91ad\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe DivisionsHelper, type: :helper do\n describe \"#division_outcome\" do\n context \"Motion passed\" do\n it { expect(helper.division_o...
ruby
chosen
[ { "from": "system", "value": "Add test for when scope key already set" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Rip::Utilities::Scope do\n subject { scope_foo }\n let(:scope_foo) { Rip::Utilities::Scope.new }\n\n before(:each) { scope_foo[:foo] = 111 }\n\n specify { ...
ruby
chosen
[ { "from": "system", "value": "[PH][000000] Change default connector to firefox instead of ghost since everyone uses it during development\n" }, { "from": "human", "value": "module Autobots\n\n # An object that holds runtime settings.\n #\n # Furthermore, Minitest doesn't provide any good way ...
ruby
chosen
[ { "from": "system", "value": "Revert to previous observed failure of TimeoutInListenQueue behavior\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire_relative '../../../test_helper'\nrequire 'socket'\n\nclass TimeoutInListenQueueTest < Test::Unit::TestCase\n\n include L...
ruby
chosen