conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Fix database configuration for AppFog\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nrequire 'data_mapper'\nrequire 'dm-types'\nrequire 'dm-is-list'\nrequire 'feedzirra'\n\nDataMapper::Logger.new(STDOUT, :warn)\n\n# AppFog Database configuration\nif ENV['VCAP... | ruby | chosen |
[
{
"from": "system",
"value": "Add the updated config options to the generator.\n"
},
{
"from": "human",
"value": "WebsocketRails.setup do |config|\n\n # Change to :debug for debugging output\n config.log_level = :default\n\n # Change to true to enable standalone server mode\n # Start the sta... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake to bundle in order to allow 'bundle exec rake' (travis ci etc.)\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/twdeps/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Nicholas E... | ruby | chosen |
[
{
"from": "system",
"value": "Package version increased from 0.0.1.4 to 0.1.0.0\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'schema'\n s.summary = \"Primitives for schema and structure\"\n s.version = '0.0.1.4'\n s.description = ' '\... | ruby | chosen |
[
{
"from": "system",
"value": "Allow apps to use rest-client 1.6\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'moltin/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Handle missing property as empty element\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\nrequire 'json'\n\norig = JSON.load File.read 'orig.json'\n\ndata = {}\norig.each do |program|\n\tdata[program['name']] = {\n\t\tname: program['name'],\n\t\ttype: program... | ruby | chosen |
[
{
"from": "system",
"value": "Return the upload URL in the presign response"
},
{
"from": "human",
"value": "require \"securerandom\"\nrequire \"openssl\"\n\nmodule FormalistDemo\n class Application < Rodakase::Application\n route \"uploads\" do |r|\n r.on \"presign\" do\n r.post... | ruby | chosen |
[
{
"from": "system",
"value": "Send attribute type along with resource class JSON\n"
},
{
"from": "human",
"value": "json.array! @resource_classes do |resource_class|\n json.menu_label resource_class.model_name.human(count: 2)\n json.singular resource_class.model_name.singular\n json.singular_... | ruby | chosen |
[
{
"from": "system",
"value": "Support both guard-rspec 1.x and 2.x\n\nRelated:\nhttps://github.com/guard/guard-rspec/commit/31e1be02503c51ed37aeda486866550f7f8395d2#diff-5\n"
},
{
"from": "human",
"value": "require \"guard/rspec/formatter\"\n\nclass Guard::JRubyRSpec::Formatter::NotificationRSpe... | ruby | chosen |
[
{
"from": "system",
"value": "Call permit! on zone params before passing to model\n\nApparrantly as of rails 4.2 we must `permit` controller `params` before\npassing them to the model. Previous rails version `params` probably\ndidn't respond to `permitted?`\n\nsee https://github.com/rails/rails/blob/v4.2.0/... | ruby | chosen |
[
{
"from": "system",
"value": "Return nil for both exceptions and when the response code isn't 200\n"
},
{
"from": "human",
"value": "require \"kmdata/version\"\nrequire \"net/http\"\nrequire \"json\"\nrequire \"ostruct\"\n\nmodule KMData\n ENDPOINT = \"kmdata.osu.edu\"\n\n class << self\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update registration controller to permit avatar params\n"
},
{
"from": "human",
"value": "class Users::RegistrationsController < Devise::RegistrationsController\n\n def update\n # required for settings form to submit when password is left blank\n if param... | ruby | chosen |
[
{
"from": "system",
"value": "Use the machine_state method to determine powerstate icon/color\n"
},
{
"from": "human",
"value": "module TextualMixins::TextualPowerState\n def textual_power_state_whitelisted(state)\n state = state.blank? ? 'unknown' : state.downcase\n quad_icon = QuadiconH... | ruby | chosen |
[
{
"from": "system",
"value": "Make xit mark things pending\n"
},
{
"from": "human",
"value": "$:.unshift(File.expand_path('../../lib', __FILE__))\n\nrequire 'pathname'\nrequire 'logger'\n\nroot_path = Pathname(__FILE__).dirname.join('..').expand_path\nlib_path = root_path.join('lib')\nlog_path ... | ruby | chosen |
[
{
"from": "human",
"value": "Add basic hub class test\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe 'hub' do\n let(:boxen_home) { '/opt/boxen' }\n let(:config_dir) { \"#{boxen_home}/config/git\" }\n let(:repo_dir) { \"#{boxen_home}/repo\" }\n let(:env_dir) { \"#{box... | ruby | chosen |
[
{
"from": "system",
"value": "Fix minor bug in MainAppRouteDelegator\n"
},
{
"from": "human",
"value": "module RailsEmailPreview::MainAppRouteDelegator\n # delegate url helpers to main_app\n def method_missing(method, *args, &block)\n if method.to_s =~ /_(?:path|url)$/ && main_app.respond_t... | ruby | chosen |
[
{
"from": "system",
"value": "Remove pendig user model spec\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe User, type: :model do\n pending \"add some examples to (or delete) #{__FILE__}\"\nend\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\nRS... | ruby | chosen |
[
{
"from": "human",
"value": "Make rudimentary tests for user model\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\nrequire 'factory_girl_rails'\n\ndescribe User do\n let(:user){ FactoryGirl.create(:user) }\n\n it \"has a valid FACTORY\" do\n expect(FactoryGirl.create(:user)).to be_... | ruby | chosen |
[
{
"from": "human",
"value": "Add simple country validation test\n\nCheck happy and sad paths\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\nRSpec.describe User, type: :model do\n it \"doesn't allow countries outside DACH\" do\n user = User.new name:\"Ry\", city: \"Berlin\", email... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec for complex object\n"
},
{
"from": "human",
"value": "require File.dirname(__FILE__) + \"/../lib/odb\"\n\nclass Post\n include ODB::Persistent\n attr_accessor :title, :author, :comment\nend\n\nclass Comment\n def initialize\n @name = 1\n @value = 2... | ruby | chosen |
[
{
"from": "system",
"value": "Use a slightly cleaner approach to stub ENV\n\nSigned-off-by: Rémy Coutable <4ea0184b9df19e0786dd00b28e6daa4d26baeb3e@rymai.me>\n"
},
{
"from": "human",
"value": "module StubENV\n def stub_env(key, value)\n allow(ENV).to receive(:[]).and_call_original unless @en... | ruby | chosen |
[
{
"from": "system",
"value": "Use API + remove modal to delete button group\n"
},
{
"from": "human",
"value": "class ApplicationHelper::Toolbar::CatalogitemButtonsCenter < ApplicationHelper::Toolbar::Basic\n button_group('catalogitem_button_vmdb', [\n select(\n :catalogitem_button_vmdb_... | ruby | chosen |
[
{
"from": "system",
"value": "Move combined refresh workers to core\n\nDepends on: https://github.com/ManageIQ/manageiq/pull/20302\n"
},
{
"from": "human",
"value": "class ManageIQ::Providers::Amazon::CloudManager::RefreshWorker < ManageIQ::Providers::BaseManager::RefreshWorker\n require_nested... | ruby | chosen |
[
{
"from": "system",
"value": "Include address in label for autocomplete\n"
},
{
"from": "human",
"value": "require_dependency \"renalware/directory\"\n\nmodule Renalware\n module Directory\n class PersonAutoCompletePresenter < DumbDelegator\n def to_hash\n { id: id, label: to_s }... | ruby | chosen |
[
{
"from": "system",
"value": "Remove N+1 for loading discussions\n"
},
{
"from": "human",
"value": "class ModelCache\n\n def initialize(discussions: {}, motions: {}, comments: {})\n @discussion_results, @motion_results, @comment_results = discussions, motions, comments\n end\n\n def discus... | ruby | chosen |
[
{
"from": "system",
"value": "Check if update is updating position\n"
},
{
"from": "human",
"value": "class TaskStatus < ActiveRecord::Base\n has_many :tasks\n\n before_create :check_and_update_default_status, :set_next_position\n before_update :check_and_update_default_status\n \n def set_... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor rename PlayCard method to be more idomatic\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nclass PlayCard\n attr_reader :errors\n\n def initialize(player, round, card)\n @player = player\n @round = round\n @card = card\n @error... | ruby | chosen |
[
{
"from": "human",
"value": "Add delete body support to Net::HTTP and ARes\n"
},
{
"from": "gpt",
"value": "module ActiveResource\n # Add a method that enables deletion with content body to\n # ActiveRecord::Connection\n class Connection\n def delete_with_body(path, body = '', headers = {}... | ruby | chosen |
[
{
"from": "system",
"value": "Update Soprano to 2.3.70 and update dependencies.\n"
},
{
"from": "human",
"value": "require 'formula'\n\nclass Soprano <Formula\n @url='http://downloads.sourceforge.net/project/soprano/Soprano/2.3.1/soprano-2.3.1.tar.bz2'\n @homepage='http://soprano.sourceforge.n... | ruby | chosen |
[
{
"from": "system",
"value": "Handle user records without github_id; skip in test env\n"
},
{
"from": "human",
"value": "class DestroyNonExistingGitHubUsers < ActiveRecord::Migration[5.1]\n def up\n unless ENV['RAILS_ENV'] == 'development'\n User.where(github_id: nil).destroy_all.each d... | ruby | chosen |
[
{
"from": "system",
"value": "Maintain backwards compatability with route53\n\nPreviously, users needed to specify the json for alias_target and\ngeo_location for a route53_recordset. In the add-alb branch, merged in\nPR 214, this was changed in a backwards-incompatible way, requiring\nanyone who had previ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove deprecation warning about timestamps :null => false for Rails 5\n"
},
{
"from": "human",
"value": "class CreateSettingsChangesTable < ActiveRecord::Migration\n def up\n create_table :settings_changes do |t|\n t.belongs_to :resource, :type => :bigint,... | ruby | chosen |
[
{
"from": "human",
"value": "Add vendor_id to tables that going to be vendorized\n"
},
{
"from": "gpt",
"value": "class AddVendorIdToSpreeModels < ActiveRecord::Migration\n def change\n table_names = %w[\n option_types\n properties\n products\n stock_locations\n ship... | ruby | chosen |
[
{
"from": "system",
"value": "Handle documents without SVG root elements\n"
},
{
"from": "human",
"value": "module InlineSvg::TransformPipeline::Transformations\n class DataAttributes < Transformation\n def transform(doc)\n doc = Nokogiri::XML::Document.parse(doc.to_html)\n svg = d... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Don't install gem or rake\"\n\nThis reverts commit d0ed812b3dfa94507ac3c6c9b4a8ec54c1f3251f.\n\nFixes Homebrew/homebrew#129\n"
},
{
"from": "human",
"value": "require 'formula'\n\nclass Ruby <Formula\n url 'ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p... | ruby | chosen |
[
{
"from": "system",
"value": "Update ELB sample to show usage\n"
},
{
"from": "human",
"value": "$: << File.expand_path(\"../../lib\", __FILE__)\n\nrequire 'aws/elb'\n\n##\n# Expects your Amazon keys to be in the environment, something like\n#\n# export AWS_KEY=\"KEY\"\n# export AWS_SECRET=\"SEC... | ruby | chosen |
[
{
"from": "system",
"value": "Ruby: Add test case: array constant barrier guard\n\nThis guard isn't yet recognised as a `StringConstArrayInclusionCall`.\n"
},
{
"from": "human",
"value": "foo = \"foo\"\n\nif foo == \"foo\"\n foo\nelse\n foo\nend\n\nif [\"foo\"].include?(foo)\n foo\nelse... | ruby | chosen |
[
{
"from": "system",
"value": "Update .podspec, OS X compatible"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"HysteriaPlayer\"\n s.version = \"2.1.2\"\n s.summary = \"Objective-C remote audio player (AVPlayer extends)\"\n s.homepage = \"https://githu... | ruby | chosen |
[
{
"from": "system",
"value": "Tweak effective_static_control to avoid double <p>\n"
},
{
"from": "human",
"value": "module Inputs\n module EffectiveStaticControl\n class Input < Effective::FormInput\n delegate :content_tag, :to => :@template\n\n def default_input_html\n {cla... | ruby | chosen |
[
{
"from": "system",
"value": "Fix migration for WSBA (already deployed and ran People migrations)\n"
},
{
"from": "human",
"value": "class AddStatusToRacers < ActiveRecord::Migration\n def self.up\n return if ASSOCIATION.short_name == \"MBRA\"\n\n add_column :racers, :status, :string\n e... | ruby | chosen |
[
{
"from": "system",
"value": "Use Tempfile for zipfile creation\n\nWhen Dir.mktmpdir is unlinked, the inner files are inaccessible to send_file.\nThis meant that we had to keep it around until after the download was complete,\nwhich littered the /tmp directory with directories filled with zip files.\n\nSinc... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade pronto dependency to 0.6.0.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'pronto/rails_schema/version'\n\nGem::Specification.new do |spec|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add pages migration w translations.\n"
},
{
"from": "human",
"value": "class CreateWafflemixPages < ActiveRecord::Migration\n def change\n create_table :wafflemix_pages do |t|\n t.integer :parent_id\n t.integer :position\n t.boolean :show_in_menu\... | ruby | chosen |
[
{
"from": "system",
"value": "Copy data from overrides to the episode columns\n"
},
{
"from": "human",
"value": "class AddEpisodeAttributes < ActiveRecord::Migration\n def change\n add_column :episodes, :url, :string\n add_column :episodes, :author_name, :string\n add_column :episodes,... | ruby | chosen |
[
{
"from": "system",
"value": "Add `more?` method to test for pagination.\n"
},
{
"from": "human",
"value": "require 'rack/utils'\n\nrequire 'finch/utils'\n\nmodule Cursor\n\n module ClassMethods\n def use_cursor\n alias_method :request_without_cursor, :request\n alias_method :reque... | ruby | chosen |
[
{
"from": "human",
"value": "Add View to notification endpoint\n"
},
{
"from": "gpt",
"value": "class CreateNotificationsEndpoint < ActiveRecord::Migration\n def change\n execute <<-SQL\n CREATE OR REPLACE VIEW \"1\".notifications AS\n SELECT * FROM\n (\n SELECT user_id, temp... | ruby | chosen |
[
{
"from": "system",
"value": "Remove logic to support EOL Fedora platforms\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "# From https://rpms.remirepo.net/ in the \"Other Resources\" section about\n# gpg keys for platform version... | ruby | chosen |
[
{
"from": "system",
"value": "Add backtrace to error logs\n"
},
{
"from": "human",
"value": "require 'celluloid/io'\n\nmodule Api2cart::Daemon\n class ProxyServer < Struct.new(:port)\n include Celluloid::IO\n\n def run\n accept_connections bind_proxy_socket\n end\n\n def run_as... | ruby | chosen |
[
{
"from": "system",
"value": "Add :run=>true option so sinatra works with ruby-style on test site\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'sinatra'\nSE_TEST_FRAMEWORK='se_demo'\nrequire 'sequel_setup'\nrequire 'se_setup'\nScaffoldingExtensions.javascript_library = 'JQuery'... | ruby | chosen |
[
{
"from": "system",
"value": "Change the destination to PA\n"
},
{
"from": "human",
"value": "class SongMailer < ApplicationMailer\n default to: 'miyoshi@ku-unplugged.net' # TODO: Replace \"miyoshi\" with \"pa\"\n\n def entry(song, applicant, notes)\n @song = song\n @applicant = applican... | ruby | chosen |
[
{
"from": "system",
"value": "Use rails configuration for from email\n"
},
{
"from": "human",
"value": "class UserMailer < ActionMailer::Base\n default from: \"from@example.com\"\n\n def password_reset_notification(user)\n @user = user\n @url = passwords_path(user.password_reset_token)\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix micro CHP migration when no network gas is set\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass RemoveMicroChpInput < ActiveRecord::Migration[5.1]\n SOURCE_KEY = 'households_heater_micro_chp_network_gas_share'\n TARGET_KEY = 'household... | ruby | chosen |
[
{
"from": "system",
"value": "Make position attribute accessible in Rails 3\n"
},
{
"from": "human",
"value": "module Rapidfire\n class Question < ActiveRecord::Base\n belongs_to :survey, :inverse_of => :questions\n has_many :answers\n\n default_scope { order(:position) }\n\n vali... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary variable and return list joined\n"
},
{
"from": "human",
"value": "require 'sinatra'\nrequire 'httparty'\nrequire 'yaml'\n\ndata = YAML.load_file(File.expand_path(\"./data.yml\"))\n\npost('/') do\n team = data['team_members'].shuffle\n\n HTTPart... | ruby | chosen |
[
{
"from": "system",
"value": "Add position method to ranked objects.\n\nAn instance of a ranked class can now call #position to get their position in the list. It uses count so wouldn't be great for querying every object (if you're doing that you're probably in a loop and can use with_index) but will be fin... | ruby | chosen |
[
{
"from": "system",
"value": "Make master 0.7.0.pre (codename \"Marilyn\")\n"
},
{
"from": "human",
"value": "module Reel\n VERSION = \"0.6.0\"\n CODENAME = \"Garland\"\nend\n"
},
{
"from": "gpt",
"value": "module Reel\n VERSION = \"0.7.0.pre\"\n CODENAME = \"Marilyn\"\nend\n"
... | ruby | chosen |
[
{
"from": "system",
"value": "Move to autoloading the modules\n"
},
{
"from": "human",
"value": "libdir = File.dirname(__FILE__)\n$LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)\n\nrequire 'ruby_rexster/vertex'\nrequire 'ruby_rexster/edge'\n\nmodule RubyRexster\nend\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Remove debugging statement and unecessary method\n"
},
{
"from": "human",
"value": "require 'rails'\nrequire 'tilt'\nrequire 'nailgun'\n\nmodule ClojurescriptRails\n class ClojurescriptTemplate < ::Tilt::Template\n def self.engine_initialized?\n not @compil... | ruby | chosen |
[
{
"from": "system",
"value": "Include iata_code in our Airline table since we have it"
},
{
"from": "human",
"value": "Airline.class_eval do\n data_miner do\n schema Earth.database_options do\n string 'name'\n string 'bts_code'\n string 'icao_code'\n end\n \n import \... | ruby | chosen |
[
{
"from": "system",
"value": "Handle additional params for DCI actions\n"
},
{
"from": "human",
"value": "module EasyDCI\n module Extensions\n module DCIBase\n extend ActiveSupport::Concern\n\n included do\n class_attribute :render_flash_messages\n self.render_flash_m... | ruby | chosen |
[
{
"from": "system",
"value": "Update OmniDiskSweeper to use latest scheme"
},
{
"from": "human",
"value": "class OmniDiskSweeper < Cask\n url 'http://www.omnigroup.com/download/latest/omnidisksweeper'\n homepage 'http://www.omnigroup.com/products/omnidisksweeper/'\n version '1.8'\n sha1 '806... | ruby | chosen |
[
{
"from": "system",
"value": "Fix one of the migrations where column name was accidentally changed\n\n[#79958812]\n"
},
{
"from": "human",
"value": "class CreateCollaborationRuns < ActiveRecord::Migration\n def up\n create_table :collaboration_runs do |t|\n t.integer :user_id\n t.s... | ruby | chosen |
[
{
"from": "human",
"value": "Add benchmark for argument formatting\n"
},
{
"from": "gpt",
"value": "require \"benchmark\"\nrequire 'lib/yard'\n\ndef format_args_regex(object)\n if object.signature\n object.signature[/#{Regexp.quote object.name.to_s}\\s*(.*)/, 1]\n else\n \"\"\n end\nend... | ruby | chosen |
[
{
"from": "system",
"value": "Correct docs of the Pedantics analysis class.\n"
},
{
"from": "human",
"value": "module RubyLint\n module Analysis\n ##\n # The {RubyLint::Analysis::UselessRuby} class checks for various useless\n # Ruby features, the use of redundant tokens such as `then`... | ruby | chosen |
[
{
"from": "system",
"value": "Modify legacy mapping rake task to support optimistic locking.\n\nThis will prevent the rake task accidentally overwriting concurrent\nchanges to a topic taxon when populating its legacy_taxons links.\n"
},
{
"from": "human",
"value": "desc \"Populate legacy_taxons ... | ruby | chosen |
[
{
"from": "human",
"value": "Add a data migration to unpublish old Policy Publisher content\n\nThis doesn't specifically relate to Whitehall, it's just an easy place\nto put this code.\n\nA single email signup page was left behind when Policy Publisher was\nretired, so unpublish that and replace it with a r... | ruby | chosen |
[
{
"from": "human",
"value": "Fix missing migration for previous commit.\n"
},
{
"from": "gpt",
"value": "class AddDocumentFingerprintToPrintJobs < ActiveRecord::Migration\n def up\n add_column :print_jobs, :document_fingerprint, :string\n PrintJob.find_each do |print_job|\n path = pr... | ruby | chosen |
[
{
"from": "system",
"value": "JariBakken: Fix spec for last change.\n\ngit-svn-id: 4179480af2c2519a5eb5e1e9b541cbdf5cf27696@13679 07704840-8298-11de-bf8c-fd130f914ac9\n"
},
{
"from": "human",
"value": "require File.expand_path(\"../../../spec_helper\", __FILE__)\n\nmodule Selenium\n module WebD... | ruby | chosen |
[
{
"from": "system",
"value": "Update specs for physical server\n\n- Add parent relationship for physical server with ems_physical_infra\n"
},
{
"from": "human",
"value": "describe PhysicalServerController do\n include CompressedIds\n\n let!(:server) { EvmSpecHelper.local_miq_server(:zone => zo... | ruby | chosen |
[
{
"from": "system",
"value": "Use before_action instead of before_filter in link check controller\n"
},
{
"from": "human",
"value": "class Admin::LinkCheckReportsController < Admin::BaseController\n before_filter :find_reportable\n\n def create\n @report = LinkCheckerApiService.check_links(... | ruby | chosen |
[
{
"from": "system",
"value": "Put the cell data in a structure.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nmodule Spectrum\n module Config\n class OnlineResourceAggregator < Aggregator\n type 'online_resource'\n\n def initialize\n super\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Correct use of node type predicates\n"
},
{
"from": "human",
"value": "module Mutant\n class Mutator\n class Node\n class Send\n\n # Mutator for sends that correspond to a binary operator\n class Binary < self\n\n children :left, :ope... | ruby | chosen |
[
{
"from": "system",
"value": "Add indices for faster queries.\n\nSee: https://github.com/alexreisner/geocoder/issues/703\n"
},
{
"from": "human",
"value": "class GeocoderMaxmindGeoliteCity < ActiveRecord::Migration\n def self.up\n create_table :maxmind_geolite_city_blocks, id: false do |t|\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add ajax contact message handling"
},
{
"from": "human",
"value": "module RocketCMS\n module Controllers\n module Contacts\n extend ActiveSupport::Concern\n def new\n @contact_message = model.new\n after_initialize\n end\n\n def... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor string input a bit\n"
},
{
"from": "human",
"value": "module SimpleForm\n module Inputs\n class StringInput < Base\n def input\n input_html_options[:size] ||= [limit, SimpleForm.default_input_size].compact.min\n input_html_option... | ruby | chosen |
[
{
"from": "system",
"value": "Use Spree 2.x method signature\n"
},
{
"from": "human",
"value": "module Spree::Chimpy\n module ControllerFilters\n extend ActiveSupport::Concern\n\n included do |variable|\n before_filter :find_mail_chimp_params\n \n include ::Spree::Core::Con... | ruby | chosen |
[
{
"from": "system",
"value": "Add placeholders for COINBASE_KEY and COINBASE_SECRET\n"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')\nrequire 'rbtc_arbitrage'\nrequire 'pry'\nrequire 'curb'\nrequire 'active_support'\nrequire 'json'\n\n# export ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix `no implicit conversion of Pathname into String (TypeError)`\n"
},
{
"from": "human",
"value": "module ActiveSupportDecorators\n\n def self.paths\n @paths ||= []\n end\n\n def self.pattern\n @pattern ||= '_decorator'\n end\n\n def self.pattern=(patter... | ruby | chosen |
[
{
"from": "human",
"value": "Add a provider for container-based agent applications\n"
},
{
"from": "gpt",
"value": "# Encoding: UTF-8\n#\n# Cookbook Name:: shipyard\n# Provider:: shipyard_agent_application_container\n#\n# Copyright 2014, Jonathan Hartman\n#\n# Licensed under the Apache License, ... | ruby | chosen |
[
{
"from": "system",
"value": "Set Webrick logger for system testing\n\nIf this is not set Webrick will log **everything** to STDOUT and\ndistract from the running tests. This will instead log to the log file.\nThis example was extracted from the Capybara source code.\n"
},
{
"from": "human",
"va... | ruby | chosen |
[
{
"from": "system",
"value": "Use single quotes for requiring files.\n"
},
{
"from": "human",
"value": "require File.expand_path('../boot', __FILE__)\n\n# Pick the frameworks you want:\nrequire \"active_record/railtie\"\nrequire \"action_controller/railtie\"\nrequire \"action_mailer/railtie\"\nr... | ruby | chosen |
[
{
"from": "system",
"value": "Change exception expectation message for rbx compatibility.\n"
},
{
"from": "human",
"value": "shared_examples_for \"a_worker\" do |method|\n describe \"additions (#{method})\" do\n it 'should add an async proxy' do\n subject.respond_to?(:async).should == t... | ruby | chosen |
[
{
"from": "system",
"value": "Add lc_email to initial entry (John Glenn)\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe \"User pages\" do\n\n subject { page }\n\n describe \"signup page\" do\n \tbefore { visit signup_path }\n\n \tit { should have_title(user_title('Sign ... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor MockAwsS3 to be more protective of the filesystem, even in dev/test envs\n"
},
{
"from": "human",
"value": "class MockAwsS3\n class MockObject\n def initialize(key)\n @key = key\n end\n\n VALID_KEYS = [\n 'demo-student-photo-small-172x20... | ruby | chosen |
[
{
"from": "system",
"value": "App/Extensions: Fix the definition of partial.\n"
},
{
"from": "human",
"value": "module WatchTower\n module Server\n module Extensions\n module ImprovedPartials\n\n def self.included(base)\n base.extend ClassMethods\n end\n\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Revert old configuration way, load only on production\n"
},
{
"from": "gpt",
"value": "if Rails.env.production?\n require \"opbeat\"\n # set up an Opbeat configuration\n Opbeat.configure do |config|\n config.organization_id = ENV[\"OPBEAT_ORG_ID\"]\n config.... | ruby | chosen |
[
{
"from": "system",
"value": "Switch API keys to actually use the test keys\n"
},
{
"from": "human",
"value": "Rails.configuration.stripe = {\n :publishable_key => ENV['STRIPE_PUBLISHABLE_KEY'],\n :secret_key => ENV['STRIPE_SECRET_KEY']\n}\n\nStripe.api_key = Rails.configuration.stripe[:s... | ruby | chosen |
[
{
"from": "system",
"value": "Test TimeSincePurchaseSpec without the database\n\nThis spec previously took 1 full second to run because of the objects\nbeing unnecessarily persisted.\n\nThis implements the same specs in memory to speed up the test\n"
},
{
"from": "human",
"value": "require 'rail... | ruby | chosen |
[
{
"from": "system",
"value": "Update to latest arm_debug driver requirements\n"
},
{
"from": "human",
"value": "module <%= @namespace %>Dev\n # This is a dummy DUT class that should be used to test that your test module can\n # integrate into a top-level app\n class DUT\n include Origen::T... | ruby | chosen |
[
{
"from": "system",
"value": "Allow cookies to work across all domains\n"
},
{
"from": "human",
"value": "require \"sign_in_guards/is_team_member_guard\"\nrequire \"sign_in_guards/not_deleted_guard\"\n\nClearance.configure do |config|\n config.allow_sign_up = false\n config.mailer_sender = ENV... | ruby | chosen |
[
{
"from": "system",
"value": "Extend original observers, instead of overwriting\n"
},
{
"from": "human",
"value": "require 'errbit/cloudfuji'\n\nErrbit::Application.configure do\n # Register observers to fire Cloudfuji events\n config.mongoid.observers = :cloudfuji_notice_observer\n\n # Set d... | ruby | chosen |
[
{
"from": "system",
"value": "Use rails way to load seed data from pages engine\n"
},
{
"from": "human",
"value": "module Refinery\n class PagesGenerator < Rails::Generators::Base\n source_root File.expand_path('../templates', __FILE__)\n\n def generate_pages_initializer\n template \... | ruby | chosen |
[
{
"from": "system",
"value": "Add description placeholder and reuse version str"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"{PROJECT}\"\n s.version = \"0.1\"\n s.summary = \"\"\n s.description = <<-DESC\n DESC\n s.homepage = \"{URL}\"\n s.lice... | ruby | chosen |
[
{
"from": "human",
"value": "Add task to show the changes ready to be deployed.\n"
},
{
"from": "gpt",
"value": "namespace :github do\n namespace :pending do\n desc 'Display pending changes ready to be deployed in a browser'\n task :default do\n if m = repository.match(/github.com:(.... | ruby | chosen |
[
{
"from": "system",
"value": "Use -m flag on rabbitmq-plugins command for managing rabbitmq_plugin resources\n\nUse the -m flag for calls to the rabbitmq-plugins command, which enables minimal\noutput mode. This is much easier and more reliable to parse.\n\nFixes an issue under RMQ 3.4.0 where rabbitmq_plu... | ruby | chosen |
[
{
"from": "system",
"value": "Add methods destroy aprove_regisration enable\n"
},
{
"from": "human",
"value": "class AdministrativeAssistantController < ApplicationController\n def new\n @administrative_assistant = AdministrativeAssistant.new\n end\n\n def create\n @administrative_assis... | ruby | chosen |
[
{
"from": "human",
"value": "Add a spec to confirm that Errno::EAGAIN is used for EWOULDBLOCK when appropriate\n"
},
{
"from": "gpt",
"value": "require File.expand_path('../../../spec_helper', __FILE__)\n\ndescribe \"Errno::EAGAIN\" do\n # From http://jira.codehaus.org/browse/JRUBY-4747\n it \... | ruby | chosen |
[
{
"from": "system",
"value": "Format update for release message.\n"
},
{
"from": "human",
"value": "task 'git:require-clean-workspace' do\n # Ensure the git repo is free of unstaged or untracked files prior\n # to building / testing / pushing a release.\n unless `git diff --shortstat 2> /dev/... | ruby | chosen |
[
{
"from": "human",
"value": "Add the customer_token col to the user table\n\nThis column is needed to store the fetched customer token.\nThe customer token will be used to place future orders.\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nclass AddKlarnaCustomerTokenToSpreeUs... | ruby | chosen |
[
{
"from": "system",
"value": "Work around pathologically slow buffer scanning in Neovim\n\nIn Neovim, unlisted buffers are returned to the Ruby layer. If you run\nFerret's :Ack, for example, you might find yourself with a large number\nof those (as `:h unlisted-buffer` says, Vim uses these to track things\n... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.