conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Remove unnecessary require that will be handled by Bundler\n"
},
{
"from": "human",
"value": "require 'cover_me'\nrequire 'rubygems'\n\nrequire 'bundler'\nbegin\n Bundler.setup(:default, :development)\nrescue Bundler::BundlerError => e\n $stderr.puts e.message\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Package version is incremented from 0.2.0 to 0.2.1\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'http-server'\n s.version = '0.2.0'\n s.summary = 'Simple HTTP Server using http-protocol'\n s.description = ' '\n\n s.... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a bug in FreeAgent configuration when user is not logged in\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n protect_from_forgery with: :exception\n\n before_action :authenticate_user!, :configure_freeagent\n\nprivate\n... | ruby | chosen |
[
{
"from": "system",
"value": "Switch to custom error pages, located in /public\n\n* Design can be changed in related template\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n # Prevent CSRF attacks by raising an exception.\n # For APIs, you may want to ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix provider key environment var\n"
},
{
"from": "human",
"value": "require '3scale_client'\nclass ApplicationController < ActionController::Base\n # Prevent CSRF attacks by raising an exception.\n # For APIs, you may want to use :null_session instead.\n protect_... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for Rails 5 + devise\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n # Prevent CSRF attacks by raising an exception.\n # For APIs, you may want to use :null_session instead.\n protect_from_forgery with: :exception\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove useless junk from PageDecorator\n"
},
{
"from": "human",
"value": "module Caffeine\n class PageDecorator < Draper::Decorator\n delegate_all\n decorates_association :children\n\n TEMPLATE_FILE_NAME = 'template'\n DEFAULT_TEMPLATE = \"templates/def... | ruby | chosen |
[
{
"from": "system",
"value": "Remove cache from code blocks (for simplicity)\n"
},
{
"from": "human",
"value": "module Wellspring\n module MarkdownHelper\n class HTMLwithPygments < ::Redcarpet::Render::HTML\n include ::Redcarpet::Render::SmartyPants\n\n def block_code(code, languag... | ruby | chosen |
[
{
"from": "system",
"value": "Rename instance variable `document` -> `section`\n"
},
{
"from": "human",
"value": "require \"forwardable\"\n\nclass SectionViewAdapter < SimpleDelegator\n extend ActiveModel::Naming\n include ActiveModel::Conversion\n\n def initialize(manual, document)\n @man... | ruby | chosen |
[
{
"from": "system",
"value": "Change the width of window\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'gosu'\nrequire 'rmagick'\nrequire 'execjs'\n\nWIDTH, HEIGHT = 1024, 720\n\nNULL_PIXEL = Magick::Pixel.from_color('none')\n\nrequire_relative 'worms/version'\nrequire_relative ... | ruby | chosen |
[
{
"from": "system",
"value": "Raise a default response when an error occurs\n"
},
{
"from": "human",
"value": "module Agendor\n\n class Entity < Agendor::Base\n\n def create(params)\n body = process_hash(params)\n HTTParty.post(resource_path, body: body.to_json, headers: headers)\n... | ruby | chosen |
[
{
"from": "system",
"value": "Correct path for custom routes\n"
},
{
"from": "human",
"value": "THEME_NAME = File.split(File.expand_path(\"../..\", __FILE__))[1]\n\nclass ActionController::Base\n # The following prepends the path of the current theme's views to\n # the \"filter_path\" that... | ruby | chosen |
[
{
"from": "system",
"value": "Use Kaminari.paginate_array when the collection is an Array\n\nSigned-off-by: David Celis <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@davidcel.is>\n"
},
{
"from": "human",
"value": "require 'api-pagination/hooks'\nrequire 'api-pagination/version'\n\nmodule ApiPaginati... | ruby | chosen |
[
{
"from": "system",
"value": "Add pad array to GitHub\n"
},
{
"from": "human",
"value": "# Pad an Array\n\n# I worked on this challenge [by myself, with: ]\n\n# I spent [] hours on this challenge.\n\n\n# Complete each step below according to the challenge directions and\n# include it in this fil... | ruby | chosen |
[
{
"from": "system",
"value": "Add descriptive comment to NullConvertor\n"
},
{
"from": "human",
"value": "class GirFFI::Builders::NullConvertor\n def initialize argument_name\n @argument_name = argument_name\n end\n\n def conversion\n @argument_name\n end\nend\n"
},
{
"from": "... | ruby | chosen |
[
{
"from": "system",
"value": "Use variable size secure compare\n"
},
{
"from": "human",
"value": "module ShopifyApp\n module WebhooksController\n extend ActiveSupport::Concern\n\n included do\n skip_before_action :verify_authenticity_token\n before_action :verify_request\n en... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake task for exporting cache\n"
},
{
"from": "human",
"value": "namespace :copycopter do\n desc \"Notify Copycopter of a new deploy.\"\n task :deploy => :environment do\n CopycopterClient.deploy\n puts \"Successfully marked all blurbs as published.\"\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec based off abstract_class gem\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nlib = File.expand_path('../lib/', __FILE__)\n$:.unshift lib unless $:.include?(lib)\n\nrequire 'sub_diff/version'\nrequire 'date'\n\nGem::Specification.new do... | ruby | chosen |
[
{
"from": "system",
"value": "Allow for basic auth setup.\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nmodule GithubCLI\n\n # The API class is the main entry point for creating GithubCLI APIs.\n class API\n\n class << self\n\n # Access or initialize Github API client\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add some whitespace for readability\n"
},
{
"from": "human",
"value": "require 'iconv'\n\nclass Griddler::Email\n attr_accessor :to, :from, :body, :user, :comment\n\n def initialize(params)\n if params[:to]\n @to = extract_address(params[:to], config.to)\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add flag for exit code\n"
},
{
"from": "human",
"value": "require 'time'\n\nmodule HerokuSan\n class API\n def initialize(options = {})\n @options = options\n end\n\n def sh(app, *command)\n preflight_check_for_cli\n\n cmd = (command + ['--a... | ruby | chosen |
[
{
"from": "system",
"value": "Implement a notifier method on Runtime\n"
},
{
"from": "human",
"value": "require 'pathname'\n\nmodule Rohbau\n class Runtime\n def self.register(name, plugin_class)\n attr_reader name\n plugins[name] = plugin_class\n end\n\n def self.plugins\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add debug flag to turn on faraday logging\n"
},
{
"from": "human",
"value": "require 'faraday'\n\nmodule Visdiff\n class Config\n attr_accessor :base_url, :api_key\n\n def initialize\n end\n\n attr_writer :connection\n def connection\n @connecti... | ruby | chosen |
[
{
"from": "system",
"value": "Work around Ox not parsing multibyte characters\n"
},
{
"from": "human",
"value": "require 'integration_helper'\nrequire 'mws/products'\n\nclass TestMultibyteQueries < IntegrationTest\n def setup\n @api = 'Products'\n super\n end\n\n def test_posts_multibyt... | ruby | chosen |
[
{
"from": "system",
"value": "Add matcher for php_fpm_pool LWRP\n"
},
{
"from": "human",
"value": "if defined?(ChefSpec)\n ChefSpec.define_matcher :php_pear\n def install_php_pear(resource_name)\n ChefSpec::Matchers::ResourceMatcher.new(:php_pear, :install, resource_name)\n end\n\n def re... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug with RouteAction so that RouteActions will run multiple times correctly\n"
},
{
"from": "human",
"value": "module Cannon\n class Route\n attr_reader :path, :actions, :redirect\n\n def initialize(app, path:, actions: nil, redirect: nil)\n path = '... | ruby | chosen |
[
{
"from": "system",
"value": "Remove deprecation warning for emoji\n"
},
{
"from": "human",
"value": "module ::Forem\n class Engine < Rails::Engine\n isolate_namespace Forem\n\n class << self\n attr_accessor :root\n def root\n @root ||= Pathname.new(File.expand_path('../.... | ruby | chosen |
[
{
"from": "system",
"value": "Update Fira Mono to 3.106\n"
},
{
"from": "human",
"value": "class FontFiraMono < Cask\n url 'http://dev.carrois.com/wordpress/wp-content/uploads/downloads/fira_3105/FiraMono3105.zip'\n homepage 'http://dev.carrois.com/fira-3-1/'\n version '3.105'\n sha256 '13e7... | ruby | chosen |
[
{
"from": "system",
"value": "Update MySQL Workbench to 6.3.4\n"
},
{
"from": "human",
"value": "cask :v1 => 'mysqlworkbench' do\n version '6.3.3'\n sha256 '2ba28b163f88bd6d3a43df8236f351bc43d8fe3d21936424fcb395bb9d56e1a6'\n\n url \"https://dev.mysql.com/get/Downloads/MySQLGUITools/mysql-work... | ruby | chosen |
[
{
"from": "system",
"value": "Fix hash syntax in nginx syntax\n"
},
{
"from": "human",
"value": "include_recipe 'nginx_server::default'\n\nnginx_server_vhost 'yumserver' do\n listen [{'ipaddress': '0.0.0.0'}]\n server_name [node['hostname'], node['fqdn']]\n root node['yumserver']['basepath']\... | ruby | chosen |
[
{
"from": "system",
"value": "Support to_a and to_ary in PyCall::Tuple\n"
},
{
"from": "human",
"value": "module PyCall\n class Tuple\n include PyObjectWrapper\n\n def self.new(init)\n case init\n when Integer\n super(LibPython.PyTuple_New(init))\n when Array\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix attributes :key name on ItemFulfillmentPackageList\n"
},
{
"from": "human",
"value": "module NetSuite\n module Records\n class ItemFulfillmentPackageList\n include Support::Fields\n include Support::Records\n include Namespaces::TranSales\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix .configure use of @config instead of .config.\n\nOtherwise, attempting to use `.configure` without having called\n`.config` first will fail, as `@config` won't exist.\n"
},
{
"from": "human",
"value": "module Redimap\n \n def self.config\n @config ||= Redim... | ruby | chosen |
[
{
"from": "system",
"value": "Remove reference to legacy support.cluster machine\n\nThis initializer is now specified in alphagov-deployment, so it is only\nused here in development now. We are trying to encourage apps to move\naway from support.cluster.\n"
},
{
"from": "human",
"value": "if Rai... | ruby | chosen |
[
{
"from": "system",
"value": "Change duration time for functions to date"
},
{
"from": "human",
"value": "class CreateFunctions < ActiveRecord::Migration[5.0]\n def change\n create_table :functions do |t|\n t.belongs_to :user, foreign_key: true\n t.belongs_to :role, foreign_key: tr... | ruby | chosen |
[
{
"from": "system",
"value": "Remove double shellout from a bad merge\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "property :name, String, regex: /^[\\w-]+$/, name_property: true\nproperty :options, String\n\naction :install do... | ruby | chosen |
[
{
"from": "system",
"value": "Use a keyword argument instead of an options hash.\n"
},
{
"from": "human",
"value": "module Ethos\n module Entity\n module ClassMethods\n def attribute(attr, options = {})\n reader = :\"#{attr}\"\n writer = :\"#{attr}=\"\n\n define_met... | ruby | chosen |
[
{
"from": "system",
"value": "Add initializer to pull auth token from ENV.\n"
},
{
"from": "human",
"value": "module Myhub\n class Github\n include HTTParty\n base_uri \"https://api.github.com\"\n\n # Your code here too!\n end\nend\n"
},
{
"from": "gpt",
"value": "module M... | ruby | chosen |
[
{
"from": "system",
"value": "Replace ENV.clone mock with empty hash\n\nENV.clone only performs a shallow-copy of the ENV object. Which means that\n`mock_env.clear` wipes the real ENV object and affects other tests that run\nafter this.\n\nWe didn't notice it because this is currently the last test picked u... | ruby | chosen |
[
{
"from": "system",
"value": "Update build scripts for Emscripten 1.38.19\n"
},
{
"from": "human",
"value": "#!/usr/bin/false\n\nNAME = \"emscripten\"\nVERSION = \"1.38.11\"\nRELEASE = \"1\"\n\nFILES = [\n [\n \"https://github.com/kripken/emscripten/archive/#{VERSION}.tar.gz\",\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Delete excluded project files on remote\n\nWhile we weren't syncing files specified in the filter file, we were\nalso not deleting any old copies of these files if they already existed\non the remote. This could potentially have been bad if the log files\ngrew to exceptionally ... | ruby | chosen |
[
{
"from": "system",
"value": "Use explicit `Rails.logger` (as we're not inheriting from ActiveRecord)\n"
},
{
"from": "human",
"value": "require 'open-uri'\nrequire 'net-purge'\n\ndef quietly_try_to_open(url)\n begin \n result = open(url).read.strip\n rescue OpenURI::HTTPError, Sock... | ruby | chosen |
[
{
"from": "system",
"value": "Allow passing query options to snapshots endpoint.\n"
},
{
"from": "human",
"value": "module Fog\n module Volume\n class OpenStack\n class Real\n def list_snapshots(detailed=true)\n path = detailed ? 'snapshots/detail' : 'snapshots'\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Handle invalid JSON produced by scraper\n"
},
{
"from": "human",
"value": "require 'turbot_runner'\n\n# Flush output immediately\nSTDOUT.sync = true\nSTDERR.sync = true\n\nMAX_DRAFT_ROWS = 2000\n\nclass Handler < TurbotRunner::BaseHandler\n def initialize\n supe... | ruby | chosen |
[
{
"from": "system",
"value": "Add tvOS as a deployment target to the Podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"ComponentKit\"\n s.version = \"0.15\"\n s.summary = \"A React-inspired view framework for iOS\"\n s.homepage = \"https://componentkit.org\"\n s.a... | ruby | chosen |
[
{
"from": "system",
"value": "Allow bin directory to be symlinked.\n"
},
{
"from": "human",
"value": "require 'yaml'\nrequire 'fileutils'\nrequire 'open-uri'\n\nrequire_relative './dotties-core/adapters/core'\nrequire_relative './dotties-core/adapters/chain'\nrequire_relative './dotties-core/ada... | ruby | chosen |
[
{
"from": "system",
"value": "Use a working email address for me\n\nOtherwise technoweenie will get my spam."
},
{
"from": "human",
"value": "$: << \"lib\" and require \"scientist/version\"\n\nGem::Specification.new do |gem|\n gem.name = \"scientist\"\n gem.description = \"A Ruby li... | ruby | chosen |
[
{
"from": "system",
"value": "Add logging on module error\n"
},
{
"from": "human",
"value": "module What\n class Monitor\n # don't worry, this method name is ironic\n def go!\n # For now, use a hash as the centralized collection point for data. We\n # can't use a method on the m... | ruby | chosen |
[
{
"from": "system",
"value": "Load the engine if we are in Rails\n"
},
{
"from": "human",
"value": "require 'window_rails/version'\n\nif(defined?(Rails))\n require File.join(File.dirname(__FILE__), '..', 'init')\nend\n"
},
{
"from": "gpt",
"value": "require 'window_rails/version'\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Add MIT license to the gemspec."
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"nilify_blanks/version\"\n\nGem::Specification.new do |s|\n s.name = \"nilify_blanks\"\n s.version = Nil... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the --encoding spec to use an ASCII-compatible encoding\n\n* Patch based on @MSP-Greg fix in\n https://github.com/MSP-Greg/ruby/commit/91e8e2abab0576b5e04066a2d19962d241a3f080\n"
},
{
"from": "human",
"value": "require_relative '../spec_helper'\n\ndescribe 'The... | ruby | chosen |
[
{
"from": "system",
"value": "Add bundler as a development dependency\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n$LOAD_PATH.push File.expand_path(\"../lib\", __FILE__)\nrequire \"simplecov/version\"\n\nGem::Specification.new do |gem|\n gem.name = \"simplecov\"\n gem.version ... | ruby | chosen |
[
{
"from": "system",
"value": "Configure platform to be iOS 5.0\n"
},
{
"from": "human",
"value": "#\n# Be sure to run `pod lib lint NAME.podspec' to ensure this is a\n# valid spec and remove all comments before submitting the spec.\n#\n# To learn more about a Podspec see http://guides.cocoapods.... | ruby | chosen |
[
{
"from": "system",
"value": "Add json ~> 2.0 dependency for conformance with RFC 7159\n"
},
{
"from": "human",
"value": "lib = File.expand_path('lib', __dir__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'rspec/composable_json_matchers/version'\n\nGem::Specification.new do... | ruby | chosen |
[
{
"from": "system",
"value": "Fix spec for underscore support for feed slugs\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe Stream::Feed do\n it \"should validate feed_id\" do\n feed = Stream::Feed.new(nil, \"slug\", \"user_id\", \"\")\n end\n\n it \"should validate... | ruby | chosen |
[
{
"from": "human",
"value": "Create simple service which get all hanami contributors\n"
},
{
"from": "gpt",
"value": "require_relative '../../http_request'\n\nclass AllContributors\n API_URL = 'https://api.github.com/repos/hanami/%{project}/stats/contributors'.freeze\n\n def call\n contribu... | ruby | chosen |
[
{
"from": "system",
"value": "Replace deprecated render nothing: true\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nrequire 'rails_helper'\n\nRSpec.describe Course::Assessment::Controller do\n controller(Course::Assessment::Controller) do\n def index\n render nothing... | ruby | chosen |
[
{
"from": "system",
"value": "Add rspec-given and pry gems to dev list\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'parsedecision/version'\n\nGem::Specification.new do |spec|\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Switch to overriding the authorized_keys file if the file is missing or empty\n"
},
{
"from": "human",
"value": "user = node[:rolling_restart][:ssh][:user]\ngroup = node[:rolling_restart][:ssh][:group]\npublic_key = node[:rolling_restart][:ssh][:public_key]\n\nhome_... | ruby | chosen |
[
{
"from": "system",
"value": "Add another exception handling (even more frequent)\n"
},
{
"from": "human",
"value": "require 'mechanize'\n\n#Read recommendation info from metatags\nmodule MetaTagsParser\n def parse\n self.description, self.title, self.image = read_content_from_page('descript... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up indenting in new observer.\n"
},
{
"from": "human",
"value": "class MergeRequestObserver < ActiveRecord::Observer\n cattr_accessor :current_user\n\n def after_create(merge_request)\n if merge_request.assignee && merge_request.assignee != current_user\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix checksum in SpeedTao.app Cask\n"
},
{
"from": "human",
"value": "class Speedtao < Cask\n url 'http://www.speedtao.net/download/SpeedTao_Beta26.dmg'\n homepage 'http://www.speedtao.net/'\n version 'Beta26'\n sha256 'c8864775c92f2a92914cdba6b70d67998c484fa3f79... | ruby | chosen |
[
{
"from": "system",
"value": "Add short descriptions to Binding.\n"
},
{
"from": "human",
"value": "module Msgr\n # A single binding\n class Binding\n attr_reader :connection, :route, :subscription\n\n def initialize(connection, route)\n @connection = connection\n @route =... | ruby | chosen |
[
{
"from": "system",
"value": "Make empty schema error less strict\n\nThe empty schema error was being thrown whenever there were no properties in the\ntop level object. This changes the error to happen if there are no properties or\nitems (in the case that the response is an array as the top level object).\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix accidental line location swap of 'private'\n"
},
{
"from": "human",
"value": "module Quality\n module Flay\n def quality_flay\n private\n\n ratchet_quality_cmd('flay',\n args: \"-m 75 -t 99999 #{ruby_files}\",\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add integration test coverage for default suite\n\nNothing fancy, this serverspec test verifies:\n\n* GCC is installed and available.\n* The GNU flavor of Make is installed and available.\n"
},
{
"from": "gpt",
"value": "require 'serverspec'\nrequire 'pathname'\n\nin... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the index action from the presentations controller\n"
},
{
"from": "human",
"value": "class PresentationsController < AssetsController\n\n def show\n @presentation = @content\n render :layout => \"slide\"\n end\n def index\n @presentation = @conte... | ruby | chosen |
[
{
"from": "human",
"value": "Create a registration controller for customize devise permit parameters\n\n"
},
{
"from": "gpt",
"value": "class RegistrationsController < Devise::RegistrationsController\n\n private\n\n def sign_up_params\n params.require(:user).permit(:first_name, :ema... | ruby | chosen |
[
{
"from": "system",
"value": "Extend vagrant list command to print both All vms, and running vms\n"
},
{
"from": "human",
"value": "require \"vagrant-list/version\"\nrequire \"vagrant/vm_info\"\nrequire \"vagrant\"\nrequire \"pp\"\n\nmodule Vagrant\n module List\n class All < ::Vagrant::Comm... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused page from hashed storage QA scenario\n"
},
{
"from": "human",
"value": "module QA\n module Scenario\n module Gitlab\n module Admin\n class HashedStorage < Scenario::Template\n def perform(*traits)\n raise ArgumentErr... | ruby | chosen |
[
{
"from": "system",
"value": "Fix spec path to include Homebrew path\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe \"homebrew::formula\" do\n let(:facts) { default_test_facts }\n let(:title) { \"clojure\" }\n\n let(:tapdir) { \"#{facts[:homebrew_root]}/Library/Taps/bo... | ruby | chosen |
[
{
"from": "human",
"value": "Add tests for the ParamsEncoder\n"
},
{
"from": "gpt",
"value": "describe Mrkt::Faraday::ParamsEncoder do\n describe '.encode' do\n let(:params) do\n {\n string: 'foobar',\n number: 1,\n boolean: true,\n array: [1, 2, 3]\n }\... | ruby | chosen |
[
{
"from": "system",
"value": "Correct test fixtrue publisher name\n"
},
{
"from": "human",
"value": "require 'serverspec'\n\n# Required by serverspec under test-kitchen\nset :backend, :exec\n\n# See recipes/test_publisher\nfixtures = {\n :deleted => 'ms.omniti.com',\n :created => 'perl.omniti.... | ruby | chosen |
[
{
"from": "system",
"value": "Use doctoc to produce tables of contents\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |gem|\n gem.name = 'log-courier'\n gem.version = '0.10'\n gem.description = 'Log Courier library'\n gem.summary = 'Receiv... | ruby | chosen |
[
{
"from": "system",
"value": "Fix rspec dependency in gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib/', __FILE__)\n$:.unshift lib unless $:.include?(lib)\n\nrequire \"akephalos/version\"\n\nGem::Specification.new do |s|\n s.name = \"a... | ruby | chosen |
[
{
"from": "system",
"value": "Add test host to spec/dummy initializer\n"
},
{
"from": "human",
"value": "Dummy::Application.configure do\n # Settings specified here will take precedence over those in config/application.rb\n\n # In the development environment your application's code is reloaded... | ruby | chosen |
[
{
"from": "system",
"value": "Make has_image? less brittle (dont check entire path)\n"
},
{
"from": "human",
"value": "class UploadFiguresOverlay < CardOverlay\n def has_image? image_name\n has_selector? \"img[src$='#{image_name}']\"\n end\n\n def attach_figure\n session.execute_script ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow newer versions of http_parser until v1.0.0\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"em-websocket/version\"\n\nGem::Specification.new do |s|\n s.name = \"em-websocket\"\n s.... | ruby | chosen |
[
{
"from": "system",
"value": "Replace fancy-pants ansi codes with simple carriage-return (doh!)\n"
},
{
"from": "human",
"value": "require 'cucumber/formatter/pretty'\nmodule Formatter\n class SlowHandCuke < Cucumber::Formatter::Pretty\n def before_step( step )\n print_ansi_code 's' # ... | ruby | chosen |
[
{
"from": "system",
"value": "Use maruku instead of rdiscount for compatibility with JRuby and Rubinius in 1.9 mode\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nrequire File.expand_path('../lib/gems/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.add_development_dependency... | ruby | chosen |
[
{
"from": "system",
"value": "Add dependency and bump version\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nGem::Specification.new do |s|\n s.name = \"redic-cluster\"\n s.version = \"0.0.4\"\n s.summary = \"Redis Cluster support for Redic\"\n s.desc... | ruby | chosen |
[
{
"from": "system",
"value": "Add minitest so we work on all rubies.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'request_store/version'\n\nGem::Specification.new do |ge... | ruby | chosen |
[
{
"from": "system",
"value": "Add license to gemspec and update authors\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\n\nrequire \"mini_magick/version\"\n\nGem::Specification.new do |s|\n s.name = \"mini_magick\"\n s.version... | ruby | chosen |
[
{
"from": "system",
"value": "Set the :lock option to true.\n"
},
{
"from": "human",
"value": "require 'sinatra/base'\nrequire 'staticmatic'\n\nmodule Sinatra\n module DynamicMatic\n def self.registered(app)\n app.set :compile_on_start, true\n app.set :public, Proc.new {app.root &&... | ruby | chosen |
[
{
"from": "system",
"value": "Fix incorrect call to register shipping calculator\n"
},
{
"from": "human",
"value": "module SpreeTemando\n class Engine < ::Rails::Engine\n isolate_namespace SpreeTemando\n\n def self.activate\n Dir.glob(File.join(File.dirname(__FILE__), \"../../app/ove... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the spec to actually check the port\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "describe 'Squid server' do\n it 'is listening on port 3128' do\n expect(port(3128)).to be_listening\n end\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for adding strong_parameters globally\n"
},
{
"from": "human",
"value": "class MassAssignDisableTest < Test::Unit::TestCase\n include BrakemanTester::RescanTestHelper\n\n def mass_assign_disable content\n init = \"config/initializers/mass_assign.rb\"\n... | ruby | chosen |
[
{
"from": "system",
"value": "Support slashes in FakeCapture3 commands\n"
},
{
"from": "human",
"value": "require 'minitest/mock'\nrequire 'open3'\n\n# Open3::capture3 replacement that reads stdout, stderr and return\n# values from the filesystem\nclass FakeCapture3\n def initialize(basedir, en... | ruby | chosen |
[
{
"from": "system",
"value": "Check if simple_form and formtastic is defined\n"
},
{
"from": "human",
"value": "module AssetManager\n class Engine < ::Rails::Engine\n isolate_namespace AssetManager\n config.generators.template_engine :haml\n config.generators.integration_tool :rspec\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add check for mail_to vulnerability\n"
},
{
"from": "gpt",
"value": "require 'checks/base_check'\nrequire 'processors/lib/find_call'\n\n#Check for cross site scripting vulnerability in mail_to :encode => :javascript\n#with certain versions of Rails (< 2.3.11 or < 3.0... | ruby | chosen |
[
{
"from": "system",
"value": "Add Query Autocomplete API support\n"
},
{
"from": "human",
"value": "require 'httparty'\nrequire 'active_support/core_ext/hash/indifferent_access'\n\nmodule Google\n module Places\n class Client\n include HTTParty\n\n base_uri \"https://maps.googleapi... | ruby | chosen |
[
{
"from": "system",
"value": "Add comment on bad class structure.\n"
},
{
"from": "human",
"value": "module Hets\n module Prove\n class Evaluator\n attr_accessor :version, :path\n attr_accessor :ontology, :user\n attr_accessor :parser, :callback\n attr_accessor :now\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Set type for ajax request\n"
},
{
"from": "human",
"value": "require 'rails_javascript_helpers'\nmodule JsTreeRails\n module Viewers\n include RailsJavaScriptHelpers\n\n def jstree(dom_id, options={})\n (\"<div id=\\\"#{dom_id.sub(/^#/, '')}\\\" class=\\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix class name of Google Docs shortcode, and fix dimension handling\n"
},
{
"from": "human",
"value": "require 'shortcodes/handler'\n\nmodule Shortcodes\n class DocumentCloud < Handler\n\n def url\n url = shortcode.attributes.fetch('url')\n end\n\n de... | ruby | chosen |
[
{
"from": "system",
"value": "Use default settings for shards and replicas (5 shards)\n"
},
{
"from": "human",
"value": "namespace :spree_elasticsearch do\n desc \"Create Elasticsearch index.\"\n task :create_index => :environment do\n unless Elasticsearch::Model.client.indices.exists index... | ruby | chosen |
[
{
"from": "human",
"value": "Add rake task for cleaning up substitution data.\n\nIn prep for https://github.com/alphagov/publishing-api/pull/405,\nwe need to remove all unpublishings of type\n\"substitution\". This is due to some inconsistent\ndata where some draft content items where unpublished\nand thus... | ruby | chosen |
[
{
"from": "human",
"value": "Add a rake task for deleting old report links\n\nThis table has the potential to grow indefinitely, so we will configure\nthis task to run periodically so it remains a good size. It also always\nus to delete the links using Jenkins so we have better visibility on the\njob.\n"
... | ruby | chosen |
[
{
"from": "system",
"value": "Reduce threshold for recent travel advice\n\nThe current behaviour is that the travel advice must be at least an\nhour old before we start alerting on it.\n\n15 minutes is probably a more reasonable threshold. Users should have\nreceived emails within 15 minutes of the advice b... | ruby | chosen |
[
{
"from": "system",
"value": "Add header support for POST method as well\n"
},
{
"from": "human",
"value": "class Webrat::MechanizeAdapter\n # Replace the Webrat version of get with one that doesn't drop the\n # headers param. Headers can be set using Webrat::Session#header\n # (#header is av... | ruby | chosen |
[
{
"from": "system",
"value": "Check for presence of rb_check_io_byte_readable\n"
},
{
"from": "human",
"value": "=begin\n\n= Info\n\nbinyo - Fast binary IO for Ruby\n\nCopyright (C) 2012\nMartin Bosslet <martin.bosslet@googlemail.com>\nAll rights reserved.\n\n= License\nSee the file 'LICENSE' fo... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.