conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Change interface of apply command\n"
},
{
"from": "human",
"value": "module Brightbox\n desc 'Apply firewall policy to a server group'\n arg_name '[firewall-policy-id...]'\n\n command [:apply] do |c|\n c.desc 'Server Group id'\n c.flag [:g, :group]\n\n c... | ruby | chosen |
[
{
"from": "system",
"value": "Add test to check js response of descendants controller\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire \"test_helper\"\n\nclass GobiertoBudgets::BudgetLineDescendantsControllerTest < GobiertoControllerTest\n def site\n @site ||= site... | ruby | chosen |
[
{
"from": "system",
"value": "Configure tests not to manage GC under JRuby\n"
},
{
"from": "human",
"value": "class DeferredGarbageCollection\n\n DEFERRED_GC_THRESHOLD = (ENV['DEFER_GC'] || 15.0).to_f\n\n @@last_gc_run = Time.now\n\n def self.start\n GC.disable if DEFERRED_GC_THRESHOLD > 0... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up prepare instance step.\n\nSigned-off-by: Andrew Su <6d7ded18778d8f6854a418786d073050217e1502@pivotal.io>\n"
},
{
"from": "human",
"value": "module Bosh::Director\n module DeploymentPlan\n module Steps\n class PrepareInstanceStep\n def initia... | ruby | chosen |
[
{
"from": "system",
"value": "Rewrite query to remove watcher duplicates in reinforcewatcheruniqueness migration.\n"
},
{
"from": "human",
"value": "class Reinforcewatcheruniqueness < ActiveRecord::Migration\n def self.up\n remove_index :watchers, {:name => 'uniqueness_index'}\n Watcher.c... | ruby | chosen |
[
{
"from": "human",
"value": "Add day 04: Advent Coins\n"
},
{
"from": "gpt",
"value": "require 'digest'\n\ninput = !ARGV.empty? && !File.exist?(ARGV.first) ? ARGV.first : ARGF.read\nn = 0\nzeroes = [5, 6]\n\nnum_zeroes = zeroes.shift\ntarget_prefix = ?0 * num_zeroes\n\nwhile num_zeroes\n md5 = ... | ruby | chosen |
[
{
"from": "system",
"value": "Update to latest hey 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 'bizness/version'\n\nGem::Specification.new do |spec|\n spec.name = \... | ruby | chosen |
[
{
"from": "human",
"value": "Add a firehose producer example\n"
},
{
"from": "gpt",
"value": "$LOAD_PATH.unshift(File.expand_path(\"../../lib\", __FILE__))\n\nrequire \"kafka\"\n\nKAFKA_CLIENT_CERT = ENV.fetch(\"KAFKA_CLIENT_CERT\")\nKAFKA_CLIENT_CERT_KEY = ENV.fetch(\"KAFKA_CLIENT_CERT_KEY\")\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add minitest as dev dependency.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'faraday-request-timer/version'\n\nGem::Specification.new do |spec|\n sp... | ruby | chosen |
[
{
"from": "system",
"value": "Update to only be compatible with Fastlane 2.104 upwards\n"
},
{
"from": "human",
"value": "# coding: utf-8\n\nlib = File.expand_path(\"../lib\", __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'fastlane/plugin/farol/version'\n\nGem::Spec... | ruby | chosen |
[
{
"from": "system",
"value": "Drop sprockets < 3.3 support\n"
},
{
"from": "human",
"value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'ember/handlebars/version'\n\nGem::Specification.new do |spec|\n spec.name = 'ember... | ruby | chosen |
[
{
"from": "system",
"value": "Make triple crown eligible winner / no winner logic readable\n"
},
{
"from": "human",
"value": "module BaseballStats\n module Calculators\n class TripleCrownEligible\n include Calculators\n\n def calculate\n al_winner = find_winner(AMERICAN_LEAG... | ruby | chosen |
[
{
"from": "system",
"value": "Use Yajl high-performance json parsing\n"
},
{
"from": "human",
"value": "module ApplicationHelper\n def render_xrds(types)\n type_str = \"\"\n\n types.each { |uri|\n type_str += \"<Type>#{uri}</Type>\\n \"\n }\n\n yadis = <<EOS\n<?xml version... | ruby | chosen |
[
{
"from": "human",
"value": "Rename 'scores' table to 'answers' table, and rename 'score' field to 'answer' field\n"
},
{
"from": "gpt",
"value": "class RenameScoresTableToAnswers < ActiveRecord::Migration\n def self.up\n \trename_table :scores, :answers\n \trename_column :answers, :score, :a... | ruby | chosen |
[
{
"from": "system",
"value": "Make the mock_service block optional\n"
},
{
"from": "human",
"value": "require 'pact/shared/dsl'\nrequire_relative 'mock_service'\n\nmodule Pact::Messages::Consumer::DSL\n class MessageProvider\n extend Pact::DSL\n\n attr_accessor :service, :consumer_name, :... | ruby | chosen |
[
{
"from": "human",
"value": "Add is_admin to User model.\n"
},
{
"from": "gpt",
"value": "class AddAdminFieldToUsers < ActiveRecord::Migration\n def self.up\n add_column :users, :is_admin, :boolean\n end\n\n def self.down\n remove_column :users, :is_admin\n end\nend\n"
}
] | ruby | chosen |
[
{
"from": "human",
"value": "Add promo_stats_2018q1 and promo_stats_updated_at_2018q1 to Publisher model\n\n* Create and run migration\n\n* Update schema\n"
},
{
"from": "gpt",
"value": "class AddColumnsToPublisher < ActiveRecord::Migration[5.0]\n def change\n add_column :publishers, :promo_... | ruby | chosen |
[
{
"from": "system",
"value": "Use death cause 99 if 34\n\nUntil UKRDC update schema to include 34\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nxml = builder\n\nxml.CauseOfDeath do\n xml.DiagnosisType \"final\"\n xml.Diagnosis do\n xml.CodingStandard \"EDTA\"\n xml.... | ruby | chosen |
[
{
"from": "system",
"value": "Write all data regarding to last deployment\n"
},
{
"from": "human",
"value": "\nclass Chef\n class Deployment\n class Monitor\n class Sink\n def receive(_data)\n fail 'must be implemented by subclass'\n end\n end\n\n class ... | ruby | chosen |
[
{
"from": "system",
"value": "Add more helper functions for bounded objects\n"
},
{
"from": "human",
"value": "module Extensions::ActiveRecord::Base\n def self.included(class_)\n class_.class_eval do\n def self.currently_valid\n where do\n (valid_from.nil? || valid_from ... | ruby | chosen |
[
{
"from": "system",
"value": "Use status constant from Dtrace class.\n\n\ngit-svn-id: 40196796c19c0e7557af02d93710b150381d7241@75 f5dbc166-08e2-44d3-850c-36126807790f\n"
},
{
"from": "human",
"value": "require 'dtrace'\n\nclass Dtracer\n attr_writer :logger\n attr_reader :script\n\n def scrip... | ruby | chosen |
[
{
"from": "human",
"value": "[hephaestus] Add tests for entities extraction task\n"
},
{
"from": "gpt",
"value": "require 'test_helper'\n\ndescribe EntitiesExtractionTask do\n let(:document){ FactoryGirl.create :document }\n let(:page) {FactoryGirl.create :page, from_pos: 0, to_pos: 100}\n le... | ruby | chosen |
[
{
"from": "system",
"value": "Fix message on country update\n"
},
{
"from": "human",
"value": "class NewAdmin::CountriesController < AdminController\n load_and_authorize_resource find_by: :namespace\n\n def index\n @countries = Country.all.order_by name: :asc\n @country ||= Country.new\n... | ruby | chosen |
[
{
"from": "system",
"value": "Patch PostsAttachments.create to allow attempting to create duplicates without error being raised\n"
},
{
"from": "human",
"value": "module TentD\n module Model\n\n class PostsAttachment < Sequel::Model(TentD.database[:posts_attachments])\n plugin :paranoia... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify code (nil params will be ignored).\n"
},
{
"from": "human",
"value": "require 'geocoder/lookups/base'\nrequire \"geocoder/results/geocoder_ca\"\n\nmodule Geocoder::Lookup\n class GeocoderCa < Base\n\n private # ------------------------------------------... | ruby | chosen |
[
{
"from": "human",
"value": "Test proves that unhandled message is not dispatched\n"
},
{
"from": "gpt",
"value": "require_relative 'dispatcher_init'\n\ndescribe \"Dispatch a Message That the Handler Doesn't Handle\" do\n it \"Does not handle the message\" do\n dispatcher = EventStore::Messa... | ruby | chosen |
[
{
"from": "system",
"value": "Remove row counting and rename services\n\nNote the client class needs to be changed\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nmodule CartoDB\n # The purpose of this class is to encapsulate storage of usage metrics.\n # This shall be used for billing... | ruby | chosen |
[
{
"from": "system",
"value": "Remove cloud_volume_type for ems_infra and add it for OpenStack Cinder Manager\n"
},
{
"from": "human",
"value": "describe EmsStorageHelper::TextualSummary do\n before do\n instance_variable_set(:@record, FactoryBot.create(:ems_infra))\n allow(self).to receiv... | ruby | chosen |
[
{
"from": "system",
"value": "Fix WebMock regression in 1.79.2\n\nSince Webmock [overrides the Net::HTTP#start\nmethod](https://github.com/bblimke/webmock/blob/master/lib/webmock/http_lib_adapters/net_http.rb#L144)\nto simulate HTTP requests, unsafe usage of `@socket` in ActiveMerchant's\n`Net::HTTP#ssl_con... | ruby | chosen |
[
{
"from": "system",
"value": "Remove .try to avoid AS dependency"
},
{
"from": "human",
"value": "module Cellect\n module Server\n class API\n module Helpers\n def workflow\n @workflow ||= Workflow[params[:workflow_id]]\n end\n\n def selector_params\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update React Native documentation (0.39)\n"
},
{
"from": "human",
"value": "module Docs\n class ReactNative < React\n self.name = 'React Native'\n self.slug = 'react_native'\n self.type = 'react'\n self.release = '0.38'\n self.base_url = 'https://fac... | ruby | chosen |
[
{
"from": "system",
"value": "Add error parameter to :response_options block in Owly Shrinker\n"
},
{
"from": "human",
"value": "require 'json'\n\nmodule LinkShrink\n module Shrinkers\n # @author Jonah Ruiz <jonah@pixelhipsters.com>\n # Implements Owly's URL Shortener API\n class Owly ... | ruby | chosen |
[
{
"from": "system",
"value": "Add dashes to word delimiters\n"
},
{
"from": "human",
"value": "module MarkovChain\n class TextSplitter\n attr_reader :text\n def initialize(text)\n @text = text\n end\n\n # word delimiters -- spaces, quotes, (various symbols followed by either an... | ruby | chosen |
[
{
"from": "system",
"value": "Implement the prefix mutation in Client::Prefixed\n"
},
{
"from": "human",
"value": "# Copyright (c) 2013 BZ Technology Services, LLC\n# Released under the MIT License (http://opensource.org/licenses/MIT)\n\nmodule Microphite\n module Client\n class Prefixed < B... | ruby | chosen |
[
{
"from": "system",
"value": "Make a method that does the hard work\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nrequire File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')\nrequire 'gherkin/tools/filter_listener'\nrequire 'gherkin/tools/pretty_listener'\nrequire 'stringio'\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo that prevented \".hidden\" to be commited"
},
{
"from": "human",
"value": "difficulty 4\ndescription \"You have committed several times but would like all those changes to be one commit.\"\n\nsetup do\n repo.init\n FileUtils.touch(\".hidden\")\n repo.add... | ruby | chosen |
[
{
"from": "system",
"value": "Create Connection's scope only once.\n"
},
{
"from": "human",
"value": "module Alf\n class Connection\n #\n # Defines the internal, private contract seen by Alf's internals\n # on connections.\n #\n module Internal\n\n # The connection specifica... | ruby | chosen |
[
{
"from": "system",
"value": "Change title to 40 charactermini\n"
},
{
"from": "human",
"value": "class Post < ActiveRecord::Base\n has_many :comments, dependent: :destroy\n validates :title, presence: true, length: { in: 2..20 }\n validates :content, presence: true, length: {in: 3..140}\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix inquiry in case scheduling_type is nil\n"
},
{
"from": "human",
"value": "class Task < ActiveRecord::Base\n include Taskable\n include Completable\n\n # Associations\n has_many :location_assignments\n has_many :locations, through: :location_assignments\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unneeded password confirmation validation\n"
},
{
"from": "human",
"value": "class User < ActiveRecord::Base\n has_many :microposts, dependent: :destroy\n has_many :relationships, foreign_key: \"follower_id\", dependent: :destroy\n has_many :followed_users... | ruby | chosen |
[
{
"from": "system",
"value": "Load the model from the app if present.\n"
},
{
"from": "human",
"value": "require File.expand_path('../../../lib/random', __FILE__)\n\nclass User < ActiveRecord::Base\n has_secure_password\n\n before_validation { |user| user.password = Random.password if user.pas... | ruby | chosen |
[
{
"from": "system",
"value": "Add method for updating total\n"
},
{
"from": "human",
"value": "class Vote < ActiveRecord::Base\n after_save :update_parent_vote_total \n \n belongs_to :voter, class_name: 'User'\n belongs_to :candidate, class_name: 'User'\n\n validates :voter, :candid... | ruby | chosen |
[
{
"from": "system",
"value": "Add error when get-postgresql-primary gets blank\n"
},
{
"from": "human",
"value": "require 'resolv'\n\nmodule GitlabCtl\n class PostgreSQL\n class EE\n class << self\n def get_primary\n node_attributes = GitlabCtl::Util.get_node_attributes\... | ruby | chosen |
[
{
"from": "system",
"value": "Use rbconfig to properly detect host OS\n"
},
{
"from": "human",
"value": "module VirtualBox\n class Platform\n class << self\n def mac?\n platform.include?(\"darwin\")\n end\n\n def windows?\n platform.include?(\"mswin\") || platfor... | ruby | chosen |
[
{
"from": "system",
"value": "Fix some issues in the eval\n"
},
{
"from": "human",
"value": "require \"truncates/version\"\n\nmodule Truncates\n DEFAULT_MAX_LENGTH = 255\n DEFAULT_CHARACTER_TRAIL = \"\"\n DEFAULT_ON = :before_validation\n \n def truncates(field_name, options = {})\n rais... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing newline to brew bottle.\n"
},
{
"from": "human",
"value": "# Builds binary brew package\nbrew_install\n\ndestination = HOMEBREW_PREFIX + \"Bottles\"\nif not File.directory?(destination)\n Dir.mkdir destination\nend\n\nARGV.each do|formula|\n # Get the ... | ruby | chosen |
[
{
"from": "system",
"value": "Add temporary BP check so tests pass and deploy to heroku :)"
},
{
"from": "human",
"value": "class UniverseCoreContentAuthorizer < CoreContentAuthorizer\n def self.creatable_by? user\n return true if user.selected_billing_plan_id == BillingPlan.find_by(stripe_p... | ruby | chosen |
[
{
"from": "system",
"value": "Use underscore to indicate private instance var\n\nSigned-off-by: Paras Sanghavi <fd1f0c49d7b34d13a5ad0b42d8ac746c734543a9@codeforamerica.org>\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule Medicaid\n class MemberStepsController < Medica... | ruby | chosen |
[
{
"from": "system",
"value": "Set default rate expiration hour for amazon\n"
},
{
"from": "human",
"value": "require_dependency 'spree/calculator'\n\nmodule Spree::Calculator::Shipping::Amazon\n\tclass Base < Spree::ShippingCalculator\n\t\t\n def compute_package(package)\n provider.estim... | ruby | chosen |
[
{
"from": "system",
"value": "TEST: Fix typo in netconsole::install test with missing }\n"
},
{
"from": "human",
"value": "require 'spec_helper'\ndescribe 'netconsole::install' do\n\n context 'with defaults for all parameters' do\n let (:facts){\n {\n :puppetversion => E... | ruby | chosen |
[
{
"from": "human",
"value": "11106: Add basic spec for async SentryJob\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nrequire \"rails_helper\"\nrequire \"json\"\n\ndescribe SentryJob do\n it \"gets created automatically\" do\n expect(Delayed::Job.count).to eq(0)\n Raven... | ruby | chosen |
[
{
"from": "system",
"value": "Remove spec for 404 on invalid formats\n"
},
{
"from": "human",
"value": "RSpec.describe 'Accepted format', type: :request do\n context 'requesting a resource with no specified format' do\n it 'returns a 200 response status' do\n get '/pension-types'\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow update scope in domain_record\n\n to data, priority, port and weight attributes\n"
},
{
"from": "human",
"value": "module DropletKit\n class DomainRecordMapping\n include Kartograph::DSL\n\n kartograph do\n mapping DomainRecord\n root_key p... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up some small details.\n\nChange \"number\" variables to \"bit.\"\nCorrect capitalization of \"Binary\" in exception message.\n\nSigned-off-by: Archer70 <4f473d33ec0129ceeb8efd984728df9841100554@gmail.com>\n"
},
{
"from": "human",
"value": "class Converter\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add specs for notify command.\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\ndescribe GithubCLI::Commands::Notifications do\n let(:format) { 'table' }\n let(:user) { 'peter-murach' }\n let(:repo) { 'github_cli' }\n let(:id) ... | ruby | chosen |
[
{
"from": "system",
"value": "Improve output of HTMLProcessor::NodeContents spec"
},
{
"from": "human",
"value": "require 'html_processor/node_contents'\n\ndescribe HTMLProcessor::NodeContents do\n subject(:processor) { described_class.new(html) }\n\n let(:html) { \"<p>#{inner_html}</p>\" }\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update spec to include testing of add_label_specification\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'ox'\nrequire 'support/shipping_options'\n\ndescribe UPS::Builders::ShipConfirmBuilder do\n context \"when passed a complete shipment\" do\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Migrate description strings into value hashes\n"
},
{
"from": "gpt",
"value": "class DescriptionValueHash < Mongoid::Migration\n def self.up\n puts \"Migrating description strings into value hashes, e.g.\"\n puts \"'some description' : { 'value' => 'some descr... | ruby | chosen |
[
{
"from": "system",
"value": "Remove upper limit for rails dependency\n\nCo-Authored-By: jacobbednarz <0762c1501ad00586616d8e5e435b658a6323c402@gmail.com>"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"engine_project/v... | ruby | chosen |
[
{
"from": "system",
"value": "Update serverspec to handle old Ubuntu/Debian releases\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe service('sssd') do\n it { should be_enabled }\n it { should be_running }\nend\n\ndescribe package('sssd') do\n it { should be_installed }\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix EC SRGS test by sorting data\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Admin::EcSrgsController do\n login_admin\n\n describe \"index\" do\n before(:each) do\n @cites_srg1 = create_ec_srg(:name => 'S1')\n @cites_srg2 = cr... | ruby | chosen |
[
{
"from": "system",
"value": "Use RSpec's eql() rather than be() to compare GET status code\n"
},
{
"from": "human",
"value": "require 'middleman/rack'\nrequire 'rack/test'\n\nmodule MiddlemanServerHelpers\n include Rack::Test::Methods\n\n def app\n @app.call\n end\n\n def visit(path)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update CI runner factories to not use invalid IDs\n\nThese IDs point to non-existing rows, causing the foreign key\nconstraints to fail.\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n factory :ci_runner_project, class: Ci::RunnerProject do\n runner_i... | ruby | chosen |
[
{
"from": "system",
"value": "Make optional validator work with FalseClass\n"
},
{
"from": "human",
"value": "module HashValidator\n module Validator\n class OptionalValidator < Base\n def initialize\n super('_optional') # The name of the validator, underscored as it won't usual... | ruby | chosen |
[
{
"from": "system",
"value": "Uninstall existing DHCP clients before installing\n"
},
{
"from": "human",
"value": "# Cookbook Name:: abiquo\n# Recipe:: install_remoteservices\n#\n# Copyright 2014, Abiquo\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use t... | ruby | chosen |
[
{
"from": "system",
"value": "Use custom db setup for migration tests\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe ROM::SQL::Repository do\n describe 'migration' do\n include_context 'database setup'\n\n context 'creating migrations inline' do\n subject(:repos... | ruby | chosen |
[
{
"from": "system",
"value": "Add end to respond_to block\n"
},
{
"from": "human",
"value": "# coding: utf-8\nmodule Megatron\n class ErrorsController < ActionController::Base\n JSON_RESPONSES = {\n internal_server_error: \"an unexpected error occurred\",\n bad_request: \... | ruby | chosen |
[
{
"from": "system",
"value": "Update PasswordResetsController for Rails 5\n\nPasswordResetsController was using before_filter which has been\ndepreciated in favor of before_action.\n"
},
{
"from": "human",
"value": "class PasswordResetsController < ApplicationController\n before_filter :set_use... | ruby | chosen |
[
{
"from": "system",
"value": "Add Exception Handling to Connection Sync Login\n"
},
{
"from": "human",
"value": "# The hope is to make this the start of ripping out the\n# oauth connection functions out of the model and into\n# service classes\nclass Util::Wallet::ConnectionSyncer\n def self.bu... | ruby | chosen |
[
{
"from": "system",
"value": "Disable file bucket for tests"
},
{
"from": "human",
"value": "require 'spec_helper_acceptance'\n\ndescribe 'hyperic class' do\n\n context 'default parameters' do\n # Using puppet_apply as a helper\n it 'should work idempotently with no errors' do\n java... | ruby | chosen |
[
{
"from": "system",
"value": "Remove wrong expectation in spec for Loader.main.\n"
},
{
"from": "human",
"value": "require File.expand_path('../../../spec_helper', __FILE__)\nrequire File.expand_path('../fixtures/common', __FILE__)\n\ndescribe \"Rubinius::Loader.main\" do\n before :each do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add some more tests to exercise FC066"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe \"FC066\" do\n context \"with a cookbook with a metadata file that does not specify chef_version\" do\n metadata_file \"name 'my_cookbook'\"\n it { is_e... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for table formatting methods.\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\nmodule FatTable\n describe Table do\n describe 'output' do\n # These tests are taken from https://www.tutorialspoint.com/postgresql/postgresql_using_joins.htm\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add failing spec for apache 2.4 virtual host changes.\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe 'config-driven-helper::apache-sites' do\n before do\n stub_command(\"/usr/sbin/apache2 -t\").and_return(true)\n end\n\n context 'apache 2.2'... | ruby | chosen |
[
{
"from": "system",
"value": "Refactoring: Rename to candidates from available_clouds in specs\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n# Copyright 2014 TIS Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in comp... | ruby | chosen |
[
{
"from": "system",
"value": "Use slug_title if parameter is given.\n"
},
{
"from": "human",
"value": "class UserFavouriteTopicsController < ApplicationController\n\n def index\n @topics = interactor :'topics/favourites', username\n\n render 'topics/index', format: 'json'\n end\n\n def ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove AIX as unsupported acceptance test platform\n"
},
{
"from": "human",
"value": "require 'beaker-rspec'\nrequire 'beaker-rspec/helpers/serverspec'\n\nhosts.each do |host|\n # Install Puppet\n install_puppet\nend\n\nUNSUPPORTED_PLATFORMS = ['Suse','windows','A... | ruby | chosen |
[
{
"from": "system",
"value": "[merb-exceptions] Create log dir if not already present\n\nThis avoids errors when running the specs from a\nfresh clone where the log dir is not yet present.\nAlso, it would resolve errors where a developer\nforgot to create or removed the Merb.root/log dir.\n"
},
{
"f... | ruby | chosen |
[
{
"from": "system",
"value": "Switch from baseload sub cat to electricity:\n"
},
{
"from": "human",
"value": "namespace :after_party do\n desc 'Deployment task: moar_advice_classes'\n task moar_advice_classes: :environment do\n puts \"Running deploy task 'moar_advice_classes'\"\n\n # Put... | ruby | chosen |
[
{
"from": "system",
"value": "Add itemnumber and firstname to context structs\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n# encoding: utf-8\n# This set of simple structs represents the @context objects\n\nBook = Struct.new(:title, :biblionumber, :items) do\n def initialize\n self... | ruby | chosen |
[
{
"from": "system",
"value": "Use bundle exec to run rake\n"
},
{
"from": "human",
"value": "set :user, \"fesplugas\"\nset :application, \"demo.typuscms.com\"\nset :use_sudo, false\nset :deploy_to, \"/home/#{user}/public_html/#{application}\"\n\nset :scm, :git\nset :default_run_options, { :pty =... | ruby | chosen |
[
{
"from": "human",
"value": "Add specs for AuthorizationSystem module.\n\n[:musical_note: Story of Reconversion - This is My Fist!]\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\n\nclass DummyController < ActionController::Base\n include AuthorizationSystem\n after_filter :validate_... | ruby | chosen |
[
{
"from": "human",
"value": "Add MIDI experiments with volca beats.\n"
},
{
"from": "gpt",
"value": "port_beats = \"midisport_4x4_anniv_b\"\nchan_beats = 10\n\nuse_bpm 130\n\nlive_audio :mixer, stereo: true\n\n# Volca beats.\ndefine :volcabeats do |p, i|\n trig = p.tr(' ', '').ring[i]\n \n mi... | ruby | chosen |
[
{
"from": "system",
"value": "Add a test for handling basic objects\n\nThis is what caused me to discover the problem I fixed in 7598c26.\n"
},
{
"from": "human",
"value": "# coding: utf-8\n\nrequire 'spec_helper'\nrequire 'json'\nrequire 'yaml'\n\ndescribe ActiveInteraction::InterfaceFilter, :f... | ruby | chosen |
[
{
"from": "system",
"value": "Fix arguments error for PlainTextFormatter\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nmodule CC::Analyzer::Formatters\n describe PlainTextFormatter do\n include Factory\n\n describe \"#write\" do\n it \"raises an error\" do\n engi... | ruby | chosen |
[
{
"from": "human",
"value": "Add missing migration for temp scheduling in gantt chart\n"
},
{
"from": "gpt",
"value": "class AddTempDueDatesForScheduling < ActiveRecord::Migration\n def self.up\n add_column :tasks, :scheduled_at, :timestamp, :default => nil\n add_column :tasks, :scheduled... | ruby | chosen |
[
{
"from": "system",
"value": "Fix migration not being properly reversible\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass RemoveLangFromUsers < ActiveRecord::Migration\n def change\n remove_column :users, :lang, :string, limit: 4, null: false\n end\nend\n"
},
{... | ruby | chosen |
[
{
"from": "system",
"value": "Set index length to 40\n\nSince we run an emoji-compatible database, a single char can be up to\nfour bytes. Maria (and MySQL) enforce a 767-bit index length limit, so\nwe need to manually pull this down.\n"
},
{
"from": "human",
"value": "class GenerateInstanceKeys... | ruby | chosen |
[
{
"from": "system",
"value": "Allow Venice to contain a shared secret"
},
{
"from": "human",
"value": "module Venice\n VERSION = \"0.0.1\"\nend\n\nrequire 'venice/client'\nrequire 'venice/receipt'\n"
},
{
"from": "gpt",
"value": "module Venice\n VERSION = \"0.0.1\"\n\n def self.sh... | ruby | chosen |
[
{
"from": "system",
"value": "[FEATURE] Move chef dependencies to include_recipe.\n"
},
{
"from": "human",
"value": "directory \"/var/www/ripple_gateway\" do\n owner \"ubuntu\"\n mode \"0777\"\nend\n\n"
},
{
"from": "gpt",
"value": "include_recipe \"git\"\ninclude_recipe \"nodejs\"... | ruby | chosen |
[
{
"from": "system",
"value": "Fix 406s in chat API\n"
},
{
"from": "human",
"value": "module Api\n module Chat\n class CommentsController < ApplicationController\n respond_to :json\n\n protect_from_forgery with: :null_session, if: Proc.new { |c| c.request.format == 'application/jso... | ruby | chosen |
[
{
"from": "system",
"value": "Remove timestamps and created_by methods\n"
},
{
"from": "human",
"value": "module Georgia\n class ApplicationDecorator < Draper::Decorator\n\n delegate_all\n\n %w(created_at updated_at).each do |timestamp|\n define_method(\"pretty_#{timestamp}\") { mode... | ruby | chosen |
[
{
"from": "system",
"value": "Include docs and LICENSE in the gem\n"
},
{
"from": "human",
"value": "lib = File.expand_path('../lib/', __FILE__)\n$:.unshift lib unless $:.include?(lib)\nrequire 'foodcritic/version'\nGem::Specification.new do |s|\n s.name = 'foodcritic'\n s.version = FoodCritic... | ruby | chosen |
[
{
"from": "system",
"value": "Create rails-env.yml if not present before archiving.\n"
},
{
"from": "human",
"value": "if ( rails?( Dir.pwd ) )\n namespace :torquebox do\n\n desc \"Create a self-contained application archive\"\n task :archive do \n puts \"Creating archive of #{RAILS_... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor code - 0 failures\n"
},
{
"from": "human",
"value": "#Solution Below\n\n# RSpec Tests. They are included in this file because the local variables you are creating are not accessible across files. If we try to run these files as a separate file per normal op... | ruby | chosen |
[
{
"from": "system",
"value": "Speed up read_marks insertion for discussion topics.\n"
},
{
"from": "human",
"value": "# This migration initialises the read/unread models for Course::Discussion::Topic.\nclass AddReadStatusToTopics < ActiveRecord::Migration[5.1]\n def up\n # Declare all Course... | ruby | chosen |
[
{
"from": "system",
"value": "Allow anyone to view /announcements\n\nFixes #217."
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass AnnouncementsController < ApplicationController\n before_action :verify_core\n before_action :verify_admin, only: [:expire]\n\n @markdown_re... | ruby | chosen |
[
{
"from": "system",
"value": "Update Confirmation Redirect to Account View\n\nUpdate the new User confirm action to redirect to the User account view\nrather than the home page.\n"
},
{
"from": "human",
"value": "class ConfirmationsController < Devise::ConfirmationsController\n def show\n us... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify params usage for Rails 5 compatibility\n\nOnly iterate over the parameters rather than being fancy with an inject.\nThis provides compatibility with Rails 3.2, 4.2 and 5.0+.\n"
},
{
"from": "human",
"value": "module ActiveAdmin::SortableTree\n module Contr... | ruby | chosen |
[
{
"from": "system",
"value": "Remove HTML and JSON fields from webmention migration.\n"
},
{
"from": "human",
"value": "class CreateWebmentions < ActiveRecord::Migration\n def up\n create_table :webmentions do |t|\n t.string :source, null: false\n t.string :target, null: fa... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.