conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Use MEDIUMTEXT(16MB) type when Mysql is used\n" }, { "from": "human", "value": "class CreateCiJobTraceChunks < ActiveRecord::Migration\n include Gitlab::Database::MigrationHelpers\n\n DOWNTIME = false\n\n def change\n create_table :ci_job_trace_chunks, id: :bi...
ruby
chosen
[ { "from": "system", "value": "Add a little note explaining how to use it.\n" }, { "from": "human", "value": "$:.unshift File.expand_path(\"..\", __FILE__)\n\nrequire 'bundler/setup'\n\nBundler.require(:default)\n\nrequire 'message_hub/provider'\nrequire 'message_hub/message'\nrequire 'message_hu...
ruby
chosen
[ { "from": "system", "value": "Remove the package_name to support older versions of thor. Don't really need it anyway\n" }, { "from": "human", "value": "require 'thor'\nrequire 'proteus'\n\nmodule Proteus\n class CLI < Thor\n package_name \"proteus\"\n\n desc \"init\", \"Initialize a basic...
ruby
chosen
[ { "from": "human", "value": "Implement queue using two stacks\n" }, { "from": "gpt", "value": "require_relative \"stack\"\n\nclass StackQueue\n class UnderflowError < StandardError; end\n\n def initialize\n @stack_1 = Stack.new\n @stack_2 = Stack.new\n end\n\n def enqueue(item)\n @s...
ruby
chosen
[ { "from": "system", "value": "Add basic tests for availabilities controller\n" }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.describe AvailabilitiesController, type: :controller do\n\nend\n" }, { "from": "gpt", "value": "require 'rails_helper'\n\nRSpec.describe Avai...
ruby
chosen
[ { "from": "system", "value": "Use cancancan baked-in aliases to simplify further\n" }, { "from": "human", "value": "# typed: strict\n# frozen_string_literal: true\n\nclass ScraperAbility\n extend T::Sig\n\n include CanCan::Ability\n\n sig { params(owner: T.nilable(Owner)).void }\n def initia...
ruby
chosen
[ { "from": "system", "value": "Update gem's rspec dependency 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 'everything/version'\n\nGem::Specification.new do |spec|\n spec.na...
ruby
chosen
[ { "from": "system", "value": "Add missing apt dependency to checkers cookbook\n" }, { "from": "human", "value": "name 'checkers'\nmaintainer 'Sebastian Wiesner'\nmaintainer_email 'swiesner@lunaryorn.com'\nlicense 'X11/MIT'\ndescription 'Installs all syntax checker...
ruby
chosen
[ { "from": "system", "value": "[CocoaPods] Fix Version Number in Podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"SwiftFlowRecorder\"\n s.version = \"0.2.0\"\n s.summary = \"Time Travel and Hot Reloading for Swift Flow\"\n s.descriptio...
ruby
chosen
[ { "from": "system", "value": "Change hash style to 1.8.7 in tests\n\nDESC:\n[Change]\n1. Change hash style to 1.8.7 in tests\nFor testing 1.8.7\n" }, { "from": "human", "value": "require \"test/unit\"\n\n$LOAD_PATH.unshift(\"#{File.dirname(__FILE__)}\")\nrequire \"test_helper\"\nrequire \"random...
ruby
chosen
[ { "from": "system", "value": "Use a string for error code in tests\n" }, { "from": "human", "value": "describe Chatrix::RequestError do\n let(:response) { { 'errcode' => 666, 'error' => 'my error' } }\n let(:error) { Chatrix::RequestError.new response }\n\n it 'should set the correct error co...
ruby
chosen
[ { "from": "system", "value": "Bump version number to 0.6\n" }, { "from": "human", "value": "require 'rubygems'\n\nSPEC = Gem::Specification.new do |s|\n s.name = \"mediacloth\"\n s.version = \"0.5\"\n s.author = \"Pluron Inc.\"\n s.email = \"support@pluron.com\"\n s....
ruby
chosen
[ { "from": "system", "value": "Read haproxy static_ips from manifest in test\n\n[#148579027]\n\nSigned-off-by: Diego Lemos <48d75b1e8d05d722a97d5c3ce49024e6a466bebe@pivotal.io>\n" }, { "from": "human", "value": "require 'spec_helper'\n\nrequire 'httparty'\n\nRSpec.describe \"haproxy\" do\n\n let...
ruby
chosen
[ { "from": "system", "value": "Remove the hard coded require.\n" }, { "from": "human", "value": "$:.unshift(File.expand_path(\"../lib\", File.dirname(__FILE__)))\n\nputs \"!! REMOVE THIS IN LINE: #{__LINE__} of #{__FILE__}\"\n$:.unshift(\"/Users/cyx/Labs/shield/lib\")\n\nrequire \"shield/contrib\...
ruby
chosen
[ { "from": "system", "value": "Fix mocha teardown to not fail all following tests\n" }, { "from": "human", "value": "require 'rubygems'\ngem 'minitest'\nrequire 'minitest/autorun'\n\nrequire 'mocha_standalone'\n\nclass MiniTest::Unit::TestCase\n include Mocha::API\n\n def teardown\n mocha_ve...
ruby
chosen
[ { "from": "system", "value": "CONFIG: Update method to get database adapter\n" }, { "from": "human", "value": "module DbHelpers\n def db_concat(*args)\n env = ENV['RAILS_ENV'] || 'development'\n adapter = ActiveRecord::Base.configurations.configs_for(env_name:env)[:adapter].to_sym\n ar...
ruby
chosen
[ { "from": "system", "value": "Remove method that doesn't have to be a method\n" }, { "from": "human", "value": "module DidYouMean\n class SimilarAttributeFinder\n attr_reader :columns, :attribute_name\n\n def self.build(exception)\n columns = exception.frame_binding.eval(\"sel...
ruby
chosen
[ { "from": "system", "value": "Remove unused string extensions from Wrapper\n" }, { "from": "human", "value": "require 'allowing/extensions/string'\n\nmodule Allowing\n module Wrappers\n class Wrapper\n using Extensions::String\n\n attr_reader :rule, :validation, :attribute\n\n ...
ruby
chosen
[ { "from": "system", "value": "Add require for controller decorator\n" }, { "from": "human", "value": "require 'piggybak_braintree/payment_decorator'\n\nmodule PiggybakBraintree\n class Engine < ::Rails::Engine\n isolate_namespace PiggybakBraintree\n require 'braintree'\n\n config.to_pr...
ruby
chosen
[ { "from": "system", "value": "Add rake back for racing_on_rals project. Add all the projects.\n\ngit-svn-id: 96bd6241e080dd4199045f7177cf3384e2eaed71@1424 2d86388d-c40f-0410-ad6a-a69da6a65d20\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\n\n# Yes, this could be more abstracted, etc. Cho...
ruby
chosen
[ { "from": "human", "value": "Test script for fetching file and saving it locally\n\n\ngit-svn-id: 035394e0ea20290a56a73539b1ebfcd8236adefd@1322 7bd17f4f-1217-0410-bbc5-bc4367116c30\n" }, { "from": "gpt", "value": "#!/usr/bin/ruby -w\n\nrequire 'xmlrpc/client'\n\nserver = XMLRPC::Client.new2(\"ht...
ruby
chosen
[ { "from": "system", "value": "Sort vacancies on about page\n" }, { "from": "human", "value": "# frozen_string_literal: true\nclass AboutSectionsController < ApplicationController\n def index\n @section = SiteSection.where(section: \"about\").first\n @sections = AboutSection.order(:positi...
ruby
chosen
[ { "from": "system", "value": "Remove unnecessary to_json in api controller.\n" }, { "from": "human", "value": "class Api::ScoresApiController < Api::ApiController\n respond_to :json\n\n resource_description do\n resource_id 'records'\n end\n\n def_param_group :mode do\n param :weapons,...
ruby
chosen
[ { "from": "system", "value": "Use suggestions from programmes first on pupil dash\n" }, { "from": "human", "value": "module Pupils\n class SchoolsController < ApplicationController\n include ActionView::Helpers::NumberHelper\n include ActivityTypeFilterable\n include DashboardAlerts\n\...
ruby
chosen
[ { "from": "system", "value": "Move definition of set method to new method" }, { "from": "human", "value": "module BettyResource\n class Record\n attr_reader :model\n\n def initialize(args)\n @model = args[:model]\n model.properties.each do |property|\n define_singleton_me...
ruby
chosen
[ { "from": "system", "value": "Update Marked 2 to version 2.5.3910\n\nThis commit updates the version, sha256 and url stanzas. The version\nis obtained from the appcast feed that was previously included in\nthis cask. Sorry if this is not an approved way to obtain a versioned\ndownload URL.\n" }, { "...
ruby
chosen
[ { "from": "system", "value": "Remove not-retiring stuff from ClassificationCount\n" }, { "from": "human", "value": "module RetirementSchemes\n class ClassificationCount\n def initialize(options = {})\n options = options.with_indifferent_access\n\n @count = options.fetch(:count)\n ...
ruby
chosen
[ { "from": "system", "value": "Update next and previous methods to return an empty query result collection object to pass all tests.\n" }, { "from": "human", "value": "module SalesforceBulk\n class QueryResultCollection < Array\n \n attr_reader :client\n attr_reader :currentIndex\n a...
ruby
chosen
[ { "from": "system", "value": "Support .yml extension as well\n" }, { "from": "human", "value": "require 'multi_json'\n\nmodule JsonYamlAssets\n\n class Engine < ::Rails::Engine\n\n config.json_yaml_assets = ActiveSupport::OrderedOptions.new\n\n class Template < Tilt::Template\n\n cla...
ruby
chosen
[ { "from": "system", "value": "Fix for inserting items via prepared queries\n\nThis commit hopefully fixes inserting via prepared queries. The error\nseems to have been that a prepared query was used on connections, that\ndid not prepare the query.\n\nThis commit also adds a raw connection non-prepared queri...
ruby
chosen
[ { "from": "system", "value": "Fix middleware class deprecation warning\n\nRails needs an actual class reference instead of just strings, this change removes the following warning:\r\n```\r\nDEPRECATION WARNING: Passing strings or symbols to the middleware builder is deprecated, please change\r\nthem to actu...
ruby
chosen
[ { "from": "system", "value": "Fix a bug that caused logs to fail" }, { "from": "human", "value": "Capistrano::Configuration.instance(:must_exist).load do |configuration|\n\n namespace :foreman do\n desc \"Export the Procfile to Ubuntu's upstart scripts\"\n task :export, roles: :app do\n ...
ruby
chosen
[ { "from": "system", "value": "Add Thin as a dependency\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'potatochop/version'\n\nGem::Specification.new do |gem|\n gem.name ...
ruby
chosen
[ { "from": "system", "value": "Include bin path in gem.\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"rails_zero/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |s|\n s.name...
ruby
chosen
[ { "from": "system", "value": "Change the english text to russian\n" }, { "from": "human", "value": "#!/bin/env ruby\n# encoding: utf-8\n\n#Напишите программу, которая спрашивает у человека имя, затем отчество, затем фамилию. В результате она должна поприветствовать человека, называя его полным и...
ruby
chosen
[ { "from": "system", "value": "Add initial ultra-basic Location model tests\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Location do\n\n it 'can be created' do\n location = create :location\n expect(location).to_not be_nil\n end\n\n it 'needs tests to be written!'...
ruby
chosen
[ { "from": "system", "value": "Use IO.sysread instead of File.read\n" }, { "from": "human", "value": "require 'forwardable'\nrequire 'mkfifo'\n\nclass Fifo\n include Forwardable\n \n class Pipe < ::File\n alias :orig_write :write\n def write(*args)\n orig_write(*args)\n flush\n...
ruby
chosen
[ { "from": "system", "value": "Fix rescheduling of password setting worker\n" }, { "from": "human", "value": "class UserSetPasswordNoticeWorker\n include Sidekiq::Worker\n\n attr_accessor :user\n\n # tidy up unaffiliated people that don't have questions\n # meant to be scheduled at a given pe...
ruby
chosen
[ { "from": "system", "value": "Remove unsupported validated_fields_for method and binding argument to concat().\n" }, { "from": "human", "value": "module Acceptance\n module FormHelper\n \n def validated_form_for(*args, &block)\n form_for(*args, &block)\n concat(acceptance_builde...
ruby
chosen
[ { "from": "system", "value": "Update render method to work without yield, load template from config\n" }, { "from": "human", "value": "module Mako\n class HTMLRenderer\n include FileOpenUtil\n\n attr_reader :template, :binding, :feed_template\n\n def initialize(args)\n @template =...
ruby
chosen
[ { "from": "system", "value": "Update URL for PaintCode 2.0\n" }, { "from": "human", "value": "class Paintcode < Cask\n url 'http://download.macheist.com/nano4/pc.zip'\n homepage 'http://www.paintcodeapp.com/'\n version 'latest'\n sha256 :no_check\n link 'PaintCode.app'\nend\n" }, { ...
ruby
chosen
[ { "from": "human", "value": "Add api factory for instantiating parts of api.\n" }, { "from": "gpt", "value": "# encoding: utf-8\n\nrequire 'github_api/core_ext/hash'\n\nmodule Github\n class ApiFactory\n\n # Instantiates a new github api object\n def self.new(klass, options={})\n ret...
ruby
chosen
[ { "from": "system", "value": "Add text/json as data MIME type\n" }, { "from": "human", "value": "module Swagger::Data\n class Mime\n @@types = [\n 'text/plain',\n 'text/plain; charset=utf-8',\n 'application/json',\n 'application/hal+json',\n 'application/problem+json...
ruby
chosen
[ { "from": "system", "value": "Add description for extension class\n" }, { "from": "human", "value": "module YARD #:nodoc: all\n class Docstring\n include Yardstick::Method\n end # class Docstring\nend # module YARD\n" }, { "from": "gpt", "value": "module YARD #:nodoc: all\n\n ...
ruby
chosen
[ { "from": "system", "value": "Add remote hands account for Appliwave\n" }, { "from": "human", "value": "name \"appliwave\"\ndescription \"Role applied to all servers at Appliwave\"\n\ndefault_attributes(\n :hosted_by => \"Appliwave\",\n :location => \"Croissy-Beaubourg, France\"\n)\n\noverride...
ruby
chosen
[ { "from": "system", "value": "Clean up error handling method in API\n" }, { "from": "human", "value": "module Xapi\n module Helpers\n module Errors\n def something_went_wrong\n \"Something went wrong, and it's not clear what it was. Please post an issue on GitHub so we can figure...
ruby
chosen
[ { "from": "system", "value": "Add rails as a dependency to avoid headaches from mocking ActiveRecord and friends.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/acts_as_purchasable/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.autho...
ruby
chosen
[ { "from": "system", "value": "ENHANCE: Replace terminator with Ruby native calls\n" }, { "from": "human", "value": "require 'terminator'\nmodule TimeoutHelper\n extend LogHelper\n\n #\n # Timeout operation\n #\n # Usage:\n # try_within 30, \"doing the thing\" do\n # long_operation()...
ruby
chosen
[ { "from": "system", "value": "Fix typos after refactor, add a log message for clarity\n" }, { "from": "human", "value": "# ----------------------------------------------------------------------------------------\n\nrequire_dependency 'rc_database.rb'\n\n# ----------------------------------------...
ruby
chosen
[ { "from": "system", "value": "Change the podspec version -> 2.9.1\n" }, { "from": "human", "value": "Pod::Spec.new do |spec|\n spec.name = \"Framezilla\"\n spec.version = \"2.9.0\"\n spec.summary = \"Comfortable syntax for working with frames.\"\n\n spec.homep...
ruby
chosen
[ { "from": "system", "value": "Clear response body before rendering error\n" }, { "from": "human", "value": "class ApplicationController < ActionController::Base\n # Prevent CSRF attacks by raising an exception.\n # For APIs, you may want to use :null_session instead.\n protect_from_forgery wi...
ruby
chosen
[ { "from": "system", "value": "Fix opinion scale field names\n" }, { "from": "human", "value": "module AskAwesomely\n class Field::OpinionScale < Field::Field\n\n POSSIBLE_STEPS = 5..11\n\n def steps(steps)\n unless POSSIBLE_STEPS.cover?(steps)\n raise ArgumentError, \"number o...
ruby
chosen
[ { "from": "system", "value": "Fix Name Calculated Absence Percent\n" }, { "from": "human", "value": "class CouncillorsController < ApplicationController\n\tdef index\n\t\t@councillors = Councillor.all.order(:last_name).includes(:ward)\n\tend\n\n\tdef show\t\n\t\t@councillor = Councillor.find par...
ruby
chosen
[ { "from": "system", "value": "Correct database field in invoice\n" }, { "from": "human", "value": "class CreateInvoices < ActiveRecord::Migration\n def change\n create_table :invoices do |t|\n t.integer :amount\n t.type :string\n t.date :due_date\n t.date :paid_date\n ...
ruby
chosen
[ { "from": "system", "value": "Add more comprehensive docs for Engine::VeritasEngine\n" }, { "from": "human", "value": "require 'veritas'\nrequire 'veritas-do-adapter'\n\nmodule DataMapper\n class Engine\n\n # Engine for Veritas\n class VeritasEngine < self\n attr_reader :adapter\n\n ...
ruby
chosen
[ { "from": "system", "value": "Clean comment and prediction mention activities after 60 days\n" }, { "from": "human", "value": "class Recurring::CleanActivities\n include Sidekiq::Worker\n\n def perform\n ActiveRecord::Base.connection_pool.with_connection do\n Activity.where(:seen => tr...
ruby
chosen
[ { "from": "system", "value": "Package version is incremented from patch number 0.1.5 to 0.1.6\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'telemetry-logger'\n s.version = '0.1.5'\n s.summary = 'Logging to STDERR with coloring and leve...
ruby
chosen
[ { "from": "human", "value": "Add file & release 1 for object oriented basics challenge\n" }, { "from": "gpt", "value": "# OO Basics: Student\n\n\n# I worked on this challenge [by myself].\n# This challenge took me [#] hours.\n\n\n# Pseudocode\n\n\n# Initial Solution\n\nclass Student\n attr_acce...
ruby
chosen
[ { "from": "system", "value": "Use require_relative when spec is not in the LOAD_PATH\n" }, { "from": "human", "value": "# vim: filetype=ruby\n\nrequire 'spec/custom/guards/engine'\n\nclass MSpecScript\n tags_dir = defined?(RUBY_ENGINE) ? RUBY_ENGINE : 'ruby'\n set :tags_patterns, [\n ...
ruby
chosen
[ { "from": "human", "value": "Add Profile Page Feed Spec\n\n* Add specs to determine items and count\n\n[Finished: #100037354]\n" }, { "from": "gpt", "value": "require \"spec_helper\"\n\nmodule SocialNetworking\n module Concerns\n # Spec for profile page feed functionality.\n module Profil...
ruby
chosen
[ { "from": "human", "value": "Move the config.rb to this repo\n" }, { "from": "gpt", "value": "require 'capistrano_colors'\n\n# Main\nset :application, \"\"\nset :use_sudo, true\nset :admin_runner, \"\"\nset :keep_releases, 5\ndefault_run_options[:pty] = true\n\n# Stages\nset :stage_dir, \"app/co...
ruby
chosen
[ { "from": "system", "value": "Include RDOC and LICENSE in gemspec.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\r\n$:.push File.expand_path(\"../lib\", __FILE__)\r\nrequire \"acts_as_executor/version\"\r\n\r\nGem::Specification.new do |s|\r\n s.name = \"acts_as_executor\"...
ruby
chosen
[ { "from": "system", "value": "Upgrade rspec version to 3.1\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'achecker/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Add unscoped method to activerecord query\n\n[Variants `act_as_paranoid`](https://github.com/spree/spree/blob/master/core/app/models/spree/variant.rb#L3). This fixes the issue of migration failure if the db has any variants where `deleted_at IS NOT NULL`." }, { "from": ...
ruby
chosen
[ { "from": "system", "value": "Add Rake and Bundler to development 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 'mixlib/versioning/version'\n\nGem::Specificat...
ruby
chosen
[ { "from": "system", "value": "Fix bug in tokens with a period\n" }, { "from": "human", "value": "Rails.application.routes.draw do\n root 'secrets#new'\n\n resources :secrets, only: [:create, :new, :show]\nend\n" }, { "from": "gpt", "value": "Rails.application.routes.draw do\n root...
ruby
chosen
[ { "from": "system", "value": "Add a test to ensure that a user manifest is used\n\nPreviously, it was possible to remove a user from all groups but\nkeep their manifest around.\n\nThis commit adds a test to ensure that every user manifest is included\nin at least one group.\n" }, { "from": "human", ...
ruby
chosen
[ { "from": "system", "value": "Add ssl_verify_mode to Chef config\n\nThis will quiet warnings at the start of each `gitlab-ctl reconfigure`\nrun.\n" }, { "from": "human", "value": "CURRENT_PATH = File.expand_path(File.dirname(__FILE__))\nfile_cache_path \"#{CURRENT_PATH}/cache\"\ncookbook_path CU...
ruby
chosen
[ { "from": "system", "value": "Fix `url` stanza comment for Lektor.\n" }, { "from": "human", "value": "cask 'lektor' do\n version '1.2.1'\n sha256 'd6d984eddcefcae9397e1fb10d96f2fd61324a9f2a7008cea4edad2ee8743feb'\n\n # github.com/lektor/lektor verified as official when first introduced to the...
ruby
chosen
[ { "from": "system", "value": "Update Second Life to 3.6.12.284506.\n" }, { "from": "human", "value": "class SecondLife < Cask\n url 'http://download.cloud.secondlife.com/Viewer_3/SecondLife_3_6_11_283787.dmg'\n homepage 'http://secondlife.com/'\n version '3.6.11.283787'\n sha1 'a90f6b5da1e68...
ruby
chosen
[ { "from": "human", "value": "Add ExportEmailController post processing to fix text message issue\n" }, { "from": "gpt", "value": "# Re-open ExportEmailController to because out local implementation of a Holding\n# has a #call_number method that is a class which deliver_later raises as an error\n...
ruby
chosen
[ { "from": "system", "value": "Add tests for glob matching\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass Jekyll::TidyTest < Minitest::Test\n def test_that_it_has_a_version_number\n refute_nil ::Jekyll::Tidy::VERSION\n end\n\n def test_outputs_clean_html\n dirty_html =...
ruby
chosen
[ { "from": "system", "value": "Remove default config SSL file" }, { "from": "human", "value": "require 'test_helper'\n\nclass ConfigTest < Test::Unit::TestCase\n def test_set_ssl_cert_file\n @config = PaypalAdaptive::Config.new(\"test\", { \"ssl_cert_file\" => \"/path/to/cacert.pem\" })\n ...
ruby
chosen
[ { "from": "system", "value": "Set environment variable to use local gem repo from extracted jar file\n" }, { "from": "human", "value": "$LOAD_PATH << File.expand_path(File.dirname(__FILE__))\n\nrequire 'java'\nrequire 'watir_robot_gui/main_frame'\nrequire 'watir_robot_gui/worker/edit_button'\nre...
ruby
chosen
[ { "from": "system", "value": "Use old_value new_value for readability\n" }, { "from": "human", "value": "require_relative '../../app/classes/open_graph_formatter.rb'\n\ndescribe OpenGraphFormatter do\n describe '#to_hash' do\n it 'returns a hash with the two default keys by default' do\n ...
ruby
chosen
[ { "from": "system", "value": "Install VIM and some useful tools. This was pulled from Optimize. It's\nawesome\n" }, { "from": "human", "value": "#Make sure that this recipe only runs on ubuntu systems\nif platform?(\"ubuntu\")\n\nend\n" }, { "from": "gpt", "value": "#Make sure that...
ruby
chosen
[ { "from": "system", "value": "Remove require version from gemspec\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/omniauth-internal/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Jan Graichen\"]\n gem.email ...
ruby
chosen
[ { "from": "system", "value": "Switch to the FrontMatter module\n" }, { "from": "human", "value": "require 'yaml'\n\nmodule Dimples\n class Document\n FRONT_MATTER_PATTERN = /^(-{3}\\n.*?\\n?)^(-{3}*$\\n?)/m.freeze\n\n attr_accessor :metadata, :contents, :path, :rendered_contents\n\n de...
ruby
chosen
[ { "from": "system", "value": "Add documentation to base Adapter\n" }, { "from": "human", "value": "module Featurer\n class Adapter\n attr_reader :config\n\n def self.inherited(klass)\n AdapterManager.add_adapter klass\n end\n\n def initialize(config = {})\n @config = confi...
ruby
chosen
[ { "from": "system", "value": "Fix required variable pool_idx that should not be\n" }, { "from": "human", "value": "require \"kafka_connection/version\"\nrequire \"kafka_connection/connection\"\nrequire \"kafka_connection/producer\"\nrequire \"kafka_connection/consumer\"\nrequire \"kafka_connecti...
ruby
chosen
[ { "from": "human", "value": "Add Jake build tool formula\n\nSigned-off-by: Adam Vandenberg <34c2b6407fd5a10249a15d699d40f9ed1782e98c@gmail.com>\n" }, { "from": "gpt", "value": "require 'formula'\n\nclass Jake <Formula\n head 'git://github.com/280north/jake.git'\n homepage 'http://github.com/28...
ruby
chosen
[ { "from": "system", "value": "Use option syntax for '-a'.\n\nFixes a warning with newer versions of CLAide.\n" }, { "from": "human", "value": "module Pod\n class Command\n class Open < Command\n\n self.summary = 'Open the workspace'\n self.description = <<-DESC\n Opens the w...
ruby
chosen
[ { "from": "system", "value": "Simplify DSL helper method: vault_parameter!\n\nThis simplifies the vault helper method provided to the template DSL to simply\ninsert a named parameter with a generic description and NoEcho set. This\nparameter uses a custom type that is not recognized by AWS and will cause a\...
ruby
chosen
[ { "from": "human", "value": "Add a formula for RATS.\n\nRATS - Rough Auditing Tool for Security\nhttp://www.fortify.com/security-resources/rats.jsp\n\nSigned-off-by: Adam Vandenberg <flangy@gmail.com>\n\n* Tweaked mandir\n" }, { "from": "gpt", "value": "require 'formula'\n\nclass Rats < Formula\...
ruby
chosen
[ { "from": "system", "value": "Revert \"Blow up if we ask for an undefined property, stopping us interpolating madness\"\n\nThis reverts commit 6cc3a2a6ce96103aa857d77a2d94167059410bb6.\n" }, { "from": "human", "value": "require 'util/namespace'\nrequire 'util/log'\n\nclass Util::ConfigFile\n in...
ruby
chosen
[ { "from": "system", "value": "Drop a level of indentation by extending self\n" }, { "from": "human", "value": "module WebConsole\n module REPL\n class << self\n # The adapters registry.\n #\n # Don't manually alter the registry, use +WebConsole::REPL.register_adapter+.\n ...
ruby
chosen
[ { "from": "system", "value": "Allow user to create snapshot without an active snapshot\n\nhttps://bugzilla.redhat.com/show_bug.cgi?id=1425591\n" }, { "from": "human", "value": "class ApplicationHelper::Button::VmSnapshotAdd < ApplicationHelper::Button::Basic\n def disabled?\n @error_message ...
ruby
chosen
[ { "from": "system", "value": "Fix test failure on Windows\n\nWhen this test was run on Windows, the database file would still be in\nuse, and `File.unlink` would fail. This would cause the temp directory to\nbe unable to be removed, and error out. By disconnecting the connection\nwhen finished, we can avoid...
ruby
chosen
[ { "from": "system", "value": "Add device to gem spec" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"elements/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |s|\n s.name ...
ruby
chosen
[ { "from": "system", "value": "Add one more route taking a parameter.\n" }, { "from": "human", "value": "$LOAD_PATH.unshift(File.dirname(__FILE__))\nrequire './lib/dolphy'\n\napp = DolphyApplication.app do\n get '/hello' do\n haml :index, :body => \"hello\"\n end\n\n get '/wat' do\n erb ...
ruby
chosen
[ { "from": "system", "value": "Raise approppriate error when parent class info cannot be found\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire \"gir_ffi/builders/struct_builder\"\n\nmodule GirFFI\n module Builders\n # Implements the creation of a class representing...
ruby
chosen
[ { "from": "human", "value": "Make webpack folder visible to rails asset pipeline\n" }, { "from": "gpt", "value": "Rails.application.config.assets.version = '1.0'\n\n# Add folder with webpack generated assets to assets.paths\nRails.application.config.assets.paths << Rails.root.join(\n 'app',\n ...
ruby
chosen
[ { "from": "system", "value": "Add slot picker stylesheets to precompile list\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 = '...
ruby
chosen
[ { "from": "human", "value": "Bring in Paypal certificates hack via new initializer\n" }, { "from": "gpt", "value": "# Fixes the issue about some PayPal requests failing with\n# OpenSSL::SSL::SSLError (SSL_connect returned=1 errno=0 state=error: certificate verify failed)\nmodule CAFileHack\n # ...
ruby
chosen
[ { "from": "system", "value": "Fix that damn version number\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'MiawKit'\n s.version = 'v1.2'\n s.license = { :type => 'MIT', :file => 'LICENSE' }\n s.summary = 'A set of utilities that ...
ruby
chosen
[ { "from": "system", "value": "Check that Java has been trimmed\n" }, { "from": "human", "value": "control \"tidy_files\" do\n impact 1.0\n title \"Unnecessary files are removed\"\n desc \"The image has had build files, excess packages and other cruft deleted\"\n\n describe file('/usr/local/s...
ruby
chosen
[ { "from": "system", "value": "Remove the counts for now.\n" }, { "from": "human", "value": "Bundler.require(*[:default, :web, ENV['RACK_ENV'].to_sym].compact)\n\nrequire 'json'\nrequire 'sinatra/base'\n\nrequire './web/database/db'\nrequire './web/database/domain'\n\nclass Humus < Sinatra::Base\...
ruby
chosen
[ { "from": "system", "value": "Remove debugger as a dependency for this gem\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'resque/plugins/priority_enqueue/version'\n\nGem::Specificat...
ruby
chosen
[ { "from": "system", "value": "Reduce server-test max duration to 2 seconds\n" }, { "from": "human", "value": "\nMIN = {\n test_count:1,\n app_coverage:100,\n test_coverage:100,\n line_ratio:1.6,\n hits_ratio:0.3\n}\n\nMAX = {\n failures:0,\n errors:0,\n warnings:0,\n skips:0,\n duratio...
ruby
chosen
[ { "from": "system", "value": "Fix dir_config usage to specify paths for icuuc.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'mkmf'\n\nHEADER_DIRS = [\n '/usr/local/include',\n '/usr/local/opt/icu4c/include',\n '/usr/include'\n].freeze\n\nLIB_DIRS = [\n '/usr/lo...
ruby
chosen