conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add common methods to adapter interface\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n# Copyright 2014 TIS Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\... | ruby | chosen |
[
{
"from": "system",
"value": "Use MyCustomHtmlFormatter for Rspec reports\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nmodule PcRailsCodeQuality\n # :nodoc:\n module Tests\n require 'simplecov'\n\n SimpleCov.start 'rails' do\n coverage_dir 'public/reports/simple... | ruby | chosen |
[
{
"from": "human",
"value": "Add first pass at a rules compiler to get a single field’s rules"
},
{
"from": "gpt",
"value": "module Formalist\n module Validation\n class FieldRulesCompiler\n IGNORED_PREDICATES = [:key?].freeze\n\n attr_reader :field_name\n\n def initialize(fie... | ruby | chosen |
[
{
"from": "system",
"value": "Make the success of the test depend on the success of the injection, just for grins.\n"
},
{
"from": "human",
"value": "\nclass SimpleService \n include TorqueBox::Injectors\n\n def initialize\n @webserver = mc('jboss.web:service=WebServer')\n end\n\n def sta... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Unable to find News article type error message\n"
},
{
"from": "human",
"value": "class Whitehall::Uploader::Finders::NewsArticleTypeFinder\n SPECIAL_CASES = {\n '' => NewsArticleType::ImportedAwaitingType\n }\n\n def self.find(slug, logger, line_number)\n... | ruby | chosen |
[
{
"from": "system",
"value": "Set up @search object and perform search\n"
},
{
"from": "human",
"value": "class QuestionsController < ApplicationController\n before_filter :authenticate_user!\n respond_to :html, :js, :json\n\n def index\n @questions = Question.page params[:page]\n end\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix person spec, use `first(15)` instead of `slice(0..14)`\n"
},
{
"from": "human",
"value": "require Rails.root.join('spec', 'shared_behaviors', 'stream')\n\ndescribe Stream::Person do\n describe \"shared behaviors\" do\n before do\n @stream = Stream::Pers... | ruby | chosen |
[
{
"from": "system",
"value": "Make YAML::ENGINE syck under ruby 1.9 to fix travis 1.9 build issue\n"
},
{
"from": "human",
"value": "# Copyright (c) 2010, Diaspora Inc. This file is\n# licensed under the Affero General Public License version 3 or later. See\n# the COPYRIGHT file.\n\nrequ... | ruby | chosen |
[
{
"from": "system",
"value": "Set Rails environment via RAILS_ENV instead RACK_ENV.\n\nThe former is more common.\n"
},
{
"from": "human",
"value": "# Default Puma config taken from Heroku, see:\n# https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server\n\nwor... | ruby | chosen |
[
{
"from": "system",
"value": "Remove deprecated puppet_module_install in favor of copy_module_to\n"
},
{
"from": "human",
"value": "require 'beaker-rspec/spec_helper'\nrequire 'beaker-rspec/helpers/serverspec'\n\nunless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no'\n # This wil... | ruby | chosen |
[
{
"from": "system",
"value": "[dependencies] Disable pry in Guard. Wake up every second.\n\nAdding no_interactions:true makes it so that guard goes to sleep\nimmediately.\n\nThis change introduces a thread that continually wakes up guard. If\nthere are changes, guard does the work, if not, it goes back to s... | ruby | chosen |
[
{
"from": "system",
"value": "Add docopt and parslet as dependencies.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'calvin/version'\n\nGem::Specification.new do |gem|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Document the filename attribute in ConfigurationFile.\n"
},
{
"from": "human",
"value": "# lib/frecon/configuration_file.rb\n#\n# Copyright (C) 2015 Christopher Cooper, Sam Craig, Tiger Huang, Vincent Mai, Sam Mercier, and Kristofer Rye\n#\n# This file is part of FR... | ruby | chosen |
[
{
"from": "system",
"value": "Add event aggregate_id and sequence_number to spec"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Sequent::Core::SerializesCommand do\n\n class RecordMock\n include Sequent::Core::SerializesCommand\n attr_accessor :aggregate_id,\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add some directories to the final package\n"
},
{
"from": "human",
"value": "require 'json'\nrequire_relative 'functions'\n\n# check program arguments\nunless ARGV.length >= 1\n puts \"Error: this program requires the path of a json file as argument\"\n exit\nend\... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused to_s method for now\n"
},
{
"from": "human",
"value": "module Hector\n class Request\n attr_reader :line, :command, :args, :text\n\n def initialize(line)\n @line = line\n parse\n end\n\n def to_s\n line\n end\n\n def e... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec of validation on Comment\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Comment do\n\n describe \"mass assignment\" do\n\n context \"allowed\" do\n [:body, :proposal_id].each do |attr|\n it { should allow_mass_assignmen... | ruby | chosen |
[
{
"from": "system",
"value": "Handle exit better - could extend by waiting for existing jobs to end\n"
},
{
"from": "human",
"value": "class Juggler\n class Runner\n def initialize(method, concurrency, strategy)\n @strategy = strategy\n @concurrency = concurrency\n @queue = me... | ruby | chosen |
[
{
"from": "system",
"value": "Use a quieter Poltergeist driver\n\nThis should eliminate the debug warnings regarding unrecognized viewport\narguments and the like\n"
},
{
"from": "human",
"value": "# Spec helper specifically for Capybara features\nrequire 'spec_helper'\nrequire 'capybara/rails'\... | ruby | chosen |
[
{
"from": "system",
"value": "Set all current users to confirmed\n"
},
{
"from": "human",
"value": "class AddConfirmableToUser < ActiveRecord::Migration\n def up\n add_column :spree_users, :confirmation_token, :string\n add_column :spree_users, :confirmed_at, :datetime\n add_column :sp... | ruby | chosen |
[
{
"from": "system",
"value": "Add a spec to ensure that only one private method is added by memoization\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire File.expand_path('../../fixtures/classes', __FILE__)\n\nshared_examples_for 'memoizes method' do\n it 'memoizes the instance ... | ruby | chosen |
[
{
"from": "system",
"value": "Adjust discrepancies in RSpec results to coincide with Travis.\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe GoogleGeocodingService do\n\n let(:test_service) { GoogleGeocodingService.new({sensor: true}) }\n\n it 'initializes with attr... | ruby | chosen |
[
{
"from": "system",
"value": "Sort playings by `inst` in the response of show action\n"
},
{
"from": "human",
"value": "json.cache! @song do\n json.extract! @song,\n :id, :name, :artist, :order, :time, :status, :youtube_id, :comment\n json.live @song.live, partial: 'lives/live',... | ruby | chosen |
[
{
"from": "system",
"value": "Add ruby 2.2.1 to the available binaries list\n\nSigned-off-by: Jeroen van Baarsen <2e488d5cebaf6d2832884be70e328933bd4c80ab@gmail.com>\n"
},
{
"from": "human",
"value": "default[\"rails\"][\"applications_root\"] = \"/u/apps\"\ndefault[\"rbenv\"][\"binaries_url\"] =... | ruby | chosen |
[
{
"from": "system",
"value": "Support ubuntu 16.04 and control group add or not\n"
},
{
"from": "human",
"value": "apt_repository \"add-docker-repository\" do\n uri \"https://apt.dockerproject.org/repo\"\n distribution \"ubuntu-trusty\"\n components [\"main\"]\n keyserver 'hkp://p80.pool.sks... | ruby | chosen |
[
{
"from": "system",
"value": "Use https to get the cloudflare gpg key\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "#\n# Cookbook:: apache2\n# Recipe:: mod_cloudflare\n#\n# Copyright:: 2008-2017, Chef Software, Inc.\n#\n# Licens... | ruby | chosen |
[
{
"from": "system",
"value": "Enable the stapler for all JS and CSS assets"
},
{
"from": "human",
"value": "#--\n# Copyright (c) 2009 Michael Rykov\n#++\n\nmodule Stapler\n module Helper\n def self.included(base)\n base.send :alias_method_chain, :write_asset_file_contents, :compressor\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add Page Class and items method\n"
},
{
"from": "human",
"value": "require \"youtube/search/version\"\nrequire \"httparty\"\n\nmodule YouTube\n class Search\n def initialize(search_word)\n @search_word = search_word\n end\n\n def response(page_token='... | ruby | chosen |
[
{
"from": "system",
"value": "Add password_confirmation to prevent Devise leaking pasword_confirmation to log file\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n\n# Configure sensitive parameters which will be filtered from the log file.\nRails.a... | ruby | chosen |
[
{
"from": "system",
"value": "Add event_wine assignment correctness test\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe EventWinesController do\n\tdef stub_current_user user\n ApplicationController.any_instance.stub(:current_user) { user }\n end\n\n let(:user) {User.c... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a broken user spec"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe StatRaptor::Client::Users do\n context \"#create\", :vcr do\n it \"returns the user json on success\" do\n client = StatRaptor::Client.new\n user = client.create_... | ruby | chosen |
[
{
"from": "system",
"value": "Add beginning of test for valid name.\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe User, type: :model do\n it \"has a valid name\"\n xit \"is invalid without a name\"\n xit \"has a valid email\"\n xit \"is invalid without an email\... | ruby | chosen |
[
{
"from": "system",
"value": "Reset the state of StubENV's @env_already_stubbed after each spec run\n\nIn certain combination of tests, @env_already_stubbed could be set\nto `true` even though it never ran for that specific test.\n"
},
{
"from": "human",
"value": "module StubENV\n def stub_env(... | ruby | chosen |
[
{
"from": "human",
"value": "Copy spec from old branch\n"
},
{
"from": "gpt",
"value": "# -*- coding: utf-8 -*-\nrequire File.join(File.dirname(__FILE__), 'spec_helper')\n\ndescribe SchemaComments::SchemaComment do\n let(:ignored_tables){ %w(schema_migrations) }\n\n before(:each) do\n Schem... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo in assignment collection spec\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Nacre::Order::AssignmentCollection do\n let(:params) do\n {\n current: {\n channel_id: 4,\n project_id: 0,\n lead_source_id: 3,\... | ruby | chosen |
[
{
"from": "system",
"value": "Test blocking pop distribution errors\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\n\nrequire \"helper\"\nrequire \"lint/blocking_commands\"\n\nclass TestDistributedBlockingCommands < Test::Unit::TestCase\n\n include Helper::Distributed\n include Lint::Blo... | ruby | chosen |
[
{
"from": "system",
"value": "Fix intermittent MongoMapper test suite failures\n"
},
{
"from": "human",
"value": "require \"mongo_mapper\"\n\nMongoMapper.connection = Mongo::Connection.new\nMongoMapper.database = \"periscope_test\"\n"
},
{
"from": "gpt",
"value": "# We need to requir... | ruby | chosen |
[
{
"from": "system",
"value": "Add resource_params with updated API\n"
},
{
"from": "human",
"value": "module Admin\n class EducatorsController < Admin::ApplicationController\n # To customize the behavior of this controller,\n # simply overwrite any of the RESTful actions.\n\n def index... | ruby | chosen |
[
{
"from": "system",
"value": "Add run_test method to test_controller\n"
},
{
"from": "human",
"value": "require_dependency \"conductor/application_controller\"\nrequire 'pty'\n\nmodule Conductor\n class TestsController < ApplicationController\n \tdef show\n \t\t@tests = File.read(\"tmp/test.... | ruby | chosen |
[
{
"from": "system",
"value": "Fix require list; not sure how this worked before\n"
},
{
"from": "human",
"value": "require 'test/unit'\nrequire File.dirname(__FILE__) + '../../lib/active_record/connection_adapters/mysql_adapter'\nrequire 'jdbc_common'\n\nclass Project < ActiveRecord::Migration\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix checking if current payload has the right user\n"
},
{
"from": "human",
"value": "module Panadoura\n class RequestAuthenticator\n def initialize(request)\n @request = request\n end\n\n def call\n valid_header? && valid_payload?\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make the test rely on the environment\n\nSigned-off-by: Stuart Preston <1c8c08db85a36cc69d975124539be839dea91342@chef.io>\n"
},
{
"from": "human",
"value": "describe command('chef-client -v') do\n its('stdout') { should match '^Chef: 13.6.0' }\nend\n\ndescribe comm... | ruby | chosen |
[
{
"from": "human",
"value": "Add cask for time machine editor.\n"
},
{
"from": "gpt",
"value": "class TimeMachineEditor < Cask\n url 'http://timesoftware.free.fr/timemachineeditor/TimeMachineEditor.zip'\n homepage 'http://timesoftware.free.fr/timemachineeditor/'\n version 'latest'\nend\n\n"
... | ruby | chosen |
[
{
"from": "system",
"value": "Update Transporter Desktop client to 3.1.17\n\nThis commit updates the version to 3.1.17 and the SHA for the\ndownloaded file.\n"
},
{
"from": "human",
"value": "cask :v1 => 'transporter-desktop' do\n version '3.1.15_18289'\n sha256 'fecf3b1944832261900237537962a4... | ruby | chosen |
[
{
"from": "system",
"value": "Fix client ability to upload to Hosted Chef\n"
},
{
"from": "human",
"value": "require 'chef_fs/data_handler/data_handler_base'\nrequire 'chef/api_client'\n\nmodule ChefFS\n module DataHandler\n class ClientDataHandler < DataHandlerBase\n def normalize(clie... | ruby | chosen |
[
{
"from": "system",
"value": "Use existing published scope for consistency.\n"
},
{
"from": "human",
"value": "class Admin::OrganisationsController < Admin::BaseController\n before_filter :load_organisation, only: [:edit, :update]\n before_filter :load_news_articles, only: [:edit, :update]\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Create tag list from all metric rollups of consumption period\n\nPreviously, tag list was determined from first metric rollup\nof the period but it is not enough to use tag list only from\nfirst rollup and tag list can be changed during period.\n\nNow we are using tag list from... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up addresses show rabl\n"
},
{
"from": "human",
"value": "object @address\nattributes :id, :firstname, :lastname, :address1, :address2,\n :city, :zipcode, :phone,\n :company, :alternative_phone, :country_id, :state_id,\n :state_na... | ruby | chosen |
[
{
"from": "system",
"value": "Update spec for change orders rel\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'rspec_api_documentation/dsl'\n\nresource \"Root\" do\n header \"Accept\", \"application/hal+json\"\n\n get \"/\" do\n example \"Getting the root resource\" do\n... | ruby | chosen |
[
{
"from": "human",
"value": "Add specs for Enum class\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\nrequire 'email'\n\ndescribe Enum do\n\n let(:enum) { Enum.new(:jake, :finn, :princess_bubblegum, :peppermint_butler) }\n\n context \".[]\" do\n it \"allows us to look up a number by... | ruby | chosen |
[
{
"from": "system",
"value": "Revert dependency on ServerSpec 2\n"
},
{
"from": "human",
"value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'vagrant-serverspec/version'\n\nGem::Specification.new do |gem|\n gem.name = '... | ruby | chosen |
[
{
"from": "system",
"value": "Convert symbols to strings when searching\n"
},
{
"from": "human",
"value": "module Ventana\n module EditableContentHelper\n def editable_content_for(key, options={})\n options[:type] ||= :text\n @key = key\n @editable_content =\n Ventana::... | ruby | chosen |
[
{
"from": "system",
"value": "Update rubocop-govuk requirement from = 4.5.0 to = 4.6.0\n\nUpdates the requirements on [rubocop-govuk](https://github.com/alphagov/rubocop-govuk) to permit the latest version.\n- [Release notes](https://github.com/alphagov/rubocop-govuk/releases)\n- [Changelog](https://github.... | ruby | chosen |
[
{
"from": "system",
"value": "Add some methods to FullTextSearch::SearcherRecord\n"
},
{
"from": "human",
"value": "module FullTextSearch\n class SearcherRecord < ActiveRecord::Base\n end\nend\n"
},
{
"from": "gpt",
"value": "module FullTextSearch\n class SearcherRecord < ActiveRe... | ruby | chosen |
[
{
"from": "system",
"value": "Remove constant that isn't used elsewhere\n\nIt's shorter and better encapsulated.\n"
},
{
"from": "human",
"value": "require 'peoplefinder'\n\nmodule Peoplefinder::Concerns::Completion\n extend ActiveSupport::Concern\n\n included do\n COMPLETION_SCORE_FIELDS =... | ruby | chosen |
[
{
"from": "system",
"value": "Fix client ability to upload to Hosted Chef\n"
},
{
"from": "human",
"value": "require 'chef/chef_fs/data_handler/data_handler_base'\nrequire 'chef/api_client'\n\nclass Chef\n module ChefFS\n module DataHandler\n class ClientDataHandler < DataHandlerBase\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change pod version -> 1.3\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'Framer'\n s.version = '1.1.3'\n s.summary = 'Comfortable syntax for working with frames'\n s.description = <<-DESC\nFramer is a good ... | ruby | chosen |
[
{
"from": "system",
"value": "Prepend all of the create_table classes with Beachy::Model\n"
},
{
"from": "human",
"value": "require 'yard'\nrequire 'active_support/inflector'\n\nmodule YARD::Handlers::Ruby::ActiveRecord::Fields\n class CreateTableHandler < YARD::Handlers::Ruby::MethodHandler\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a big bug introduced in my recent refactor.\n\nI had misread the previous implementation, and it seemed sensible to tie constraint creation to model migration. \n\nBut no, there's a reason that constraints are all removed before migrating down, and all added after migrating... | ruby | chosen |
[
{
"from": "human",
"value": "Add extensions to custom pages in middleman-blog\n\nThe middleman-blog extension allows you to configure custom collections\nof pages to allow you to generate pages for arbitrary groups of blog\narticles. The custom collections are based on keys in the the frontmatter.\nFor exa... | ruby | chosen |
[
{
"from": "system",
"value": "Return one order for sandbox calls\n"
},
{
"from": "human",
"value": "module Beslist\n module API\n\n class Client\n\n attr_accessor :connection\n\n def initialize(options = {})\n @connection = Beslist::API::Connection.new( :client_id => options... | ruby | chosen |
[
{
"from": "system",
"value": "Fix validation pattern to handle comma separated multiple parents\n"
},
{
"from": "human",
"value": "require File.join(File.expand_path(File.dirname(__FILE__)), 'ancestry/class_methods')\nrequire File.join(File.expand_path(File.dirname(__FILE__)), 'ancestry/instance... | ruby | chosen |
[
{
"from": "system",
"value": "Fix: Support attribute name for PBXReferenceProxy\n"
},
{
"from": "human",
"value": "module Xcodeproj\n class Project\n module Object\n # Apparently a proxy for a reference object which might belong another\n # project contained in the same workspace o... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused validation fom find_set\n"
},
{
"from": "human",
"value": "require 'typhoeus'\n\nrequire 'gfw_api_client/version'\nrequire 'gfw_api_client/data_set'\n\nmodule GfwApiClient\n\n def self.find_set(options)\n\n table_space = options['table_space'] if o... | ruby | chosen |
[
{
"from": "system",
"value": "Load correct extension for rails version\n"
},
{
"from": "human",
"value": "require \"hestia\"\n\nmodule Hestia\n class Railtie < ::Rails::Railtie\n # Hooks into ActionDispatch::Session::SignedCookieJar to allow rotating secret tokens in signed cookies.\n #\n... | ruby | chosen |
[
{
"from": "system",
"value": "Modify step definition so it can serve for multiple scenarios\n"
},
{
"from": "human",
"value": "When /^I visit the page for the talk$/ do \n visit talk_url(@talk)\nend\n\nThen /^I should see the talk's (\\S+)$/ do |attribute|\n expect(page).to have_content @talk.... | ruby | chosen |
[
{
"from": "system",
"value": "Improve 'some stats exist' step to handle 2 different steps equally\n"
},
{
"from": "human",
"value": "Given(/^that no stats exist$/) do\nend\n\nGiven(/^that some stats exist$/) do\n @stats_csv = \"aardsda01,2009,AL,SEA,73,0,0,0,0,0,0,0,0,0\"\nend\n\nWhen(/^I displ... | ruby | chosen |
[
{
"from": "system",
"value": "Use proper comparison for ruby version\n"
},
{
"from": "human",
"value": "# Disable XML parameter parsing, see:\n# http://www.insinuator.net/2013/01/rails-yaml/\nActionDispatch::ParamsParser::DEFAULT_PARSERS.delete(Mime::XML)\n\n# Patches for Ruby 2.4\nif RUBY_VERSI... | ruby | chosen |
[
{
"from": "system",
"value": "Put the uploaded files in a CDN\n"
},
{
"from": "human",
"value": "CarrierWave.configure do |config|\n if Concerns::EnvironmentBasedUploader.use_fog?\n config.fog_provider = 'fog/aws'\n config.fog_credentials = {\n provider: 'AWS',\n aws_access_key_... | ruby | chosen |
[
{
"from": "system",
"value": "Transform conditional modifier to avoid nil check.\n"
},
{
"from": "human",
"value": "require \"yaml\"\n\nmodule Nutrella\n #\n # Provides a cache of the most recently used items.\n #\n class Cache\n attr_reader :capacity, :path\n\n def initialize(path, ca... | ruby | chosen |
[
{
"from": "system",
"value": "Fix issue with Response wrongly not succeeding\n\nSomtimes the eBay API returns 'ack' instead of 'Ack'.\n\nThanks, eBay!\n"
},
{
"from": "human",
"value": "module Rebay\n class Response\n attr_accessor :response\n attr_accessor :results\n \n def initial... | ruby | chosen |
[
{
"from": "system",
"value": "Fix incorrect load path in Resque rake task\n"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'\nrequire 'resque/tasks'\n"
},
{
"from": "gpt",
"value": "$LOAD_PATH.unshift File.dirname(__FILE__) + '/../../lib'\nrequir... | ruby | chosen |
[
{
"from": "system",
"value": "Send API key as param\n"
},
{
"from": "human",
"value": "require 'visdiff/config'\n\nmodule Visdiff\n class Client\n attr_reader :config\n\n def initialize(config=Visdiff.config)\n @config = config\n end\n\n def submit_revision revision\n resp... | ruby | chosen |
[
{
"from": "system",
"value": "Rename tests to reflect helper being tested\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass WickedPdfHelperTest < ActionView::TestCase\n test 'should return the same as stylesheet_link_tag when passed a full path' do\n assert_equal wicked_pdf_s... | ruby | chosen |
[
{
"from": "system",
"value": "Add authentication via parameter \"apikey\"\n\nWhen using the API via a website that is protected with HTTP BASIC auth\nin Apache or Nginx, we were running into issues. In those scenarios we\ncan now pass the key as a parameter.\n"
},
{
"from": "human",
"value": "re... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the shebang as /bin is a symlink for /usr/bin\n"
},
{
"from": "human",
"value": "#!/bin/env ruby\n# description: ManageIQ watchdog application loop\n#\n\nrequire 'bundler'\nBundler.setup\n\nrequire_relative '../../../lib/evm_watchdog'\n\nEvmWatchdog.kill_other_w... | ruby | chosen |
[
{
"from": "system",
"value": "Fix soure and private header declares in podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |spec|\n spec.name = \"MEReactiveFoundation\"\n spec.version = \"1.1.0\"\n spec.authors = {\"William Towe\" => \"willbur1984@gmail.com\"}\n spec.license = {:type... | ruby | chosen |
[
{
"from": "system",
"value": "Update dev logging config to support unicorn"
},
{
"from": "human",
"value": "Rails.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 reloa... | ruby | chosen |
[
{
"from": "system",
"value": "Correct problem with participant recent activity\n"
},
{
"from": "human",
"value": "Rails.application.config.to_prepare do\n\n # Monkey patching events controller for pagination and recent activity\n MwebEvents::EventsController.class_eval do\n before_filter(:o... | ruby | chosen |
[
{
"from": "system",
"value": "Use meta for dispatching instead of case..when\n"
},
{
"from": "human",
"value": "require 'json'\nrequire 'time'\n\nclass Caskbot::Hookins::Github\n class << self\n def process(event_type, payload)\n if event_type == 'push'\n %w[created_at pushed_at]... | ruby | chosen |
[
{
"from": "system",
"value": "Change the migration file for the postgresql bug.\n"
},
{
"from": "human",
"value": "class TasksStatusType < ActiveRecord::Migration[5.0]\n def change\n change_column :tasks, :status, \"integer USING CAST(status AS integer)\"\n end\nend\n"
},
{
"from": ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow nested params on analytics\n"
},
{
"from": "human",
"value": "module V1\n class AnalyticsController < ApplicationController\n SEGMENT_WRITE_KEY = Rails.application.secrets.segment_write_key\n\n def identify\n segment(:identify, %w(user_id traits))\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix index method in translations controller and add chunk_id in translation_params\n"
},
{
"from": "human",
"value": "class Api::TranslationsController < Api::ApiController\n before_action :set_translation, only: [:show, :update, :destroy]\n\n def index\n @tran... | ruby | chosen |
[
{
"from": "system",
"value": "Use ant to build robot jar\n"
},
{
"from": "human",
"value": "#!/usr/bin/ruby\nrequire 'fileutils'\n\nhas_jar = File.exists?(ARGV[0])\nabort \"Error: Robot code jar doesn't exist at #{ARGV[0]}\" unless has_jar\n\ntmp_dir = Dir.pwd + \"/tmp\"\n`rm -rf #{tmp_dir}`\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Bump version and date, pushed to rubygems\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'capistrano-deploytags'\n s.license = 'BSD-2-Clause'\n s.version = '1.0.4'\n s.date = '2015-10-18'\n s.summary = 'Add... | ruby | chosen |
[
{
"from": "system",
"value": "Fix rails 5.2 deprecation message\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n#\n# This file contains migration options to ease your Rails 5.0 upgrade.\n#\n# Once upgraded flip defaults one by one to migrate to the... | ruby | chosen |
[
{
"from": "human",
"value": "Create admin role for catarse users with admin true using the API\n"
},
{
"from": "gpt",
"value": "class CreateAdminRole < ActiveRecord::Migration\n def up\n execute <<-SQL\n CREATE ROLE admin NOLOGIN;\n -- This script assumes a role postgrest and a role an... | ruby | chosen |
[
{
"from": "human",
"value": "Test data helper for DtoCollections saving specs\n\nTest data helper for DtoCollections saving specs\n"
},
{
"from": "gpt",
"value": "module SpecParsedData\n def vm_data(i, data = {})\n {\n :type => ManageIQ::Providers::CloudManager::Vm.name,\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec because of README update\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"ALRT\"\n s.version = \"1.3.1\"\n s.summary = \"ALRT is an easy-to-create UIAlertController framework.\"\n s.description = <<-DESC\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add b/w options. Improve output format\n"
},
{
"from": "human",
"value": "module A11y\n module Color\n module Matrix\n class CLI < Thor\n desc \"check\", \"check list of colors\"\n def check(*c)\n colors = Set.new c\n colors.... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused service registry organisation_slug attribute\n"
},
{
"from": "human",
"value": "class OrganisationalSectionServiceRegistry < AbstractSectionServiceRegistry\n def initialize(organisation_slug:)\n @organisation_slug = organisation_slug\n end\n\n at... | ruby | chosen |
[
{
"from": "system",
"value": "Add FreeBSD support to CPUCounter\n"
},
{
"from": "human",
"value": "require 'rbconfig'\n\nmodule Celluloid\n module CPUCounter\n case RbConfig::CONFIG['host_os'][/^[A-Za-z]+/]\n when 'darwin'\n @cores = Integer(`/usr/sbin/sysctl hw.ncpu`[/\\d+/])\n w... | ruby | chosen |
[
{
"from": "human",
"value": "Add the frozen string comment and sane defaults\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nmodule Dimples\n module Configuration\n def self.defaults\n {\n source_path: Dir.pwd,\n destination_path: File.join(Dir.pwd, 'site... | ruby | chosen |
[
{
"from": "system",
"value": "Rename parmas => values in Result\n"
},
{
"from": "human",
"value": "require 'dry/validation/constants'\n\nmodule Dry\n module Validation\n class Result\n def self.new(params, errors = EMPTY_HASH.dup)\n result = super\n yield(result) if block_... | ruby | chosen |
[
{
"from": "system",
"value": "Add rdoc comments for the asset manager adapter\n"
},
{
"from": "human",
"value": "require_relative 'base'\nrequire_relative 'exceptions'\n\nclass GdsApi::AssetManager < GdsApi::Base\n include GdsApi::ExceptionHandling\n\n def create_asset(asset)\n post_multipa... | ruby | chosen |
[
{
"from": "system",
"value": "Fix line numbers in error stacks\n"
},
{
"from": "human",
"value": "module HashBuilder\n # Renders templates with '.json_builder' extension.\n #\n # If the template is a normal view, it will render a JSON string.\n # If the template however is a partial, it rend... | ruby | chosen |
[
{
"from": "system",
"value": "Fix extracting content from vat-payment-deadlines\n\nThis adds support for the `to_s` method in the MethodMissingObject to\naccept an argument. An argument is sometimes passed to `to_s` to specify\nthe format of the string in the view templates.\n"
},
{
"from": "human",... | ruby | chosen |
[
{
"from": "system",
"value": "Add extra assertions about how the link will open\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nfeature 'Browse artifact', :js do\n let(:project) { create(:project, :public) }\n let(:pipeline) { create(:ci_empty_pipeline, project: project) }\n let(:... | ruby | chosen |
[
{
"from": "system",
"value": "Update sports league feature spec for new date format\n"
},
{
"from": "human",
"value": "require \"rails_helper\"\n\nfeature \"user views sports leagues\" do\n scenario \"and sees relevant details on the page\" do\n nfl = create(:sports_league)\n \n visit ... | ruby | chosen |
[
{
"from": "system",
"value": "Add lib dir to $LOAD_PATH\n"
},
{
"from": "human",
"value": "require 'action_controller/railtie'\nrequire 'action_view/railtie'\n\nrequire 'rexception'\n\nmodule Dummy\n class Application < Rails::Application\n config.secret_token = 'abcdefghijklmnopqrstuvwxyz01... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.