conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix executing tests.rake: set /home/uwabami as /tmp during test\n\nSigned-off-by: Youhei SASAKI <71d846e864222823256d2e7aa2ef5b2fc53b38e3@gfd-dennou.org>\n" }, { "from": "human", "value": "require 'gem2deb/rake/spectask'\nGem2Deb::Rake::RSpecTask.new do |spec|\n sp...
ruby
chosen
[ { "from": "system", "value": "Make all hashes 1.8 compatible\n" }, { "from": "human", "value": "class Business < ActiveRecord::Base\n belongs_to :user\n belongs_to :owner, :polymorphic => true\n\n has_many :business_categories\n has_many :categories, :through => :business_categories\n \n s...
ruby
chosen
[ { "from": "system", "value": "Update hanami dep to 1.0.0.beta1\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'hanami/bootstrap/version'\n\nGem::Specification.new do |spec|\n spec.n...
ruby
chosen
[ { "from": "system", "value": "Fix query params with token\n" }, { "from": "human", "value": "module Uploader\n class Jenkins < Generic\n attr_accessor :job_build_url\n\n def upload dsym_path\n url = URI.parse(URI.encode(@job_build_url.strip))\n url.query = \"\" if url.query.nil?...
ruby
chosen
[ { "from": "human", "value": "Add example SVG generator with different output options\n" }, { "from": "gpt", "value": "require 'roda'\nrequire 'calyx'\n\nclass AnyGradient < Calyx::Grammar\n html '<body style=\"margin:0; padding:0\">{svg}</body>'\n xml '<?xml version=\"1.0\" encoding=\"utf-8\"?...
ruby
chosen
[ { "from": "system", "value": "Update autocomplete cache on record change." }, { "from": "human", "value": "module Autocompleteable\n extend ActiveSupport::Concern\n\n class UnconfiguredException < Exception; end\n\n included do\n after_create :add_to_autocomplete_cache\n after_destroy ...
ruby
chosen
[ { "from": "system", "value": "Add rspec gem to dependencies and reformat file.\n" }, { "from": "human", "value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'xtap/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "human", "value": "Update grade change tables for override grades\n\nflag=none\ncloses EVAL-1065\n\nTest plan:\n- \"up\" migration:\n - Ensure migrations run properly\n - After the migration finishes, check that the assignment_id,\n submission_id and submission_version_number columns in the\n...
ruby
chosen
[ { "from": "system", "value": "Update rake requirement from ~> 10.0 to ~> 12.3\n\nUpdates the requirements on [rake](https://github.com/ruby/rake) to permit the latest version.\n- [Release notes](https://github.com/ruby/rake/releases)\n- [Changelog](https://github.com/ruby/rake/blob/master/History.rdoc)\n- [...
ruby
chosen
[ { "from": "system", "value": "Modify : pod spec version\n" }, { "from": "human", "value": "#\n# Luo Yu\n\nPod::Spec.new do |s|\n s.name = 'ConfigKit'\n s.version = '1.2.5'\n s.summary = 'Configuration toolkit.'\n\n s.description = <<-DESC\nConfiguration toolkit.\nSystem style.\nLanguage sett...
ruby
chosen
[ { "from": "system", "value": "Remove left over mongoid reference.\n" }, { "from": "human", "value": "require 'doorkeeper/orm/mongoid5/concerns/scopes'\nrequire 'doorkeeper-mongodb/compatible'\n\nmodule Doorkeeper\n class AccessGrant\n include DoorkeeperNeo4j::Compatible\n\n include Neo4j:...
ruby
chosen
[ { "from": "system", "value": "Use ClassBase to provide initialize and to_ptr." }, { "from": "human", "value": "module GirFFI\n # Wraps GIBaseInfo struct, the base \\type for all info types.\n # Decendant types will be implemented as needed.\n class IBaseInfo\n # This is a helper method to ...
ruby
chosen
[ { "from": "system", "value": "Change to clean up files\n" }, { "from": "human", "value": "# encoding: utf-8\n\nrequire 'spec_helper'\nrequire 'generators/loaf/install_generator'\n\nRSpec.describe Loaf::Generators::InstallGenerator, type: :generator do\n destination File.expand_path(\"../../../t...
ruby
chosen
[ { "from": "system", "value": "Add a deploy method and pretty URLs\n" }, { "from": "human", "value": "# Automatic image dimensions on image_tag helper\nactivate :automatic_image_sizes\n\n# Reload the browser automatically whenever files change\nconfigure :development do\n activate :livereload\...
ruby
chosen
[ { "from": "system", "value": "Add runtime dependencies missing for the 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 'funtestic/version'\n\nGem::Specification.new do |spec|\n s...
ruby
chosen
[ { "from": "system", "value": "Add support for install NRPE via package on CentOS and similar systems\n\n\nFormer-commit-id: 2f1bb3bc6475fa16b61a921e0898e18ec515ac40 [formerly 46a219961f40fe59231d731019375814a9c4b867] [formerly 1cedf1c9e07e1703ebb42f7a53e59f990ace7533 [formerly 4101cb57c11083d9a5b5f4f85223d7...
ruby
chosen
[ { "from": "system", "value": "Add vendor dir to gemspec files list" }, { "from": "human", "value": "# encoding: utf-8\n$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"glow/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specificati...
ruby
chosen
[ { "from": "system", "value": "Set homepage to github page." }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"grim\"\n\nGem::Specification.new do |s|\n s.name = \"grim\"\n s.version = Grim::VERSION\n s.authors =...
ruby
chosen
[ { "from": "system", "value": "Use require (not gem) for minitest\n" }, { "from": "human", "value": "require 'rubygems'\n\n# Only run coverage in MRI\nunless defined? Maglev\n if ENV['CI']\n require 'coveralls'\n Coveralls.wear!\n else\n require 'simplecov'\n SimpleCov.start\n end\...
ruby
chosen
[ { "from": "system", "value": "Add deployment target to support watchOS 2" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"JSONModel\"\n s.version = \"1.1.2\"\n s.summary = \"Magical Data Modelling Framework for JSON. Create rapidly powerful, atomic and smar...
ruby
chosen
[ { "from": "system", "value": "Add test case for user name length\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass UserTest < ActiveSupport::TestCase\n def setup\n @user = User.new(name: 'Example user', email: 'example@example.com')\n end\n\n test 'should be valid' do\n ...
ruby
chosen
[ { "from": "system", "value": "Debug message had the wrong test-unit version numbers.\n" }, { "from": "human", "value": "require 'test/unit/testcase'\nrequire 'mocha/integration/test_unit/assertion_counter'\nrequire 'mocha/expectation_error'\n\nmodule Mocha\n\n module Integration\n\n module T...
ruby
chosen
[ { "from": "system", "value": "Revert \"EID-1774 Implement eIDAS escape route (exploration)\"\n" }, { "from": "human", "value": "require 'partials/eidas_validation_partial_controller'\n\nclass ChooseACountryController < ApplicationController\n include EidasValidationPartialController\n before_a...
ruby
chosen
[ { "from": "system", "value": "Use active scope instead of dynamic finder.\n" }, { "from": "human", "value": "# encoding: UTF-8\n\n# Generated (meme) image pages controller.\nclass GendImagePagesController < ApplicationController\n include GendImagesHelper\n\n def show\n @gend_image = GendIm...
ruby
chosen
[ { "from": "system", "value": ":penguin: Add missing fedora dependency libXScrnSaver\n" }, { "from": "human", "value": "\nmodule Itch\n # RPM package\n def Itch.ci_package_rpm (arch, build_path)\n rpm_arch = to_rpm_arch arch\n gem_dep 'fpm', 'fpm'\n\n say \"Preparing stage2\"\n stag...
ruby
chosen
[ { "from": "system", "value": "Use instance exec instead of call on hook procs.\n" }, { "from": "human", "value": "module ResourceKit\n class ActionInvoker\n attr_reader :action, :connection, :args, :options\n\n attr_accessor :context\n\n def initialize(action, connection, *args)\n ...
ruby
chosen
[ { "from": "system", "value": "Update vim plugins when installing luan's vim\n\n* luan claims this won't break initial installations, so we will trust him\n\nSigned-off-by: Dan Wendorf <aacfaec681ee5d2ca2a22f1deac31c830d964d35@pivotal.io>\n" }, { "from": "human", "value": "package 'vim'\nhomebrew...
ruby
chosen
[ { "from": "system", "value": "Replace system call for password with ruby\n" }, { "from": "human", "value": "require './lib/ruby-icloud'\nrequire 'pry'\n\ndef get_password\n prompt=\"Password: [typing will be hidden]\"\n `read -s -p \"#{prompt}\" password; echo $password`.chomp\nend\n\ndef get_...
ruby
chosen
[ { "from": "system", "value": "Clean up all models in cucumber tests.\n" }, { "from": "human", "value": "Before do\n %w(Repo User).each do |attr|\n GitHub.const_get(attr).delete_all\n end\nend\n\nGiven /^I fetch user \"(.*)\"$/ do |login|\n @record = GitHub::User.get(login)\nend\n\nGiven /^...
ruby
chosen
[ { "from": "system", "value": "Check first movie under Top Box\n" }, { "from": "human", "value": "Given /^I am on the Welcome Screen$/ do\n\n\twait_for(:timeout => 5) { element_exists(\"label text:'Top Box Office'\") }\n\ttouch(\"view marked: 'MovieCell-1-1'\")\n\n\twait_for(:timeout => 5) { elem...
ruby
chosen
[ { "from": "system", "value": "Access the default logger simply\n" }, { "from": "human", "value": "module FluentLoggerHelper\n def logger\n Fluent::Logger.class_variable_get(:@@default_logger)\n end\n\n def last_log(tag)\n logger.queue.select { |h| h.tag == tag }.last\n end\nend\n\nRSpe...
ruby
chosen
[ { "from": "system", "value": "Set default serializer to Marshal." }, { "from": "human", "value": "require 'ohm'\nrequire 'bindi/version'\n\nclass Bindi\n def initialize serializer\n @serializer = serializer\n end\n \n def connect\n Ohm.connect\n end\n\n def [] key\n @serializer.lo...
ruby
chosen
[ { "from": "system", "value": "Stop mapping keys to Symbols.\n" }, { "from": "human", "value": "require 'redis'\n\nclass Bindi\n def initialize serializer = Marshal\n @serializer = serializer\n @redis = Redis.new\n end\n\n def [] key\n @serializer.load(@redis.get key) if @redis.exists...
ruby
chosen
[ { "from": "system", "value": "Update gemspec to refinerycms 3.0\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'refinery/tweets/version'\n\nGem::Specification.new do |spec|\n spec.n...
ruby
chosen
[ { "from": "system", "value": "Update to be Datamapper 1.0 compatible\n" }, { "from": "human", "value": "# encoding: utf-8\n\nmodule Rubyzome\n # TODO: centralize configuration for example: default is app/ directory (should be different)\n\n # Include all controllers \n Dir[\"app/control...
ruby
chosen
[ { "from": "system", "value": "Set the default encoding to UTF-8.\n\nAfter making myself a little shell script to run on build of a scheme in Xcode, it would always fail on me, even though running it from the terminal worked fine. Setting the default encoding to UTF-8 seems to fix this issue.\n\nReference: h...
ruby
chosen
[ { "from": "system", "value": "Exit with 0 if there are no errors.\n" }, { "from": "human", "value": "require_relative 'uspec/version'\nrequire_relative 'uspec/dsl'\nrequire_relative 'uspec/stats'\n\nmodule Uspec\n def self.included object\n warn 'Use extend instead of include.'\n exit 2\n...
ruby
chosen
[ { "from": "system", "value": "Fix database cleaner support for RSpec\n" }, { "from": "human", "value": "require 'capybara/rails'\nrequire 'capybara/rspec'\n" }, { "from": "gpt", "value": "RSpec.configure do |config|\n config.before(:suite) do\n DatabaseCleaner.strategy = :transac...
ruby
chosen
[ { "from": "system", "value": "Install rh-python27 in Docker but do not set envs\n" }, { "from": "human", "value": "# vi:syntax=dockerfile\n# name:centos6-builder\nFROM centos:6\nMAINTAINER Daniele Viganò <daniele@openquake.org>\n\nRUN yum -y upgrade && \\\n yum -y groupinstall 'Development To...
ruby
chosen
[ { "from": "system", "value": "Test to ensure that slugs aren't generated when slug_key values are blank\n" }, { "from": "human", "value": "require 'helper'\n\nclass TestSlugizer < Test::Unit::TestCase\n context \"working with slugs\" do\n setup do\n BlogPost.delete_all\n @blogpost ...
ruby
chosen
[ { "from": "human", "value": ":sparkles: Add global constants used across the library\n" }, { "from": "gpt", "value": "# coding: utf-8\nrequire 'googlemaps/services/version'\n\n# Global constants used across the library\n#\n# @since 1.3.5\nmodule Constants\n # The User-Agent header\n USER_AGENT...
ruby
chosen
[ { "from": "system", "value": "Disable coalesce of GIFs for the time being\n" }, { "from": "human", "value": "require \"sinatra/base\"\nrequire \"mini_magick\"\nrequire \"pathname\"\nrequire \"rack\"\nrequire \"tempfile\"\n\nmodule MountableProcessingServer\n class Endpoint < Sinatra::Base\n ...
ruby
chosen
[ { "from": "system", "value": "Use table_exists? directly instead of going through connection\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire_relative 'builder/enum'\nrequire_relative 'builder/period'\n\nmodule Torque\n module PostgreSQL\n module Attributes\n ...
ruby
chosen
[ { "from": "human", "value": "Add dirty load testing script\n" }, { "from": "gpt", "value": "require 'json'\nrequire 'httparty'\nrequire 'thread/pool'\nrequire 'awesome_print'\n\ntarget = 'http://146.185.153.218'\n\ni = 0\nhit_count = 0\nerror_count = 0\n\ntimes = []\n\npool = Thread.pool(200)\n\...
ruby
chosen
[ { "from": "system", "value": "Add manufacturer list to asset types\n" }, { "from": "human", "value": "class AssetType < ActiveRecord::Base\n \n # associations\n has_many :asset_subtypes\n \n #attr_accessible :name, :description, :active\n #attr_accessible :class_name, :form_name, :in...
ruby
chosen
[ { "from": "system", "value": "Decrease the solr_page_size to 150 from the default 200\n" }, { "from": "human", "value": "class Collection < ActiveFedora::Base\n include Hydra::Collection\n include CurationConcern::CollectionModel\n include Hydra::Collections::Collectible\n include CurationCo...
ruby
chosen
[ { "from": "system", "value": "Use iteration to require each file in lib/\n" }, { "from": "human", "value": "require 'gosu'\nrequire './lib/player.rb'\nrequire './lib/window.rb'\n\nwindow = GameWindow.new\nwindow.show\n" }, { "from": "gpt", "value": "require 'gosu'\nDir['./lib/*.rb']....
ruby
chosen
[ { "from": "system", "value": "Add inverse constant: rad/km for the earth" }, { "from": "human", "value": "require \"jeeyo/version\"\nrequire \"ruby-units\"\n\nmodule Jeeyo\n autoload :Location, \"jeeyo/location\"\n \n EARTH_KILOMETERS_PER_RADIAN = Unit.new(\"6367.5 km/rad\")\n \nend\n" }, ...
ruby
chosen
[ { "from": "system", "value": "Use vendor libraries and add core extensions\n" }, { "from": "human", "value": "#%w{activerecord activesupport activemodel arel builder i18n tzinfo}.each do |lib|\n# path = File.expand_path(\"../vendor/#{lib}/lib\",__FILE__)\n# $:.unshift(path)\n#end\n#require 'ru...
ruby
chosen
[ { "from": "system", "value": "Load active_support before any other active_support file.\n\nThis loads activesupport/dependencies/autoload.rb.\n" }, { "from": "human", "value": "# encoding: UTF-8\n\nrequire 'anvil/version'\nrequire 'active_support/core_ext'\n\n# Main anvil module\nmodule Anvil\n ...
ruby
chosen
[ { "from": "system", "value": "Test payment form not displayed on round status GET\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass ChargeFlowTest < ActionDispatch::IntegrationTest\n # test \"the truth\" do\n # assert true\n # end\n setup do\n @round = rounds(:one)\n en...
ruby
chosen
[ { "from": "system", "value": "Add exiting when HTTP request is not success\n" }, { "from": "human", "value": "require 'json'\nrequire 'net/http'\n\nmodule CodeClimateCheck\n class GetGpa < Base\n ENDPOINT = 'https://codeclimate.com/api/repos/%{repo}/branches/%{branch}'\n NULL_GPA = 0\n\n ...
ruby
chosen
[ { "from": "system", "value": "Change to stop loading test and executable files\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'loaf/version'\n\nGem::Specification.new do |spec|\n sp...
ruby
chosen
[ { "from": "system", "value": "Fix FormBuilder for Rails 4.1+\n\nBlock parameter for FormBuilder was removed in https://github.com/rails/rails/commit/38aafc037705aab2f09ec924bf634d105002e016" }, { "from": "human", "value": "module Erector\n module Rails\n class FormBuilder\n class_attrib...
ruby
chosen
[ { "from": "system", "value": "Switch to the iterator object to be more Java-ninny.\n" }, { "from": "human", "value": "module HTTP\n class Response\n attr_reader :headers, :cookies\n\n def initialize(native_response, cookies)\n @native_response = native_response\n @headers = Head...
ruby
chosen
[ { "from": "system", "value": "Remove well class from forms\n" }, { "from": "human", "value": "def form_at(route, fields, opts={})\n form = \"\"\n form << %Q{<form class=\"well\" action=\"#{route}\" method=\"post\">\\n}\n\n fields.each do |name, value|\n form << %Q{<input type=\"hidden\" na...
ruby
chosen
[ { "from": "system", "value": "Add helpful message for port spec.\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'bitlbee' do\n let(:facts) do\n {\n :boxen_home => '/opt/boxen',\n :boxen_user => 'testuser',\n :luser => 'goober',\n }\n end\n it { shoul...
ruby
chosen
[ { "from": "system", "value": "Use rspec-puppet-facts instead of puppet_facts for unit tests\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'openssl' do\n on_puppet_supported_platforms.each do |version, platforms|\n platforms.each do |platform, facts|\n context \"on...
ruby
chosen
[ { "from": "system", "value": "Test to ensure the hostname is set to the uuid of the VM\n" }, { "from": "human", "value": "require 'spec_helper'\n\n# Ensure hostname is not carried over from live-cd build\ndescribe command('hostname') do\n it { should_not return_stdout 'debian-7-blank' }\nend\n"...
ruby
chosen
[ { "from": "system", "value": "Tidy up spec a bit" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Rdayone::Journal do\n describe \"loading\" do\n let(:finder) do\n f = double(\"finder\")\n f.stub(:find_entries) { [double(\"entry\")] }\n f\n end\n\n subj...
ruby
chosen
[ { "from": "system", "value": "Add description and license to gemspec\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"json_presentable/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification....
ruby
chosen
[ { "from": "system", "value": "Add EHOSTDOWN to rescuable errors\n" }, { "from": "human", "value": "require \"timeout\"\nrequire \"socket\"\n\nclass Godot\n attr_reader :host, :port\n attr_writer :interval, :timeout\n\n def self.wait!(host, port)\n new(host, port).wait!\n end\n\n def self...
ruby
chosen
[ { "from": "system", "value": "Allow .first on resource collection\n" }, { "from": "human", "value": "module Moltin\n class ResourceCollection\n @resources = []\n\n def initialize(resource_class, data)\n @resources = data.map do |result|\n resource_class.constantize.new result\...
ruby
chosen
[ { "from": "system", "value": "Use the 'info' key from the `auth_hash`\n\nMigrating from the `attributes` key to `info` since this is the conical\nkey we want to use going forward.\n" }, { "from": "human", "value": "require 'omniauth-oauth2'\n\nbegin\n require 'dotenv'\n Dotenv.load\nrescue Loa...
ruby
chosen
[ { "from": "system", "value": "Add a description to the gemspec.\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'default_options/version'\n\nGem::Specification.new do |spec|\n spec.n...
ruby
chosen
[ { "from": "human", "value": "Clone report.rake for generic searches\n\nUse report.rake as a basis to create a task to run new generic term finder" }, { "from": "gpt", "value": "namespace :report do\n desc \"Run a publication delay report of the last week\"\n task publication_delay_report: :env...
ruby
chosen
[ { "from": "system", "value": "Add additional IIS-related Windows features\n" }, { "from": "human", "value": "powershell_script 'Install IIS' do\n code 'Add-WindowsFeature Web-Server'\n not_if \"(Get-WindowsFeature -Name Web-Server).Installed\"\nend\n\nwindows_service 'w3svc' do\n action [:sta...
ruby
chosen
[ { "from": "system", "value": "Add require statements for file\n" }, { "from": "human", "value": "require 'grape'\n\nrequire_relative './worker.rb'\nrequire_relative '../models/build.rb'\nrequire_relative '../entities/build.rb'\nrequire_relative './resources/build.rb'\n\nmodule Ephemeral\n class...
ruby
chosen
[ { "from": "system", "value": "Make chat service notifier send better success and failure messages.\n" }, { "from": "human", "value": "module Janky\n module Notifier\n class ChatService\n def self.completed(build)\n status = build.green? ? \"was successful\" : \"failed\"\n ...
ruby
chosen
[ { "from": "system", "value": "Revert \"Prioritise Sequel over AR\"\n\nThis reverts commit af9777e1f29f7adaba94cd836aecf9679bd421e1.\n" }, { "from": "human", "value": "require \"attr_secure/version\"\nrequire 'fernet'\n\nrequire 'attr_secure/adapters/ruby'\nrequire 'attr_secure/adapters/active_re...
ruby
chosen
[ { "from": "system", "value": "Add test to show route for plants\n" }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe PlantsController do\n before(:each) do\n User.create(email: \"test@test.com\", password: \"testPassword\")\n controller.session[:user_id] = User.first.id\n...
ruby
chosen
[ { "from": "system", "value": "Include the branch name in the subject\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'cgi'\nrequire 'net/smtp'\nrequire 'sha1'\n\nrequire 'diff_to_html'\nrequire 'emailer'\nrequire 'git'\n\nclass CommitHook\n\n def self.run(rev1, rev2, ref_name)\n\...
ruby
chosen
[ { "from": "system", "value": "Test present forms of the copular verb\n" }, { "from": "human", "value": "require 'helper'\n\nclass TestVerbs < Test::Unit::TestCase\n def test_copular_conjugation\n assert_equal :am, Verbs::Conjugator.conjugate(:be, :tense => :present, :person => :first, :plura...
ruby
chosen
[ { "from": "system", "value": "Add check to prevent incrementing score with no line\n" }, { "from": "human", "value": "require './core/tetrimino'\n\nclass Player\n def initialize(game)\n @score = 0\n @linesCleared = 0\n @combo = 0\n @game = game\n @board = Bo...
ruby
chosen
[ { "from": "system", "value": "Update the octokit version to 4.0.0\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n# Reference: http://docs.rubygems.org/read/chapter/20\n\nGem::Specification.new do |s|\n s.name = 'git-scripts'\n s.version = '0.6.1'\n s.date = Time.now.strftime...
ruby
chosen
[ { "from": "human", "value": "Write sample test cases replace unit with minitest\n" }, { "from": "gpt", "value": "require_relative 'test_helper'\n\ndescribe WDuck::Duck do\n\n subject { WDuck::Duck.new(\"linux\") }\n describe \"function result that gets called for duck\" do\n it \"should res...
ruby
chosen
[ { "from": "system", "value": "chore: Use compact instead of reject(&:nil?)\n\nAvailable in all supported rubys. Deteced by latest rubocop.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule Mnemosyne\n module VERSION\n MAJOR = 1\n MINOR = 12\n PATCH = 0\n STA...
ruby
chosen
[ { "from": "system", "value": "Use a h5 for table captions\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\n\nrequire 'json'\nrequire 'haml'\n\nmodule Dirt\n class Macro\n def self.to_html(text)\n data = JSON.load(text)\n type = data['type'].capitalize + 'Macro'\n Dirt.c...
ruby
chosen
[ { "from": "human", "value": "Add test for Get Involved admin page\n\nThere is currently no test that loads the admin page for Get Involved.\n\nThis meant that an error in loading the page (e.g. by breaking a route\nhelper) would not be noticed by running the test suite.\n\nI'm not exactly sure what this pag...
ruby
chosen
[ { "from": "system", "value": "Add Docs for the new DSL.\n" }, { "from": "human", "value": "module MicroQ\n module DSL\n def worker(*opts)\n self.class_eval do\n def self.microq_options\n @microq_options ||= { :methods => [:perform] }\n end\n end\n\n if H...
ruby
chosen
[ { "from": "system", "value": "Use the described class for subject.\n" }, { "from": "human", "value": "require 'helper'\nrequire 'flipper/adapters/redis'\nrequire 'flipper/spec/shared_adapter_specs'\n\ndescribe Flipper::Adapters::Redis do\n let(:client) { Redis.new }\n\n subject { Flipper::Adap...
ruby
chosen
[ { "from": "system", "value": "Remove code from sample gli app\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 'octo'\n s.summary = 'Run commands in parallel on multiple hosts'\n s.description = 'A lightweight script that allows you to run commands in ...
ruby
chosen
[ { "from": "system", "value": "Update pod spec to reflect categories\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n\n s.name = \"OJWT\"\n s.version = \"0.0.1\"\n s.summary = \"An Objective-C JSON Web Tokens Library\"\n s.description = <<-DESC\n ...
ruby
chosen
[ { "from": "system", "value": "Refactor admin rake task. :v:\n" }, { "from": "human", "value": "# encoding: utf-8\nnamespace :add do\n desc \"通过邮箱地址给一个用户赋予管理员权限\"\n task :admin => :environment do\n email = ENV['email']\n logger = Logger.new(File.join(Rails.root, 'log', 'admin.log'))\n\n...
ruby
chosen
[ { "from": "system", "value": "Add a rake task to set up watches for users that don't have them\n" }, { "from": "human", "value": "namespace :app do\n namespace :emergency do\n desc \"Reset all user github access tokens (Needed after heartbleed)\"\n task :reset_github_access_tokens => :env...
ruby
chosen
[ { "from": "system", "value": "Load order, and add setup\n" }, { "from": "human", "value": "# encoding: utf-8\n\nrequire 'thor'\nrequire 'settingslogic'\n\nrequire_relative 'settings/load_settings'\nrequire_relative 'settings/settings_helpers'\n\n# Load subcommands\nrequire_relative 'commands/epi...
ruby
chosen
[ { "from": "system", "value": "Support destroying a user's session in Rails 5.2\n\n`ActionDispatch::Request::Session.clear` stopped working on Rails 5.2.\nCalling destroy has the intended behaviour.\n" }, { "from": "human", "value": "module RapidRack\n module DefaultReceiver\n def receive(env...
ruby
chosen
[ { "from": "system", "value": "Replace binary data with placeholder text when logging.\n" }, { "from": "human", "value": "require 'redis'\nrequire 'redis/rails/instrumentation/logging'\nrequire 'redis/rails/instrumentation/version'\nrequire 'active_support'\nrequire 'sweet_notifications'\n\nclass...
ruby
chosen
[ { "from": "system", "value": "Document the return value for Aggregate.call\n" }, { "from": "human", "value": "module Veritas\n\n # Abstract class for aggregate functions\n class Aggregate\n include AbstractClass, Immutable, Visitable, Operation::Unary\n\n # Evaluate the aggregate using t...
ruby
chosen
[ { "from": "system", "value": "Make event store configurable, this makes it possible to not depend upon Sandthorn core lib. Decoupling galore!\n" }, { "from": "human", "value": "require 'sequel'\nrequire 'sandthorn_event_filter'\nrequire \"sandthorn_sequel_projection/version\"\nrequire \"sandthor...
ruby
chosen
[ { "from": "system", "value": "Simplify HexFormat linter string searching\n\nThe `HexFormat` linter was using `visit_prop` with a manual check to see\nif the value of the property was a `Sass::Script::String`, rather than\njust using `visit_script_string`.\n\nSwitching to `visit_script_string` simplifies the...
ruby
chosen
[ { "from": "system", "value": "Set HTML part of message instead of body\n" }, { "from": "human", "value": "module Pakyow\n class Mailer\n attr_accessor :view, :message\n \n def initialize(view_path)\n @view = Pakyow.app.presenter.view_for_full_view_path(view_path, true)\n \n ...
ruby
chosen
[ { "from": "system", "value": "Add method merge! on HetsOptions.\n" }, { "from": "human", "value": "module Hets\n class HetsOptions\n attr_reader :options\n\n def self.from_hash(hash)\n new(hash['options'])\n end\n\n def initialize(opts = {})\n @options = opts.dup\n pr...
ruby
chosen
[ { "from": "human", "value": "Add specs for new Api::EnterpriseFeesController\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\nmodule Api\n describe EnterpriseFeesController, type: :controller do\n include AuthenticationWorkflow\n\n let!(:unreferenced_fee) { create(:enterprise_fee...
ruby
chosen
[ { "from": "human", "value": "Add specs of stdout_handler and stderr_handler for exec backend\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\nbackend = Specinfra::Backend::Exec.new\n\ncontext 'Output of stdout_handler' do\n subject(:stdout) do\n out = ''\n backend.stdout_handler ...
ruby
chosen
[ { "from": "system", "value": "Fix a sporadic test failure\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe JoinController do\n\n it \"should track the source\" do\n pending\n end\n\n describe \"log in\" do\n login_user\n it \"sign_up_at should be very very recent\...
ruby
chosen
[ { "from": "system", "value": "Clear data store when integration tests finish so that we can run ints and units together\n" }, { "from": "human", "value": "require_relative '../../lib/hashy_db'\nrequire 'mince/shared_examples/interface_example'\n\ndescribe 'Mince Interface with HashyDb' do\n bef...
ruby
chosen
[ { "from": "system", "value": "EGG-757: Add statsd message logging around worker perform\n" }, { "from": "human", "value": "# assumes an environment task that sets up your app environment\ndesc \"worker that reads the queue and sends messages through the router as configured\"\ntask :superbolt =>...
ruby
chosen
[ { "from": "system", "value": "Add request estimate and cancelation methods\n" }, { "from": "human", "value": "require 'uber/arguments'\nrequire 'uber/api_request'\nrequire 'uber/models/request'\nrequire 'uber/models/map'\n\nmodule Uber\n module API\n module Requests\n def trip_request(*...
ruby
chosen
[ { "from": "human", "value": "Add ActionController::API benchmark with Kir\n" }, { "from": "gpt", "value": "require 'bundler/setup'\nrequire 'action_controller'\nrequire_relative 'support/benchmark_rails'\n\nclass ApiController < ActionController::API\n def show\n render json: \"JSON\", statu...
ruby
chosen