conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Revert CPU module to previous functionality\n"
},
{
"from": "human",
"value": "# CPU Stats\n# Extend CPU_STATS C module (ext/osx_stats/smc.c)\n#\nmodule IStats\n class Cpu\n extend CPU_STATS\n class << self\n\n # Delegate CLI command to function\n #... | ruby | chosen |
[
{
"from": "system",
"value": "Use the `klass` variable that is passed into methods\n"
},
{
"from": "human",
"value": "module ActiveRecord\n module MTI\n module QueryMethods\n\n def build_arel\n select_by_tableoid = select_values.delete(:tableoid) == :tableoid\n group_by_ta... | ruby | chosen |
[
{
"from": "system",
"value": "Add support for setup task\n"
},
{
"from": "human",
"value": "namespace :load do\n task :defaults do\n set :safe_deploy_to_owner, nil\n set :safe_deploy_to_path, -> { fetch(:deploy_to) }\n end\nend\n\nnamespace :safe_deploy_to do\n task :create do\n on r... | ruby | chosen |
[
{
"from": "system",
"value": "Update destroy action for backend updates\n"
},
{
"from": "human",
"value": "require 'knife-cloudformation/cloudformation_base'\n\nclass Chef\n class Knife\n class CloudformationDestroy < Knife\n\n include KnifeCloudformation::KnifeBase\n\n banner 'kni... | ruby | chosen |
[
{
"from": "system",
"value": "Add all parts within multipart alternative\n"
},
{
"from": "human",
"value": "\n# au-kddi handsets render html mail properly only when \n# all mime parts are in a flat multipart/alternate structure\nclass Galakei::Email::AuMailInterceptor\n def self.delivering_emai... | ruby | chosen |
[
{
"from": "human",
"value": "Add a package for TAC Fuel Balancer.\n"
},
{
"from": "gpt",
"value": "class TACFuelBalancer < Kosmos::Package\n title 'TAC Fuel Balancer'\n url 'http://kerbalspaceport.com/wp/wp-content/themes/kerbal/inc/download.php?f=uploads/2013/12/TacFuelBalancer_2.3.0.2.zip'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary uses of self\n"
},
{
"from": "human",
"value": "class Value\n def self.new(*fields)\n Class.new do\n attr_reader *fields\n\n define_method(:initialize) do |*values|\n raise ArgumentError.new(\"wrong number of arguments, #{valu... | ruby | chosen |
[
{
"from": "system",
"value": "Return the error as JSON if something goes wrong\n"
},
{
"from": "human",
"value": "require 'sinatra/base'\nrequire 'json'\n\nmodule Koseki\n class Web < Sinatra::Base\n helpers do\n raise \"No API_KEY specified\" unless ENV['API_KEY']\n set :port, ENV... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo in empty table cell commit\n"
},
{
"from": "human",
"value": "require 'equivalent-xml'\n\nmodule SyncChecker\n module Checks\n DetailsCheck = Struct.new(:expected_details) do\n attr_reader :content_item\n def call(response)\n failures =... | ruby | chosen |
[
{
"from": "system",
"value": "Remove License from preserved path"
},
{
"from": "human",
"value": "require 'json'\n\npackage = JSON.parse(File.read(File.join(__dir__, 'package.json')))\n\nPod::Spec.new do |s|\n s.name = 'react-native-keep-awake'\n s.version = package['version']... | ruby | chosen |
[
{
"from": "system",
"value": "Use payload['pull_request'] to set data['event']\n"
},
{
"from": "human",
"value": "module Travis\n module Tasks\n module Middleware\n class Logging\n def call(worker, message, queue, &block)\n time = Benchmark.ms do\n yield\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add the job id for events starting with job.\n"
},
{
"from": "human",
"value": "module Travis\n module Tasks\n module Middleware\n class Logging\n def call(worker, message, queue, &block)\n uuid, _, _, payload, params = *message['args']\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add EXCLUDE_EMBEDDED so that JRuby users can just connect to the server without needing neo4j-community/neo4j-enterprise\n"
},
{
"from": "human",
"value": "require 'ext/kernel'\n\nrequire 'ostruct'\nrequire 'forwardable'\nrequire 'fileutils'\n\nrequire 'neo4j-core/v... | ruby | chosen |
[
{
"from": "system",
"value": "Set the read timeout to a minute."
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire 'net/http'\n\nmodule Nobel\n class HTTP\n class << self\n def get(uri)\n Net::HTTP.start(uri.host, uri.port) do |http|\n request = Net::HTTP::Ge... | ruby | chosen |
[
{
"from": "system",
"value": "Add clearing window to DSL\n"
},
{
"from": "human",
"value": "# dsl.rb\n\nmodule Ruby2D::DSL\n def hello\n puts \"hi\"\n end\n \n def get(sym)\n Ruby2D::Application.get(sym)\n end\n \n def set(opts)\n Ruby2D::Application.set(opts)\n end\n \n def o... | ruby | chosen |
[
{
"from": "system",
"value": "Update CLI interface\n- Change 'enumerate' command to 'transform'\n- Add 'dry' option that now outputs dependency map like enumerate used to\n- Add 'output' option to allow transformed modules to be output to a specific directory\n"
},
{
"from": "human",
"value": "r... | ruby | chosen |
[
{
"from": "system",
"value": "Use /tmp/kafka instead of /tmp\n"
},
{
"from": "human",
"value": "require 'fileutils'\nrequire 'test_kafka/cluster_runner'\n\nmodule TestKafka\n def self.start(kafka_path, tmp_dir='/tmp', kafka_port=9092, zk_port=2181)\n FileUtils.rm_rf(tmp_dir)\n\n TestKafka... | ruby | chosen |
[
{
"from": "system",
"value": "Use entry unknown segment char for illegible check\n"
},
{
"from": "human",
"value": "require_relative 'entry_parser'\nrequire_relative 'number_checksum'\n\nmodule Accounty\n class AccountNumber\n def initialize(entry)\n @entry = entry\n end\n\n def r... | ruby | chosen |
[
{
"from": "human",
"value": "Add knife ec2 vpc list command\n\nWithout this you have to use another CLI or jump in to the UI to get the VPC ID for server create.\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "gpt",
"value": "#\n# Author:: Tim Smit... | ruby | chosen |
[
{
"from": "system",
"value": "Add comment deviating domain in url stanza\n"
},
{
"from": "human",
"value": "cask :v1 => 'munki' do\n version '2.1.1.2352'\n sha256 'd2287454a1b3aa66ef49e41a34dfa55cfffd45d3e00de5d2288b3fd7ced2e42c'\n\n url \"https://github.com/munki/munki/releases/download/v#{v... | ruby | chosen |
[
{
"from": "system",
"value": "Remove local dir from require\n"
},
{
"from": "human",
"value": "require_relative './anygood/clients/client'\nrequire_relative './anygood/clients/imdb'\nrequire_relative './anygood/clients/rotten_tomatoes'\nrequire_relative './anygood/movie'\nrequire_relative './any... | ruby | chosen |
[
{
"from": "system",
"value": "Make the hoptoad_notifier honor the RACK_ENV env variable\n"
},
{
"from": "human",
"value": "module Duckweed\n module NotifyHoptoad\n def self.extended(klass)\n klass.setup_hoptoad\n end\n\n def setup_hoptoad\n hoptoad_yml = File.join(\n F... | ruby | chosen |
[
{
"from": "system",
"value": "Set method now utilizes controllers to interface with shell file.\n"
},
{
"from": "human",
"value": "command :set do |c|\n c.syntax = 'cfy set'\n c.summary = 'Sets an environment variable in your configuration file.'\n c.description = ''\n c.example 'description... | ruby | chosen |
[
{
"from": "system",
"value": "Fix relative links in repo docs\n\nRelative links always need to point to one level below the current path,\nas nanoc path end on a trailing slash.\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire 'nokogiri'\n\nclass NormalizeLinks < ::Nanoc::Filter\n... | ruby | chosen |
[
{
"from": "system",
"value": "Move require to first line\n"
},
{
"from": "human",
"value": "module Fluent\n\n class LogioOutput < Output\n\n Plugin.register_output('logio', self)\n\n config_param :output_type, :default => 'json'\n config_param :host, :string, :default => 'localhost'\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure the timeout is 10 seconds\n"
},
{
"from": "human",
"value": "require_relative 'base'\nrequire_relative 'exceptions'\nrequire 'json'\n\nclass GdsApi::GovUkDelivery < GdsApi::Base\n include GdsApi::ExceptionHandling\n\n def subscribe(email, feed_urls)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Adjust whitespace, keeping things at 80 char width\n"
},
{
"from": "human",
"value": "require 'httparty'\n\nmodule Github::Auth\n class KeysClient\n attr_reader :username, :hostname\n\n UsernameRequiredError = Class.new StandardError\n GithubUnavailableErr... | ruby | chosen |
[
{
"from": "system",
"value": "Use ' not \" if no string interpolation happens"
},
{
"from": "human",
"value": "require File.expand_path(\"../lib/lingohub/version\", __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = \"lingohub\"\n gem.version = Lingohub::VERSION\n\n gem.author ... | ruby | chosen |
[
{
"from": "system",
"value": "Add support for Rails 2.x.x apps.\n"
},
{
"from": "human",
"value": "require 'active_support/time'\n\nclass FalseClass\n def to_builder\n self.inspect\n end\nend\n\nclass TrueClass\n def to_builder\n self.inspect\n end\nend\n\nclass String\n def to_builde... | ruby | chosen |
[
{
"from": "system",
"value": "Add condition of loaded brancher gem\n"
},
{
"from": "human",
"value": "ENV[\"RAILS_ENV\"] ||= \"test\"\n$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)\n\nrequire \"codeclimate-test-reporter\"\nCodeClimate::TestReporter.start\n\nrequire 'pry'\nrequire 'r... | ruby | chosen |
[
{
"from": "system",
"value": "Use cocaine for running passenger-status command\n"
},
{
"from": "human",
"value": "module PassengerStatus\n class System\n def data\n `passenger-status --show=xml`\n end\n \n def kill(pid)\n `kill -9 #{pid}`\n end\n end\nend"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Add a default (present) to the ensure property\n\nThis allows the resource to be used without explicitly specifying\nensure. I expect that in 90% of use cases ensure=present is what is\nintended, so this potentially saves a few characters or lines.\n"
},
{
"from": "huma... | ruby | chosen |
[
{
"from": "system",
"value": "Package version is increased from 2.5.5.1 to 2.5.5.2\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'evt-messaging'\n s.version = '2.5.5.1'\n s.summary = 'Common primitives for platform-specific messaging im... | ruby | chosen |
[
{
"from": "system",
"value": "Move Search Index to Environmental Variable\n"
},
{
"from": "human",
"value": "module TankerArticleDefaults\n def self.included(base)\n base.send(:include, ::Tanker)\n\n index = 'hnlanswers-development'\n \tindex = 'hnlanswers-production' if Rails.env === 'p... | ruby | chosen |
[
{
"from": "human",
"value": "Remove _rdr suffix from nodes and edges\n"
},
{
"from": "gpt",
"value": "namespace :import do\n # A hidden task which needs to run after importing the nodes, slots, and\n # edges to \"fix\" the keys of any RDR nodes.\n task :post_graph, [:from, :to] => [:setup] do... | ruby | chosen |
[
{
"from": "system",
"value": "Add mustache gem to project\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\nrequire File.expand_path('../lib/metamodel/version', __FILE__)\nrequire 'date'\n\nGem::Specification.new do |s|\n s.name = \"metamodel\"\n s.version = MetaModel::VERSION\n s.da... | ruby | chosen |
[
{
"from": "system",
"value": "Set a better User Agent\n"
},
{
"from": "human",
"value": "require 'faraday'\n\nmodule Twingly\n module Analytics\n class Query\n attr_accessor :pattern, :language, :client\n attr_reader :start_time, :end_time\n\n BASE_URL = 'https://api.twingly.c... | ruby | chosen |
[
{
"from": "system",
"value": "Use if/else rather than long ternary operator.\n"
},
{
"from": "human",
"value": "require 'net/http'\nrequire 'vcr/extensions/net_http_response'\n\nmodule Net\n class HTTP\n def request_with_vcr(request, body = nil, &block)\n unless VCR::HttpStubbingAdapter... | ruby | chosen |
[
{
"from": "system",
"value": "Handle the case where Chef node_name is not set\n"
},
{
"from": "human",
"value": "module Vagrant\n module Provisioners\n class ChefClient < Chef\n class Config < Chef::Config\n attr_accessor :knife_config\n def knife_config; @knife_config || ... | ruby | chosen |
[
{
"from": "system",
"value": "Change the wrong method name\n"
},
{
"from": "human",
"value": "require \"net/https\"\n\nmodule VagrantPlugins\n module Pushover\n class Action\n \n def initialize(app,env)\n @app = app\n @ui = env[:ui]\n @machine = env[:m... | ruby | chosen |
[
{
"from": "system",
"value": "Split host instead of using regex\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'rack'\nrequire 'erb'\n\nclass Powapps\n VERSION = '1.5'\n\n def self.call(env)\n new(env).response.finish\n end\n\n def initialize(env)\n @request = Rack::Req... | ruby | chosen |
[
{
"from": "system",
"value": "Package version is increased from 2.5.8.1 to 2.6.0.0\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'evt-messaging'\n s.version = '2.5.8.1'\n s.summary = 'Common primitives for platform-specific messaging im... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"unlock bundler with rake\"\n\nThis reverts commit f877027fdf1f17d842e589bcdc780db2a679e50d.\n\nConflicts:\n\tnaminori.gemspec\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOA... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing require for Thing\n"
},
{
"from": "human",
"value": "require 'opal'\n\nmodule Yeah\n module Web\n end\nend\n\nrequire 'yeah/image'\nrequire 'yeah/asset_loader'\nrequire 'yeah/display'\nrequire 'yeah/keyboard'\nrequire 'yeah/mouse'\nrequire 'yeah/game'\... | ruby | chosen |
[
{
"from": "system",
"value": "Add bid dawg to seed data with 'big_dawg' permission level\n"
},
{
"from": "human",
"value": "User.destroy_all if User.any?\n\nu1 = User.create!(username: 'user1', password: 'password', permission_level: 'author')\nu2 = User.create!(username: 'user2', password: 'pas... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade rake dependency to 13.0.3\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'perobs/version'\n\nGEM_SPEC = Gem::Specification.new do |spec|\n spec... | ruby | chosen |
[
{
"from": "system",
"value": "Add yours truly to credits\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'pubdraft/version'\n\nGem::Specification.new do |gem|\n gem.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"WSZ - add more time to find tx_username in order to fix regression test.\"\n\nThis reverts commit dc653d8542ddf8c215627c7d6a9abffbb6d1f4a7.\n"
},
{
"from": "human",
"value": "require 'calabash-android/calabash_steps'\nrequire 'pry'\n\nWhen /^I enter usern... | ruby | chosen |
[
{
"from": "system",
"value": "Fix email template strong params\n"
},
{
"from": "human",
"value": "class Fe::Admin::EmailTemplatesController < ApplicationController\n before_filter :check_valid_user\n layout 'fe/fe.admin'\n \n def index \n @email_templates = Fe::EmailTemplate.order('name')... | ruby | chosen |
[
{
"from": "system",
"value": "Add windows test exclusion to ensure_resource\n"
},
{
"from": "human",
"value": "#! /usr/bin/env ruby -S rspec\nrequire 'spec_helper_acceptance'\n\ndescribe 'ensure_resource function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do\n describe... | ruby | chosen |
[
{
"from": "system",
"value": "Fix deprecation warning calling `env' in controllers\n"
},
{
"from": "human",
"value": "class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController\n\n def twitter\n sign_in_with :twitter_login, :twitter\n end\n\n def facebook\n sign_in_w... | ruby | chosen |
[
{
"from": "human",
"value": "Implement specs for the helper\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\nRSpec.describe ApplicationHelper, type: :helper do\n describe 'sidebar navigation' do\n it 'defaults to not having a sidebar' do\n expect(helper.has_sidebar?).to eq(fal... | ruby | chosen |
[
{
"from": "system",
"value": "Add templates and assets files to gem\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'gerablog'\n s.version = '0.1.0'\n s.summary = 'My own static site generator.'\n s.description = 'Write posts in Markdown, publish a ... | ruby | chosen |
[
{
"from": "system",
"value": "Add userinfo.email to default scopes\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule Kubeclient\n # Get a bearer token from the Google's application default credentials.\n class GoogleApplicationDefaultCredentials\n class GoogleDepend... | ruby | chosen |
[
{
"from": "system",
"value": "Add Brian to gem authors\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/vagrant-libvirt/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = ['Lukas Stanek','Dima Vasilets']\n gem.email ... | ruby | chosen |
[
{
"from": "human",
"value": "Improve test performance, tips by plataformatec.com.br\n"
},
{
"from": "gpt",
"value": "# http://blog.plataformatec.com.br/2011/12/three-tips-to-improve-the-performance-of-your-test-suite/\n#\nDevise.stretches = 1\nRails.logger.level = 4\n"
}
] | ruby | chosen |
[
{
"from": "system",
"value": "Improve test descriptions for io listener\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nmodule ActivityBroker\n describe IOListener do\n class FakeListener\n def forwarding_follow_event\n\n end\n end\n\n let!(:fake_listener) { FakeL... | ruby | chosen |
[
{
"from": "system",
"value": "Remove redundant clause in gem description\n"
},
{
"from": "human",
"value": "require File.expand_path('../lib/kerberos_authenticator/version', __FILE__)\n\nGem::Specification.new do |s|\n s.name = 'kerberos_authenticator'\n s.version = KerberosAuthenti... | ruby | chosen |
[
{
"from": "system",
"value": "Remove faulty logic with fallback to Rails.application.config.client_access_token\n"
},
{
"from": "human",
"value": "module Unimatrix\n module Authorization\n class RequiresPolicies\n\n def initialize( application, resource )\n @application = applica... | ruby | chosen |
[
{
"from": "system",
"value": "Add the license to the gemspec\n\nAllows license compliance systems to automatically recognize the gem license.\n"
},
{
"from": "human",
"value": "$LOAD_PATH.push File.expand_path('../lib', __FILE__)\n\nrequire 'griddler/version'\n\nGem::Specification.new do |s|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add jiralicious as a dependency\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/octopolo/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Patrick Byrne\", \"Luke Ludwig\"]\n gem.email ... | ruby | chosen |
[
{
"from": "system",
"value": "68: Add coverage of user show page with past meal\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire \"rails_helper\"\n\nfeature \"user show\" do\n let(:actor) { create(:user) }\n\n around { |ex| with_user_home_subdomain(actor) { ex.run } ... | ruby | chosen |
[
{
"from": "system",
"value": "Add another invalid subdomain test, since the homepage is handled seperately.\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe \"Group subdomains\", use: :subdomain do\n context \"valid domains\" do\n let(:group) { FactoryGirl.create(:group... | ruby | chosen |
[
{
"from": "system",
"value": "[Clean] Use a method \"be_nil\" instead of \"be nil\"\n\n- Use a method \"be_nil\" instead of \"be nil\" in test codes\n"
},
{
"from": "human",
"value": "# ==============================================================================\n# SPEC - STRING FOUNDATION - V... | ruby | chosen |
[
{
"from": "system",
"value": "Use 'as' instead of pavlov_options\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'evidence' do\n include Pavlov::Helpers\n\n let(:current_user) { create :user }\n\n def pavlov_options\n {current_user: current_user}\n end\n\n before do\... | ruby | chosen |
[
{
"from": "human",
"value": "Add extra columns to user model.\n"
},
{
"from": "gpt",
"value": "class AddExtraColumnsToUsers < ActiveRecord::Migration\n def change\n add_column :users, :provider, :string\n add_column :users, :uid, :string\n add_column :users, :phone_number, :string\n e... | ruby | chosen |
[
{
"from": "system",
"value": "Remove index removal from last migration\n"
},
{
"from": "human",
"value": "class RemoveIdFromAllTables < ActiveRecord::Migration\n def change\n remove_index :rails_identity_users, :id\n remove_index :rails_identity_sessions, :id\n remove_column :rails_ide... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor make method accessibilty explicit\n\nThe FileLoader.unique_paths is not part of its API and should not\nbe used by other classes/modules.\n"
},
{
"from": "human",
"value": "module DreddHooks\n module FileLoader\n def self.unique_paths(patterns)\n p... | ruby | chosen |
[
{
"from": "human",
"value": "Add a spec for procs being block-passed and some peculiarities therein.\n"
},
{
"from": "gpt",
"value": "require File.dirname(__FILE__) + '/../../spec_helper'\n\ndescribe \"Proc as a block pass argument\" do\n def revivify(&b)\n b\n end\n\n it \"remains the sam... | ruby | chosen |
[
{
"from": "system",
"value": "Add test case for current existing strategies\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nRSpec.describe JsonSchema::Artesano do\nend\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\nRSpec.describe JsonSchema::Artesano do\n let(... | ruby | chosen |
[
{
"from": "system",
"value": "Remove debug-code: file referencing to local file.\n"
},
{
"from": "human",
"value": "module PiwikAnalytics\n module Helpers\n def piwik_tracking_tag\n config = PiwikAnalytics.configuration\n return if config.disabled?\n\n if config.use_async?\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for context proc arity validation\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe Vault::EncryptedModel do\n let(:klass) do\n Class.new(ActiveRecord::Base) do\n include Vault::EncryptedModel\n end\n end\n\n describe \".v... | ruby | chosen |
[
{
"from": "system",
"value": "Fix error in raising exeception for invalid configuration file\n"
},
{
"from": "human",
"value": "module WeatherReporter\n module UserInput\n RSpec.describe Validator do\n let(:validator_class) { WeatherReporter::UserInput::Validator }\n\n describe '#i... | ruby | chosen |
[
{
"from": "system",
"value": "Fix to work without groonga\n"
},
{
"from": "human",
"value": "class PostSearcher\n def initialize\n @posts = Groonga['Posts']\n end\n\n def related_post_ids(post, limit: 5)\n related_posts = @posts.select do |record|\n conditions = (record.index('Word... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor code for duration representation\n"
},
{
"from": "human",
"value": "require 'uri'\nrequire 'cgi'\n\nmodule VideosHelper\n\n def get_title(video)\n if video && video.title.length > 0\n video.title\n else\n \"(no title)\"\n end\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Configure email from permit sender to be donotreply@homebasefix\n"
},
{
"from": "human",
"value": "class PermitSender < ActionMailer::Base\n default from: \"from@example.com\"\n\n # send the permit email to San Antonio Gov, pass in the user object that contains th... | ruby | chosen |
[
{
"from": "system",
"value": "Implement to_s_62 (MRI implements only radix 36)"
},
{
"from": "human",
"value": "\nmodule Shrtr\n \n module Helpers\n def upcase(str)\n str.upcase\n end\n end\n\nend"
},
{
"from": "gpt",
"value": "\nmodule Shrtr\n \n module Helpers\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make one line block more concise\n"
},
{
"from": "human",
"value": "module DataLoader\n class DebatesXML\n def initialize(xml_document, house)\n raise 'Debate data missing' unless xml_document.at(:debates)\n @debates_xml, @house = xml_document, house\n... | ruby | chosen |
[
{
"from": "system",
"value": "Define 'primary_key' for geocoded class.\n"
},
{
"from": "human",
"value": "require 'geocoder/stores/base'\nrequire 'geocoder/stores/mongo_base'\n\nmodule Geocoder::Store\n module Mongoid\n include Base\n include MongoBase\n\n def self.included(base)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add post proposta, need help please\n"
},
{
"from": "human",
"value": "require 'config/application'\n\n# It's good to decide how tools we shall use!\n\n# This is my opinion:\n#\n# ORM: Datamapper\n# Database: PostgreSQL\n# Views: Erb\n# \n\n# I put this choices in G... | ruby | chosen |
[
{
"from": "system",
"value": "Fix routing to work with initial, static requiring\n"
},
{
"from": "human",
"value": "module RailsOps::Mixins::Routes\n extend ActiveSupport::Concern\n\n included do\n end\n\n class RoutingContainer\n include Rails.application.routes.url_helpers\n\n attr_r... | ruby | chosen |
[
{
"from": "system",
"value": "Fix deprecation warning under RSpec 2.14\n\nRSpec.configuration.backtrace_clean_patterns is deprecated in favor of\nRSpec.configuration.backtrace_exclusion_patterns.\n"
},
{
"from": "human",
"value": "module RR\n module Integrations\n class RSpec2 < RSpec1\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Rename Reporter variables to reflect their role\n"
},
{
"from": "human",
"value": "require 'stepping_stone/event_log'\n\nmodule SteppingStone\n class Reporter\n attr_reader :results\n\n def initialize(broadcaster)\n broadcaster.add_observer(self)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update gem version number and actually increase it to 1.0 to match rubygems standards,\nthis gem is production-ready.\n"
},
{
"from": "human",
"value": "require 'rubygems'\n\nSPEC = Gem::Specification.new do |s|\n s.name = \"assure\"\n s.version = \... | ruby | chosen |
[
{
"from": "system",
"value": "Destroy upgrades when server is nil in cleanup:updates rake task\n"
},
{
"from": "human",
"value": "desc \"Remove system packages to update when none\"\nnamespace :cleanup do\n task :updates => :environment do\n # ONLY APT FILES FOR NOW !!!!!!\n update_files ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow developing with Bundler 2.x\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'well_read_faker/version'\n\nGem::Specification.new do |spec|\n spec.n... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Remove unnecessary method call\"\n\nThis reverts commit bf14865077ba4b50bc9aa60742d0d32a4b973154 because\nI am an idiot - `new_sign_up` is supposed to be true when we *don't*\nfind anyone.\n\nDid someone say tests?\n"
},
{
"from": "human",
"value": "class U... | ruby | chosen |
[
{
"from": "system",
"value": "Fix steps to make sure we definitely get the last added metric\n"
},
{
"from": "human",
"value": "Then(/^the data should be stored in the \"(.*?)\" metric$/) do |metric_name|\n @metric = Metric.where(name: metric_name).last\n @metric.name.should == metric_name\nen... | ruby | chosen |
[
{
"from": "system",
"value": "Change hardcoded 'identity' to service.to_s\n"
},
{
"from": "human",
"value": "module Aviator\n\n define_request :update_user do\n\n meta :provider, :openstack\n meta :service, :identity\n meta :api_version, :v2\n meta :endpoint_type, :admi... | ruby | chosen |
[
{
"from": "system",
"value": "Index commonly searched fields: time and type.\n\n* while working on another event store implementation it has proven very\n useful (and frequent) to filter by time and type of events recorded in\n store\n* however there are no methods in EventRepository that would currently\... | ruby | chosen |
[
{
"from": "system",
"value": "Use 1.8 syntax for :class_name"
},
{
"from": "human",
"value": "class StateMachine::AuditTrail::Backend::ActiveRecord < StateMachine::AuditTrail::Backend\n attr_accessor :context_to_log\n\n def initialize(transition_class, owner_class, context_to_log = nil)\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Add gsub to prevent Faker from creating numbers that start with 911, a condition that causes PhonyRails to declare the number invalid.\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n factory :user, class: \"User\" do\n name { Faker::Name.name }\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a bug of test apps\n"
},
{
"from": "human",
"value": "class ArticlesController < ApplicationController\n before_action :authenticate_user!, except: [:index, :show]\n before_action :set_article, only: [:show, :edit, :update, :destroy]\n\n # GET /articles\n de... | ruby | chosen |
[
{
"from": "human",
"value": "Add a rake task for filling in missing attributes…\n\nNamely: content_id and public_updated_at\n"
},
{
"from": "gpt",
"value": "namespace :data_hygiene do\n def write_file(report_path, content_items)\n File.open(report_path, \"w\") do |file|\n file.puts \"co... | ruby | chosen |
[
{
"from": "system",
"value": "Add window and document object to jshint validation\n"
},
{
"from": "human",
"value": "require 'jshintrb'\n\nmodule ZendeskAppsSupport\n module Validations\n module Source\n\n LINTER_OPTIONS = {\n # enforcing options:\n :noarg => true,\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add acceptance test for openldap_overlay\n"
},
{
"from": "gpt",
"value": "require 'spec_helper_acceptance'\n\ndescribe 'openldap::server::overlay' do\n\n context 'without parameters' do\n it 'creates an overlay' do\n pp = <<-EOS\n class { 'openldap::ser... | ruby | chosen |
[
{
"from": "human",
"value": "Add rename user to voter migration\n"
},
{
"from": "gpt",
"value": "class RenameVoteUserToVoter < ActiveRecord::Migration\n def change\n rename_column :votes, :user_id, :voter_id\n rename_column :votes, :user_type, :voter_type\n end\nend\n"
}
] | ruby | chosen |
[
{
"from": "system",
"value": "Update put.io adder to 2.7\n"
},
{
"from": "human",
"value": "class PutioAdder < Cask\n version '2.6.1'\n sha256 'd89aed7a40de99ad3e75ca05995c088c5147282cb387beaaa5c496c5fc9b2307'\n\n url 'https://github.com/nicoSWD/put.io-adder/releases/download/v2.6.1/put.io.ad... | ruby | chosen |
[
{
"from": "system",
"value": "Update QuickSilver to version 1.1.3\n"
},
{
"from": "human",
"value": "class Quicksilver < Cask\n url 'http://cdn.qsapp.com/com.blacktree.Quicksilver__16390.dmg'\n homepage 'http://qsapp.com/'\n version '1.1.2'\n sha1 '1957b38994afaf3da54b8eb547395dd407b28698'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add description and summary to gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/joker-api/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Geoff Garside\"]\n gem.email = [... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.