conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add first Task class implementation\n" }, { "from": "human", "value": "require \"tavern/version\"\n\nmodule Tavern\n # Your code goes here...\nend\n" }, { "from": "gpt", "value": "require \"tavern/version\"\n\nmodule Tavern\n \n class Task\n attr_a...
ruby
chosen
[ { "from": "system", "value": "Add .pre for next release\n" }, { "from": "human", "value": "# This file is maintained by a herd of rabid monkeys with Rakes.\nmodule EY\n class CloudClient\n VERSION = '1.0.0'\n end\nend\n# Please be aware that the monkeys like tho throw poo sometimes.\n" },...
ruby
chosen
[ { "from": "system", "value": "Fix description for be_valid matcher\n" }, { "from": "human", "value": "module RSpec::Rails::Matchers\n module Validation\n class IsValid\n include RSpec::Matchers::BaseMatcher\n\n def initialize(scope)\n @scope = scope\n end\n\n def m...
ruby
chosen
[ { "from": "system", "value": "Split up spec by subspecs\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"OMM\"\n s.version = \"0.2.0\"\n s.summary = \"OMM is a one more mapper that helps to map JSON objects to Swift instances.\"\n s.description = \"OMM ...
ruby
chosen
[ { "from": "system", "value": "Fix module to correctly include compass extenstion.\n\nSorry about all the commits - still getting my bearings with compass.\n" }, { "from": "human", "value": "# This contains functions for use with a project *only* using Compass.\n\nmodule Compass::SassExtensions::...
ruby
chosen
[ { "from": "system", "value": "Delete to navigate back in Safari\n" }, { "from": "human", "value": "pivotal_workstation_defaults \"set safari to show status bar\" do\n domain 'com.apple.safari'\n key 'ShowStatusBar'\n boolean true\nend" }, { "from": "gpt", "value": "pivotal_worksta...
ruby
chosen
[ { "from": "system", "value": "Check alive in the safe way\n" }, { "from": "human", "value": "# vim:fileencoding=utf-8\n\nmodule Resque\n module Scheduler\n module SignalHandling\n attr_writer :signal_queue\n\n def signal_queue\n @signal_queue ||= []\n end\n\n # For...
ruby
chosen
[ { "from": "system", "value": "Fix 6 failing tests on Ruby 1.9.2 regarding attachments.\n" }, { "from": "human", "value": "require 'tempfile'\n\nTempfile.class_eval do\n # overwrite so tempfiles use the extension of the basename. important for rmagick and image science\n def make_tmpname(basen...
ruby
chosen
[ { "from": "human", "value": "Add few tests for speed_skydiving_competitions_controller\n" }, { "from": "gpt", "value": "describe Api::V1::SpeedSkydivingCompetitionsController do\n let(:event) { speed_skydiving_competitions(:nationals) }\n\n describe '#show' do\n it 'forbidden when user does...
ruby
chosen
[ { "from": "system", "value": "Check against arr, should be a symbol.\n" }, { "from": "human", "value": "require 'voicearchive/client'\nmodule Voicearchive\n module V2\n class SupplierClient < Client\n def get_suppliers\n response = call('supplier')\n JSON.parse(response.bo...
ruby
chosen
[ { "from": "system", "value": "Add rake as a development dependency\n\nRake should be run using \"bundle exec rake\", otherwise an incompatible\nversion of Rake may get loaded.\n\nChange-Id: I963637d60b714d245933a03d1002c9dd9b6d9772\nReviewed-on: https://gerrit.causes.com/1526\nTested-by: Greg Hurrell <79e24...
ruby
chosen
[ { "from": "system", "value": "Update rubocop requirement from ~> 0.85.0 to ~> 0.86.0\n\nUpdates the requirements on [rubocop](https://github.com/rubocop-hq/rubocop) to permit the latest version.\n- [Release notes](https://github.com/rubocop-hq/rubocop/releases)\n- [Changelog](https://github.com/rubocop-hq/r...
ruby
chosen
[ { "from": "system", "value": "Fix test_helper dependency, clean up test.\n" }, { "from": "human", "value": "require 'test_helper'\n\nrequire 'resque/cli'\n\ndescribe Resque::CLI do\n describe \"#work\" do\n it \"does its thing\" do\n worker = MiniTest::Mock.new.expect(:work, \"did some ...
ruby
chosen
[ { "from": "system", "value": "Fix deprecation warning in generated test suite\n" }, { "from": "human", "value": "require 'minitest_helper'\n\nclass TestHierogloss < MiniTest::Unit::TestCase\n def test_that_it_has_a_version_number\n refute_nil ::Hierogloss::VERSION\n end\nend\n" }, { ...
ruby
chosen
[ { "from": "human", "value": "Remove char limit from PSP references\n\nFor any type of payment notifications, we're guaranteed that the psp\nreference is a unique 16 digit identifier.\n\nHowever, Adyen also sends different types of notifications, such as when\nreports are available. For these types of notifi...
ruby
chosen
[ { "from": "system", "value": "Fix typo in documentation for And.rb\n\nChange $or to $and in documentation for And.rb" }, { "from": "human", "value": "# encoding: utf-8\nmodule Mongoid\n module Matchable\n\n # Defines behavior for handling $or expressions in embedded documents.\n class And...
ruby
chosen
[ { "from": "system", "value": "Remove non existent rake task load\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule Release\n module Notes\n class Railtie < Rails::Railtie\n rake_tasks do\n load \"tasks/update_release_notes.rake\"\n end\n\n gener...
ruby
chosen
[ { "from": "system", "value": "Clean up BallGag settings between tests\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'Plain Old Ruby Object' do\n it 'should have no gagged attributes' do\n ExampleModel.gagged_attributes.should be_empty\n end\n\n it 'should gag attribu...
ruby
chosen
[ { "from": "system", "value": "Store and extract width and height of a StoredImage.\n" }, { "from": "human", "value": "module Suwabara\n\n class StoredImage < StoredFile\n def url(transform = nil)\n transform = ImageTransform.parse(transform)\n\n if transform.present?\n path ...
ruby
chosen
[ { "from": "system", "value": "Update for compatibility with RSpec 3.\n\n`example` isn't available in the scope this is used in now, but\n_default_file_to_render is.\n" }, { "from": "human", "value": "shared_context \"a controller spec\", controller: true do\n include TextHelpers::Translation\n\...
ruby
chosen
[ { "from": "system", "value": "Change specs to use stronger matchers\n" }, { "from": "human", "value": "require 'spec_helper'\n\nrequire './spec/fixtures/bookmark'\n\ntry_spec do\n describe DataMapper::Property::URI do\n before do\n @uri_str = 'http://example.com/path/to/resource/'\n ...
ruby
chosen
[ { "from": "system", "value": "Use test-unit-full instead of test-unit\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/rss/atom/feed_history/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"KITAITI Makoto\"]\n gem.ema...
ruby
chosen
[ { "from": "system", "value": "Remove dependency on Lookback for now\n" }, { "from": "human", "value": "require \"json\"\n\njson = File.read(File.join(__dir__, \"package.json\"))\npackage = JSON.parse(json).deep_symbolize_keys\n\nPod::Spec.new do |s|\n s.name = package[:name]\n s.version = pack...
ruby
chosen
[ { "from": "system", "value": "Enable support for Rails 4\n\nRails 4 changed how \"some date string\".to_date is processed. Prior to\nRails 4, this was facillitated via an override of Date._parse. However,\nin Rails 4 this is now handled through Date.parse directly.\n" }, { "from": "human", "valu...
ruby
chosen
[ { "from": "system", "value": "Add inline documentation for Primes\n" }, { "from": "human", "value": "class Primes\n\n class << self\n\n # Generates the first n prime numbers\n # using the Sieve of Eratosthenes.\n #\n # @method: generate\n # @params:\n # + n: integer\n def...
ruby
chosen
[ { "from": "system", "value": "Kill timeout; it's no longer a thing maybe?\n" }, { "from": "human", "value": "Routes = Rack::Builder.new do\n use Rollbar::Middleware::Sinatra\n use Pliny::Middleware::RescueErrors, raise: Config.raise_errors?\n use Pliny::Middleware::CORS\n use Pliny::Middlewa...
ruby
chosen
[ { "from": "system", "value": "Make sure we load the mime types.\n" }, { "from": "human", "value": "require 'active_support'\nrequire 'active_support/json'\n\nrequire 'tinder/connection'\nrequire 'tinder/campfire'\nrequire 'tinder/room'\nrequire 'tinder/middleware'\n\nmodule Tinder\n class Error...
ruby
chosen
[ { "from": "human", "value": "Add event user link spec.\n" }, { "from": "gpt", "value": "require 'rails_helper'\n\nfeature 'Event user link' do\n given!(:users) do\n 10.times.map do\n create :user\n end\n end\n context '3人のとき' do\n given(:event) { create :event, name: 'テストコード相談会'...
ruby
chosen
[ { "from": "human", "value": "Revert \"Remove test for nonexistent migration\"\n\nThis reverts commit 14e36c3fc61af639e87f23438adf4527d5cd5fdd.\n" }, { "from": "gpt", "value": "# Copyright 2011-2013, The Trustees of Indiana University and Northwestern\n# University. Licensed under the Apache L...
ruby
chosen
[ { "from": "system", "value": "Add element to form and call show.\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\n\nrequire 'rubygems'\nrequire_relative '../../lib/ppcurses.rb'\n\n\n\n\ndef display_form\n\n\n first_name = PPCurses::InputElement.new(\"FirstName\", 10)\n form = PPCurses::...
ruby
chosen
[ { "from": "system", "value": "Add test for presence of user name\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": "Add a valid description for the gem.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/minty/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Jez Cope\"]\n gem.email = [\"J.Cope@ba...
ruby
chosen
[ { "from": "human", "value": "Add test for deprecation module\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\nrequire \"graphql\"\nrequire \"graphql/client/deprecation\"\nrequire \"minitest/autorun\"\n\nclass TestDeprecation < MiniTest::Test\n def test_warn\n GraphQL::Client::...
ruby
chosen
[ { "from": "system", "value": "Update php-build to get 5.3.3's definition.\n" }, { "from": "human", "value": "default[:phpbuild][:git][:repository] = \"git://github.com/CHH/php-build.git\"\ndefault[:phpbuild][:git][:revision] = \"e870d676bcdf2fcb9d9ae83f061c436...
ruby
chosen
[ { "from": "system", "value": "Fix Coveralls reports, now really tracks code coverage\n\nBefore, `Bundler.require` was executed before `Coveralls.wear!` was\ncalled, therefore no actual code coverage was tracked. Instead\n'invokations' of code within the spec folder was analyzed.\n\nAlso, now only Rubinius g...
ruby
chosen
[ { "from": "system", "value": "Rename MongoDB database used for testing" }, { "from": "human", "value": "SPEC_DIR = File.dirname(__FILE__)\nlib_path = File.expand_path(\"#{SPEC_DIR}/../lib\")\n$LOAD_PATH.unshift lib_path unless $LOAD_PATH.include?(lib_path)\n\nrequire 'rubygems'\nrequire 'bundler...
ruby
chosen
[ { "from": "system", "value": "Add Child class for testing, fix formatting\n" }, { "from": "human", "value": "require 'bundler'\nBundler.setup\n\nrequire 'rspec'\nrequire 'jschematic'\n\nRSpec::Matchers.define :accept do |instance_value|\n match do |validator|\n begin\n validator.accepts...
ruby
chosen
[ { "from": "system", "value": "Make sure to require yard >= 0.4.0.\n" }, { "from": "human", "value": "require 'rubygems'\ngem 'rspec', '>=1.2.9'\nrequire 'spec'\n\nrequire 'yard'\n\ninclude YARD\n" }, { "from": "gpt", "value": "require 'rubygems'\ngem 'rspec', '>=1.2.9'\nrequire 'spec...
ruby
chosen
[ { "from": "system", "value": "Fix failing tests due to tty-screen update\n\ntty-screen is updated to 0.8.0.\n\n```\nNoMethodError:\n undefined method `ioctl' for #<StringIO:0x00561e7c808478>\n```\n" }, { "from": "human", "value": "ENV['THOR_COLUMNS'] = '160'\n\nrequire 'simplecov'\nSimpleCov.st...
ruby
chosen
[ { "from": "system", "value": "Disable simplecov for JRuby and rbx for specs\n\nMSP-11103\n\nHad to disable for cucumber, so disable for specs too since coverage is\nonly complete with both cucumber and specs.\n" }, { "from": "human", "value": "$LOAD_PATH.unshift File.expand_path('../../lib', __F...
ruby
chosen
[ { "from": "system", "value": "Fix for Paperlex.token getting unset in the specs - only seeing this on the slaw spec but with no discernable cause\n" }, { "from": "human", "value": "require 'bundler'\nrequire 'active_support/core_ext/object/blank'\nrequire 'securerandom'\n\nBundler.require(:defau...
ruby
chosen
[ { "from": "human", "value": "Add spec test for help_controller\n\n- Add spec test for help_controller.\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe HelpController do\n \n describe \"GET index\" do\n it \"should set variables to view help page\" do\n @admin_user = ...
ruby
chosen
[ { "from": "system", "value": "Add Coveralls filter for sidekiq.rb\n" }, { "from": "human", "value": "# Require this file for unit tests\nENV['HANAMI_ENV'] ||= 'test'\n\nrequire 'simplecov'\nrequire 'coveralls'\n\nSimpleCov.formatter = Coveralls::SimpleCov::Formatter\nSimpleCov.start do\n add_fi...
ruby
chosen
[ { "from": "system", "value": "Use risk test server in tests" }, { "from": "human", "value": "require 'simplecov'\nSimpleCov.start\n\nENV[\"RAILS_ENV\"] = \"test\"\n\nrequire File.expand_path(\"../dummy/config/environment.rb\", __FILE__)\nrequire \"rails/test_help\"\nrequire \"rspec/rails\"\nrequ...
ruby
chosen
[ { "from": "system", "value": "Clean test files after suite.\n" }, { "from": "human", "value": "# This file is copied to spec/ when you run 'rails generate rspec:install'\nENV[\"RAILS_ENV\"] ||= 'test'\nrequire File.expand_path(\"../../config/environment\", __FILE__)\nrequire 'rspec/rails'\nrequi...
ruby
chosen
[ { "from": "system", "value": "Update README to reflect CodeClimate instructions\n" }, { "from": "human", "value": "$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)\nrequire 'enumerated_constants'\nrequire 'codeclimate-test-reporter'\n\nCodeClimate::TestReporter.start\n" }, { "f...
ruby
chosen
[ { "from": "human", "value": "Add spec to check json and yaml file syntax\n" }, { "from": "gpt", "value": "require 'rails_helper'\n\ndescribe 'json files' do\n `git ls-files *.json`.each_line do |json_file|\n json_file.chomp!\n describe(json_file) do\n it 'is valid json' do\n F...
ruby
chosen
[ { "from": "system", "value": "Add noindex,follow meta robots on tag list pages\n" }, { "from": "human", "value": "module Jekyll\n class TagPageGenerator < Generator\n safe true\n \n def generate(site)\n tags = site.posts.docs.flat_map { |post| post.data['tags'] || [] }.to_se...
ruby
chosen
[ { "from": "system", "value": "Call correct methods in the AxiomsController.\n" }, { "from": "human", "value": "#\n# Lists axioms of an ontology\n#\nclass AxiomsController < InheritedResources::Base\n\n belongs_to :ontology\n\n actions :index\n has_pagination\n\n respond_to :html, only: %i(in...
ruby
chosen
[ { "from": "system", "value": "Remove language banner for pension type tool\n\nStops the language banner being displayed since these content items are\nconsidered translated now.\n" }, { "from": "human", "value": "class GuidesController < ApplicationController\n layout 'guides'\n\n before_actio...
ruby
chosen
[ { "from": "system", "value": "Fix for migration if user doesn't have a location\n" }, { "from": "human", "value": "class CreateAddresses < ActiveRecord::Migration\n def change\n create_table :addresses do |t|\n t.string :street_address_1\n t.string :street_address_2\n t.string...
ruby
chosen
[ { "from": "system", "value": "Build methods in admin controller\n" }, { "from": "human", "value": "class AdminsController < ApplicationController\n def new\n end\nend\n" }, { "from": "gpt", "value": "class AdminsController < ApplicationController\n def new\n @admin = Admin.new\...
ruby
chosen
[ { "from": "system", "value": "Fix latest edition number bug\n\nThe fix applied in PR #502 didn’t completely fix the problem.\n\nWe need to parse the content returned by GDS API before we can apply Hash methods (with_indifferent_access) to it.\n\nError in [sentry](https://sentry.io/govuk/app-collections-publ...
ruby
chosen
[ { "from": "system", "value": "Fix URL builder for reorder route\n\nPreference is to use ActiveAdmin's built-in route builder so we get the\ncorrect namespace and model naming.\n" }, { "from": "human", "value": "module ActiveAdmin\n module Reorderable\n module TableMethods\n\n def reorde...
ruby
chosen
[ { "from": "human", "value": "Update strings by using ruby script\n" }, { "from": "gpt", "value": "#!/usr/bin/env ruby\n\nPROJECT_PATH = \"./Hodor\"\nSTRINGS_PATH = \"./zh-Hans.lproj/Localizable.strings\"\n\ndef klang_strings\n keys = []\n Dir.entries(\".\").each do |path|\n mfiles = File.jo...
ruby
chosen
[ { "from": "human", "value": "Add examples of services of server-spec\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe service('httpd') do\n it { should be_enabled }\nend\n\ndescribe service('mysqld') do\n it { should be_enabled }\nend\n\ndescribe service('zabbix_agentd') do\n...
ruby
chosen
[ { "from": "system", "value": "Stop using README.md as the gem's description\n" }, { "from": "human", "value": "require_relative './util'\n\n# :nodoc:\nmodule Builderator\n VERSION = Util.source_path('VERSION').read rescue '0.0.1'\n DESCRIPTION = Util.source_path('README.md').read rescue 'READM...
ruby
chosen
[ { "from": "system", "value": "Add transaction id to debits\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe GetBalances do\n let(:gateway) { TestGateway.new }\n let(:action) { GetBalances.new gateway }\n\n it \"calculates category balances\" do\n action.run[:stuff].sho...
ruby
chosen
[ { "from": "system", "value": "Remove tmp dir in integration tests\n\nSigned-off-by: Maria Shaldibina <dc03896a0185453e5852a5e0f0fab6cbd2e026ff@pivotal.io>\n" }, { "from": "human", "value": "require 'tmpdir'\nrequire 'tempfile'\nrequire 'fileutils'\nrequire 'bosh/dev/sandbox/debug_logs'\n\nRSpec....
ruby
chosen
[ { "from": "system", "value": "Add a test expecting moves to an occupied square will be rejected\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe TicTacToe::Game do\n let(:console) { mock_console }\n let(:board) { mock_board }\n let(:game) { TicTacToe::Game.new(console, boa...
ruby
chosen
[ { "from": "system", "value": "Make the index route test stronger\n" }, { "from": "human", "value": "require 'spec_helper'\nrequire 'rack_spec_helper'\nrequire 'tic_tac_toe/rack_shell'\n\ndescribe TicTacToe::RackShell do\n include Rack::Test::Methods\n\n def app\n TicTacToe::RackShell.new_sh...
ruby
chosen
[ { "from": "system", "value": "Improve output of Rake task if check failed\n\n* Do not print out result a second time.\n* Do not raise an exception, just exit with 1.\n\nThis is close to what RSpec's Rake task does:\nhttps://github.com/rspec/rspec-core/blob/master/lib/rspec/core/rake_task.rb\n" }, { ...
ruby
chosen
[ { "from": "system", "value": "Add MIT license identification to the Ruby gemspec" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire './lib/ember/data/version'\n\nGem::Specification.new do |gem|\n gem.name = \"ember-data-source\"\n gem.authors = [\"Yehuda Katz\"]...
ruby
chosen
[ { "from": "system", "value": "Update gem name to be consistent.\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s.name = 'spree_embedded_videos'\n s.version = '0.60.4'\n s.summary = 'A Spree extension that adds embedded ...
ruby
chosen
[ { "from": "system", "value": "Add documentation for the search methods\n" }, { "from": "human", "value": "\nrequire \"logstash/namespace\"\nrequire \"logstash/logging\"\nrequire \"logstash/event\"\n\nclass LogStash::Search::Base\n # Do a search. \n def search(query)\n raise \"The class #{se...
ruby
chosen
[ { "from": "system", "value": "Use Model.model_name.human instead of Model.human_name, which is deprecated\n" }, { "from": "human", "value": "require 'active_support/core_ext/string/inflections'\nmodule RailsAdmin\n class AbstractModel\n module GenericSupport\n def to_param\n part...
ruby
chosen
[ { "from": "system", "value": "Add new app to requires" }, { "from": "human", "value": "require_relative 'form_helpers'\nrequire_relative 'tag_helper'\nrequire_relative 'fieldset'\nrequire_relative 'form'\nrequire_relative 'simple_command_service_helpers'\n" }, { "from": "gpt", "value...
ruby
chosen
[ { "from": "human", "value": "Add League Spartan, version c350408b07\n" }, { "from": "gpt", "value": "cask :v1 => 'font-league-spartan' do\n version 'c350408b07'\n sha256 'a166294a7e156a0eb14df5714acfeeb3ad4db01eab2bc88f961695da917337fd'\n\n url 'http://files.theleagueofmoveabletype.com/downlo...
ruby
chosen
[ { "from": "human", "value": "Add basic spec for LabHasGroup\n" }, { "from": "gpt", "value": "describe LabHasGroup do\n describe \"relations\" do\n it \"should have a lab group\" do\n create(:lab_has_group).lab_group.should_not be_nil\n end\n end\n\n describe \"validations\" do\n ...
ruby
chosen
[ { "from": "human", "value": "Add google auth request spec\n" }, { "from": "gpt", "value": "require \"spec_helper\"\n\nRSpec.describe \"GET /admin/google_photos_authorizations/new\" do\n let(:path) { admin_new_google_photos_authorization_path }\n let(:user) { Factory.create_user }\n let(:admin...
ruby
chosen
[ { "from": "system", "value": "Fix casting issue in represent matcher.\n\nLet's say that in representation will be time. It gets serialized as string in json and then it doesn't get converted to instance of Time, therefore it makes a difference which should be ommited." }, { "from": "human", "val...
ruby
chosen
[ { "from": "system", "value": "Remove form_helpers from required files.\n\nThis should have been done sooner, but I kind of forgot ^_^\".\n" }, { "from": "human", "value": "class Cuba\n CONTRIB_ROOT = File.expand_path(\"../../\", File.dirname(__FILE__))\n\n require \"cuba/contrib/prelude\"\n r...
ruby
chosen
[ { "from": "system", "value": "Fix bug: storyboard needs to be included as a resource.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'JCAutocompletingSearch'\n s.platform = :ios, '5.0'\n s.version = '0.9.1'\n s.summary = 'Search controller for queryi...
ruby
chosen
[ { "from": "system", "value": "Use Adobe defaults... by default!" }, { "from": "human", "value": "module EventMachine\n module RTMP\n\n class RTMPError < RuntimeError; end\n class HandshakeError < RTMPError; end\n class HeaderError < RTMPError; end\n class MessageError < RTMPError; e...
ruby
chosen
[ { "from": "system", "value": "Use module_function since we are not instantiating this anyway. imasuka.\n" }, { "from": "human", "value": "module Fappu\n class Search\n\n def self.tagged(tag)\n tag.downcase!\n url = \"https://api.fakku.net/tags/#{tag}\"\n response = JSON.parse(...
ruby
chosen
[ { "from": "system", "value": "Use defined? instead of const_defined?\n" }, { "from": "human", "value": "# frozen_string_literal: true\nrequire 'haml/template/options'\n\n# check for a compatible Rails version when Haml is loaded\nif (activesupport_spec = Gem.loaded_specs['activesupport'])\n if ...
ruby
chosen
[ { "from": "system", "value": "Add Rack::Test as a development dependency" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/rake-pipeline/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"TODO: Write your name\"]\n gem.ema...
ruby
chosen
[ { "from": "system", "value": "Add ability to parse object paths as well as rails style routes.\n" }, { "from": "human", "value": "require 'loaf/configuration'\n\nmodule Loaf\n module Helpers\n\n class_eval do\n define_method :config do |options|\n Loaf.config\n end\n end\...
ruby
chosen
[ { "from": "system", "value": "Stop detecting Ruby types, and rely on mkmf to make the correct decision\n" }, { "from": "human", "value": "# ext/games_dice/extconf.rb\nif RUBY_DESCRIPTION =~ /jruby/\n mfile = open(\"Makefile\", \"wb\")\n mfile.puts '.PHONY: install'\n mfile.puts 'install:'\n ...
ruby
chosen
[ { "from": "system", "value": "Update dependencies to latest versions\n" }, { "from": "human", "value": "Gem::Specification.new do |gem|\n gem.name = \"blossom\"\n gem.version = \"0.1.4\"\n gem.author = \"Daniel Brockman\"\n gem.email = \"daniel@gointeractive.se\"\n gem.summary = \"Quick-sta...
ruby
chosen
[ { "from": "system", "value": "Remove tests for standard associations\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe AlbumImage do\n it 'must belong to an album' do\n pending 'test album image and album association'\n end\n\n it 'must have an image' do\n pending 'te...
ruby
chosen
[ { "from": "human", "value": "Add new spec for ActiveGoogle::Resource.\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\nclass Contact < ActiveGoogle::Resource\nend\n\ndescribe ActiveGoogle::Resource do\n describe \".element_path\" do\n it \"should use the google contacts api path\" d...
ruby
chosen
[ { "from": "system", "value": "Increase wait time for quick add url feature spec to 10s\n" }, { "from": "human", "value": "require 'rails_helper'\n\nrequire 'support/features'\n\nRSpec.feature 'quick add url', type: :feature, js: true do\n scenario 'quick add url' do\n create_user\n\n fill...
ruby
chosen
[ { "from": "human", "value": "Test file for the mentees helper.\n" }, { "from": "gpt", "value": "require 'rails_helper'\n\n# Specs in this file have access to a helper object that includes\n# the MenteesHelper. For example:\n#\n# describe MenteesHelper do\n# describe \"string concat\" do\n# ...
ruby
chosen
[ { "from": "system", "value": "Update link to FreeBSD distribution\n" }, { "from": "human", "value": "class FontCode2000 < Cask\n url 'http://ftp.freebsd.org/pub/FreeBSD/ports/local-distfiles/thierry/code2000-1.171/CODE2000.ZIP'\n homepage 'http://ftp.freebsd.org/pub/FreeBSD/ports/local-distfil...
ruby
chosen
[ { "from": "system", "value": "Update Mapbox Studio.app to version 0.2.0\n" }, { "from": "human", "value": "cask :v1 => 'mapbox-studio' do\n version '0.1.5'\n sha256 '284741137e2d711107debe0a5d940cee3d3a3eece55f4e95beb8de98006f116f'\n\n url \"https://mapbox.s3.amazonaws.com/mapbox-studio/mapbo...
ruby
chosen
[ { "from": "system", "value": "Add rspec as development 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 'blackbox/version'\n\nGem::Specification.new do |gem|\n ge...
ruby
chosen
[ { "from": "system", "value": "Add /etc/login.defs to permissions check\n" }, { "from": "human", "value": "# Encoding: UTF-8\nOhai.plugin(:Permissions) do\n provides 'permissions'\n\n def file_perms(file)\n command = <<-EOS\n stat -L -c \"%a\" #{file}\n EOS\n so = shell_out(command)...
ruby
chosen
[ { "from": "system", "value": "Update whenever log file path\n" }, { "from": "human", "value": "# Use this file to easily define all of your cron jobs.\n#\n# It's helpful, but not entirely necessary to understand cron before proceeding.\n# http://en.wikipedia.org/wiki/Cron\n\n# Example:\n#\n# set...
ruby
chosen
[ { "from": "system", "value": "Fix bug: crontab not updated\n" }, { "from": "human", "value": "every 1.minute do\n system 'thor sw:start'\nend\n" }, { "from": "gpt", "value": "every 1.minute do\n command \"cd #{`pwd`.strip} && #{`which thor`.strip} sw:start\"\nend\n" } ]
ruby
chosen
[ { "from": "system", "value": "Switch platform detection to shell out to uname -p -- Config::Config['target']\nlies on Intel with Apple's Universal ruby.\n" }, { "from": "human", "value": "require 'mkmf'\nrequire 'rbconfig'\n\ndef symlink(old, new)\n if File.exists?(new) && File.symlink?(new)\n ...
ruby
chosen
[ { "from": "system", "value": "Fix tests when running at end of month\n" }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe 'Day Entries' do\n include_context 'has all objects'\n\n describe 'show' do\n it 'should redirect to sign in if not logged in' do\n visit day_entry...
ruby
chosen
[ { "from": "human", "value": "Add homebrew head-only recipe to contrib/\n" }, { "from": "gpt", "value": "require \"formula\"\n\nclass Kakoune < Formula\n homepage \"https://github.com/mawww/kakoune\"\n head \"https://github.com/mawww/kakoune.git\"\n\n depends_on 'boost'\n\n def install\n c...
ruby
chosen
[ { "from": "system", "value": "Update gsetting helper to handle non-numeric values\n" }, { "from": "human", "value": "module GsettingsHelper\n def self.set_gsetting(plugin, key, value)\n <<-EOH\n gsettings set \\\n #{plugin} \\\n #{key} #{value}\n EOH\n end\n\n def self.gsetting...
ruby
chosen
[ { "from": "human", "value": "Create test to 'enroll in a team' feature\n" }, { "from": "gpt", "value": "require 'rails_helper'\n\ndescribe \"Enroll in a team\", type: :feature, js: true do\n let!(:team) { create(:team) }\n\n before do\n login_as create(:user)\n visit teams_path\n end\n\...
ruby
chosen
[ { "from": "human", "value": "Add | Tests for Capataz rewritten codes cache\n" }, { "from": "gpt", "value": "\nrequire 'rails_helper'\n\ndescribe Capataz::Cache do\n\n let! :cache do\n Capataz::Cache\n end\n\n before :each do\n cache.clean\n end\n\n context \"when Redis client is prese...
ruby
chosen
[ { "from": "system", "value": "Allow `email` to be blank\n" }, { "from": "human", "value": "class User < ActiveRecord::Base\n validates :nusnet_id, presence: true, uniqueness: true, format: { with: /\\A(A\\d{7}|U\\d{6,7})\\z/i }\n validates :name, presence: true\n validates :email, format: { w...
ruby
chosen
[ { "from": "system", "value": "Make password and password_confirmation accessible to let registration work.\n" }, { "from": "human", "value": "# == Schema Information\n# Schema version: 20090225185730\n#\n# Table name: users\n#\n# id :integer(4) not null, primary key\n# log...
ruby
chosen
[ { "from": "system", "value": "Add a 'signed_in?' helper method\n" }, { "from": "human", "value": "module SessionsHelper\n \n def sign_in(user)\n remember_token = User.new_remember_token\n cookies.permanent[remember_token] = remember_token\n user.update_attribute(:remember_token, User....
ruby
chosen
[ { "from": "system", "value": "Return an array of images for each artist, not just one image.\n" }, { "from": "human", "value": "class ArtistsController < ApplicationController\n\n # GET /artists.json\n def index\n image_finder = Image.where(true)\n image_finder = image_finder.where(secti...
ruby
chosen