conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "human",
"value": "Add new mixin for child resource controllers\n"
},
{
"from": "gpt",
"value": "# encoding: utf-8\n\nrequire 'active_support/concern'\n\nmodule ChildResource\n extend ActiveSupport::Concern\n\n included do\n class_eval do\n class_attribute :child_resource_opt... | ruby | chosen |
[
{
"from": "human",
"value": "Add css class to taxon links.\n"
},
{
"from": "gpt",
"value": "module Spree\n module BaseHelper\n\n def taxons_tree(root_taxon, current_taxon, max_level = 1)\n return '' if max_leve < 1 || root_taxon.children.empty?\n content_tag :ul, class: 'taxons_lis... | ruby | chosen |
[
{
"from": "system",
"value": "Update Zocalo references to WorkDocs inside the cask\n"
},
{
"from": "human",
"value": "cask :v1 => 'amazon-zocalo' do\n version :latest\n sha256 :no_check\n\n # cloudfront.net is the official download host per the vendor homepage\n url 'https://dpfrknqwmbop6.cl... | ruby | chosen |
[
{
"from": "system",
"value": "Update Hex Color Picker path\n\nBinary is located inside Hex Color Picker directory.\n"
},
{
"from": "human",
"value": "class ColorpickerHex < Cask\n url 'http://wafflesoftware.net/hexpicker/download/HexColorPicker-1.6.1.zip'\n homepage 'http://wafflesoftware.net/... | ruby | chosen |
[
{
"from": "system",
"value": "Add loading of binary so file in fat binary windows gem.\n"
},
{
"from": "human",
"value": "require 'glu/glu'\n\ninclude Glu\n\n# (Glu.)gluSphere -> GLU.Sphere\n# (Glu::)GLU_INSIDE -> GLU::INSIDE\nmodule GLU\n extend self\n include Glu\n\n Glu.constants.each do |... | ruby | chosen |
[
{
"from": "system",
"value": "Move apply lambda's into apply method\n"
},
{
"from": "human",
"value": "require \"lsi/version\"\n\nclass Lsi\n def self.run(*args)\n new(*args).run\n end\n\n def initialize(command:, path:, list_command:)\n @command = command\n @path = path\n @list_c... | ruby | chosen |
[
{
"from": "system",
"value": "Fix ruby 2.7 deprecation warning\n"
},
{
"from": "human",
"value": "require 'csv'\n\nmodule DiningTable\n \n module Presenters\n\n class CSVPresenter < SpreadsheetPresenter\n\n attr_writer :output\n attr_accessor :stringio\n private :output, :str... | ruby | chosen |
[
{
"from": "system",
"value": "Add .pre for next release\n"
},
{
"from": "human",
"value": "module EY\n module Serverside\n class Adapter\n VERSION = \"2.0.4\"\n # For backwards compatibility, the serverside version default will be maintained until 2.1\n # It is recommended tha... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Don't truncate Slack messages.\"\n\nThis reverts commit 121125d7448c51745b11d409f71aac3e5a13f85e.\n"
},
{
"from": "human",
"value": "class NotificationServices::SlackService < NotificationService\n Label = \"slack\"\n Fields += [\n [:subdomain, {\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove ability to customise mysql_version, no longer used\n"
},
{
"from": "human",
"value": "require 'stackbuilder/stacks/namespace'\nrequire 'stackbuilder/stacks/machine_def'\n\nclass Stacks::Services::CiSlave < Stacks::MachineDef\n attr_accessor :mysql_version\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix spacing on check-if-bosh-lite-resource-exists error message\n\n[#129169949]\n\nSigned-off-by: James Wen <3b2f4c88287a5fcd7db73a67dd1ab82807db04ee@columbia.edu>\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n# encoding: utf-8\n\nrequire_relative '../../l... | ruby | chosen |
[
{
"from": "system",
"value": "Rename name to key for consistency.\n"
},
{
"from": "human",
"value": "class APICache::MemoryStore\n def initialize\n puts \"Init cache\"\n @cache = {}\n end\n\n def expired?(name, timeout)\n Time.now - created(name) > timeout\n end\n\n def set(name, v... | ruby | chosen |
[
{
"from": "system",
"value": "Use Raven.captureMessage instead of Logger\n"
},
{
"from": "human",
"value": "unless user.respond_to?(:statistics) && user.respond_to?(:top_user_topics) then\n user = Queries::UsersByIds.new(user_ids: [user.id]).call.first\n\n logger.warn \"Tried to render user_pa... | ruby | chosen |
[
{
"from": "system",
"value": "Change modified_at from String to Fixnum\n"
},
{
"from": "human",
"value": "module CodeHunter\n class GitBlamer\n def initialize(args)\n @path = args[:path]\n @line = args[:line]\n end\n\n def blame\n parse(invoke)\n end\n\n def parse(... | ruby | chosen |
[
{
"from": "system",
"value": "Make mass-assignment setting match rails defaults\n"
},
{
"from": "human",
"value": "Rails.env = 'test'\n\nmodule Combustion\n class Application < Rails::Application\n # Core Settings\n config.cache_classes = true\n config.whiny_nils ... | ruby | chosen |
[
{
"from": "system",
"value": "Use distinct for Rails 4+ instead of uniq.\n"
},
{
"from": "human",
"value": "require 'active_support/concern'\n\nmodule Gutentag::ActiveRecord\n extend ActiveSupport::Concern\n\n module ClassMethods\n def has_many_tags\n has_many :taggings, :class_name =>... | ruby | chosen |
[
{
"from": "system",
"value": "Use symbols to represent internal codes\n"
},
{
"from": "human",
"value": "require 'bis'\nrequire 'powerpack'\nrequire 'pqueue'\nrequire 'huffman/static/link_node'\nrequire 'huffman/static/value_node'\n\nmodule Huffman\n module Static\n class Encoder\n def ... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"[UPDATE] destroy based on scope\"\n\nThis reverts commit fb794fbada3533935fe38ee9043064c13a8c4f45.\n"
},
{
"from": "human",
"value": "module JobHunter\n def self.extended(base_class)\n base_class.include(InstanceMethods)\n end\n\n module InstanceMetho... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Index operation still using the old AssociationIncluder\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule Pragma\n module Operation\n # Finds all records of the requested resource, authorizes them, paginates them and decorates\n #... | ruby | chosen |
[
{
"from": "system",
"value": "Write some env vars (static list for now)\n"
},
{
"from": "human",
"value": "require 'simplestats/stat'\n\nmodule SimpleStats\n class Middleware\n def initialize(app)\n @app = app\n end\n\n def call(env)\n stat = SimpleStats::Stat.create(:rack_en... | ruby | chosen |
[
{
"from": "system",
"value": "Apply fix to migrate method\n"
},
{
"from": "human",
"value": "module Songkick\n module OAuth2\n\n class Schema\n def self.migrate\n ActiveRecord::Base.logger ||= Logger.new(StringIO.new)\n if ActiveRecord.version.version >= '5.2'\n A... | ruby | chosen |
[
{
"from": "system",
"value": "Use knife solo instead of knife\n"
},
{
"from": "human",
"value": "module Stacko\n class KnifeOperation\n\n def initialize(instance)\n @instance = instance\n end\n\n %w(prepare cook).each do |operation|\n define_method(operation) do\n\n ra... | ruby | chosen |
[
{
"from": "system",
"value": "Add test case for two services started with equal name.\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass DrbarpgConnectTest < ActiveSupport::TestCase\n test \"default connect timeout\" do\n obj = DRbObject.new_with_uri(\"drbarpg://notstarted\")\... | ruby | chosen |
[
{
"from": "system",
"value": "Remove versions from bundler and reake\n"
},
{
"from": "human",
"value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'ltsv_logger_formatter/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Support adding checksum to tar package\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: dotnetcore\n# Recipe:: _tar_install\n#\n# Copyright (C) 2016 Andrew Cornies\n#\n# All rights reserved - Do Not Redistribute\n#\n# Installs dotnetcore using the tar instruc... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for logging in with invalid credentials\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe AccountController do\n include HTMLCompareHelper\n fixtures :all\n\n it '#settings' do\n compare('/account/settings.php')\n end\n\n it 'logs... | ruby | chosen |
[
{
"from": "human",
"value": "Add export script for Stylus\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env ruby\n\nrequire 'json'\n\nif ARGV.count > 0\n file = ARGV.first\nelse\n file = Time.now.strftime('./stylus-%Y-%m-%d.json')\nend\n\nabort \"JSON file does not exist: #{file}\" unless File.e... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor categories controller to prevent failures in other scenarios\n\nWe change the condition for the categories controller index action to be less strict\nbecause we want to ensure that data is being returned but we don't care about the amount.\n"
},
{
"from": "huma... | ruby | chosen |
[
{
"from": "system",
"value": "Validate presence of create link\n"
},
{
"from": "human",
"value": "describe LabGroupsController do\n describe \"join\" do\n student = Factory.create(:student)\n gc = Factory.create(:given_course)\n lg = Factory.create(:lab_group, given_course: gc)\n sr... | ruby | chosen |
[
{
"from": "system",
"value": "Add DescribeMethod test case for single argument\n"
},
{
"from": "human",
"value": "describe RuboCop::Cop::RSpec::DescribeMethod do\n subject(:cop) { described_class.new }\n\n it 'enforces non-method names' do\n inspect_source(cop, \"describe Some::Class, 'nope... | ruby | chosen |
[
{
"from": "human",
"value": "Add system spec for /.well-known/change-password route feature\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nrequire 'rails_helper'\n\ndescribe '/.well-known/change-password' do\n it 'when user successfully redirected to change password form' do\... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration to create spree_store_credit_reasons table\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nclass CreateSpreeStoreCreditReasonsTable < ActiveRecord::Migration[5.1]\n class StoreCreditUpdateReason < ActiveRecord::Base\n self.table_na... | ruby | chosen |
[
{
"from": "human",
"value": "Move enterprises layout templates and themes\n"
},
{
"from": "gpt",
"value": "class MoveEnterprisesLayoutTemplateToTopLeft < ActiveRecord::Migration\n\n ThemesGlob = '{cirandas-green,tantascores-*,modernista*,template,ees,coral*,borboleta*}'\n\n def up\n themes ... | ruby | chosen |
[
{
"from": "system",
"value": "Check whether a string exists and it's not called title.\n"
},
{
"from": "human",
"value": "require 'refinery'\n\nmodule Refinery\n module <%= class_name.pluralize %>\n class Engine < Rails::Engine\n config.after_initialize do\n Refinery::Plugin.regi... | ruby | chosen |
[
{
"from": "system",
"value": "Remove associations workaround from TopicsController\n"
},
{
"from": "human",
"value": "module Forem\n class TopicsController < Forem::ApplicationController\n before_filter :authenticate_forem_user, :except => [:show]\n before_filter :find_forum\n\n def sh... | ruby | chosen |
[
{
"from": "system",
"value": "Remove id from self report params\n"
},
{
"from": "human",
"value": "class SelfReportsController < ApplicationController\n expose(:self_reports){ current_user.self_reports }\n expose(:self_report, attributes: :self_report_params)\n\n def create\n self_report.s... | ruby | chosen |
[
{
"from": "system",
"value": "Add yajl-ruby as development dependency so specs can be run with bundle exec rake spec\n"
},
{
"from": "human",
"value": "\nGem::Specification.new do |s|\n s.name = \"resque-brokered\"\n s.version = \"0.2\"\n s.platform = Gem::Platform::RUBY\n s.au... | ruby | chosen |
[
{
"from": "system",
"value": "Enable extension developers to customize the namespace\n\nIf you are developing an extension and you want to use\n`Rake::Task['extension:test_app']` you are forced to have a file named\nexactly as the capitalized version of the extension namespace name, so\nif you name your nam... | ruby | chosen |
[
{
"from": "system",
"value": "Use correct form for CAB locator\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n\nrequire 'bundler/setup'\nrequire 'date'\nrequire 'mechanize'\n\ndomain = ARGV[0]\n\nputs \">> Checking #{domain} at #{Time.now}\"\n\nmech = Mechanize.new\n\nif ENV['AUTH_USERN... | ruby | chosen |
[
{
"from": "human",
"value": "Migrate calculators to outside spree namespace\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nclass MoveAllCalculatorsOutsideTheSpreeNamespace < ActiveRecord::Migration\n def up\n convert_calculator(\"Spree::Calculator::DefaultTax\", \"Calculat... | ruby | chosen |
[
{
"from": "system",
"value": "Drop the fully qualified const refs\n"
},
{
"from": "human",
"value": "require 'delegate'\n\nmodule SGMailer\n class MessageDelivery < SimpleDelegator\n def deliver_now(**options)\n SGMailer::Job.set(options).perform_now(as_json) if as_json\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow indifferent access if ActiveSupport present"
},
{
"from": "human",
"value": "class Sidekiq::EventBus::Consumer\n # Register Consumer with the EventBus for a particular topic\n def self.topic *topics\n Array(topics).each do |topic|\n Sidekiq::EventBus... | ruby | chosen |
[
{
"from": "human",
"value": "Add rake task for setting last_edited_at\n"
},
{
"from": "gpt",
"value": "desc \"Sets last_edited_at for each content item with the value from public_updated_at\"\ntask set_last_edited_at: :environment do\n sql = \"UPDATE content_items SET last_edited_at = public_up... | ruby | chosen |
[
{
"from": "system",
"value": "Send correct data to Sentry\n\nHere, `msg` is not defined, so it raises a NameError.\n"
},
{
"from": "human",
"value": "module Travis\n module Tasks\n class ErrorHandler\n def call(worker, job, queue)\n yield\n rescue => ex\n Sidekiq.logg... | ruby | chosen |
[
{
"from": "system",
"value": "Add integration tests for installation of mcrouter\n\nAll that work to install, yet just need one test to check it’s really there\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'mcrouter::default' do\n\n # Serverspec examples can be found at\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add non-standard basic http auth\n"
},
{
"from": "human",
"value": "require File.expand_path(\"../init\", __FILE__)\nrun Integrity.app\n"
},
{
"from": "gpt",
"value": "require File.expand_path(\"../init\", __FILE__)\nuse Rack::Auth::Basic do |user, pass|... | ruby | chosen |
[
{
"from": "system",
"value": "Move config directory down a level\n"
},
{
"from": "human",
"value": "#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http... | ruby | chosen |
[
{
"from": "system",
"value": "Update preproduction description. chenge the source_root\n"
},
{
"from": "human",
"value": "require 'rails/generators/base'\nrequire 'mangopay'\n\nmodule Mangopay\n module Generators\n class InstallGenerator < Rails::Generators::Base\n source_root File.expa... | ruby | chosen |
[
{
"from": "system",
"value": "Update Emacs to version 24.5\n"
},
{
"from": "human",
"value": "cask :v1 => 'emacs' do\n version '24.4'\n sha256 '2d13ff9edff16d4e8f4bc9cf37961cf91a3f308fad5e9c214c4a546e86719312'\n\n url \"http://emacsformacosx.com/emacs-builds/Emacs-#{version}-universal.dmg\"\n... | ruby | chosen |
[
{
"from": "system",
"value": "Make the botbot spec URL have a trailing slash"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe IrcLogsController do\n describe 'GET #index' do\n it 'redirects to the botbot dashboard' do\n get :index\n\n expect(response).to redirect_... | ruby | chosen |
[
{
"from": "system",
"value": "Change indents that reduce line length\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe SessionsController, type: :controller do\n\n describe 'GET #new' do\n it 'returns http success' do\n get :new\n expect(response).to have_... | ruby | chosen |
[
{
"from": "system",
"value": "Adjust tests for new form nesting\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe SessionsController, type: :controller do\n\n describe \"GET #new\" do\n it \"returns http success\" do\n get :new\n expect(response).to have_h... | ruby | chosen |
[
{
"from": "system",
"value": "Use roda session middleware instead of rack session middleware in session spec on Ruby 2+\n\nThis works around the issue that Rack::Session::Cookie isn't\navailable in Rack starting in Rack 3+.\n"
},
{
"from": "human",
"value": "require_relative \"spec_helper\"\n\nd... | ruby | chosen |
[
{
"from": "system",
"value": "Update to latest version of highline\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nrequire 'ttycaca/version'\n\nGem::Specification.new do |gem|\n... | ruby | chosen |
[
{
"from": "system",
"value": "Move catalogue check from shared example in apache::mod::jk spec test\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'apache::mod::jk', :type => :class do\n it_behaves_like 'a mod class, without including apache'\n\n shared_examples 'minimal ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove session test from user spec\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nfeature 'User sign up/login' do\n scenario \"adds a new user\" do\n visit root_path\n expect{\n click_link \"Login/Signup\"\n fill_in \"Name\", with: \"N... | ruby | chosen |
[
{
"from": "system",
"value": "Migrate repo under the skroutz organization\n"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift 'lib'\nrequire \"agile_serializer/version\"\n\nGem::Specification.new do |s|\n s.name = \"agile_serializer\"\n s.version = AgileSerializer::VER... | ruby | chosen |
[
{
"from": "human",
"value": "Add tests for Network model.\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe Network do\n let(:network) { Network.new }\n\n describe :enable_ci do\n subject { network.enable_ci '', '', '', '' }\n\n context 'on success' do\n before do\n... | ruby | chosen |
[
{
"from": "human",
"value": "Add specification for nil predicate"
},
{
"from": "gpt",
"value": "require File.dirname(__FILE__) + \"/../spec_helper.rb\"\n\ndescribe \"Object using nil predicate\" do\n\n before(:all) do\n class User\n verifiable\n\n attr_accessor :login\n login_... | ruby | chosen |
[
{
"from": "system",
"value": "Add nagios user/password creation to the centos package recipe\n"
},
{
"from": "human",
"value": "#\n# Author:: Seth Chisamore <schisamo@opscode.com>\n# Cookbook Name:: nagios\n# Recipe:: client_package\n#\n# Copyright 2011, Opscode, Inc\n#\n# Licensed under the Apa... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec to be compatible with Rails 3.2."
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"jquery-tablesorter/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Speci... | ruby | chosen |
[
{
"from": "system",
"value": "Fix ActionMailer::LogSubscriber to use the correct log level check.\n"
},
{
"from": "human",
"value": "module ActionMailer\n class LogSubscriber < ActiveSupport::LogSubscriber\n def deliver(event)\n return unless logger.debug?\n recipients = Array(even... | ruby | chosen |
[
{
"from": "system",
"value": "Bring back the test cases for `presence`\n\nThis was removed by mistake in 5e51bdd\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire 'abstract_unit'\nrequire 'active_support/core_ext/object/blank'\n\nclass BlankTest < ActiveSupport::TestCase\n class E... | ruby | chosen |
[
{
"from": "system",
"value": "Add Adjustments info to order\n"
},
{
"from": "human",
"value": "Spree::Api::ApiHelpers.module_eval do\n def line_item_attributes\n [:id, :quantity, :price, :variant_id, :adjustments]\n end\n def tax_rate_attributes\n [:id, :name, :amount, :included_in_pric... | ruby | chosen |
[
{
"from": "system",
"value": "Add after sign up path\n"
},
{
"from": "human",
"value": "require_dependency \"ajo_register/application_controller\"\nclass AjoRegister::PasswordsController < Devise::PasswordsController\n\n def new\n super\n end\n\n def create\n self.resource = resource_cl... | ruby | chosen |
[
{
"from": "human",
"value": "Add specs for offer search\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\nRSpec.describe \"Offer search\" do\n describe \"when visiting offers_path without params\" do\n before do\n visit offers_path\n end\n\n it \"shows basic search form\"... | ruby | chosen |
[
{
"from": "system",
"value": "Use let rather than subject\n"
},
{
"from": "human",
"value": "require File.expand_path(File.dirname(__FILE__) + '/spec_helper')\n\ndescribe \"OmniauthMapmyfitness\" do\n subject do\n OmniAuth::Strategies::MapMyFitness.new({})\n end\n\n it 'has a name' do\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add some sort of SSH transport tests\n\nAdd some test for the SSH transport plugin.\nTesting with Net::SSH mocks is incredibly complicated and fragile; there is no\nreal Mocks for it, only Net::SSH::Test which seems to be ill concieved and not\nvery useful for any serious testin... | ruby | chosen |
[
{
"from": "system",
"value": "Stop keeping backup files for the zend framework download\n"
},
{
"from": "human",
"value": "#svn export http://framework.zend.com/svn/framework/standard/branches/release-1.11/library\n\ninclude_recipe \"php5::default\"\n\nzend_dl_uri=\"http://framework.zend.com/rel... | ruby | chosen |
[
{
"from": "system",
"value": "Add delete route to user controller\n"
},
{
"from": "human",
"value": "put '/users/:id' do\n user_to_update = User.find(params[:id])\n if user_to_update\n user_to_update.user_name = params[:user][:user_name]\n if user_to_update.save\n redirect \"/users/... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake to development dep\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.unshift File.expand_path('../lib', __FILE__)\nrequire 'priority_test/version'\n\nGem::Specification.new do |s|\n s.name = \"priority_test\"\n s.version = Priori... | ruby | chosen |
[
{
"from": "system",
"value": "Put the sinatra.log file into the log directory."
},
{
"from": "human",
"value": "app_path = File.dirname(__FILE__)\n$:.unshift(app_path) unless $:.include?(app_path)\n\nrequire \"env\"\n\nrequire \"bundler\"\nBundler.require(:default, ENV['RACK_ENV'])\n\nrequire \"... | ruby | chosen |
[
{
"from": "system",
"value": "Fix adding caching headers to assets\n"
},
{
"from": "human",
"value": "require 'rack/contrib/static_cache'\nrequire 'rack/contrib/try_static'\nrequire 'rack/contrib/not_found'\nrequire 'rack/rewrite'\n\nuse Rack::Deflater\n\nuse Rack::Rewrite do\n r301 '/blog/why-... | ruby | chosen |
[
{
"from": "system",
"value": "Add pry and rb-readline to dev dependancies\n\n* Allows debugging"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'puppet-syntax/version'\n\nGem::Specifica... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test description for Base.point_to_class\n"
},
{
"from": "human",
"value": "require 'helper'\nrequire 'deviantart'\nrequire 'deviantart/base'\nrequire 'deviantart/deviation'\n\ndescribe DeviantArt::Base do\n describe '#inspect' do\n before do\n @base = ... | ruby | chosen |
[
{
"from": "system",
"value": "Add license information to 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 'ruby_installer'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary methods for `NullRelation`\n"
},
{
"from": "human",
"value": "module ActiveRecord\n module NullRelation # :nodoc:\n def exec_queries\n @records = [].freeze\n end\n\n def pluck(*column_names)\n []\n end\n\n def delete_all(... | ruby | chosen |
[
{
"from": "system",
"value": "Fix update note to not only update sqlite but also evernote.\n"
},
{
"from": "human",
"value": "require \"rubygems\"\nrequire \"#{File.dirname(__FILE__)}/evernote_gist_store\"\nrequire \"#{File.dirname(__FILE__)}/gist\"\nrequire \"#{File.dirname(__FILE__)}/gists\"\n... | ruby | chosen |
[
{
"from": "system",
"value": "Rename rates local shadowing enclosing method name\n"
},
{
"from": "human",
"value": "module SmartAnswer::Calculators\n class RatesQuery\n def initialize(rates_filename)\n @rates_filename = rates_filename\n end\n\n def rates(relevant_date = Date.today... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor how ActiveRecord is configured.\n"
},
{
"from": "human",
"value": "require File.expand_path('config/site.rb') if File.exists?('config/site.rb')\n\nrequire \"bundler\"\nBundler.require\n\nrequire 'active_support/all'\n\nrequire 'rails/observers/activerecord/... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo, change GET to POST in spec description"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe MessagesController, type: :controller do\n let(:sender) { create(:advocate) }\n\n before do\n sign_in sender.user\n end\n\n describe \"G... | ruby | chosen |
[
{
"from": "system",
"value": "Update test to not include deprecated categories\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe QuestionController do\n describe \"GET answer\" do\n \n it \"assigns quantities\" do\n get :answer, :q => 'shipping 10 tonnes of stuff f... | ruby | chosen |
[
{
"from": "system",
"value": "Change a day without a match LiveScore test\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe FCReminder::Providers::LiveScore do\n subject(:provider) { FCReminder::Providers::LiveScore.new }\n let(:team_name) { \"Barcelona\" }\n\n describe \"#... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for closing revert modal on escape keypress\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\ndescribe 'Merge request > User sees Revert modal', :js do\n let(:project) { create(:project, :public, :repository) }\n let(:user) { project.creator }\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make the error message match the actual error\n\nI think this was copy pasta from build-essential\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: vim\n# Recipe:: default\n#\n# Copyright 2010-2015, Chef Software, Inc.\n#\n# Licensed under the Apache License, ... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec which does not work yet.\n"
},
{
"from": "gpt",
"value": "require 'cells/rails'\nrequire 'cells-collection/cells/rails'\n\ndescribe Cells::Rails::ActionView do\n describe '#render_cell_collection' do\n subject{ Object.new.extend(Cells::Rails::ActionView)... | ruby | chosen |
[
{
"from": "system",
"value": "Add diagnostics for travis ci\n"
},
{
"from": "human",
"value": "require 'grampus'\nrequire 'socket'\n\ndescribe Grampus do\n\n before do\n `lsof -t -i tcp:21779 | xargs kill`\n end\n\n it \"kills a process running on a port\" do\n p = fork { TCPServer.new(... | ruby | chosen |
[
{
"from": "system",
"value": "Add specs for game - obfuscated letters\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe Game, type: :model do\n let(:alphabet) { %w{ a b c d e f g h i j k l m n o p q r s t u v w x y z } }\n let(:game) { Game.new }\n\n describe \"#... | ruby | chosen |
[
{
"from": "system",
"value": "Write two logout spec tests.\n"
},
{
"from": "human",
"value": "require 'factory_girl'\nrequire 'rails_helper'\n\ndescribe SessionsController do\n describe '#login' do\n context 'with valid credentials' do\n before :each do\n @user = FactoryGirl.crea... | ruby | chosen |
[
{
"from": "system",
"value": "Update tests for the conversations controller\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'rails_helper'\n\nRSpec.describe ConversationsController, type: :controller do\n describe 'GET #new' do\n login_user\n it 'should be succ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix broken organization controller specs\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe OrganizationsController do\n\n describe \"GET 'index'\" do\n it \"should be successful\" do\n get 'index'\n response.should be_success\n en... | ruby | chosen |
[
{
"from": "system",
"value": "Remove method that is now added by Enumerable.\n"
},
{
"from": "human",
"value": "module Burgundy\n class Collection < SimpleDelegator\n include Enumerable\n\n def initialize(items, wrapping_class = nil)\n @items = items\n @wrapping_class = wrapping... | ruby | chosen |
[
{
"from": "system",
"value": "Add debugger/rspec to development dependencies\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'quick_shoulda/version'\n\nGem::Specification.new do |spec... | ruby | chosen |
[
{
"from": "system",
"value": "Remove trailing whitespace and double blank line\n"
},
{
"from": "human",
"value": "require 'active_support/concern'\n\nmodule Doorkeeper\n module Extensions\n module Application\n extend ActiveSupport::Concern\n\n included do \n has_many :permi... | ruby | chosen |
[
{
"from": "system",
"value": "Fix displaying of first line in legacy parser for undocumentable error\n"
},
{
"from": "human",
"value": "module YARD\n module Parser::Ruby::Legacy\n class Statement \n attr_reader :tokens, :comments, :block\n attr_accessor :comments_range\n\n def... | ruby | chosen |
[
{
"from": "system",
"value": "Support all IO resources during formatting\n"
},
{
"from": "human",
"value": "module Dox\n module Formatters\n class Base\n def initialize(dispatch)\n @dispatch = dispatch\n dispatch_body = dispatch.body\n @body = dispatch_body.is_a?(St... | ruby | chosen |
[
{
"from": "human",
"value": "Add test coverage for the dependencies API.\n"
},
{
"from": "gpt",
"value": "require 'test_helper'\nrequire 'httpclient'\n\nclass DependenciesApiTest < Geminabox::TestCase\n test \"push a gem with dependencies\" do\n assert_can_push(:a, :deps => [[:b, '>= 0']])\n... | ruby | chosen |
[
{
"from": "system",
"value": "Test making sure Versionable works in Form\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass FormTest < ActiveSupport::TestCase\n # test \"the truth\" do\n # assert true\n # end\nend\n"
},
{
"from": "gpt",
"value": "require 'test_hel... | ruby | chosen |
[
{
"from": "system",
"value": "Test verifies that the cahce record error is raised (rather than the cache error)\n"
},
{
"from": "human",
"value": "require_relative './store_init'\n\ndescribe \"Get with Expected Version\" do\n stream_name = EventStore::EntityStore::Controls::Writer.write_batch '... | ruby | chosen |
[
{
"from": "system",
"value": "Tweak error messages for :parse_as and :parse_first_as\n"
},
{
"from": "human",
"value": "RSpec::Matchers.define :parse_as do |expected|\n match do |parser|\n @actual = parser.parse_tree\n @actual == expected\n end\n\n failure_message_for_should do |actual|... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.