conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Fix error uninitialized constant DNSimple::Client (NameError)"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'bundler/setup'\nrequire 'aruba/cucumber'\n\nBefore do\n @aruba_timeout_seconds = 30\n ENV['DNSIMPLE_CONFIG'] = '~/.dnsimple.test'\nend\n\nAf... | ruby | chosen |
[
{
"from": "system",
"value": "Add methods to the Issue decorator to figure out icon paths.\n"
},
{
"from": "human",
"value": "class IssueDecorator < ApplicationDecorator\n decorates :issue\n\n def map\n h.render partial: \"map\", locals: {issue: issue}\n end\n\n def description\n h.sim... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary args from json_for.\n"
},
{
"from": "human",
"value": "module ApplicationHelper\n def json_for(collection, serializer, options = {})\n collection.map do |record|\n record.serializable_hash\n end\n collection.to_json\n end\nend\n"
... | ruby | chosen |
[
{
"from": "system",
"value": "Make intention of label generation clearer\n\nif there are multiple matches wrap the list of them in braces to make it look more like a\nmathematical set.\n"
},
{
"from": "human",
"value": "module SmartAnswer\n module Predicate\n class VariableMatches < Base\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Support Railsy ERB <%= %> interpolations in config file\n"
},
{
"from": "human",
"value": "module CriticalPathCss\n class Configuration\n CONFIGURATION_FILENAME = 'critical_path_css.yml'\n\n def initialize\n @configurations = YAML.load_file(configuration... | ruby | chosen |
[
{
"from": "system",
"value": "Remove end-to-end test, because it requires a running Kafka\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'poseidon'\nrequire 'json'\n\nRSpec.describe Avro2Kafka do\n describe '#publish' do\n let(:options) do\n {\n broker: 'localh... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for SELinux being disabled\n"
},
{
"from": "human",
"value": "require_relative 'spec_helper'\n\ndescribe 'box' do\n it 'should have a root user' do\n expect(user 'root').to exist\n end\n\n it 'should have a vagrant user' do\n expect(user 'vagrant')... | ruby | chosen |
[
{
"from": "system",
"value": "Fix `url` stanza comment for Mjolnir.\n"
},
{
"from": "human",
"value": "cask 'mjolnir' do\n version '0.4.3'\n sha256 '7f7a9579427f258a34663abed46845c81c35f676f63b2ae1acef2a7729745572'\n\n url \"https://github.com/sdegutis/mjolnir/releases/download/#{version}/Mjo... | ruby | chosen |
[
{
"from": "system",
"value": "Update Trailer to version 1.3.5\n\nThis commit updates the version and sha256 stanzas\n"
},
{
"from": "human",
"value": "cask :v1 => 'trailer' do\n version '1.3.4'\n sha256 '3daf054656f635a1ec17eb84fac56867da0511b206c7b6a4b4f80562f4fa1f4b'\n\n url \"http://ptsoch... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Event::Cloner spec for daylight savings transition days\n\nInstead of using an offset from midnight, compare the date and wall \nclock time of the cloned event directly. This better captures the\nintended cloning behavior and will work when run on DST transition days.\n\nFi... | ruby | chosen |
[
{
"from": "system",
"value": "Add presence validations and email format validation\n"
},
{
"from": "human",
"value": "class User < ApplicationRecord\n # Include default devise modules. Others available are:\n # :confirmable, :lockable, :timeoutable and :omniauthable\n devise :database_authent... | ruby | chosen |
[
{
"from": "system",
"value": "Order messages by id DESC\n"
},
{
"from": "human",
"value": "class User < ActiveRecord::Base\n acts_as_token_authenticatable\n\n devise :database_authenticatable, :registerable,\n :recoverable, :rememberable, :trackable, :validatable\n\n has_many :sent_me... | ruby | chosen |
[
{
"from": "system",
"value": "Use after_create callback for creating tokens\n"
},
{
"from": "human",
"value": "class User < ActiveRecord::Base\n devise :omniauthable, :api_token_authenticatable\n\n has_many :tokens\n\n after_save :create_a_token\n\n def self.find_for_github_oauth(user_hash)\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix coveralls ruby version check\n"
},
{
"from": "human",
"value": "if ENV['TRAVIS'] && RUBY_VERSION == '2.1.2'\n require 'coveralls'\n Coveralls.wear!\nend\n\nrequire 'minitest/autorun'\nrequire 'mocha/mini_test'\nrequire 'active_support'\nrequire 'active_record'... | ruby | chosen |
[
{
"from": "system",
"value": "Add warning when running the test suite\n"
},
{
"from": "human",
"value": "ENV['RAILS_ENV'] ||= 'test'\nrequire File.expand_path('../../config/environment', __FILE__)\nrequire 'rails/test_help'\nrequire 'mocha/mini_test'\nrequire 'pry'\n\nDir[Rails.root.join(\"test/... | ruby | chosen |
[
{
"from": "system",
"value": "Use pry for debugging in tests\n"
},
{
"from": "human",
"value": "require 'coveralls'\nCoveralls.wear!\n# Configure Rails Environment\nENV[\"RAILS_ENV\"] = \"test\"\nrequire File.expand_path(\"../dummy/config/environment.rb\", __FILE__)\nrequire \"rails/test_help\"... | ruby | chosen |
[
{
"from": "system",
"value": "Make tests work with latest Minitest\n"
},
{
"from": "human",
"value": "require 'test/unit'\nrequire 'rubygems'\nrequire 'logger'\nrequire 'active_record'\nrequire 'sortifiable'\nrequire 'support/migration'\n\nif RUBY_VERSION < '1.9'\n $KCODE = 'UTF8'\nend\n\nActiv... | ruby | chosen |
[
{
"from": "system",
"value": "Make dummy app tests run properly\n"
},
{
"from": "human",
"value": "# Configure Rails Environment\nENV[\"RAILS_ENV\"] = \"test\"\n\nrequire File.expand_path(\"../dummy/config/environment.rb\", __FILE__)\nrequire \"rails/test_help\"\n\nRails.backtrace_cleaner.remov... | ruby | chosen |
[
{
"from": "system",
"value": "Create the tmp directory if it does not exist.\n\nOn a fresh git checkout the 'tmp' directory used for storing test output\nimages does not exist. This adds a line to the test_helper to create the\ndirectory if necessary.\n"
},
{
"from": "human",
"value": "# :stopdo... | ruby | chosen |
[
{
"from": "system",
"value": "Set the version number to 0.3.0.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'Folklore'\n s.version = '0.2.2'\n s.license = 'MIT'\n s.summary = 'League of Legends chat service library for iOS and OS X.'\n s.homepage = 'https://gith... | ruby | chosen |
[
{
"from": "system",
"value": "Disable sysctl tuning on openvz systems\n"
},
{
"from": "human",
"value": "#\n# Cookbook:: sysctl\n# Recipe:: default\n#\n# Copyright:: 2010, Tom Hughes\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in co... | ruby | chosen |
[
{
"from": "system",
"value": "Update the brew formula to 0.5.0\n\nUpdate the brew formula to 0.5.0"
},
{
"from": "human",
"value": "class Skaffold < Formula\n desc \"A tool that facilitates continuous development for Kubernetes applications.\"\n url \"https://github.com/GoogleContainerTools/sk... | ruby | chosen |
[
{
"from": "system",
"value": "Update Podspec for version 2.0.1\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"Popsicle\"\n s.version = \"2.0.0\"\n s.summary = \"Delightful, extensible Swift value interpolation framework\"\n s... | ruby | chosen |
[
{
"from": "system",
"value": "[Podspec] Fix the git source link in the podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"react-native-video\"\n s.version = \"0.7.1\"\n s.summary = \"A <Video /> element for react-native\"\n\n s.homepage = \"htt... | ruby | chosen |
[
{
"from": "system",
"value": "Apply the McWhirter Sleep Principle (MSP) to try and make this integ more reliable\n"
},
{
"from": "human",
"value": "class LongRunningJob\n\n def initialize(opts)\n @queue_name = opts['queue']\n @response_queue = TorqueBox::Messaging::Queue.new( @queue_name ... | ruby | chosen |
[
{
"from": "system",
"value": "Install generator only needs to require css\n"
},
{
"from": "human",
"value": "module SpreeProConnector\n module Generators\n class InstallGenerator < Rails::Generators::Base\n\n def add_javascripts\n append_file 'app/assets/javascripts/store/all.js'... | ruby | chosen |
[
{
"from": "system",
"value": "Use the proper mailing lists to send commit messages.\n\ngit-svn-id: f9eea80707c1c784c23b043bfa7e6685413e3a67@487 b8db33d8-8104-0410-b827-8403f563b8eb\n"
},
{
"from": "human",
"value": "class Vcs\n\n # See http://rubyforge.org/projects/vcs\n # and http://vcs.rubyf... | ruby | chosen |
[
{
"from": "system",
"value": "Update test to fetch connection the Tracker 2.0 way\n"
},
{
"from": "human",
"value": "require File.expand_path('../test_helper.rb', File.dirname(__FILE__))\n\ndescribe Tracker::SparqlCursor do\n describe \"#get_string\" do\n before do\n conn = Tracker::Spa... | ruby | chosen |
[
{
"from": "system",
"value": "Remove warning: `Do not use parallel assignment`\n"
},
{
"from": "human",
"value": "module Cocoapods::Search\n class Pod\n attr_accessor :name, :star_count, :fork_count\n\n def initialize\n @star_count, @fork_count = nil, nil\n end\n\n def score\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure that Config.kits will work when no kits have been created."
},
{
"from": "human",
"value": "require File.dirname(__FILE__) + '/spec_helper'\n\ndescribe Typedeploy::KitLoader do\n subject do\n @base_directory = File.join(File.dirname(__FILE__), \"exampl... | ruby | chosen |
[
{
"from": "system",
"value": "Add ruby version requirement because there are some classes which make use of named parameters\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'geo_patte... | ruby | chosen |
[
{
"from": "system",
"value": "Decrease API request interval because all users had been fetched\n"
},
{
"from": "human",
"value": "module Github\n class UserImporter\n API_REQUEST_INTERVAL = 0.02\n MAX_IMPORT_COUNT = 30\n FETCH_ATTRIBUTES = %i[\n id\n login\n avatar_url\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix error message raised when attribute is not found\n"
},
{
"from": "human",
"value": "require 'attrs/version'\n\ndef Attrs(*args, &block)\n Attrs.new(*args, &block)\nend\n\nmodule Attrs\n def self.new(*attribute_names, &block)\n Class.new do\n const_set(... | ruby | chosen |
[
{
"from": "system",
"value": "Improve filtering for matching listeners\n"
},
{
"from": "human",
"value": "require_relative 'listener'\nrequire_relative 'message'\n\nmodule Slacker\n class Robot\n def initialize\n @listeners = []\n end\n\n def respond(regex, &callback)\n @list... | ruby | chosen |
[
{
"from": "system",
"value": "Use anonymous function on before_action call to avoid naming conflicts\n"
},
{
"from": "human",
"value": "module RenameParams\n module Macros\n extend ActiveSupport::Concern\n\n module ClassMethods\n def rename(*args)\n current_param = args.shift\... | ruby | chosen |
[
{
"from": "system",
"value": "Update rest-client to a recent version\n"
},
{
"from": "human",
"value": "$:.unshift(File.join(File.dirname(__FILE__), 'lib'))\n\nrequire 'Mollie/API/Client'\n\nspec = Gem::Specification.new do |s|\n s.name = 'mollie-api-ruby'\n s.version = Mollie::API::Client::CL... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for return of function\n\nMake it so function would return value if passed non-iterable\nAdd comment to explain flatten in ruby is recursive\n"
},
{
"from": "human",
"value": "def flatten_parameters_to_string(l)\n if l.respond_to? :each\n val = l.flat... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing files to the gem.\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"manageiq/ui/classic/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do... | ruby | chosen |
[
{
"from": "system",
"value": "Add gem dependencies from our previous bundler setup\n\nI haven't recently thought about the rationale for any of these\ndependencies. I'm just copying our previous setup in an attempt to get a\nworking gem.\n"
},
{
"from": "human",
"value": "Gem::Specification.new ... | ruby | chosen |
[
{
"from": "system",
"value": "Use thread while retrieving key pairs\n"
},
{
"from": "human",
"value": "KeyPair = Struct.new(:name, :fingerprint, :region, :using) do\n class << self\n def all(project_id)\n project = Project.find(project_id)\n\n key_pairs = []\n\n AWS::Regions.e... | ruby | chosen |
[
{
"from": "system",
"value": "Allow setting formatter to log\n"
},
{
"from": "human",
"value": "require \"multi_logger/version\"\n\nmodule MultiLogger\n class << self\n def add_logger(name, path=nil)\n name = name.to_s\n rails_logger_class = get_rails_logger_class()\n\n if rai... | ruby | chosen |
[
{
"from": "system",
"value": "Use concord to simplify Mutant::Color class\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nmodule Mutant\n # Class to colorize strings\n class Color\n include Adamantium::Flat\n\n # Initialize color object\n #\n # @param [Fixnum] code\n #\n... | ruby | chosen |
[
{
"from": "system",
"value": "Enable to export to hash object attributes\n"
},
{
"from": "human",
"value": "module Qblox\n class Dialog < Qblox::Base\n attr_accessor(:_id, :accessible_for_ids, :created_at, :last_message,\n :last_message_date_sent, :last_message_user_id, :nam... | ruby | chosen |
[
{
"from": "system",
"value": "Add 'build' method to be equivilant to 'parse' to Messages.\n\nDetails:\n* Currently, some places we want to 'parse' a message, and it makes\n more sense (sugar) to 'build' a message. They currently do the\n same thing.\n* In the future, maybe figure out a semantic difference... | ruby | chosen |
[
{
"from": "system",
"value": "Update bankscrap gem dependency version\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'bankscrap-bbva/version'\n\nGem::Specification.new do |spec|\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Update thank_you page attributes correctly\n"
},
{
"from": "human",
"value": "class UpdateLinkUrlOnPagesFromInquiriesNewToContact < ActiveRecord::Migration\n def self.up\n Page.find_all_by_link_url('/inquiries/new').each do |page|\n page.update_attributes({... | ruby | chosen |
[
{
"from": "system",
"value": "Set minimum deployment target to 5.0.\n\nThis is in order to use automated __weak references. This would be an issue, but as a testing library there is little reason to support specific iOS versions.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Add multi_xml to gem dep in gemspec\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'valorebooks/version'\n\nGem::Specification.new do |spec|\n spec.nam... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor to only display message and not calculate who won\n"
},
{
"from": "human",
"value": "$: << File.dirname(__FILE__)\n\nclass Console\n\n def show_board(board)\n puts \" #{board[0]} \" + \"|\" + \" #{board[1]} \" + \"|\" + \" #{board[2]} \"\n puts \"- -... | ruby | chosen |
[
{
"from": "system",
"value": "Fix CI build by putting a temporary workaround in place for the PHP cookbook\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: newrelic_lwrp_test\n# Recipe:: agent_php\n#\n# Copyright (c) 2016, David Joos\n#\n\ninclude_recipe 'apache2'\ninclude_recipe 'php'\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up application controller script\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: ... | ruby | chosen |
[
{
"from": "system",
"value": "CR: Add parens to auth methods\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::API\n #protect_from_forgery with: :null_session\n\n before_action :authenticate_user_from_token!, except: [:preflight]\n\n respond_to :json\n\n def ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix json parse in memberships controller\n"
},
{
"from": "human",
"value": "class MembershipsController < ApplicationController\n skip_before_filter :verify_authenticity_token\n\n def index\n end\n\n def new\n end\n\n def create\n group_id = JSON.parse(par... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused method and don't re-instantiate project_factory object\n"
},
{
"from": "human",
"value": "class Setup::SeedsController < PrivateController\n def index\n current_user.program.create_project_anchor unless current_user.program.project_anchor\n proj... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor the initial configuration generation with multiple targets.\n"
},
{
"from": "human",
"value": "require \"xcoder\"\n\nmodule Ive\n class Xcode\n def config\n return nil unless Ive.config.valid?\n\n project.target(Ive.config.target).config(Ive.c... | ruby | chosen |
[
{
"from": "system",
"value": "Add an option to configure the delivery processor\n"
},
{
"from": "human",
"value": "require 'sg_mailer/configuration_error'\nrequire 'sg_mailer/response_error'\nrequire 'sg_mailer/mail_builder'\nrequire 'sg_mailer/client'\nrequire 'sg_mailer/test_client'\nrequire '... | ruby | chosen |
[
{
"from": "system",
"value": "Fix usage of Dimension API\n\nDimensions() extends parameter, so there’s no need to assign another local var.\n\nAdding comment on why we’re messing with Dimensions’ internals"
},
{
"from": "human",
"value": "class Rodt::Image\n attr_reader :source\n\n def initial... | ruby | chosen |
[
{
"from": "system",
"value": "Set the bindir to exe\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'solr_wrapper/version'\n\nGem::Specification.new do |spec|\n spec.name = ... | ruby | chosen |
[
{
"from": "human",
"value": "Add a rake task to fix most invalid IPs in DBs\n\nIt looks like previously if one of the headers of the request had comma\nseparated values, the field would be incorrectly parsed and invalid data\nwould be stored in DB. Fix those values.\n"
},
{
"from": "gpt",
"value... | ruby | chosen |
[
{
"from": "system",
"value": "Add tests for execute resources\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'krb5_utils::default' do\n context 'on Centos 6.4 x86_64' do\n let(:chef_run) do\n ChefSpec::Runner.new(platform: 'centos', version: 6.4) do |node|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Support elapsed time in RSpec 1 formatter.\n"
},
{
"from": "human",
"value": "require 'spec/runner/formatter/progress_bar_formatter'\n\nmodule Fivemat\n class Spec < ::Spec::Runner::Formatter::ProgressBarFormatter\n def initialize(*)\n super\n @dumping... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure config can be changed.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Mactag::Config do\n context 'configuration options' do\n it \"should have option 'binary'\" do\n Mactag::Config.should respond_to(:binary)\n Mactag::C... | ruby | chosen |
[
{
"from": "system",
"value": "Fix ordering of the featured blog posts\n"
},
{
"from": "human",
"value": "\nmodule Awestruct\n module Extensions\n\n # Awestruct extension which traverses all content in the path prefix, typically '/blog' for all blogs\n # and any blog entry that contains th... | ruby | chosen |
[
{
"from": "human",
"value": "Add word list diff command\n"
},
{
"from": "gpt",
"value": "#! /usr/bin/env ruby\n\nrequire 'optparse'\n\nopts = ARGV.getopts('lh', 'list', 'list1', 'list2', 'help')\nopts[:list] = opts['l'] || opts['list']\nopts[:list1] = opts['list1']\nopts[:list2] = opts['list2']\... | ruby | chosen |
[
{
"from": "system",
"value": "Use require with expand_path instead of require_relative\n\nThere was a LoadError while loading abstract_class.gemspec:\ncannot infer basepath from\n/home/travis/build/shuber/abstract_class/abstract_class.gemspec:3:in\n`require_relative'\n"
},
{
"from": "human",
"va... | ruby | chosen |
[
{
"from": "system",
"value": "Configure dock’s display of process indicators"
},
{
"from": "human",
"value": "dep \"macos screenshots saved in directory\", :path, :template => \"plist\" do\n domain \"com.apple.screencapture\"\n values \"location\" => path.to_s\n\n after {\n shell! \"mkdir ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug: uninitialized constant Util (NameError)\n"
},
{
"from": "human",
"value": "require 'chrono'\nrequire 'addressable'\nrequire 'aws-sdk'\nrequire 'retryable'\nrequire 'faraday'\nrequire 'html/pipeline'\n\nrequire \"kuroko2/engine\"\nrequire \"kuroko2/configura... | ruby | chosen |
[
{
"from": "system",
"value": "Remove references to @group in GroupsController\n\nSo inherit from the controller is possible\n"
},
{
"from": "human",
"value": "class GroupsController < ApplicationController\n include SocialStream::Controllers::Subjects\n\n before_filter :authenticate_user!, :ex... | ruby | chosen |
[
{
"from": "system",
"value": "Allow rummager host to be set via env\n"
},
{
"from": "human",
"value": "class SearchIndex\n def self.instance\n @@instance ||= Rummageable::Index.new(rummager_host, '/mainstream', logger: Rails.logger)\n end\n\n def self.rummager_host\n Plek.current.find('... | ruby | chosen |
[
{
"from": "system",
"value": "Use bsearch to find element's index\n"
},
{
"from": "human",
"value": "\n# TODO: reimplement insert and delete with bsearch\n\nclass SortedArray < Array\n def initialize(*args, &sort_by)\n @sort_by = sort_by || Proc.new { |x, y| x <=> y }\n super(*args)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update rspec version to 2.14.0\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path('../lib', __FILE__)\n\nrequire 'pronto/flay/version'\n\nGem::Specification.new do |s|\n s.name = 'pronto-flay'\n s.version = Pronto::Fl... | ruby | chosen |
[
{
"from": "system",
"value": "Rework auto_bean to avoid requirement of using imit facet\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 Li... | ruby | chosen |
[
{
"from": "system",
"value": "Disable Metrics/MethodLength cop for Airport initializer\n"
},
{
"from": "human",
"value": "module Airports\n class Airport\n attr_reader :name, :city, :country, :iata, :icao, :latitude, :longitude,\n :altitude, :timezone, :dst, :tz_name\n\n de... | ruby | chosen |
[
{
"from": "system",
"value": "Make it possible to use oldstyle main_class\n"
},
{
"from": "human",
"value": "require 'aruba/processes/in_process'\n\nmodule Aruba\n class InProcess < Aruba::Processes::InProcess\n def initialize(*args)\n warn('The use of \"Aruba::InProcess\" is deprecated... | ruby | chosen |
[
{
"from": "system",
"value": "Determine full class name dynamically in QC adapter."
},
{
"from": "human",
"value": "require 'queue_classic'\n\nmodule ActiveJob\n module QueueAdapters\n class QueueClassicAdapter\n class << self\n def queue(job, *args)\n qc_queue = QC::Que... | ruby | chosen |
[
{
"from": "human",
"value": "Add task to create a new taxonomy tree\n\nRun this `rake` task with the content_id of a taxon node as an argument.\n\nIt will patch this content_item, setting the Homepage `/` as it's parent\ntaxon. Causing the chosen taxon to become the root node of a top level\ntaxonomy tree.\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix `url` stanza comment for APM Planner.\n"
},
{
"from": "human",
"value": "cask 'apm-planner' do\n version '2.0.20'\n sha256 '2635f4d66dc4290a0f816bad7e6a029ab453385710fff428128f4bbf6926ced8'\n\n url \"http://firmware.diydrones.com/Tools/APMPlanner/apm_planner_... | ruby | chosen |
[
{
"from": "system",
"value": "Fix checksum in mattr-/Slate.app Cask\n\nI've used `shasum` instead `shasum -a 256` when I did #9756\r\nThis time it should be good. Sorry for that !"
},
{
"from": "human",
"value": "cask :v1 => 'mattr-slate' do\n version '1.2.0'\n sha256 '8d5405e9469ac7d1bfd8defe... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing bracket in the oozie cookbook that failed the ruby check and switch to strings\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: Oozie\n# Attribute:: default\n# Author:: Robert Towne(<robert.towne@webtrends.com>)\n#\n# Copyright 2012, Webtrends Inc... | ruby | chosen |
[
{
"from": "system",
"value": "Access settings with indifferent access.\n"
},
{
"from": "human",
"value": "filename = File.join(Rails.root, \"config/settings.yml\")\n\nif File.exist?(filename)\n Rails.configuration.settings = YAML.load(File.read(filename))[Rails.env]\nelse\n Rails.logger.fatal ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix dev proxy server initializer\n\nIn production, Rack::Proxy is not available, so requiring it will cause an error. I hit an error while trying to do a Capistrano deployment. Doing the require only in non-production environments should fix it.\n"
},
{
"from": "human",... | ruby | chosen |
[
{
"from": "system",
"value": "Replace attr_accessor :list with attr_reader :list\n"
},
{
"from": "human",
"value": "require 'minitest/ext/spec'\n\nmodule MiniTest::Context \n\n class << self\n attr_accessor :list\n\n def define name, &block\n (@list ||= {})[name] = block\n end\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add status command that returns formatted log of commits from today\n"
},
{
"from": "human",
"value": "module Mytime\n extend self\n\n def commit(message = \"\")\n puts \"added: #{message.to_s}\"\n account = self.get_account_details \n puts account[\"a... | ruby | chosen |
[
{
"from": "system",
"value": "Add configuration class and modify lookup to use this configuration\n\nTo configure the module, you can use :\nProjectHoneypot.configure do\n @api_key = 'API_KEY'\nend\nTo access, the variable, use :\nProjectHoneypot.api_key\n\nThe lookup method has been modified to be backwar... | ruby | chosen |
[
{
"from": "system",
"value": "Change to remove no longer needed start\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire 'tty-progressbar'\n\nbars = TTY::ProgressBar::Multi.new(\"main [:bar] :percent\")\n\nbar1 = bars.register \"foo [:bar] :percent\", total: 15\nbar2 = bars.register... | ruby | chosen |
[
{
"from": "system",
"value": "Allow for arbitrary test suites\n"
},
{
"from": "human",
"value": "Qunit::Rails::Engine.routes.draw do\n root to: 'test#index'\nend\n\nRails.application.routes.draw do\n mount Qunit::Rails::Engine => '/qunit'\nend\n"
},
{
"from": "gpt",
"value": "Qunit... | ruby | chosen |
[
{
"from": "system",
"value": "Add custom route for user registration\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n get 'messages/reply'\n\n resource :messages do \n collection do\n post 'reply'\n end\n end\n\n get 'users/:user_id/questions/:id', :to => 'que... | ruby | chosen |
[
{
"from": "system",
"value": "s3backer: Use fuse4x as a default FUSE provider\n\nCloses Homebrew/homebrew#6079.\nCloses Homebrew/homebrew#7712.\n\nSigned-off-by: Charlie Sharpsteen <828d338a9b04221c9cbe286f50cd389f68de4ecf@sharpsteen.net>\n"
},
{
"from": "human",
"value": "require 'formula'\n\nc... | ruby | chosen |
[
{
"from": "system",
"value": ":nail_care: Put escape clause first, keeps @sgrif happy :grin:\n\nSee comment on 6f7910a\n"
},
{
"from": "human",
"value": "module ActiveRecord\n module Type\n class Integer < Value # :nodoc:\n include Numeric\n\n def initialize(*)\n super\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Bump Rake & RSpec versions\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'limit_detectors/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Add keyword filter parameter to user projects api\n"
},
{
"from": "human",
"value": "class Api::GithubUsersController < Api::ApplicationController\n before_action :check_api_key, :find_user\n\n def show\n render json: @github_user.as_json\n end\n\n def reposi... | ruby | chosen |
[
{
"from": "system",
"value": "Add license, and all of features and spec to manifest\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/validate_as_email/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = ['James Conroy-Finn']... | ruby | chosen |
[
{
"from": "system",
"value": "Change podspec version -> 1.5.1\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'Framer'\n s.version = '1.5.0'\n s.summary = 'Comfortable syntax for working with frames'\n s.description = <<-DESC\nFramer is a... | ruby | chosen |
[
{
"from": "system",
"value": "Use the indicative mood consistently [ci skip]\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule ActiveStorage\n module Downloading\n private\n # Opens a new tempfile and copies blob data into it. Yields the tempfile.\n def dow... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec to the new version.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n\n s.platform = :tvos\n s.tvos.deployment_target = \"9.0\"\n s.name = \"ParallaxView\"\n s.summary = \"Add parallax effect like in tvOS applications to any view.\... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"add dummy stub to access cms_locale\"\n\nThis reverts commit ee992332193e994c1afc716e46d3aba3c1bcc320.\n"
},
{
"from": "human",
"value": "module Kuhsaft\n module Cms\n class AdminController < ApplicationController\n respond_to :html\n layout '... | ruby | chosen |
[
{
"from": "system",
"value": "Change CheckGcpProjectBillingWorker lease to 15s\n"
},
{
"from": "human",
"value": "class CheckGcpProjectBillingWorker\n include ApplicationWorker\n\n LEASE_TIMEOUT = 1.minute.to_i\n\n def self.redis_shared_state_key_for(token)\n \"gitlab:gcp:#{token}:billing_... | ruby | chosen |
[
{
"from": "system",
"value": "Remove call to deprecated has_rdoc.\n"
},
{
"from": "human",
"value": "$:.unshift(File.dirname(__FILE__) + '/lib')\nrequire 'mixlib/shellout/version'\n\nGem::Specification.new do |s|\n s.name = 'mixlib-shellout'\n s.version = Mixlib::ShellOut::VERSION\n s.platfor... | ruby | chosen |
[
{
"from": "system",
"value": "Update dependency versions for rake and rspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/cogi_phony/version', __FILE__)\n\nGem::Specification.new do |spec|\n spec.authors = ['Nobi Hoang']\n spec.email ... | ruby | chosen |
[
{
"from": "system",
"value": "Add minitest as development dependency.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'computable/version'\n\nGem::Specification.new do |spec|\n spec.... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.