conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Make sure verbose setting doesn't leak.\n" }, { "from": "human", "value": "$LOAD_PATH.unshift(File.dirname(__FILE__))\n$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), \"..\", \"lib\"))\n\nrequire \"bundler\"\nBundler.setup\nrequire \"typhoeus\"\nrequire \"rspec...
ruby
chosen
[ { "from": "system", "value": "Use symbols in the configuration hash\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'bundler/setup'\n\nENV['RACK_ENV'] = 'test'\n\nrequire 'knockoff'\n\nActiveRecord::Base.configurations = {\n 'test' => { 'adapter' => 'sqlite3', 'database' => 'tmp/...
ruby
chosen
[ { "from": "system", "value": "[CS] Include logs in spec output\n" }, { "from": "human", "value": "require 'adhearsion'\nrequire 'matrioska'\n\nRSpec.configure do |config|\n config.color_enabled = true\n config.tty = true\n\n config.filter_run focus: true\n config.run_all_when_everything_filt...
ruby
chosen
[ { "from": "system", "value": "Disable `should` syntax in Rspec\n\n`should` syntax is deprecated as of Rspec version 3.0 and the previous\ncommit converts all of our tests to use `expect` for consistency.\n\nTo prevent regressions, this change disables `should` syntax for this\ngem.\n" }, { "from": "...
ruby
chosen
[ { "from": "system", "value": "Add handler group pattern at simplecov.\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\n\nunless ENV['CI']\n require 'simplecov'\n SimpleCov.start do\n add_filter 'spec'\n add_group 'Agharta' do |source|\n source.filename =~ /lib\\/agharta(|...
ruby
chosen
[ { "from": "system", "value": "Add a few more default filters." }, { "from": "human", "value": "require 'rspec'\nrequire 'rspec/its'\nrequire 'simplecov'\n\n# Check for coverage stuffs\nformatters = []\nif ENV['CODECLIMATE_REPO_TOKEN']\n require 'codeclimate-test-reporter'\n formatters << CodeC...
ruby
chosen
[ { "from": "system", "value": "Add options to rack mock request\n" }, { "from": "human", "value": "require 'frankie'\nrequire 'rack'\ninclude Frankie\n\nclass Rack::MockRequest\n def trace(uri, opts={}) request(\"TRACE\", uri, opts) end\nend\n\ndef extended_modules_for kls\n (class << kls; ...
ruby
chosen
[ { "from": "system", "value": "Allow filtering of absolute paths\n\nThis fixes an issue with xcdatamodel files since they are included as a\ndirectory not as the file inside of them\n" }, { "from": "human", "value": "module Marooned\n class Finder\n def find(directory)\n search_path = Fi...
ruby
chosen
[ { "from": "system", "value": "Apply database seeds before running specs.\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/...
ruby
chosen
[ { "from": "system", "value": "Fix \"undefined method `parse' for Time:Class\"\n" }, { "from": "human", "value": "require \"sports_data_api/version\"\nrequire \"nokogiri\"\nrequire \"rest_client\"\n\nmodule SportsDataApi\n def self.key\n \"garbage\"\n end\n\n def self.access_level\n \"t\...
ruby
chosen
[ { "from": "system", "value": "Destroy record in down migration\n" }, { "from": "human", "value": "class SeedStoreCreditUpdateReasons < ActiveRecord::Migration\n def up\n Spree::StoreCreditUpdateReason.create!(name: 'Credit Given In Error')\n end\n\n def down\n # intentionally left blank...
ruby
chosen
[ { "from": "system", "value": "Use `render plain` instead of `render text` for Rails 5.1" }, { "from": "human", "value": "require 'active_support/concern'\n# Interact with WebSocket connections in rails.\n# Example:\n# # The widget controller's `show` lets you edit a widget in\n# # real time....
ruby
chosen
[ { "from": "system", "value": "Change sleep back to 2 seconds\n" }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe 'Showing restaurants', js: true do\n let!(:user) { User.create!(name: 'Matt', email: 'matt@matt.com', password: 'password') }\n let!(:group1) { Group.create!(name:...
ruby
chosen
[ { "from": "human", "value": "Add tests for building a User from an auth hash" }, { "from": "gpt", "value": "require 'test_helper'\n\ndescribe User do\n\n let(:auth_hash) {\n {\n provider: 'google',\n uid: '12345',\n info: {\n name: 'Stub User',\n email: 'stub.use...
ruby
chosen
[ { "from": "system", "value": ":green_heart: Add option for Travis CI test\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass MysqlImportTest < Test::Unit::TestCase\n test 'It has a version number' do\n refute_nil ::MysqlImport::VERSION\n end\n\n sub_test_case '#import' do\n ...
ruby
chosen
[ { "from": "human", "value": "Add missing spec of resourceful module\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe ElectricSheep::Shell::Resourceful do\n\n ResourcefulKlazz = Class.new do\n include ElectricSheep::Shell::Resourceful\n \n def initialize\n @host=E...
ruby
chosen
[ { "from": "human", "value": "Add script to list countries leading to outcome\n\nThis displays the countries that lead to the given outcome.\n\nIt's going to help me when extracting the marriage-abroad services from the\ntemplates.\n" }, { "from": "gpt", "value": "outcome_name = ARGV.shift\n\nfil...
ruby
chosen
[ { "from": "system", "value": "Call Prepare blocks from file level scope to second level scope.\n" }, { "from": "human", "value": "prepare do\n $file = true\nend\n\nprepare do\n $first = false\nend\n\nprepare do\n $second = false\nend\n\nspec 'call prepare blocks in file level scope only' do\n...
ruby
chosen
[ { "from": "system", "value": "Move mustache to development dependency\n" }, { "from": "human", "value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'pieces/version'\n\nGem::Specification.new do |spec|\n spec.name = 'piec...
ruby
chosen
[ { "from": "system", "value": "Rename tab to 'Gollum Wiki', fix it to be selected, place before :wiki.\n" }, { "from": "human", "value": "require 'redmine'\nrequire 'dispatcher'\n\nDispatcher.to_prepare :redmine_model_dependencies do\n require_dependency 'project'\n require_dependency 'user'\ne...
ruby
chosen
[ { "from": "system", "value": "Add an error message for Rails 2.3.6.\n" }, { "from": "human", "value": "unless $gems_rake_task\n require 'rails_xss/plugin'\nend\n" }, { "from": "gpt", "value": "if ActionPack::VERSION::STRING == \"2.3.6\"\n raise \"rails_xss does not support Rails 2....
ruby
chosen
[ { "from": "system", "value": "Remove \"/\" route since we dont need it\n" }, { "from": "human", "value": "class HelloWorldApp < Sinatra::Base\n configure do\n set :protection, :except => :frame_options\n end\n\n get '/' do\n \"Hello, world!\"\n end\n\n get '/button' do\n @color ...
ruby
chosen
[ { "from": "system", "value": "Print a message when it comes.\n" }, { "from": "human", "value": "#!/usr/bin/ruby -Ku\n# vim: set fileencoding=utf-8:\n\nif RUBY_VERSION >= '1.9'\n Encoding.default_external = Encoding::UTF_8\nend\n\nrequire 'em-websocket'\nrequire 'thread'\n\nts = []\nEventMachine...
ruby
chosen
[ { "from": "system", "value": "Move logic for testing push to private method\n" }, { "from": "human", "value": "require File.expand_path('../helper', __FILE__)\n\nclass AppHarborTest < Service::TestCase\n def setup\n @stubs = Faraday::Adapter::Test::Stubs.new\n end\n\n def test_push\n ap...
ruby
chosen
[ { "from": "human", "value": "Add testcase for Weblate service\n" }, { "from": "gpt", "value": "class WeblateTest < Service::TestCase\n def setup\n @stubs = Faraday::Adapter::Test::Stubs.new\n end\n\n def test_push\n @stubs.post \"/hooks/github/\" do |env|\n assert_equal 'weblate.ex...
ruby
chosen
[ { "from": "system", "value": "Remove \"Subsequent\" kinds from matrix submission options\n" }, { "from": "human", "value": "module MatricesHelper\n # Determines how many matrices to display at a time via pagination\n # Reads from the params and session hashes, but also handles the special\n #...
ruby
chosen
[ { "from": "system", "value": "Support Active Record <= 4.0.3, which uses the old method signature\n" }, { "from": "human", "value": "module ActiveRecord\n module MassAssignmentSecurity\n module Inheritance\n extend ActiveSupport::Concern\n\n module ClassMethods\n private\n ...
ruby
chosen
[ { "from": "system", "value": "Switch slave databases to use wal-g instead of wal-e\n" }, { "from": "human", "value": "name \"db-slave\"\ndescription \"Role applied to all slave database servers\"\n\ndefault_attributes(\n :postgresql => {\n :settings => {\n :defaults => {\n :hot_s...
ruby
chosen
[ { "from": "system", "value": "Fix search placeholder name/shortname being two different games\n" }, { "from": "human", "value": "module GamesHelper\n def placeholder\n random_placeholder || Game.new(name: 'Super Mario Sunshine', shortname: 'sms')\n end\n\n private\n\n def random_placehold...
ruby
chosen
[ { "from": "system", "value": "Implement root_path in gobierto data module\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule GobiertoData\n def self.table_name_prefix\n \"gdata_\"\n end\n\n def self.classes_with_custom_fields\n [GobiertoData::Dataset]\n end\nend...
ruby
chosen
[ { "from": "system", "value": "Fix crash if no jodels available\n" }, { "from": "human", "value": "class JodelHandler\n include HTTParty\n\n base_uri 'https://api.go-tellm.com/api/v2'\n\n def initialize(api_key)\n @api_key = api_key\n end\n\n def get_posts(latitude, longitude)\n puts \...
ruby
chosen
[ { "from": "system", "value": "Change error messages for system-system links to be clearer [story:42834235]\n" }, { "from": "human", "value": "# A link between systems\nclass SystemSystem < ActiveRecord::Base\n include AuthoredModel\n\n attr_accessible :parent, :child, :type, :order\n\n belong...
ruby
chosen
[ { "from": "system", "value": "Return validation errors in a consistent way\n" }, { "from": "human", "value": "module Bookyt\n class API < Grape::API\n format :json\n\n helpers do\n def current_user\n User.find_by_authentication_token(env['Auth-Token'] || headers['Auth-Token'])...
ruby
chosen
[ { "from": "system", "value": "JariBakken: Make sure opts is empty when we validate the options passed.\n\nr11124\n" }, { "from": "human", "value": "module Selenium\n module WebDriver\n module Firefox\n\n # @api private\n class Bridge < Remote::Bridge\n\n def initialize(opts ...
ruby
chosen
[ { "from": "system", "value": "Create factorial files with codes\n" }, { "from": "human", "value": "# Factorial\n\n# I worked on this challenge [by myself, with: ].\n#Pseudocode\n#First part\n #condition is zero\n#Second part\n #build factorial by iteriating the number down to 1.\n\n# Your Solu...
ruby
chosen
[ { "from": "system", "value": "Update rails dependency in order to work with Rails 3.2 RC1" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"searchify/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Sp...
ruby
chosen
[ { "from": "system", "value": "Add spec for internal registry access\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Celluloid::SupervisionGroup do\n before :all do\n class MyActor\n include Celluloid\n\n def running?; :yep; end\n end\n\n class MyGroup < C...
ruby
chosen
[ { "from": "human", "value": "Add specs for custom signchangeaddress action.\n" }, { "from": "gpt", "value": "require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')\n\ndescribe UserController do\n\n describe 'GET signchangeaddress' do\n\n render_views\n\n it \"redirects an an...
ruby
chosen
[ { "from": "human", "value": "Add feature spec for duplication.\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\nrequire 'rails_helper'\n\nRSpec.feature 'Course: Duplication' do\n let!(:instance) { Instance.default }\n\n with_tenant(:instance) do\n let!(:course) { create(:cour...
ruby
chosen
[ { "from": "system", "value": "Package version increased from 0.1.1.1 to 0.2.0.0\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'event_store-client-http'\n s.version = '0.1.1.1'\n s.summary = 'HTTP Client for EventStore'\n s.description ...
ruby
chosen
[ { "from": "system", "value": "Test Provider for create, confirm, and delete to create an instance of Provider with a task instance variable equaling the task hash and an empty result hash\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Provider do\n\nend\n" }, { "fro...
ruby
chosen
[ { "from": "system", "value": "Use github homepage instead of personal\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 'rubygems-openpgp'\n s.version = '0.0.0'\n s.date = '2010-05-27'\n s.summary = \"Sign gems via OpenPGP\"\n s.description = ...
ruby
chosen
[ { "from": "system", "value": "Add mote as a runtime dependency\n\nMote is not a development dependency, as cuba/contrib requires\ncuba/mote, which in turn requires mote.\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = \"cuba-contrib\"\n s.version ...
ruby
chosen
[ { "from": "system", "value": "Package version is increased from 0.2.0.0 to 0.3.0.0\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'schema'\n s.summary = \"Primitives for schema and structure\"\n s.version = '0.2.0.0'\n s.description = '...
ruby
chosen
[ { "from": "system", "value": "Make sure cron is installed on Debian / Ubuntu\n" }, { "from": "human", "value": "default['cron']['package_name'] = case node['platform_family']\n when 'rhel', 'fedora'\n node['platform_version'].to...
ruby
chosen
[ { "from": "system", "value": "Add a dependency on guard version 1, to prepare the migration to version 2\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/guard/zeus/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = \"guard...
ruby
chosen
[ { "from": "system", "value": "Update dependencies (and the spelling of my name :P) in gemspec.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path('../lib', __FILE__)\nrequire 'sicuro/version'\n\nGem::Specification.new do |s|\n s.name = 'sicuro'\n s.ve...
ruby
chosen
[ { "from": "human", "value": "Remove nickname limit on db\n" }, { "from": "gpt", "value": "class RemoveNicknameLimit < ActiveRecord::Migration\n def self.up\n change_column :profiles, :nickname, :string, :limit => 255\n end\n\n def self.down\n change_column :profiles, :nickname, :string,...
ruby
chosen
[ { "from": "human", "value": "Add migration to drop gp_political_groups table\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\n\nclass DropPoliticalGroups < ActiveRecord::Migration[5.2]\n def up\n drop_table :gp_political_groups\n end\n\n def down\n create_table :gp_politi...
ruby
chosen
[ { "from": "system", "value": "Copy bootstrap templates if option specified.\n" }, { "from": "human", "value": "require 'rails/generators'\nrequire 'rails/generators/named_base'\n\nmodule LinkToAction\n module Generators\n class InstallGenerator < Rails::Generators::Base\n desc \"Copy Li...
ruby
chosen
[ { "from": "system", "value": "Move the view-specific spec into a real view spec.\n" }, { "from": "human", "value": "require File.expand_path(File.dirname(__FILE__) + '/spec_helper' )\n\ndescribe 'GET /recipes/permalink' do\n include Sinatra::Test\n\n before(:all) do\n RestClient.put @@db, {...
ruby
chosen
[ { "from": "human", "value": "Add test for Pushbullet service.\n" }, { "from": "gpt", "value": "require File.expand_path('../helper', __FILE__)\n\nclass PushbulletTest < Service::TestCase\n def setup\n @stubs = Faraday::Adapter::Test::Stubs.new\n\n @options = {\"api_key\" => \"a\", \"devic...
ruby
chosen
[ { "from": "system", "value": "Remove auto-generated failing unit test\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\n\n def test_it_does_someth...
ruby
chosen
[ { "from": "human", "value": "Add spec for hiding of attachments that show personal details.\n" }, { "from": "gpt", "value": "require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')\n\ndescribe RequestController do\n\n describe 'GET get_attachment' do\n\n it \"returns RecordNotFo...
ruby
chosen
[ { "from": "system", "value": "Add _table-suffix to migration filename in uninstall spec" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'RailsAdmin::UninstallGenerator' do\n include GeneratorSpec::TestCase\n include GeneratorHelpers\n \n tests RailsAdmin::UninstallGenerato...
ruby
chosen
[ { "from": "system", "value": "Upgrade Cloud Foundry CLI to 6.7.0\n" }, { "from": "human", "value": "cask :v1 => 'cloudfoundry-cli' do\n version '6.6.1'\n sha256 '1a159944a447b4b321513cadd8c009477dc084ce22b6bfd2e5e20382d98bb5e5'\n\n url \"http://go-cli.s3-website-us-east-1.amazonaws.com/releas...
ruby
chosen
[ { "from": "system", "value": "Use FakeRedis in Sidekiq as well\n" }, { "from": "human", "value": "require 'sidekiq/testing/inline' if %w(development test).include?(Rails.env)\n\nif Settings.sidekiq?\n Sidekiq::Web.use Rack::Auth::Basic do |username, password|\n username == Settings.sidekiq.u...
ruby
chosen
[ { "from": "system", "value": "Use default application layout for styleguide\n" }, { "from": "human", "value": "require_dependency \"hologram_rails/application_controller\"\n\nmodule HologramRails\n class StyleguideController < ApplicationController\n include HighVoltage::StaticPage\n layo...
ruby
chosen
[ { "from": "system", "value": "fix(ForumResponse): Set max no of posts that could be selected\n" }, { "from": "human", "value": "# frozen_string_literal: true\nclass Course::Assessment::Question::ForumResponse < ApplicationRecord\n acts_as :question, class_name: Course::Assessment::Question.name...
ruby
chosen
[ { "from": "human", "value": "Add serializer for show page of aru\n" }, { "from": "gpt", "value": "class ShowAnnualReportUploadSerializer < ActiveModel::Serializer\n attributes :id, :trading_country_id, :point_of_view, :number_of_rows,\n :file_name, :has_primary_errors, :created_at, :updated_at...
ruby
chosen
[ { "from": "system", "value": "Verify new admin role is active." }, { "from": "human", "value": "module PageObject\n module Circle\n class Roles < PageObject::Page\n\n set_url '/circles/{circle_id}/admin/roles{?as}'\n element :promote_user_link, 'a', text: /Promote User/\n elem...
ruby
chosen
[ { "from": "system", "value": "Replace deprecated stub method with double in specs\n" }, { "from": "human", "value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\ndescribe SQL::Fuzzer, '#each' do\n let(:object) { described_class.new(ast) }\n let(:ast) { stub('ast').as_null_object }\n\n b...
ruby
chosen
[ { "from": "system", "value": "Update podspect to support version 1.1.0\n" }, { "from": "human", "value": "#\n# Be sure to run `pod lib lint BLCStarRatingView.podspec' to ensure this is a\n# valid spec and remove all comments before submitting the spec.\n#\n# Any lines starting with a # are optio...
ruby
chosen
[ { "from": "system", "value": "Remove dead code from merge\n" }, { "from": "human", "value": "module ActionView\n module TemplateHandlers\n module Compilable\n def self.included(base)\n base.extend ClassMethod\n end\n\n module ClassMethod\n # If a handler is mixin...
ruby
chosen
[ { "from": "system", "value": "Undo check for unsufficient argument count for now (causes problems during bootstrap)." }, { "from": "human", "value": "# in Fancy we use the BlockEnvironment as Block\nBlock = Rubinius::BlockEnvironment\n\nclass Block\n define_method(\"while_true:\") do |block|\n ...
ruby
chosen
[ { "from": "system", "value": "Include rdoc as a dev dependency.\n" }, { "from": "human", "value": "require './lib/syntax/version'\n\nGem::Specification.new \"syntax\", Syntax::Version::STRING do |s|\n s.summary = \"Perform simple syntax highlighting.\"\n s.description = \"Syntax is Ruby librar...
ruby
chosen
[ { "from": "system", "value": "Update HandbrakeCLI Nightly to v7073svn\n\nHandBrakeCLI Nightly v7073svn built 2015-04-09.\n" }, { "from": "human", "value": "cask :v1 => 'handbrakecli-nightly' do\n version '7031svn'\n sha256 '29584bd078000dc79c95c56aa9483e7bc5d6cce048349414e4016bcea68ef76d'\n\n ...
ruby
chosen
[ { "from": "system", "value": "Add unauthenticated route back for Rails3\n" }, { "from": "human", "value": "Georgia::Engine.routes.draw do\n\n devise_for :users, class_name: \"Georgia::User\", path: '/', module: 'georgia/users', path_names: {sign_in: '/login', sign_out: '/logout'}\n\n namespace...
ruby
chosen
[ { "from": "system", "value": "Add fixes for Rails 3\n" }, { "from": "human", "value": "module ActionView\n module Helpers\n class FormBuilder\n def country_select(method, options = {}, html_options = {})\n @template.country_select(@object_name, method, objectify_options(options),...
ruby
chosen
[ { "from": "system", "value": "Change the format of JSON representation\n" }, { "from": "human", "value": "require 'json'\n\nmodule XClarityClient\n class DiscoverRequestManagement < XClarityBase\n\n include XClarityClient::ManagementMixin\n\n def initialize(conf)\n super(conf, Discov...
ruby
chosen
[ { "from": "system", "value": "Fix weird and more or less random test failure.\n" }, { "from": "human", "value": "require 'helper'\n\nclass Car\n include Transitions\n\n state_machine do\n state :parked\n state :running\n state :driving\n\n event :turn_key do\n transitions :fro...
ruby
chosen
[ { "from": "system", "value": "Update spec for partial message which was flapping\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'Client - partial message behavior' do\n before do\n @s = NatsServerControl.new\n @s.start_server\n end\n\n after do\n @s.kill_server\...
ruby
chosen
[ { "from": "system", "value": "Use modern syntax for booking template factory.\n" }, { "from": "human", "value": "Factory.define :booking_template do |b|\nend\n\nFactory.define :cash, :parent => :booking_template do |b|\n b.title 'Bareinnahmen'\n b.association :credit_account, :factory => :cash...
ruby
chosen
[ { "from": "system", "value": "Allow network connection for integration tests\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'spec_helper'\nrequire 'plaintweet/repository'\n\nRSpec.describe 'Tweets Repository', integration: true do\n subject(:repository) { Plaintweet...
ruby
chosen
[ { "from": "system", "value": "Remove validation spec for UserIdentifier spec\n\nThis validation was removed from the model\n" }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.describe UserIdentifier, type: :model do\n\n context \"validations\" do\n it { is_expected.to validate...
ruby
chosen
[ { "from": "system", "value": "Fix the pid running check method call.\n" }, { "from": "human", "value": "module Cognizant\n module System\n module Process\n def self.pid_running?(pid)\n return false unless pid and pid != 0\n self.signal(0, pid)\n # It's running since...
ruby
chosen
[ { "from": "system", "value": "Use form to get size.\n" }, { "from": "human", "value": "module Ethon\n class Easy\n module Http\n\n # This module contains logic for setting up a [multipart] POST body.\n module Postable\n # Set things up when form is provided.\n # Deals...
ruby
chosen
[ { "from": "system", "value": "Add unit test for adapter.\n" }, { "from": "human", "value": "# = ts_all.rb\n#\n# Test Suite of all the Test Unit.\n#\n# == Project\n#\n# * ActiveRDF\n# <http://m3pe.org/activerdf/>\n#\n# == Authors\n# \n# * Eyal Oren <first dot last at deri dot org>\n# * Renaud Del...
ruby
chosen
[ { "from": "system", "value": "test-bot-docker: Fix a typo (tap linuxbrew/xorg)\n" }, { "from": "human", "value": "#: `test-bot-docker` <formulae>...\n#:\n#: Build a bottle for the specified formulae using a Docker container.\n#: See `test-bot` for further options accepted by this command.\n\nm...
ruby
chosen
[ { "from": "system", "value": "Use old validate and aggregate for analysis\n" }, { "from": "human", "value": "module SchoolAggregation\n extend ActiveSupport::Concern\n\nprivate\n\n def aggregate_school(school)\n cache_key = \"#{school.name.parameterize}-aggregated_meter_collection\"\n Ra...
ruby
chosen
[ { "from": "system", "value": "Include ranking module in user through config.to_prepare.\n" }, { "from": "human", "value": "module VoluntaryRanking\n class Engine < ::Rails::Engine\n config.autoload_paths << File.expand_path(\"../..\", __FILE__)\n config.autoload_paths << File.expand_path(...
ruby
chosen
[ { "from": "system", "value": "Refactor gemspec and add slop\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'readme_tracker/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Add method to create by rank\n" }, { "from": "human", "value": "class Chouette::JourneyPatternSection < Chouette::ActiveRecord\n belongs_to :journey_pattern\n belongs_to :route_section\n\n validates :journey_pattern_id, presence: true\n validates :route_section_...
ruby
chosen
[ { "from": "system", "value": "Make the server work properly\n" }, { "from": "human", "value": "unless [:development, :test].include?(Rails.env.to_sym)\n $mixpanel = Mixpanel::Tracker.new('2e87e79bda898d69197d3623c426be35')\nend\n" }, { "from": "gpt", "value": "if defined?(Mixpanel)\...
ruby
chosen
[ { "from": "system", "value": "Make error spec work on circle\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe LintTrap::Linter::Base do\n let(:container){LintTrap::Container::Docker.new('lintci/spin_cycle:latest', fixture_path)}\n let(:options){{}}\n subject(:linter) do\n ...
ruby
chosen
[ { "from": "system", "value": "Add filtred Password in log file\n" }, { "from": "human", "value": "require File.expand_path('../boot', __FILE__)\n\nrequire 'rails/all'\n\n# Require the gems listed in Gemfile, including any gems\n# you've limited to :test, :development, or :production.\nBundler.re...
ruby
chosen
[ { "from": "system", "value": "Fix SyntaxError in version number\n" }, { "from": "human", "value": "require File.expand_path('../boot', __FILE__)\n\nrequire 'rails/all'\n\n# Require the gems listed in Gemfile, including any gems\n# you've limited to :test, :development, or :production.\nBundler.r...
ruby
chosen
[ { "from": "system", "value": "Change how encoding is specified." }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/texter/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"J. Pablo Fernández\"]\n gem.email = [\"pu...
ruby
chosen
[ { "from": "system", "value": "Fix showing excerpt in posts lists\n" }, { "from": "human", "value": "# coding: utf-8\nmodule Article::PostDecorator\n def byline\n content_tag(:p, class: 'byline') do\n show? ? full_byline : responsive_byline\n end\n end\n\n def content\n show? ? b...
ruby
chosen
[ { "from": "human", "value": "Add tests to ensure ntp is locked down\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\n# Tests to ensure ntp is locked down \n\ndescribe file('/etc/ntp.conf') do\n it { should be_file }\n\tit { should contain \"restrict default kod nomodify notrap nopeer n...
ruby
chosen
[ { "from": "human", "value": "Add day 06: Light Grid\n" }, { "from": "gpt", "value": "COMMAND = /^(?:turn )?(on|off|toggle) (\\d+),(\\d+) through (\\d+),(\\d+)$/\n\ndef new_grid; Array.new(1000) { Array.new(1000, 0) }; end\n\nputs ARGF.each_line.with_object([new_grid, new_grid]) { |l, (on_off_gri...
ruby
chosen
[ { "from": "system", "value": "Add ConsumerMetadata to Api lookups\n" }, { "from": "human", "value": "require 'neptune/api/consumer_metadata'\nrequire 'neptune/api/fetch'\nrequire 'neptune/api/metadata'\nrequire 'neptune/api/offset'\nrequire 'neptune/api/offset_fetch'\nrequire 'neptune/api/produc...
ruby
chosen
[ { "from": "system", "value": "Use private method for assignment definition\n" }, { "from": "human", "value": "class SendSingleTriageEmailJob < ApplicationJob\n def perform(id)\n repo_sub = RepoSubscription.includes(:user, :repo).find(id)\n IssueAssigner.new(repo_sub.user, [repo_sub]).assi...
ruby
chosen
[ { "from": "system", "value": "Remove unused constant aliases for `ActiveRecord::Associations::ClassMethods::*`\n\n`ActiveRecord::Associations::ClassMethods::*` had already been moved to\n`ActiveRecord::Associations::*` since Rails 3.1.\n\nSee https://github.com/rails/rails/commit/b171b9e73dcc6a89b1da652da61...
ruby
chosen
[ { "from": "system", "value": "Change variable name passed to methods\n" }, { "from": "human", "value": "require \"tic_tac_toe/version\"\n\nmodule TicTacToe\n # Your code goes here...\n class Board\n def pos coords\n \" \"\n end\n\n def move coords, mark\n\n end\n end\nend\n" ...
ruby
chosen
[ { "from": "system", "value": "Adjust config path for new code location\n" }, { "from": "human", "value": "require 'yaml'\nmodule Wukong\n CONFIG_FILE_LOCATION=File.dirname(__FILE__)+'/../config'\n CONFIG = { }\n def self.config_options\n\n # load main options\n config = YAML.load(F...
ruby
chosen
[ { "from": "system", "value": "Add details to search by subscription code\n" }, { "from": "human", "value": "require_relative '../../boot'\n\n# Find a Subscription by code\n#\n# You need to give AccountCredentials (EMAIL, TOKEN) and the subscription code\n#\n# P.S: See the boot file example for m...
ruby
chosen
[ { "from": "system", "value": "Fix `url` stanza comment for FreeCAD.\n" }, { "from": "human", "value": "cask 'freecad' do\n version '0.16-6705.acfe417'\n sha256 '7ddd1dc718b9338bc3581f02f107a80d3dfe3dfe147f7dcd7c5d28af864654f9'\n\n url \"https://github.com/FreeCAD/FreeCAD/releases/download/0.1...
ruby
chosen
[ { "from": "system", "value": "Revert \"Ensure MemCacheStore is required when using CompressedMemCacheStore since they are lazy load now.\"\n\nThis reverts commit dd4181f47dc0f166eb5d3e47a4a0dc1594cc5669.\n" }, { "from": "human", "value": "require \"active_support/cache/mem_cache_store\"\n\nmodul...
ruby
chosen
[ { "from": "system", "value": "Fix `url` stanza comment for OSXFUSE.\n" }, { "from": "human", "value": "cask 'osxfuse' do\n version '2.8.3'\n sha256 'b0f05fa6e74372b73417e89bfd103a46a0b968239f03832755e424bec09051e6'\n\n # sourceforge.net/project/osxfuse was verified as official when first intr...
ruby
chosen