conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Change regexes to not capture\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule RuboCop\n module Cop\n # This module provides functionality for checking if numbering match the\n # configured EnforcedStyle.\n module ConfigurableNumb...
ruby
chosen
[ { "from": "system", "value": "Specs: Mark BSON as broken in JRuby 9.3\n" }, { "from": "human", "value": "describe 'transformer_bson', proxy: :Transformer do\n moneta_build do\n Moneta.build do\n use :Transformer, key: :bson, value: :bson\n adapter :Memory\n end\n end\n\n monet...
ruby
chosen
[ { "from": "system", "value": "Fix debit invoice booking building.\n" }, { "from": "human", "value": "class DebitInvoicesController < InvoicesController\n # Actions\n def new\n # Allow pre-seeding some parameters\n invoice_params = {\n :company_id => current_tenant.company.id,\n ...
ruby
chosen
[ { "from": "system", "value": "Use single quote in .gemspec\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'deviantart/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Add patterns test for consonant\n" }, { "from": "human", "value": "require 'rspec'\n\ndescribe Consonant do\n let(:consonant) { Consonant.new('c',{\"output\"=>'k'}) }\n describe '#input' do\n it 'should return c for (\\'c\\',{\"output\"=>\\'k\\'})' do\n ex...
ruby
chosen
[ { "from": "system", "value": "Add some dumy specs for Solid::Tag\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Solid::Tag do\n\n \n\nend" }, { "from": "gpt", "value": "require 'spec_helper'\n\nclass DummyTag < Solid::Tag\n\n def display(*args)\n args.map(&...
ruby
chosen
[ { "from": "system", "value": "JariBakken: Implement pending spec for server backtrace.\n\ngit-svn-id: 4179480af2c2519a5eb5e1e9b541cbdf5cf27696@9511 07704840-8298-11de-bf8c-fd130f914ac9\n" }, { "from": "human", "value": "require \"spec_helper\"\n\ndescribe \"Error\" do\n\n it \"should have an ap...
ruby
chosen
[ { "from": "system", "value": "Add extra sleep time to adjust to exact minute\n" }, { "from": "human", "value": "module Chrono\n class Trigger\n attr_reader :block, :source\n\n def initialize(source, &block)\n @source = source\n @block = block || -> {}\n end\n\n def once\n ...
ruby
chosen
[ { "from": "system", "value": "Remove erroneous key from UnansweredCalls report\n\nCallsFullyWithinTheGivenTimeInterval keys were off, due to a bad key given to\nthe ordered hash. This is now resolved.\n" }, { "from": "human", "value": "module Queri\n class Stats\n class UnansweredCalls\n ...
ruby
chosen
[ { "from": "system", "value": "Add bang to ensure_email because it raises an error\n" }, { "from": "human", "value": "module Pure360\n class Client\n def initialize(params)\n @endpoint = URI.parse(params.fetch(:endpoint))\n @list = params.fetch(:list)\n...
ruby
chosen
[ { "from": "system", "value": "Change the status print color.\n" }, { "from": "human", "value": "module Remote\nmodule Printer\n def log(str)\n $stderr << \"#{str}\\n\"\n end\n\n def status(where, what)\n c1 = \"\\033[0;30m\"\n c2 = \"\\033[0;33m\"\n c0 = \"\\033[0m\"\n log \"#{...
ruby
chosen
[ { "from": "system", "value": "Add ENV variable for worker timeout\n" }, { "from": "human", "value": "require \"resque/tasks\"\nrequire \"resque/scheduler/tasks\"\n\ntask \"resque:setup\" => :environment\n\nnamespace :resque do\n desc \"Clear stuck workers\"\n task clear_workers: :environment d...
ruby
chosen
[ { "from": "system", "value": "Add task to drop the index.\n" }, { "from": "human", "value": "namespace :search do\n task :reindex => :environment do\n [ Issue,\n ParliamentIssue,\n Proposition,\n Promise,\n Representative,\n Party,\n Topic\n ].each do |klass|...
ruby
chosen
[ { "from": "system", "value": "Load environment for Protractor test\n" }, { "from": "human", "value": "namespace :travis do\n task :rspec do\n puts \"Starting to run rspec...\"\n system(\"bundle exec rspec\")\n raise \"rspec failed!\" unless $?.exitstatus == 0\n end\n\n task :cucumber...
ruby
chosen
[ { "from": "system", "value": "Add swift version to podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'MIBlurPopup'\n s.version = '0.2.0'\n s.summary = 'MIBlurPopup lets you create amazing popups with a blurred background.'\n s.homepage ...
ruby
chosen
[ { "from": "system", "value": "Add third order factor to positions table\n" }, { "from": "human", "value": "class CupGroup < Sequel::Model\n one_to_many :matches, key: :group_id\n one_to_many :group_positions, key: :group_id\n\n subset(:groups_phase, :phase => \"groups\")\n\n def teams\n m...
ruby
chosen
[ { "from": "human", "value": "Add cask for Microsoft Azure CLI\n\nCloses #8238.\n" }, { "from": "gpt", "value": "cask :v1 => 'azure-cli' do\n version :latest\n sha256 :no_check\n\n url 'http://go.microsoft.com/fwlink/?linkid=252249&clcid=0x409'\n name 'Microsoft Azure SDK'\n homepage 'http:/...
ruby
chosen
[ { "from": "system", "value": "Use the version of the Pod to identify the Git tag" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"RMStore\"\n s.version = \"0.1\"\n s.license = \"Apache 2.0\"\n s.summary = \"A lightweight iOS framework for In-App Purch...
ruby
chosen
[ { "from": "system", "value": "Use new namespace and render 404 if blog post is not available" }, { "from": "human", "value": "require \"active_support/core_ext\"\nrequire \"sinatra\"\n\nset :root, File.dirname(__FILE__)\nset :server, \"webrick\"\n\nconfigure do\n I18n.default_locale = \"en-US\"...
ruby
chosen
[ { "from": "system", "value": "Add halt 200 to finish\n" }, { "from": "human", "value": "require 'sinatra'\nrequire 'data_mapper'\n\nrequire './helpers/birthday'\n\nrequire './models/vip_clients.rb'\nrequire './models/invitations.rb'\n\ninclude Birthday\n\nDataMapper.setup(:default, ENV['DATABASE...
ruby
chosen
[ { "from": "system", "value": "Remove four-number-only limit for train number (just in case we want to check Amtrak, for example)\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'sinatra'\nrequire 'open-uri'\nrequire 'nokogiri'\n\nURL = 'http://dv.njtransit.com/mobile/tid-mobile.as...
ruby
chosen
[ { "from": "system", "value": "Add OSx and TVos as supported platform\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"SwiftQueue\"\n s.version = \"0.1.0\"\n s.summary = \"SwiftQueue\"\n s.description = \"Job Scheduler for IOS with Concur...
ruby
chosen
[ { "from": "system", "value": "Add view spec for rights statement\n" }, { "from": "human", "value": "require 'spec_helper'\n\nRSpec.describe 'hyrax/base/_attribute_rows.html.erb', type: :view do\n let(:url) { \"http://example.com\" }\n let(:ability) { double }\n let(:work) { stub_model(Generic...
ruby
chosen
[ { "from": "system", "value": "Remove the mock_page method which isn't called within the PagesController spec\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Context::PagesController do\n\n def mock_page(stubs={})\n (@mock_page ||= mock_model(Context::Page).as_null_object...
ruby
chosen
[ { "from": "system", "value": "Include CHANGELOG.md in the packaged gem\n" }, { "from": "human", "value": "require File.expand_path(\"../lib/down/version\", __FILE__)\n\nGem::Specification.new do |spec|\n spec.name = \"down\"\n spec.version = Down::VERSION\n\n spec.required_ruby_v...
ruby
chosen
[ { "from": "human", "value": "Test interfaces eth0 and eth1\n\nA Test VM must be provision with two IPs\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\n# This test requires a VM to be provision with two IPs, preferably one public\n# and one private.\n\n# Test to ensure the VM has two in...
ruby
chosen
[ { "from": "system", "value": "Fix rubocop warning in VmActions::RemoveSecurityGroup\n" }, { "from": "human", "value": "module Mixins\n module Actions\n module VmActions\n module RemoveSecurityGroup\n def remove_security_group_vms\n assert_privileges(\"instance_remove_sec...
ruby
chosen
[ { "from": "system", "value": "Add noop flush for fake log\n" }, { "from": "human", "value": "module LogHelper\n # STDOUT\n class FakeLog\n attr_reader :msgs\n\n def initialize\n @msgs = []\n end\n\n def puts(msg)\n @msgs << msg\n end\n\n def output\n @msgs.join...
ruby
chosen
[ { "from": "system", "value": "Upgrade dependency requirement for octokit\n\nWhy:\n\n* Version four has been out for over six months\n* Another [Github related Lita extension](https://rubygems.org/gems/lita-github-web-hooks-core) is requiring version 4\n" }, { "from": "human", "value": "Gem::Spec...
ruby
chosen
[ { "from": "human", "value": "Add migration for default content\n\nThe only class the application knows is a generic 'Resource' that has\na name as its only attribute. A migration has been added to create the\ntable.\n" }, { "from": "gpt", "value": "class CreateResources < ActiveRecord::Migration...
ruby
chosen
[ { "from": "system", "value": "Update HandbrakeCLI Nightly to v7031svn\n\nHandBrakeCLI Nightly v7031svn built 2015-03-31.\n" }, { "from": "human", "value": "cask :v1 => 'handbrakecli-nightly' do\n version '7010svn'\n sha256 '1ab548fe2c78fa8115736e0c26091283e2ab990825385012bf652ce3803322ac'\n\n ...
ruby
chosen
[ { "from": "system", "value": "Fix bug in delivery time estimates display (DISCOVERYACCESS-950)\n" }, { "from": "human", "value": "module BlacklightCornellRequests\n module RequestHelper\n\n \t# Time estimates are now delivered from the model in ranges (e.g., [1, 3])\n \t# instead of integers....
ruby
chosen
[ { "from": "system", "value": "Allow Rails v3.* as long as Ruby >= 1.9\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'ettu/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Store Photo Key as key\n" }, { "from": "human", "value": "class Photo\n include MongoMapper::Document\n include Plugins::Benchmarkable\n include Plugins::Couriable\n include Plugins::Fusionable\n \n key :description, String\n key :dimensions, Dimensi...
ruby
chosen
[ { "from": "system", "value": "Update R version for default\n" }, { "from": "human", "value": "require \"minitest/autorun\"\nrequire \"minitest/reporters\"\nMinitest::Reporters.use! [Minitest::Reporters::JUnitReporter.new(reports_dir=\"/tmp/result/junit\")]\n\ndescribe 'check R version' do\n\n i...
ruby
chosen
[ { "from": "system", "value": "Move sass-cache out of project\n" }, { "from": "human", "value": "# Require any additional compass plugins here.\nproject_type = :stand_alone\n\n# Set this to the root of your project when deployed:\nhttp_path = \"/\"\ncss_dir = \"assets/css/\"\nsass_dir = \"sass/\"...
ruby
chosen
[ { "from": "system", "value": "Disable rack protection in development.\n\nThis prevents the spurious 403 errors on /preload-autocomplete, although\nI'm not sure if this is the correct solution. It would probably be better\nto get rack-protection working properly.\n" }, { "from": "human", "value":...
ruby
chosen
[ { "from": "system", "value": "Enable asset hashing of files; set default caching policy on newly created s3 files\n" }, { "from": "human", "value": "###\n# Compass\n###\n\n# Change Compass configuration\n# compass_config do |config|\n# config.output_style = :compact\n# end\n\n###\n# Helpers\n#...
ruby
chosen
[ { "from": "system", "value": "Use the new standard API port\n" }, { "from": "human", "value": "# encoding: utf-8\n#\n# Copyright 2016 Liqwyd Ltd\n#\n# Authors: Kristian Van Der Vliet <vanders@liqwyd.com>\nrequire 'sinatra'\nrequire 'sidekiq/web'\n\nrequire 'cyclid/app'\n\nconfigure :production d...
ruby
chosen
[ { "from": "system", "value": "Add jemoji as a dep\n" }, { "from": "human", "value": "# coding: utf-8\n\nGem::Specification.new do |spec|\n spec.name = \"stately-jekyll\"\n spec.version = \"0.1.0\"\n spec.authors = [\"Patrick Marsceill\"]\n spec.email = [\"pmarsce...
ruby
chosen
[ { "from": "system", "value": "Add tests for search function\n" }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe Movie do\n let(:movie) { Movie.new }\n it \"creates a valid movie with required parameters\" do\n movie = Movie.new(title: \"The Avengers\", release_date: 2002-2...
ruby
chosen
[ { "from": "system", "value": "Add missing development dependencies (first pass)\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib/', __FILE__)\n$:.unshift lib unless $:.include?(lib)\n\nrequire 'adapter_extensions/version'\n\nGem::Specification.new do |...
ruby
chosen
[ { "from": "human", "value": "Create hamster file & update with questions\n" }, { "from": "gpt", "value": "print \"What is the hamsters name: \"\nname = gets.chomp\n\nprint \"What is the volume (1-10) \"\nvolume = gets.chomp\n\nprint \"What is the fur color? \"\nfur_color = gets.chomp\n\nprint \"...
ruby
chosen
[ { "from": "system", "value": "Fix small typo in the log message\n" }, { "from": "human", "value": "#\n# Cookbook Name:: mesos\n# Recipe:: mesosphere\n#\n# Copyright 2013, Shingo Omura\n#\n# All rights reserved - Do Not Redistribute\n#\n::Chef::Recipe.send(:include, Helpers::Mesos)\n::Chef::Recip...
ruby
chosen
[ { "from": "system", "value": "Add status require statemnt back\n" }, { "from": "human", "value": "# FarmBot Controller\nrequire 'pry'\n\nrequire_relative 'settings.rb'\n\nsystem('clear')\nputs ''\n\nputs ' /\\ '\nputs '---------'\nputs ' FarmBot '\nputs '---------'\nputs ' \\/ '\nputs ...
ruby
chosen
[ { "from": "human", "value": "Add custom step definitions for integration tests.\n\nThe Aruba cucumber library adds `lib` to the load path. However, it does\nnot auto load any files. Add a helper step to include this library so it\ndoes not need to be required in each scenario.\n\nAdd a declarative step for ...
ruby
chosen
[ { "from": "human", "value": "Add tests for fallback mode" }, { "from": "gpt", "value": "require 'contest'\nrequire 'tilt'\n\nclass TiltFallbackTest < Test::Unit::TestCase\n class FailTemplate < Tilt::Template\n def self.engine_initialized?; false end\n def prepare; ...
ruby
chosen
[ { "from": "system", "value": "Make Alignment for the Output\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'bundler/setup'\nrequire 'sinatra'\n\n\nget '/hi' do\n \"Hello World!\"\nend\n\n\nget '/time' do\n Time.now.to_s\nend\n\nget '/hello' do\n \nname=params[:name]\n\n\n\"Hel...
ruby
chosen
[ { "from": "system", "value": "Update to generic application name\n" }, { "from": "human", "value": "set :application, \"asb\"\n\n# create a pseudo terminal for every command, otherwise SSH/SVN breaks\n#default_run_options[:pty] = true \n\n# If you aren't deploying to /u/apps/#{application} on th...
ruby
chosen
[ { "from": "system", "value": "Adjust gem dependencies according to warnings\n" }, { "from": "human", "value": "require File.expand_path('../lib/attr_vault/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Maciek Sakrejda\"]\n gem.email = [\"m.sakrejda@gmai...
ruby
chosen
[ { "from": "system", "value": "Add animator to public headers\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'SpinKit'\n s.version = '1.2.0'\n s.authors = {'Ramon Torres' => 'raymondjavaxx@gmail.com'}\n s.homepage = 'https://github.com/raymondjavaxx/S...
ruby
chosen
[ { "from": "system", "value": "Remove unused service registry constructor\n" }, { "from": "human", "value": "class OrganisationalSectionServiceRegistry < AbstractSectionServiceRegistry\n def initialize(organisation_slug:)\n @organisation_slug = organisation_slug\n end\nend\n" }, { "f...
ruby
chosen
[ { "from": "human", "value": "Add really dumb script for importing i18n from OneSky.\n" }, { "from": "gpt", "value": "#!/usr/bin/env ruby\n\nSOURCE = \"#{ENV['HOME']}/Downloads/OneBody.zip\"\n\nif File.exist?(SOURCE)\n puts `unzip #{SOURCE} -d /tmp/i18n`\n Dir['/tmp/i18n/*'].each do |dir|\n ...
ruby
chosen
[ { "from": "system", "value": "Add resource_description placeholder method in scaffold generator\n" }, { "from": "human", "value": "<% module_namespacing do -%>\nclass <%= class_name %> < Forest::ApplicationRecord\n include Blockable\n include Sluggable\n include Statusable\nend\n<% end -%>\n"...
ruby
chosen
[ { "from": "system", "value": "Add instructions to CSV email\n" }, { "from": "human", "value": "class AdminMailer < ApplicationMailer\n default from: \"\\\"Asics Hub\\\" <no-reply@asicshub.com.br>\"\n\n def invite_csv_file_email(respond_to, file)\n mail_to = \"no-reply@asicshub.com.br\"\n ...
ruby
chosen
[ { "from": "system", "value": "Add specs for XMPP class" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Adhearsion::XMPP do\n\n subject { Adhearsion::XMPP }\n\n it \"should be a module\" do\n subject.should be_kind_of Module\n end\n\nend" }, { "from": "gpt", "...
ruby
chosen
[ { "from": "system", "value": "Add swagger schema for Bug\n" }, { "from": "human", "value": "module Api\n module Docs\n class Bugs\n # :nocov:\n include Swagger::Blocks\n\n swagger_path '/bugs/{bug_id}' do\n operation :get do\n key :description, 'Returns bug inf...
ruby
chosen
[ { "from": "system", "value": "Add test for instance of Dolphy::Response.\n" }, { "from": "human", "value": "require_relative '../spec_helper'\nrequire_relative '../../lib/dolphy/response'\n\ndescribe Dolphy::Response do\n let(:response) { Dolphy::Response.new }\n\n describe \"#initialize\" do\...
ruby
chosen
[ { "from": "human", "value": "Add spec to make sure parameters is nil by default.\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\nmodule Swagger\n module V2\n describe Path do\n subject(:path) { Path.new({}) }\n describe 'initial fields' do\n describe '#parameters' ...
ruby
chosen
[ { "from": "system", "value": "Fix invite instructeur from manager\n" }, { "from": "human", "value": "module Manager\n class InstructeursController < Manager::ApplicationController\n def reinvite\n instructeur = Instructeur.find(params[:id])\n instructeur.invite!\n flash[:notic...
ruby
chosen
[ { "from": "system", "value": "Set time stamp in logs.\n" }, { "from": "human", "value": "require 'dotenv'\n\nDotenv.load\n\nCuba.use Rack::Static, urls: %w[/js /css], root: \"public\"\nCuba.plugin Cuba::Render\nCuba.settings[:render][:template_engine] = \"slim\"\n\n\nCLIENT = Mosca::Client.new\n...
ruby
chosen
[ { "from": "system", "value": "Validate new user needs for detailed guides\n\nRather than skipping the new user need fields if any of them are\nblank, skip only if all the fields are blank and show validation\nerrors when anything has been filled in.\n" }, { "from": "human", "value": "module Edit...
ruby
chosen
[ { "from": "system", "value": "Prepare location to merge with master\n" }, { "from": "human", "value": "# encoding: UTF-8\n# This file is auto-generated from the current state of the database. Instead\n# of editing this file, please use the migrations feature of Active Record to\n# incrementally ...
ruby
chosen
[ { "from": "system", "value": "Set global max_page_size for graphql\n" }, { "from": "human", "value": "HcxpSchema = GraphQL::Schema.define do\n query(Types::QueryType)\n\n rescue_from ActiveRecord::RecordNotFound, &:message\n\n object_from_id -> (id, ctx) { decode_object(id) }\n id_from_objec...
ruby
chosen
[ { "from": "human", "value": "Add code wars (6) - who likes it\n" }, { "from": "gpt", "value": "# http://www.codewars.com/kata/5266876b8f4bf2da9b000362/\n# --- iteration 1 ---\ndef likes(names)\n case names.size\n when 0 then \"no one likes this\"\n when 1 then \"#{names.first} likes this\"\n ...
ruby
chosen
[ { "from": "system", "value": "Test various encodings in worksheet names (failing)\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\nrequire 'helper'\n\nclass TC_add_worksheet < Test::Unit::TestCase\n\n def test_true\n assert(true)\n end\n\nend\n" }, { "from": "gpt", "v...
ruby
chosen
[ { "from": "system", "value": "Upgrade oj, rest-client, and fast_blank.\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'anypresence_generator/version'\n\nGem::Specification.new do |sp...
ruby
chosen
[ { "from": "human", "value": "Add script to confirm that examples are working\n" }, { "from": "gpt", "value": "#!/usr/bin/env ruby -wKU\n\n# Ensure that all of the examples start properly and respond to a request\n# successfully\n#\n# This set of tests relies on certain Unix commands that will no...
ruby
chosen
[ { "from": "system", "value": "Make global connection interface private\n" }, { "from": "human", "value": "module GitHub\n class Ldap\n module UserSearch\n class ActiveDirectory < Default\n\n # Returns a connection to the Active Directory Global Catalog\n #\n # See: ...
ruby
chosen
[ { "from": "system", "value": "Fix a bug in a task" }, { "from": "human", "value": "namespace :'2018_06_05_send_new_attestation' do\n task set: :environment do\n ids = [\n 20982,\n 21262,\n 54914,\n 59769,\n 63747,\n 59520,\n 21496,\n 13386,\n 1337...
ruby
chosen
[ { "from": "human", "value": "Change HeadTeachersSchoolSummaryTable to ManagementSummaryTable in alert_types\n" }, { "from": "gpt", "value": "namespace :after_party do\n desc 'Deployment task: update_head_teacher_school_summary_to_management_summary'\n task update_head_teacher_school_summary_to...
ruby
chosen
[ { "from": "system", "value": "Make tests less dependent on config.\n\nFor the test environment it's okay if no TWO_FACTOR_ENCRYPTION_KEY is set up, we can use any old key.\nThis will make it easier to run tests from a fresh install.\n" }, { "from": "human", "value": "class User < ActiveRecord::B...
ruby
chosen
[ { "from": "system", "value": "Update comment for Google Cloud\n\nCorrect the methods listed in the autorequire comment.\n" }, { "from": "human", "value": "# Copyright 2016 Google Inc. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use ...
ruby
chosen
[ { "from": "system", "value": "Add integration test for NICK and USER on connection establishment\n" }, { "from": "human", "value": "require \"test_helper\"\n\nmodule Tropoli\n class ConnectionTest < IntegrationTest\n test :\"pass sent before nick and user if supplied\" do\n pass = \"s3c...
ruby
chosen
[ { "from": "system", "value": "Fix support_facility_fta error on finding facilitytype\n" }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe \"assets/_support_facility_fta.html.haml\", :type => :view do\n\n it 'fta info' do\n test_asset = create(:administration_building, :fta_f...
ruby
chosen
[ { "from": "system", "value": "Add only required files on .gem pkg\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'git_bumper/version'\n\nGem::Specification.new do |spec|\n spec.name...
ruby
chosen
[ { "from": "system", "value": "Fix reviewit config for mail configuration.\n" }, { "from": "human", "value": "# Please, use just plain ruby here, no rails code, since this is loaded into application.rb\nclass ReviewitConfig\n CONFIG_FILE = './config/reviewit.yml'\n\n class << self\n private\...
ruby
chosen
[ { "from": "system", "value": "Add more allowed attributes to clouds refinery.\n" }, { "from": "human", "value": "class CloudRefinery < ApplicationRefinery\n\n def create\n [:name, :short_name, :description]\n end\n\n def update\n end\n\nend\n" }, { "from": "gpt", "value": "cla...
ruby
chosen
[ { "from": "system", "value": "Remove cached location maps with the variant suffix too.\n" }, { "from": "human", "value": "class LocationSweeper < ActionController::Caching::Sweeper\n \n include ApplicationHelper\n \n private\n\n def expire_stop_fragments(stop) \n # expire the stop pa...
ruby
chosen
[ { "from": "system", "value": "Comment describing s3 upload command\n" }, { "from": "human", "value": "class FeedEaterWorker\n include Sidekiq::Worker\n\n def perform(feed_onestop_ids: [])\n # TODO: datastore_api_base_url = Figaro.env.DATASTORE_PROTOCOL + \"://\" + Figaro.env.DATASTORE_HOST ...
ruby
chosen
[ { "from": "human", "value": "Add rakuten ranking save as csv sample\n" }, { "from": "gpt", "value": "# coding: utf-8\n# 楽天ランキングAPIを利用し、ランキングデータをCSVとして保存するサンプル\n# config.item_ranking_module = 'MyCSV' の使い方を説明したかっただけ\n\nrequire 'rakuten_api'\nrequire 'faraday'\nrequire 'csv'\n\nmodule MyCSV\n CSV_...
ruby
chosen
[ { "from": "system", "value": "Make sure $stdout is reassigned in :after action.\n" }, { "from": "human", "value": "require File.dirname(__FILE__) + '/../../spec_helper'\nrequire 'rakelib/dependency_grapher'\n\ndescribe \"DependencyGrapher#print_dependencies\" do\n before :each do\n @stdout, ...
ruby
chosen
[ { "from": "system", "value": "Change feature generator spec to use expect syntax\n" }, { "from": "human", "value": "require 'spec_helper'\n\n# Generators are not automatically loaded by rails\nrequire 'generators/rspec/feature/feature_generator'\n\ndescribe Rspec::Generators::FeatureGenerator do...
ruby
chosen
[ { "from": "system", "value": "[tests] Allow defining the html we're working with.\n" }, { "from": "human", "value": "require 'capybara/cucumber'\nrequire 'sinatra/base'\n\nclass DillApp < Sinatra::Base; end\n\nAfter do\n DillApp.reset!\nend\n" }, { "from": "gpt", "value": "require '...
ruby
chosen
[ { "from": "system", "value": "Add some more options to ruby\n" }, { "from": "human", "value": "class Ruby193P327Falcon < HerokuBrew::Formula\n url \"http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p327.tar.gz\"\n basedir \"ruby-1.9.3-p327\"\n patch \"https://raw.github.com/gist/4136373...
ruby
chosen
[ { "from": "system", "value": "Update authors, email, website of gem\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'capistrano/nginx_unicorn/version'\n\nGem::Specification....
ruby
chosen
[ { "from": "system", "value": "Fix requires_arc value in podspec\n" }, { "from": "human", "value": "\nPod::Spec.new do |s|\n\n s.name = \"NBJMergeLayout-ObjC\"\n s.version = \"1.0.1\"\n s.summary = \"Remove unnecessary views from Nib view hierarchies\"\n s.homepage = \"h...
ruby
chosen
[ { "from": "system", "value": "Create game, player, and straw classes, add main game loop\n" }, { "from": "human", "value": "#\n# Ruby For Kids Project 7: Straws\n# Tutorial By: Chris Haupt\n# Programmed By: Kyrene Jackson\n# Elimination-round, tournament-style, avoid the\n# shortest straw, or el...
ruby
chosen
[ { "from": "human", "value": "Create new featured link table\n" }, { "from": "gpt", "value": "class CreateFeaturedLinks < ActiveRecord::Migration\n class FeaturedServicesAndGuidance < ActiveRecord::Base\n end\n class TopTasks < ActiveRecord::Base\n end\n\n def up\n create_table :featured_...
ruby
chosen
[ { "from": "human", "value": "Add a spec for QueueingRabbit::Configuration module.\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe QueueingRabbit::Configuration do\n subject { Class.new { extend QueueingRabbit::Configuration} }\n\n it { should respond_to(:amqp_uri) }\n it { ...
ruby
chosen
[ { "from": "system", "value": "Add tmp index to ci_builds to optimize stages migration\n" }, { "from": "human", "value": "class CleanupBuildStageMigration < ActiveRecord::Migration\n include Gitlab::Database::MigrationHelpers\n\n DOWNTIME = false\n\n disable_ddl_transaction!\n\n class Build <...
ruby
chosen
[ { "from": "system", "value": "Reduce query interval in specs\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe MusicBrainz::Client do\n\n let(:client) { MusicBrainz::Client.new }\n define_method(:request) { client.artist '5b11f4ce-a62d-471e-81fc-a69a8278c7da' }\n\n around d...
ruby
chosen
[ { "from": "human", "value": "Test instance creation and argument assignment" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe EventGirl::Client do\n it 'creates instances with two arguments' do\n expect(described_class.instance_method(:initialize).arity).to eql 2\n end\n\n i...
ruby
chosen
[ { "from": "human", "value": "Add first test. Let the TDD commence\n" }, { "from": "gpt", "value": "require \"spec_helper\"\n\ndescribe Geezeo::Client do\n before(:each) do\n @client = Geezeo::Client.new(credentials)\n end\n\n it \"gets a list of accounts\" do\n @account = @client.accoun...
ruby
chosen
[ { "from": "system", "value": "Add convenience method to login to dev JCR\n" }, { "from": "human", "value": "$: << File.dirname(__FILE__)\n\nrequire 'java'\nrequire 'jcr/node'\nrequire 'jcr/query'\n\nclass JCR\n include_class('java.lang.String') {|package,name| \"J#{name}\" }\n include_class 'j...
ruby
chosen
[ { "from": "system", "value": "Allow passing custom environments when making Liquid contexts for testing. Backwards-compatible with previous implementation.\n" }, { "from": "human", "value": "$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)\nrequire 'jekyll'\nrequire 'jekyll-seo-tag'\nr...
ruby
chosen
[ { "from": "system", "value": "Support :prefix option and build Mapper descendants on Finalize\n" }, { "from": "human", "value": "# encoding: utf-8\n\n# this is needed for guard to work, not sure why :(\nrequire \"bundler\"\nBundler.setup\n\nif RUBY_ENGINE == \"rbx\"\n require \"codeclimate-test...
ruby
chosen
[ { "from": "system", "value": "Exclude /spec/ from coverage reports\n" }, { "from": "human", "value": "if ENV['COVERAGE'] == 'yes'\n require 'coveralls'\n Coveralls.wear!\nend\n\nrequire 'rspec'\nrequire 'facterdb'\ninclude FacterDB\n\ndef project_dir\n File.dirname File.dirname(File.expand_pa...
ruby
chosen
[ { "from": "system", "value": "Add dotenv to spec helper\n" }, { "from": "human", "value": "require \"hearthstone_api\"\nrequire \"rspec\"\nrequire \"vcr\"\n\nVCR.configure do |c|\n c.cassette_library_dir = \"spec/support/vcr_cassettes\"\n c.hook_into :webmock\n c.configure_rspec_metadata!\n ...
ruby
chosen
[ { "from": "system", "value": "Reset test suite default to sendgrid.\n" }, { "from": "human", "value": "$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)\nrequire 'rubygems'\nrequire 'bundler/setup'\n\nrequire 'combustion'\n\nrequire 'action_mailer'\n\n# get combustion to trigger our rai...
ruby
chosen