conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Correct check for MyAmee module\n"
},
{
"from": "human",
"value": "class Mailer < ActionMailer::Base\n \n protected\n def setup_email(user)\n @recipients = \"#{user.email}\"\n @from = \"help@amee.com\"\n @reply_to = \"help@amee.com\"\n head... | ruby | chosen |
[
{
"from": "system",
"value": "Make implementation of Stdout more readable\n"
},
{
"from": "human",
"value": "class Stdout\n include Enumerable\n\n attr_reader :data_path, :timing_path\n\n def initialize(data_path, timing_path)\n @data_path = data_path\n @timing_path = timing_path\n end... | ruby | chosen |
[
{
"from": "system",
"value": "Resolve issue where knife from file does not encrypt\n"
},
{
"from": "human",
"value": "require 'chef/knife/data_bag_from_file'\nrequire_relative 'secure_data_bag/base_mixin'\nrequire_relative 'secure_data_bag/secrets_mixin'\nrequire_relative 'secure_data_bag/defaul... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Keys do not need to be converted strings before being dumped to JSON\"\n\nThis reverts commit a9dfa5d45675f4b3161a57a9859c1ce7673a80bd.\n"
},
{
"from": "human",
"value": "require 'gds_api/test_helpers/json_client_helper'\n\nmodule GdsApi\n module TestHelpe... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unsued pipelines-related prometheus metric\n"
},
{
"from": "human",
"value": "module Gitlab\n module Ci\n module Pipeline\n module Chain\n class Create < Chain::Base\n include Chain::Helpers\n\n def perform!\n ::Ci... | ruby | chosen |
[
{
"from": "system",
"value": "Use the accessor instead of the instance variable.\n\nIt seems like the to_filter method needs to be called twice when used\nalongside the jruby-ldap library before it outputs the correct filter\nstring.\n\nHaven't been able to figure out a failing test for this, so giving this... | ruby | chosen |
[
{
"from": "system",
"value": "Use proper mock for raising.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'OopsRequest::States' do\n context 'new oops request' do\n let(:request) { create :oops_request }\n before { allow_any_instance_of(OopsRequest).to(receive(:async... | ruby | chosen |
[
{
"from": "system",
"value": "Print items in room each turn\n"
},
{
"from": "human",
"value": "# Mark Harder\n# 2013.01.31\n# The game engine\n\nrequire_relative 'utility.rb'\nrequire_relative 'player.rb'\nrequire_relative 'point.rb'\nrequire_relative 'command.rb'\n\ninclude Utility\n\nclass Mys... | ruby | chosen |
[
{
"from": "system",
"value": "Clarify test description by saying “microseconds” not “milliseconds”\n\nThe time being tested is 123,456 microseconds, so “milliseconds” is\nmisleading.\n"
},
{
"from": "human",
"value": "require_relative '../../spec_helper'\nrequire_relative 'shared/inspect'\n\ndes... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec for overriding Warning.warn\n"
},
{
"from": "human",
"value": "require File.expand_path(\"../../../spec_helper\", __FILE__)\n\ndescribe \"Warning.warn\" do\n ruby_version_is \"2.4\" do\n it \"complains\" do\n -> {\n Warning.warn(\"Chunky bac... | ruby | chosen |
[
{
"from": "system",
"value": "Update ARM gcc to `7-2017-q4-major`"
},
{
"from": "human",
"value": "require 'formula'\n\nclass ArmNoneEabiGcc < Formula\n\n homepage 'https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads'\n version '6-2017-q2-update'\n\n url 'https://developer.ar... | ruby | chosen |
[
{
"from": "human",
"value": "Create Puma appserver configuration file.\n"
},
{
"from": "gpt",
"value": "threads Integer(ENV['MIN_THREADS'] || 8), Integer(ENV['MAX_THREADS'] || 12)\n\nworkers Integer(ENV['PUMA_WORKERS'] || 2)\n\nrackup DefaultRackup\nport ENV['PORT'] || 3000\nenvironment ENV['RA... | ruby | chosen |
[
{
"from": "human",
"value": "Add feature steps for editing user steps\n"
},
{
"from": "gpt",
"value": "Given(/^that I have a user called \"(.*?)\" surname \"(.*?)\" with username \"(.*?)\" and password \"(.*?)\"$/) do |firstname, surname, username, password|\n pending # express the regexp above... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake to development dependencies.\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"recaptcha_mailhide/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification... | ruby | chosen |
[
{
"from": "system",
"value": "Support for later versions of neo4j-core\n"
},
{
"from": "human",
"value": "lib = File.expand_path('../lib/', __FILE__)\n$:.unshift lib unless $:.include?(lib)\n\nGem::Specification.new do |s|\n s.name = \"neo4apis\"\n s.version = '0.5.0'\n s.required_ruby_v... | ruby | chosen |
[
{
"from": "human",
"value": "Add wrapper for Billingrad API\n"
},
{
"from": "gpt",
"value": "require 'base64'\nrequire 'digest'\nrequire 'json'\nrequire 'faraday'\nrequire 'faraday_middleware'\n\nmodule Billingrad\n class Client\n\n @@host = 'http://my.billingrad.com/api'.freeze\n @@metho... | ruby | chosen |
[
{
"from": "system",
"value": "Remove private method debug() from ToyRobot::Application\n\nThis method was untested and undocumented. It is of doubtful\nvalue and thus has been removed from the code base.\n"
},
{
"from": "human",
"value": "require_relative 'factory'\nrequire_relative 'command/par... | ruby | chosen |
[
{
"from": "system",
"value": "Downgrade Cura.app to v15.04.2 (latest stable)\n\nThe previous Cask referenced a beta version.\nNow the latest stable version is in use.\n\nPlease see homebrew-versions 'cura-beta.rb' for latest beta.\n"
},
{
"from": "human",
"value": "cask :v1 => 'cura' do\n versi... | ruby | chosen |
[
{
"from": "human",
"value": "Add test to ensure that XXHash keys are stable.\n"
},
{
"from": "gpt",
"value": "# encoding: UTF-8\n#\n# Copyright (c) 2019 by Chris Schlaeger <chris@taskjuggler.org>\n#\n# This file contains tests for Array that are similar to the tests for the\n# Array implementati... | ruby | chosen |
[
{
"from": "system",
"value": "Increase nr of retries and delay.\n"
},
{
"from": "human",
"value": "module Twtrtool\n module WithRetries\n MAX_RETRIES = 5\n RETRY_DELAY = 5\n \n def self.included(base)\n base.extend self\n end\n \n def with_retries\n num_tries = 0\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add RecordNotFound exception and make data local to store object"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nmodule SimpleStore\n class Memory\n attr_reader :bucket\n\n def initialize(bucket)\n @bucket = bucket\n data[bucket] ||= {}\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Rewrite master spec to use gold master testing.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'open3'\n\ndescribe 'master task', task: true, test_construct: true do\n Given {\n @construct.file \"Rakefile\", <<END\nrequire 'quarto'\nQuarto.con... | ruby | chosen |
[
{
"from": "system",
"value": "Include `pry` in the tests"
},
{
"from": "human",
"value": "require 'capybara'\nrequire 'capybara/dsl'\nrequire 'bundler/setup'\nrequire 'sinatra'\nrequire 'minitest/autorun'\nrequire 'minitest/pride'\nrequire 'dotenv'\nDotenv.load\nrequire './server'\nrequire 'tilt... | ruby | chosen |
[
{
"from": "system",
"value": "Put some negative examples in for Assert/Refute\n"
},
{
"from": "human",
"value": "require_relative 'testing.rb'\nrequire_relative 'numbers.rb'\ntitle \"Assert/Refute (2)\"\nAssert[True]\nRefute[False]\n\ntitle \"AssertEqual\"\n\nAssertNumbersEqual = AssertEqual[Num... | ruby | chosen |
[
{
"from": "system",
"value": "Add group_step to the quick reference controller\n"
},
{
"from": "human",
"value": "class QuickReferenceController < ApplicationController\n append_view_path \"app/views/pages\"\n\n before_action :add_cors_headers\n\n PIPELINE_PAGES = [\n 'pipelines/command_st... | ruby | chosen |
[
{
"from": "system",
"value": "Make Merb::Plugins.config[:foo] default to {}\n"
},
{
"from": "human",
"value": "module Merb\n\n module Plugins\n\n # ==== Returns\n # Hash::\n # The configuration loaded from Merb.root / \"config/plugins.yml\" or, if\n # the load fails, an empty ha... | ruby | chosen |
[
{
"from": "system",
"value": "Fix some nondeterminism in the specs, caught by Travis\n"
},
{
"from": "human",
"value": "require File.join(File.dirname(File.expand_path(__FILE__)), \"spec_helper\")\n\ndescribe \"scissors plugin\" do\n before do\n @m = Class.new(Sequel::Model(:items))\n @m.... | ruby | chosen |
[
{
"from": "system",
"value": "Add summary metadata to gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/vagrant-list/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Josh McArthur\"]\n gem.email = [\"jo... | ruby | chosen |
[
{
"from": "system",
"value": "Use getters instead of instance vars\n"
},
{
"from": "human",
"value": "module OodCore\n module Job\n class Task\n attr_reader :id\n attr_reader :status\n\n def initialize(id:, status:, **_)\n @task_id = id\n @status = OodCore::Job::... | ruby | chosen |
[
{
"from": "system",
"value": "Use MetricFu.with_run_dir to avoid flakiness\n\nThis scenario is not the flaky one, but the fact that this is expecting things to work because there was a file under spec/dummy is problematic for other scenarios.\n"
},
{
"from": "human",
"value": "require \"spec_hel... | ruby | chosen |
[
{
"from": "system",
"value": "Change to fix integration spec\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nRSpec.describe 'teletype' do\n it \"prints available commands and global options\" do\n command = \"bundle exec teletype\"\n\n out = `#{command}`\n\n expect(out).to incl... | ruby | chosen |
[
{
"from": "system",
"value": "Update specs to match the Chef 13 fixes\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'perl_test::default' do\n context 'on Ubuntu 16.04' do\n let(:chef_run) do... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec for deleting(D) products"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe VersacommerceAPI::Product do\n let!(:klass) { VersacommerceAPI::Product }\n\n before do\n initialize_session\n end\n\n describe 'CRUD Operations' do\n\n de... | ruby | chosen |
[
{
"from": "system",
"value": "Add logged in to comment new controller\n"
},
{
"from": "human",
"value": "class CommentsController < ApplicationController\n def show\n @comment = Comment.find_by(id: params[:comment_id])\n end\n\n def new\n @review = Review.find_by(id: params[:review_id])... | ruby | chosen |
[
{
"from": "system",
"value": "Allow searching for products by name or id\n"
},
{
"from": "human",
"value": "class ProductsController < ApplicationController\n respond_to :json\n before_filter :find_product, only: [:show, :update, :destroy]\n def index\n @products = Product.all\n respond... | ruby | chosen |
[
{
"from": "system",
"value": "Remove less namespace from rake task\n"
},
{
"from": "human",
"value": "namespace :less do\n namespace :js do\n desc \"Make a js file that will have functions that will return restful routes/urls.\"\n task :routes => :environment do\n require \"js-routes... | ruby | chosen |
[
{
"from": "system",
"value": "[rubocop] C: Use delegate to define delegations.\n"
},
{
"from": "human",
"value": "class Webmail::StoredMailPart\n attr_accessor :section\n attr_accessor :part\n\n def initialize(part, section = nil)\n self.section = section\n self.part = part\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug in QuizQuestionsDisplayController resulting from merging the plugin into the main codebase\n"
},
{
"from": "human",
"value": "class Quizzes::QuizQuestionsDisplayController < ApplicationController\n include Api::V1::QuizQuestion\n include Filters::Quizzes\n... | ruby | chosen |
[
{
"from": "system",
"value": "Change not correct has_many value in material serializer\n"
},
{
"from": "human",
"value": "class MaterialSerializer < ActiveModel::Serializer\n attributes(\n :id,\n :rightholder_id,\n :owner_id,\n :original_link,\n :caption_original,\n :caption_t... | ruby | chosen |
[
{
"from": "system",
"value": "Add fallback values for Preset created/update times\n"
},
{
"from": "human",
"value": "class ScenarioSerializer < PresetSerializer\n # Creates a new Scenario API serializer.\n #\n # @param [#api_v3_scenario_url] controller\n # The controller which created the ... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify code by removing unnecessary use of a variable to hold the verb list call.\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nclass Router\n attr_reader :languages\n\n def initialize\n @languages = {}\n Dir[File.dirname(__FILE__) + \"/languages... | ruby | chosen |
[
{
"from": "system",
"value": "Add some exception handling and redirect for the index\n"
},
{
"from": "human",
"value": "# rulers/lib/rulers.rb\nrequire \"rulers/version\"\nrequire \"rulers/routing\"\nrequire \"rulers/array\"\n\nmodule Rulers\n class Application\n def call(env)\n klass, ... | ruby | chosen |
[
{
"from": "human",
"value": "Add Conversions API routing spec\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nrequire 'rails_helper'\n\nRSpec.describe 'conversions routing', :type => :routing do\n it 'routes conversions endpoint' do\n route = '/api/conversions'\n\n expec... | ruby | chosen |
[
{
"from": "system",
"value": "Update sidekiq dependency in gemspec\nto accomodate versions 2.13.1 & greater\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/sidekiq-middleware/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors ... | ruby | chosen |
[
{
"from": "system",
"value": "Update BetterTouchTool to version 1.33"
},
{
"from": "human",
"value": "cask :v1 => 'bettertouchtool' do\n\n if MacOS.release <= :snow_leopard\n version '0.939'\n sha256 'fad5e9d36259c379bdb33188cf15d179fd9ff73023035c98f5734e7e3e13bb75'\n\n # bettertouchto... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for :scale_bytes flag\n"
},
{
"from": "human",
"value": "require_relative 'test_helper'\n\nclass TestResults < Minitest::Test\n def test_pretty_print_works_with_no_args\n assert_output(/^Total allocated/, '') { MemoryProfiler::Results.new.pretty_print }... | ruby | chosen |
[
{
"from": "system",
"value": "Update for newer version of serverspec\n"
},
{
"from": "human",
"value": "require 'serverspec'\n\ninclude SpecInfra::Helper::Exec\ninclude SpecInfra::Helper::DetectOS\n\nRSpec.configure do |c|\n if ENV['ASK_SUDO_PASSWORD']\n require 'highline/import'\n c.sudo... | ruby | chosen |
[
{
"from": "system",
"value": "Clear another rspec 3 hurdle\n"
},
{
"from": "human",
"value": "# Configure Rails Envinronment\nENV[\"RAILS_ENV\"] = \"test\"\nrequire File.expand_path(\"../dummy/config/environment.rb\", __FILE__)\nSPEC_ROOT = File.dirname(__FILE__)\n\nrequire 'pry'\nrequire 'rspe... | ruby | chosen |
[
{
"from": "system",
"value": "Include ammeter in spec file for generator testing.\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(\"../dummy/config/environment\", __FILE__)\nreq... | ruby | chosen |
[
{
"from": "system",
"value": "Change be_true and be_false to be(true) and be(false) in specs\n"
},
{
"from": "human",
"value": "shared_examples_for \"require 'dm-transactions'\" do\n\n %w[ Repository Model Resource ].each do |name|\n it \"should include the transaction api in DataMapper::#{n... | ruby | chosen |
[
{
"from": "system",
"value": "Set all inputs to integers instead of strings.\n"
},
{
"from": "human",
"value": "Given(/^I have an Image Tag Builder with standard config$/) do\n @itb = ImageTagBuilder.new\nend\n\nGiven(/^a source image that's (\\d+)x(\\d+)$/) do |width, height|\n @itb.source_wi... | ruby | chosen |
[
{
"from": "system",
"value": "Remove condition from User test model for data_mapper\n\nHad unnecessarily verified that DEVISE_ORM is not data_mapper_active_model\n"
},
{
"from": "human",
"value": "require 'shared_user'\n\nclass User\n include DataMapper::Resource\n\n property :id, Serial\n pr... | ruby | chosen |
[
{
"from": "system",
"value": "Improve error message for memcache session store when dalli isn't loaded in app\n"
},
{
"from": "human",
"value": "require 'action_dispatch/middleware/session/abstract_store'\nrequire 'rack/session/dalli'\n\nmodule ActionDispatch\n module Session\n class MemCach... | ruby | chosen |
[
{
"from": "human",
"value": "Create UserResult model with associations\n"
},
{
"from": "gpt",
"value": "class UserResult < ActiveRecord::Base\n belongs_to :tasting\n has_one :user, through: :tasting\n has_one :event_wine, through: :tasting\n has_one :wine, through: :event_wine\n has_one :ev... | ruby | chosen |
[
{
"from": "system",
"value": "Update Lyn app to latest version 1.5.2"
},
{
"from": "human",
"value": "class Lyn < Cask\n version '1.3.7'\n sha256 '5a1b937e4226dc0cb69f187296821410a150ac0994fea629e789f84baecb7c28'\n\n url 'http://www.lynapp.com/downloads/Lyn-1.3.7.dmg'\n appcast 'http://www.l... | ruby | chosen |
[
{
"from": "system",
"value": "Update .podspec to pull updated release"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'Cely'\n s.version = '2.0.0'\n s.license = { :type => \"MIT\", :file => \"LICENSE\" }\n s.summary = 'Cely’s goal is to add a login system into your app in under ... | ruby | chosen |
[
{
"from": "system",
"value": "Add a spec for the PID in tag and JSON support.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Logglier::Client::Syslog do\n describe \"PRI calculation conforms to RFC3164 4.1.1\" do\n before do\n UDPSocket.stub(:new).and_return(mock(\... | ruby | chosen |
[
{
"from": "system",
"value": "Modify spec so JRuby passes\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nmodule Jeff\n describe Streamer do\n let(:streamer) { Streamer.new }\n let(:xml) { '<?xml version=\"1.0\"?><foo>bar</foo>' }\n\n it 'should parse XML' do\n streame... | ruby | chosen |
[
{
"from": "human",
"value": "Add some tests for Logger::Colors\n"
},
{
"from": "gpt",
"value": "# GitCompound\n#\nmodule GitCompound\n describe Logger::Colors do\n before { GitCompound::Logger.colors = true }\n after { GitCompound::Logger.colors = false }\n\n context 'use #colorize() m... | ruby | chosen |
[
{
"from": "system",
"value": "Add test to enforce that 'recursive' returns a Proc\n"
},
{
"from": "human",
"value": "require 'minitest/autorun'\nrequire 'ruby-function'\n\ndescribe \"recursive\" do\n it \"creates a recursive function\" do\n func = recursive { |this, i|\n if i < 1\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use strict statements for test\n"
},
{
"from": "human",
"value": "require 'test-unit'\nrequire 'junoser'\n\nclass TestCommentLine < Test::Unit::TestCase\n display_set_config = <<-EOS\n /* a comment */\n # a comment\n /*\n * a comment\n */\nset system /* a commen... | ruby | chosen |
[
{
"from": "human",
"value": "Implement simple script to find common point pairs\n\nMotivation:\n-to answer the question: do users often make related points in their\nposts?\n\nChange Explanation:\n-using combinations of points in posts, find common pairs of points\n"
},
{
"from": "gpt",
"value":... | ruby | chosen |
[
{
"from": "system",
"value": "Set feature flags and notify user immediately\n\nTODO: we still need to ensure that we avoid duplicate emails if multiple requests are made.\n"
},
{
"from": "human",
"value": "module Travis::API::V3\n class Services::BetaMigrationRequests::Create < Service\n par... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the deprecated set call from the Grape app\n"
},
{
"from": "human",
"value": "require 'grape'\n\nclass GrapeSimple < Grape::API\n set :reload, true\n\n get '/json_endpoint' do\n present({ :test => true })\n end\nend\n\n"
},
{
"from": "gpt",
... | ruby | chosen |
[
{
"from": "system",
"value": "Remove div assertions from controller tests.\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass NewSessionsControllerTest < SharedSessionsControllerTest\n\n# -> Prompts webmaster to log in.\n\n test_happy_path_response\n\n test \"routing\" do\n a... | ruby | chosen |
[
{
"from": "human",
"value": "Add missing indexes to several tables\n\nFixing alerts from houndci styling guidelines\n\nFixing the Align the parameters of a method call if they span more than one line\n\nFixes #6192\n"
},
{
"from": "gpt",
"value": "class AddMissingIndexes < ActiveRecord::Migratio... | ruby | chosen |
[
{
"from": "system",
"value": "Remove scheduled task stuff from migration (removed from code).\n"
},
{
"from": "human",
"value": "class RevampGroupMemberships < ActiveRecord::Migration\n def self.up\n remove_column :groups, :cached_parents\n add_column :memberships, :auto, :boolean, :defau... | ruby | chosen |
[
{
"from": "system",
"value": "Fix warnings from `pod lib lint`\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |spec|\n spec.name = 'Sift'\n spec.version = '0.1.0'\n spec.authors = 'Sift Science'\n spec.license = {\n :type => 'MIT',\n :file => 'LICENSE',\n }\n spec.homepage = 'ht... | ruby | chosen |
[
{
"from": "system",
"value": "Remove bin/ from Capistrano's linked_dirs\n"
},
{
"from": "human",
"value": "# config valid only for current version of Capistrano\nlock \"3.8.2\"\n\nset :application, \"injobs\"\nset :repo_url, \"https://github.com/moroz/hatarake.git\"\n\n# Default branch is :maste... | ruby | chosen |
[
{
"from": "system",
"value": "Remove tests regarding old hypriot driver, we'r using upstream bin\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe package('docker-machine') do\n it { should be_installed }\nend\n\ndescribe command('dpkg -l docker-machine') do\n its(:stdout) {... | ruby | chosen |
[
{
"from": "system",
"value": "Apply fix proposed by @phuong-nguyen\n"
},
{
"from": "human",
"value": "if defined?(Rails::Application)\n Rails.application.routes.draw do\n # Unrecoverable error\n match '/error' => \"application#errship_standard\", :as => :error\n match '/not_found' => \... | ruby | chosen |
[
{
"from": "system",
"value": "Allow repos with dots in the name"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n get 'projects/new' => 'projects#new', as: :new_project\n get 'projects/:id' => 'projects#show', as: :project\n post 'projects' => 'projects#create', as: :project... | ruby | chosen |
[
{
"from": "system",
"value": "Make /email_preview url work if there is catch all route in application\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n resources :email_preview, :controller => 'email_preview', :only => [:index, :show] do\n collection do\n get :naviga... | ruby | chosen |
[
{
"from": "human",
"value": "Add test of API call\n"
},
{
"from": "gpt",
"value": "require 'faraday'\nrequire 'json'\n\nBASE_URI='https://api.chatwork.com/v1/'\nAPI_TOKEN=ENV['CHATWORK_API_TOKEN']\n\nGET_ROOMS='rooms'\n\nchatwork_connection = Faraday::Connection.new(url: BASE_URI) do |builder|\n... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify the LinkStatusUpdater by removing unnecessary indirection.\n\nThe `@table` and `@column` indirection were hiding the intention of this\nclass. By replacing them with the class literals, we make it more\nobvious what this class's collaborators are.\n"
},
{
"from... | ruby | chosen |
[
{
"from": "system",
"value": "Reset column information in migration\n\nWhen running `rake db:migrate` from scratch Rails will load the column\ninformation for a table and cache it so when the model is used a second\ntime the column information is stale and a previously added column is\nnot found.\n\nFix thi... | ruby | chosen |
[
{
"from": "system",
"value": "Correct license header for recipes\n"
},
{
"from": "human",
"value": "include_recipe 'runit'\n\nrunit_service 'graphite-web' do\n default_logger true\nend\n"
},
{
"from": "gpt",
"value": "#\n# Cookbook Name:: graphite\n# Attributes:: uwsgi\n#\n# Copyrig... | ruby | chosen |
[
{
"from": "system",
"value": "Use FreeTDS 0.95.76 as default.\n"
},
{
"from": "human",
"value": "\nICONV_VERSION = ENV['TINYTDS_ICONV_VERSION'] || \"1.14\"\nICONV_SOURCE_URI = \"http://ftp.gnu.org/pub/gnu/libiconv/libiconv-#{ICONV_VERSION}.tar.gz\"\n\nOPENSSL_VERSION = ENV['TINYTDS_OPENSSL_VERSI... | ruby | chosen |
[
{
"from": "system",
"value": "Add a third episode to the panic csv test\n"
},
{
"from": "human",
"value": "require 'test_helper'\nrequire 'libsyn/panic_csv'\n\nmodule Libsyn\n describe PanicCsv do\n describe '#to_s' do\n it 'returns a string in the correct format for Panic Status Board'... | ruby | chosen |
[
{
"from": "system",
"value": "Update reference to re-name herbarium fixture\n\nFixes errors in herbarium_test\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire \"test_helper\"\n\nclass HerbariumTest < UnitTestCase\n def test_specimens\n assert(herbaria(:nybg_herbarium).specimen... | ruby | chosen |
[
{
"from": "system",
"value": "Fix EXH legality check for cards that haven't been upvoted\n"
},
{
"from": "human",
"value": "class FormatEXH < FormatECH\n def initialize(time=nil)\n super(time)\n @ban_list = BanList[\"elder cockatrice highlander\"]\n end\n\n def format_pretty_name\n \... | ruby | chosen |
[
{
"from": "human",
"value": "Move Api::Timeslots_spec to api folder\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\ndescribe Api::TimeslotsController do\n let(:user) { FactoryGirl.create(:user) }\n let(:timeslot) { FactoryGirl.build(:timeslot).attributes }\n let(:persisted_timeslot) ... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Revert \"Comment out test that occasionally fails on travis\"\"\n\nThis reverts commit a52e340971d8e3ba926b9fbb297ac6650334d13d.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe FeedsController, :type => :request do\n include HTMLCompar... | ruby | chosen |
[
{
"from": "system",
"value": "Add vendor directory to gemspec.\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"rocket_job_mission_control/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specificat... | ruby | chosen |
[
{
"from": "system",
"value": "Update App Engine Go from 1.9.17 to 1.9.18\n"
},
{
"from": "human",
"value": "module Autoparts\n module Packages\n class GoogleAppEngineGo < Package\n name 'googleappenginego'\n version '1.9.17'\n description 'Google App Engine for Go: A CLI for m... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade Opera Beta.app to v29.0.1795.30\n"
},
{
"from": "human",
"value": "cask :v1 => 'opera-beta' do\n version '29.0.1795.26'\n sha256 '4a62e04697b18385f8ed7dbf5bf60a253087beaca75cf47beda99ed248b37ce1'\n\n url \"http://get.geo.opera.com/pub/opera-beta/#{version... | ruby | chosen |
[
{
"from": "system",
"value": "Debug redis running in CI\n"
},
{
"from": "human",
"value": "require 'redis'\nconfig = YAML.load(ERB.new(IO.read(File.join(Rails.root, 'config', 'redis.yml'))).result)[Rails.env].with_indifferent_access\nRedis.current = Redis.new(config.merge(thread_safe: true))\n"
... | ruby | chosen |
[
{
"from": "system",
"value": "Update Zend Studio to 12.0.1\n"
},
{
"from": "human",
"value": "cask :v1 => 'zendstudio' do\n version '10.6.1'\n sha256 '98cafacf5e2f08ae22561b4f9c756400e3c28202f1e97c345357816d3b38b40d'\n\n url \"http://downloads.zend.com/studio-eclipse/#{version}/ZendStudio-#{v... | ruby | chosen |
[
{
"from": "system",
"value": "Update code with .md extension\n"
},
{
"from": "human",
"value": "module Pesapal\n module Generators\n class InstallGenerator < Rails::Generators::Base\n source_root File.expand_path(\"../../templates\", __FILE__)\n\n desc \"Creates a Pesapal config fi... | ruby | chosen |
[
{
"from": "system",
"value": "Change gem name to use rubygems convention\n"
},
{
"from": "human",
"value": "SPEC = Gem::Specification.new do |s|\n s.name = 'xirr-newton-calculator'\n s.version = '0.0.1'\n s.date = '2013-10-17'\n s.author = \"JP Colomer\"\n s.email ... | ruby | chosen |
[
{
"from": "system",
"value": "Add milestone seeds to legislation processs\n"
},
{
"from": "human",
"value": "section \"Creating default Milestone Statuses\" do\n Milestone::Status.create(name: I18n.t('seeds.budgets.statuses.studying_project'))\n Milestone::Status.create(name: I18n.t('seeds.bud... | ruby | chosen |
[
{
"from": "system",
"value": "Use phpenv install script from travis-ci\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\ndefault['travis_phpenv']['prerequisite_recipes'] = %w[git]\ndefault['travis_phpenv']['git']['repository'] = 'git://github.com/CHH/phpenv.git'\ndefault['travi... | ruby | chosen |
[
{
"from": "system",
"value": "Set file permissions for secret token file to 0600 upon setup\n"
},
{
"from": "human",
"value": "require 'securerandom'\n\nnamespace :secrets do\n desc \"Create a secret token for this deployment\"\n task :setup, roles: :app do\n template \"secret_token.rb.erb\... | ruby | chosen |
[
{
"from": "system",
"value": "Split disable-sudo message into two lines\n"
},
{
"from": "human",
"value": "require 'travis/build/appliances/base'\n\nmodule Travis\n module Build\n module Appliances\n class DisableSudo < Base\n MSG = \"\\nThis job is running on container-based inf... | ruby | chosen |
[
{
"from": "system",
"value": "Update the description, summary, and homepage in the gemspec\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'cats'\n\nGem::Specification.new do |spec|\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add sprockets 2 to the dependencies\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"handlebars_assets/version\"\n\nGem::Specification.new do |s|\n s.name = \"handlebars_assets\"\n s.ver... | ruby | chosen |
[
{
"from": "human",
"value": "Add code wars (7) - double char\n"
},
{
"from": "gpt",
"value": "# http://www.codewars.com/kata/56b1f01c247c01db92000076/\n# --- iteration 1 ---\ndef double_char(str)\n str.chars.zip(str.chars).flatten.join\nend\n\n# --- iteration 2 ---\ndef double_char(str)\n str.... | ruby | chosen |
[
{
"from": "system",
"value": "Improve docs for Delegable module\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n# The including class must contain an organization_id attribute and a\n# concealed attribute *or* must override the :with_policy_scope_attributes\n# scope using joi... | ruby | chosen |
[
{
"from": "system",
"value": "Trim pictures on upload to stop transparency issues with PDFs\n\nTo strip transparency only, we need to add a transparent border, then trim. This will ensure pictures with a coloured edge do not get trimmed incorrectly\n"
},
{
"from": "human",
"value": "class Drawin... | ruby | chosen |
[
{
"from": "human",
"value": "Add basic specs for ApplianceEmbeddedAnsible\n"
},
{
"from": "gpt",
"value": "require_dependency 'embedded_ansible'\n\ndescribe ApplianceEmbeddedAnsible do\n before do\n allow(MiqEnvironment::Command).to receive(:is_appliance?).and_return(true)\n allow(Contain... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.