conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Fix for mysql primary key bug\n\nSigned-off-by: Rob Day-Reynolds <904086f049d807ae99640dbdfde98536a5822f56@pivotallabs.com>\n" }, { "from": "gpt", "value": "Sequel.migration do\n change do\n add_column :director_attributes, :temp_name, String, null: true\n sel...
ruby
chosen
[ { "from": "system", "value": "Return number of removed records.\n" }, { "from": "human", "value": "require 'active_support'\nrequire 'active_record'\n\nmodule ActiveRecord\n module Prunable\n extend ActiveSupport::Concern\n\n @@models = []\n\n class << self\n def included(model)\n...
ruby
chosen
[ { "from": "system", "value": "Revert \"Fixed watchOS deployment target for CocoaPods\"\n\nThis reverts commit 8ad242a491de1f266b54546553e9bd2d8470509b.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'ZIPFoundation'\n s.version = '0.9.2'\n s.license = 'MIT'\n s.summary = '...
ruby
chosen
[ { "from": "system", "value": "Access resource attributes by method instead keys.\n\nThis fixes the following error:\n\n Failure/Error: expect(chef_run).to create_remote_file_with_attributes('...')\n NoMethodError:\n undefined method `[]' for Chef::Resource::RemoteFile\n\nNOTE: We have no covering spec ...
ruby
chosen
[ { "from": "system", "value": "Use march_hare in these names\n" }, { "from": "human", "value": "RSpec.describe \"Any exchange\" do\n let(:connection) { MarchHare.connect }\n\n after :each do\n connection.close\n end\n\n\n #\n # Examples\n #\n\n it \"can have an alternate exchange (a Rab...
ruby
chosen
[ { "from": "system", "value": "Change homepage location in gemspec\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"failsafe/version\"\n\nGem::Specification.new do |s|\n s.name = \"failsafe\"\n s.version = Failsaf...
ruby
chosen
[ { "from": "human", "value": "Create aggregation sample for second parser\n\nSigned-off-by: Lucas Moura <143f96f992bf3dc84afaa2cc3d6d759a2b3ef261@gmail.com>\n" }, { "from": "gpt", "value": "require 'set'\n\nclass Class1\n\n attr_accessor :value\n\n def initialize(value)\n @value = va...
ruby
chosen
[ { "from": "system", "value": "Test subscriber hooks for registering and processing\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Hearst::Subscriber do\n\n it 'auto-registers itself with Hearst'\n it 'validates required parameters'\n it 'stores event and exchange configu...
ruby
chosen
[ { "from": "system", "value": "Add sprinkle as a 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 'sprinkle/script/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Use EXCLUDED in BinaryOperatorParameterName cop\n\nPrefer EXCLUDED to BLACKLIST in code as well as in cop config names.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule RuboCop\n module Cop\n module Naming\n # This cop makes sure t...
ruby
chosen
[ { "from": "system", "value": "Allow deletion of unmerged branches\n\nCalling git branch with the `-d` flag will only delete a branch if it\nhas been fully merged with its parent (usually master). In this case, if\nthe user explicitly chooses to delete a local branch, we want to honour\nthis request regardle...
ruby
chosen
[ { "from": "human", "value": "Add class specs for govuk_ghe_vpn\n" }, { "from": "gpt", "value": "require_relative '../../../../spec_helper'\n\ndescribe 'govuk_ghe_vpn', :type => :class do\n\n it { is_expected.to compile }\n it { is_expected.to compile.with_all_deps }\n it { is_expected.to cont...
ruby
chosen
[ { "from": "system", "value": "Fix an error for `Faker::Computer.os`\n\nFollow up to #1948.\n\nThis PR fixes the following error for `Faker::Computer.os`.\n\n```console\n% cd path/to/faker-ruby/faker\n% bundle exec ruby -Itest test/test_determinism.rb\nLoaded suite test/test_determinism\n(snip)\n\ntest/test_...
ruby
chosen
[ { "from": "system", "value": "Add a working package for Ferram Aerospace Research.\n\nI have installed and uninstalled this mod a few dozen times today.\n" }, { "from": "human", "value": "class FerramAerospaceResearch < Kosmos::Package\n title 'Ferram Aerospace Research'\n aliases 'ferram', 'f...
ruby
chosen
[ { "from": "system", "value": "Use the chunk param in Arethusa routes\n" }, { "from": "human", "value": "module LLT\n module Review::Api\n module Helpers\n def origin(el)\n \"Publication ##{extracted_id(el.id)} by #{el.sentences.annotators}\"\n end\n\n def extracted_id(i...
ruby
chosen
[ { "from": "system", "value": "Fix URL for Foreca service\n\nSigned-off-by: Aki Saarinen <278bc57fbbff6b7b38435aea0f9d37e3d879167e@akisaarinen.fi>\n" }, { "from": "human", "value": "# -*- encoding : utf-8 -*-\nrequire 'uri'\nrequire 'net/http'\nrequire 'nokogiri'\n\nKernel.load('fetch_uri.rb')\n\...
ruby
chosen
[ { "from": "system", "value": "Add rake to dev deps" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'opal/activesupport/version'\n\nGem::Specification.new do |gem|\n gem.name ...
ruby
chosen
[ { "from": "system", "value": "Change default for max picture size in dummy app\n" }, { "from": "human", "value": "Monologue.config do |monologue|\n monologue.image_upload.max_picture_size = 100.kilobytes\n monologue.image_upload.upload_path = \"monologue\"\nend" }, { "from": "gpt", ...
ruby
chosen
[ { "from": "system", "value": "Speed up dev mode for production.\n" }, { "from": "human", "value": "FarHorizonsApp::Application.configure do\n # Settings specified here will take precedence over those in config/application.rb.\n\n # In the development environment your application's code is relo...
ruby
chosen
[ { "from": "system", "value": "Switch assets to S3 cnamed urls." }, { "from": "human", "value": "s3 = YAML.load(ERB.new(File.read(RAILS_ROOT + '/config/amazon_s3.yml')).result)[RAILS_ENV].symbolize_keys\n\nCarrierWave.configure do |config|\n config.s3_access_key_id = s3[:access_key_id]\n config...
ruby
chosen
[ { "from": "system", "value": "Use a env variable for the Hoptoad API key instead of hardcoding it\n" }, { "from": "human", "value": "HoptoadNotifier.configure do |config|\n config.api_key = '86a3b1ba9ee92b6bfc5cb1840e9ae3df'\nend\n" }, { "from": "gpt", "value": "HoptoadNotifier.conf...
ruby
chosen
[ { "from": "human", "value": "Add data migration to remove CHIEF 0% duty measures\n\nWe noticed while testing another feature that CHIEF had included 0%\nduty measures for cigarettes again. To resolve this we've removed the 0%\nmeasures and re-enabled the existing measures that had the proper rates.\n" }, ...
ruby
chosen
[ { "from": "system", "value": "Remove references to instance variables (use getter methods instead).\n" }, { "from": "human", "value": "module SmartChart\n class Map < Base\n \n # region depicted\n attr_accessor :region\n \n \n private # ---------------------------------------...
ruby
chosen
[ { "from": "system", "value": "Add helpful error message if developer makes type-o\n" }, { "from": "human", "value": "module ExpressTemplates\n module Compiler\n def compile(template_or_src=nil, &block)\n template, src = _normalize(template_or_src)\n\n expander = Expander.new(templa...
ruby
chosen
[ { "from": "system", "value": "Add frequencies class to do shift and include frequency buckets.\n" }, { "from": "human", "value": "module Cowboy\n def Cowboy::fft(arr, w=Hamming, n=29)\n if !w.nil?\n window = w.new(n)\n input = window.convolve(arr)\n fft_1d(input)\n else\n ...
ruby
chosen
[ { "from": "system", "value": "Allow for development rack to block queues\n" }, { "from": "human", "value": "# configure.rb\nGuaranteedQueue.config(\n max_threads: 4,\n access_key_id: ENV['AWS_ACCESS_KEY_ID'] || 'test',\n secret_access_key: ENV['AWS_SECRET_ACCESS_KEY'] || 'test',\n region: EN...
ruby
chosen
[ { "from": "system", "value": "Fix bug preventing deploys from replacing existing files that have changed\n" }, { "from": "human", "value": "module Frizz\n class Sync\n def initialize(local, remote)\n @local = local\n @remote = remote\n end\n\n def run!\n remote.files.eac...
ruby
chosen
[ { "from": "system", "value": "Remove useless namespace in method names\n" }, { "from": "human", "value": "require 'slim/logic_less'\n\nmodule Redch::SOS\n module Client\n\n module Templates\n class Settings\n attr_accessor :templates_folder, :extension\n\n def initialize\n...
ruby
chosen
[ { "from": "system", "value": "Update Ruby to the latest version for security\n\n(CVE-2013-0256) http://www.ruby-lang.org/en/news/2013/02/06/rdoc-xss-cve-2013-0256/" }, { "from": "human", "value": "require File.expand_path(File.dirname(__FILE__) + '/../utilities')\nrequire File.expand_path(File.d...
ruby
chosen
[ { "from": "system", "value": "Add a note about remote upload\n" }, { "from": "human", "value": "require 'pathname'\nrequire 'knife-cloudformation/cloudformation_base'\nrequire 'knife-cloudformation/export'\n\nclass Chef\n class Knife\n class CloudformationExport < Knife\n\n include Knif...
ruby
chosen
[ { "from": "system", "value": "Add start_date and end_date to NON_RIDE_COORDINATOR_ATTRIBUTES\n" }, { "from": "human", "value": "require 'active_support/concern'\n\nmodule RecurringRideCoordinatorScheduler\n extend ActiveSupport::Concern\n include ScheduleAttributes\n\n NON_RIDE_COORDINATOR_AT...
ruby
chosen
[ { "from": "system", "value": "Stop using require_relative for CLI test\n" }, { "from": "human", "value": "require_relative 'helper'\n\nclass TestCLI < Test::Unit::TestCase\n\tcontext \"Tracking's CLI\" do\n\n\t\tshould \"clear list (to prepare for other tests)\" do\n\t\t\tcapture_output { Tracki...
ruby
chosen
[ { "from": "system", "value": "Check if the lib is in the load path and requirable before attempting to activate the gem version\n" }, { "from": "human", "value": "[%w(builder 2.1.2), %w(i18n 0.1.3), %w(memcache-client 1.7.5), %w(tzinfo 0.3.13)].each do |lib, version|\n # Try to activate a gem ~...
ruby
chosen
[ { "from": "system", "value": "Improve way SQL request are made\n" }, { "from": "human", "value": "#\n# == Abouts Controller\n#\nclass AboutsController < PostsController\n decorates_assigned :about\n before_action :set_about, only: [:show, :create]\n before_action :set_commentable, only: [:sho...
ruby
chosen
[ { "from": "system", "value": "QUALITY: Remove recipient_id from comment serializer\n" }, { "from": "human", "value": "class TaskCommentSerializer < ActiveModel::Serializer\n attributes :id, :comment, :created_at, :comment_by, :recipient_id, :is_new\n\n def comment_by\n object.user.name\n e...
ruby
chosen
[ { "from": "system", "value": "Update HandbrakeCLI Nightly to v6562svn\n\nHandBrakeCLI Nightly Build 6562svn released 2014-11-27.\n" }, { "from": "human", "value": "cask :v1 => 'handbrakecli-nightly' do\n version '6559svn'\n sha256 'b66feea96cb15ab7f54498235670ead24245af51e339b7218eabc58446692e...
ruby
chosen
[ { "from": "system", "value": "Fix Validation for Account Subdomain\n" }, { "from": "human", "value": "class Account < ActiveRecord::Base\n has_many :users, dependent: :destroy\n has_many :invoices, dependent: :destroy\n has_many :positions, through: :invoices\n has_many :customers, dependent...
ruby
chosen
[ { "from": "system", "value": "Make an API wrapper around the endpoints for better calling\n\nNow you have to explicitely call a resource before calling its endpoint.\nIt makes things clearer and will keep consistency between the endpoints\nas well e.g.\n\napi = Onfido::API.new\napi.applicant.find('applicant...
ruby
chosen
[ { "from": "system", "value": "Fix rubocop warnings in ApplicationController::SysprepAnswerFile\n" }, { "from": "human", "value": "class ApplicationController\n module SysprepAnswerFile\n def upload_sysprep_file\n @_params.delete :commit\n @upload_sysprep_file = true\n @edit = ...
ruby
chosen
[ { "from": "system", "value": "Make file gemspec a little more aggressive with file filtering\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"magic_grid/version\"\n\n# Describe your gem and declare its dependencies:\nG...
ruby
chosen
[ { "from": "system", "value": "Change display_date method to account for the fact that the day might be Sunday\n" }, { "from": "human", "value": "class Meeting < ActiveRecord::Base\n validates_presence_of :date\n\n scope :past, -> { where('date < ?', Date.today) }\n scope :upcoming, -> { where...
ruby
chosen
[ { "from": "system", "value": "Update League Gothic license to ofl" }, { "from": "human", "value": "cask :v1 => 'font-league-gothic' do\n version '1.001'\n sha256 '2ba5f583d44e4880597812be5d0a81b616c01b4af3d2a1e39ae50c0df9d27c59'\n\n url 'http://files.theleagueofmoveabletype.com/downloads/thel...
ruby
chosen
[ { "from": "system", "value": "Add validations and polymorphic relationship\n" }, { "from": "human", "value": "class Comment < ActiveRecord::Base\n\n belongs_to :author, class_name: User\n has_many :votes\nend\n" }, { "from": "gpt", "value": "class Comment < ActiveRecord::Base\n be...
ruby
chosen
[ { "from": "system", "value": "Remove --main rdoc thing from gemspec.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |s|\n s.name = %q{weakling}\n s.version = \"0.0.1\"\n s.authors = [\"Charles Oliver Nutter\"]\n s.date = Time.now.strftime('YYYY-MM-D...
ruby
chosen
[ { "from": "human", "value": "Add file for GPS 2.2\n" }, { "from": "gpt", "value": "# Method to create a list\n# input: string of items separated by spaces (example: \"carrots apples cereal pizza\")\n# steps:\n # [fill in any steps here]\n # set default quantity\n # print the list to the conso...
ruby
chosen
[ { "from": "system", "value": "Fix dependency version requirements in gemspec" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = \"restful_adhearsion\"\n s.version = \"0.1.1\"\n s.summary = \"Ruby Library for the Adhearsion RESTful RPC API\"\n s.description = \"Ruby lib...
ruby
chosen
[ { "from": "system", "value": "Update the migrator to also update the activities\n" }, { "from": "human", "value": "class ChangeRegistryIdFromNamespace < ActiveRecord::Migration\n def change\n # If there are namespaces without a registry_id set, try to migrate them to\n # the existing regi...
ruby
chosen
[ { "from": "system", "value": "Enable in production env also since we require an explicit around_filter now. Use the :if option on around_filter to limit profiling to a specific domain, for example.\n" }, { "from": "human", "value": "unless RAILS_ENV == 'production'\n begin\n require 'action_...
ruby
chosen
[ { "from": "system", "value": "Improve plugin description; Fix pathes, controller names and permissions." }, { "from": "human", "value": "require 'redmine'\n\nRedmine::Plugin.register :redmine_dashboard do\n name 'Redmine Dashboard plugin'\n author 'Jan Graichen'\n description 'Add a task dash...
ruby
chosen
[ { "from": "system", "value": "Tag the jdk specs `dev`\n\nsince the edge images are busted\n" }, { "from": "human", "value": "describe 'jdk installation' do\n describe command('java -version') do\n its(:exit_status) { should eq 0 }\n end\n\n describe file('/opt/jdk_switcher/jdk_switcher.sh'...
ruby
chosen
[ { "from": "system", "value": "Revert \"avoid using user 2\"\n\nThis reverts commit ff2b2e99b71191f3b5c33ac8f7bdeea11d8d3a19.\n" }, { "from": "human", "value": "require 'screenshot_helper'\n\ndescribe \"Check the tour\", type: :request do\n include PavlovSupport\n\n before do\n user = Factor...
ruby
chosen
[ { "from": "system", "value": "Update MAMP to version 3.4\n" }, { "from": "human", "value": "cask :v1 => 'mamp' do\n version '3.3'\n sha256 'fb50cfbf54c82f92808ae46bef50944a1c40fc607b43ad1767c78edc18d0b1d1'\n\n url \"https://downloads.mamp.info/MAMP-PRO/releases/#{version}/MAMP_MAMP_PRO_#{vers...
ruby
chosen
[ { "from": "system", "value": "Check if the field already exists before creating it\n\nSince this fields already exists on our main host project, the migration\nis unable to run and it halts the whole process.\n" }, { "from": "human", "value": "class AddPosAttributeToSpreeOrder < ActiveRecord::Mi...
ruby
chosen
[ { "from": "system", "value": "Add scripts directory, so that initial sem stuff is created\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 'schema-evolution-manager'\n s.homepage = \"https://github.com/gilt/schema-evolution-manager\"\n s.versio...
ruby
chosen
[ { "from": "system", "value": "Use text instead of varchar(255) for snippets content, varchar(255) is too small for content\n" }, { "from": "human", "value": "class CreateSnippetRevisions < ActiveRecord::Migration\n def self.up\n create_table :snippet_revisions do |t|\n t.integer :snippe...
ruby
chosen
[ { "from": "system", "value": "Remove low version of Mongoid support, lock on 2.2.0\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\n\nGem::Specification.new do |s|\n s.name = \"mongoid_auto_increment_id\"\n s.version = \"0...
ruby
chosen
[ { "from": "system", "value": "Add build number to version\n" }, { "from": "human", "value": "# installation\ndefault.sensu.version = \"0.9.13\"\ndefault.sensu.use_unstable_repo = false\ndefault.sensu.directory = \"/etc/sensu\"\ndefault.sensu.log_directory = \"/var/log/sensu\"\ndefault.sensu.use_...
ruby
chosen
[ { "from": "system", "value": "Update Flowdock to use version 'latest' & no_checksum" }, { "from": "human", "value": "class Flowdock < Cask\n url 'https://d2ph5hv9wbwvla.cloudfront.net/mac/Flowdock_v1_1_0.zip'\n homepage 'https://www.flowdock.com/help/desktop'\n version '1.1.0'\n sha1 '623329...
ruby
chosen
[ { "from": "human", "value": "Add new cask QLC+.app v4.11.1\n" }, { "from": "gpt", "value": "cask 'qlc-plus' do\n version '4.11.1'\n sha256 'd34804876fbac6fa6c1a5a4310d15cbdcf1423d460a9242b8f43453da4c964ec'\n\n url \"http://qlcplus.org/downloads/#{version}/QLC+_#{version}.dmg\"\n name 'Q Ligh...
ruby
chosen
[ { "from": "system", "value": "Fix grammar for \"Not rescue Exception\"\n\nThis is not a grammatically correct sentence. The class should also probably be renamed." }, { "from": "human", "value": "# encoding: utf-8\nmodule RailsBestPractices\n module Reviews\n # Review all code to make sure w...
ruby
chosen
[ { "from": "system", "value": "Remove validations if nonce presence\n" }, { "from": "human", "value": "module PiggybakBraintree\n module PaymentDecorator\n extend ActiveSupport::Concern\n\n included do\n attr_accessor :payment_method_nonce\n\n validates :payment_method_nonce, pre...
ruby
chosen
[ { "from": "system", "value": "Allow to use local rubocop config by rake task.\n\nIn some projects rubocop returns:\n```\n(Using Ruby 2.0 parser; configure using TargetRubyVersion parameter, under AllCops)\n```\n\nDifferent projects using different ruby versions. To fix this problem user should set TargetRub...
ruby
chosen
[ { "from": "system", "value": "Make sure everyone knows that CheckProvider is meant to be used along with vagrant's builtin Call action\n" }, { "from": "human", "value": "module Vagrant\n module Notify\n module Action\n class CheckProvider\n def initialize(app, env)\n @ap...
ruby
chosen
[ { "from": "system", "value": "Update org nickname from latest data\n" }, { "from": "human", "value": "# Using American spelling to match GitHub usage\nclass Organization < Owner\n # TODO: rename this to members\n has_and_belongs_to_many :users, join_table: :organizations_users\n\n def user?\n...
ruby
chosen
[ { "from": "system", "value": "Allow users to set their picture, website and about text.\n" }, { "from": "human", "value": "# == Schema Information\n#\n# Table name: user_profiles\n#\n# id :integer not null, primary key\n# user_id :integer not null\n# picture_uid :...
ruby
chosen
[ { "from": "system", "value": "Add javascripts and stylesheets to generator\n" }, { "from": "human", "value": "class SocialStream::Documents::InstallGenerator < Rails::Generators::Base\n include Rails::Generators::Migration\n \n source_root File.expand_path('../templates', __FILE__)\n\n def c...
ruby
chosen
[ { "from": "system", "value": "Set a default password for Backstage for local Vagrant development.\n" }, { "from": "human", "value": "name \"vagrant\"\ndescription \"A role for the local vagrant development instances\"\n\nrun_list([\n \"recipe[vagrant_extras]\",\n \"recipe[vagrant_extras::ssl_c...
ruby
chosen
[ { "from": "system", "value": "Mark the pod as having submodules\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"Silica\"\n s.version = \"0.1.5\"\n s.summary = \"A framework for Cocoa window management.\"\n s.description = <<-DESC\n ...
ruby
chosen
[ { "from": "system", "value": "Make flaky test less specific\n\nThis test is a bit flaky and sometimes breaks CI.\n\nNeither ContentItemFilter or ContentItem define an ordering, so it\nlooks like this is non deterministic.\n\nI think all we really expect here is that one of the content items is returned,\nit...
ruby
chosen
[ { "from": "system", "value": "Use :not_found instead of 404\n" }, { "from": "human", "value": "# A bunch of validations for incoming webhooks to ensure github is sending them\nmodule WebhookValidations\n extend ActiveSupport::Concern\n\n def verify_incoming_webhook_address!\n if valid_incom...
ruby
chosen
[ { "from": "system", "value": "Fix bug redirecting to new when property has no elements.\n" }, { "from": "human", "value": "class PropertyElementsController < ApplicationController\n before_filter :check_for_cancel, :only => [:create]\n\n def index\n @user = current_user\n @property = Pro...
ruby
chosen
[ { "from": "system", "value": "Update Parity formula for v0.9.2\n\n* Faster deploys, less interaction with development-machine Rake\n" }, { "from": "human", "value": "require \"formula\"\n\nclass Parity < Formula\n homepage \"https://github.com/thoughtbot/parity\"\n url \"https://github.com/tho...
ruby
chosen
[ { "from": "system", "value": "Remove lower-case letters from regex\n\nIn the README for this problem the letters are always in upper case. And\nin the example solution, the `alphabet` method only returns upper case.\nSo I didn't think the tests needed to check for lower case letters.\n" }, { "from":...
ruby
chosen
[ { "from": "system", "value": "Remove submodules from podspec source\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"Verso\"\n s.version = \"0.0.1\"\n s.summary = \"A multi-paged image viewer for iOS\"\n \n s.homepage = \"https://github.co...
ruby
chosen
[ { "from": "system", "value": "Update pod version to 0.2.0\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"IDPDesign\"\n s.version = \"0.1.0\"\n s.summary = \"Placeholder\"\n s.description = <<-DESC\n Placeholder\n DESC\n ...
ruby
chosen
[ { "from": "system", "value": "Comment file related to screenshot archiver, that is not being used\n" }, { "from": "human", "value": "module MediaScreenshotArchiver\n extend ActiveSupport::Concern\n\n def screenshot_script=(script)\n @screenshot_script = script\n end\n\n def screenshot_scr...
ruby
chosen
[ { "from": "system", "value": "Move relative location of rspec (core) directory.\n" }, { "from": "human", "value": "dir = File.dirname(__FILE__)\n$LOAD_PATH.unshift \"#{dir}/../../../rspec/lib\" \nrequire 'spec'\nrequire 'stringio'\n\nmodule Spec::Example::ExampleMethods\n def set_env\n root ...
ruby
chosen
[ { "from": "system", "value": "JariBakken: Update spec to check host of proxied HTTP client.\n\ngit-svn-id: aa1aa1384423cb28c2b1e29129bb3a91de1d9196@10680 07704840-8298-11de-bf8c-fd130f914ac9\n" }, { "from": "human", "value": "require File.expand_path(\"../../../spec_helper\", __FILE__)\n\nmodule...
ruby
chosen
[ { "from": "system", "value": "Remove gemspec dependency on `git`\n\nShelling out is unecessary, especially since no .rb files are\ngitignore'd.\n\nUsing the same thing I did for `overcommit`:\n\n https://github.com/causes/overcommit/blob/master/overcommit.gemspec#L20-L22\n\nChange-Id: I3fb732dc5e5c59cd618d...
ruby
chosen
[ { "from": "system", "value": "Add spec for NotifyRegisteredUserFromProposedOrg associating user with org\n" }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe NotifyRegisteredUserFromProposedOrg do\n\n let(:user){FactoryGirl.create(:user)}\n let(:proposed_org){FactoryGirl.crea...
ruby
chosen
[ { "from": "human", "value": "Create unpublishing for withdrawn edition 383738\n\nFixes an error with `DocumentCollection` sync checks with `document_id\n= 256174`. This collection contains a `Document` with an id of `258249` which\nmanaged to get itself into a state where the `Edition` (383738) had a state ...
ruby
chosen
[ { "from": "system", "value": "Package version is increased from 0.1.0.0 to 0.1.0.1\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'event_store-messaging'\n s.summary = 'Messaging primitives for EventStore using the EventStore Client HTTP ...
ruby
chosen
[ { "from": "system", "value": "Add contenders to performance check\n" }, { "from": "human", "value": "require 'pp'\nrequire 'benchmark'\n\n$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../lib')\n\nrequire 'aurb'\n\nBenchmark.bm 7 do |x|\n x.report 'search' do\n Aurb.aur.searc...
ruby
chosen
[ { "from": "system", "value": "Update a file in gemspec file\n" }, { "from": "human", "value": "require 'json'\npackage = JSON.parse(IO.read(\"package.json\"))\n\nGem::Specification.new do |spec|\n spec.name = package[\"name\"]\n spec.version = package[\"version\"]\n spec.descri...
ruby
chosen
[ { "from": "system", "value": "Remove unused AB test config\n" }, { "from": "human", "value": "require_relative 'boot'\n\nrequire \"action_controller/railtie\"\nrequire \"sprockets/railtie\"\nrequire \"rails/test_unit/railtie\"\n\n# Require the gems listed in Gemfile, including any gems\n# you've...
ruby
chosen
[ { "from": "system", "value": "Move the auto generated config to top of file\n\nKeep our custom modifications at the bottom" }, { "from": "human", "value": "require_relative \"boot\"\nrequire_relative \"../app/lib/oauth_state_middleware\"\n\nrequire \"rails/all\"\n\n# Require the gems listed in G...
ruby
chosen
[ { "from": "system", "value": "Fix bug in rendering @usernames\n" }, { "from": "human", "value": "class AtUsers\n def self.render(content, messageboard)\n at_names = AtNotificationExtractor.new(content).extract\n members = messageboard.members_from_list(at_names)\n members.each { |membe...
ruby
chosen
[ { "from": "system", "value": "Use max_by instead of max in Charting.detect_available_plugin\n" }, { "from": "human", "value": "class Charting\n class << self\n extend Forwardable\n delegate [\n :backend, # charting backend name; FIXME: remove this method\n :render_...
ruby
chosen
[ { "from": "system", "value": "Fix \"exceeded available parameter key space\" bug with large POST requests\n\nRack attempts to parse the POST data as a form if the Content-Type header\nmatches one of its understood formats. Sometimes the Content-Type header\nis not set correctly by calls to the API and it tr...
ruby
chosen
[ { "from": "system", "value": "Make gemspec executable and build the gem.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib/', __FILE__)\n$:.unshift lib unless $:.include?(lib)\n\nrequire 'jsrebuild/version'\n\nGem::Specification.new do |gem|\n gem.name...
ruby
chosen
[ { "from": "system", "value": "Refactor to not use $- variable\n" }, { "from": "human", "value": "# This program outputs the Fibonacci sequence for as long\n# as it can using the closed-form expression of the series.\n\n$_ = $$ / $$ # 1\n@_ = $_ + $_ # 2\n$- = $_ - @_ # -1\n$__= @_ * @_ + $_ # ...
ruby
chosen
[ { "from": "system", "value": "Make sure to include the COPYING and TODO files in the gemspec, so that\ngenerated gems get those files (COPYING, in particular, is absolutely\nrequired)\n\n" }, { "from": "human", "value": "require 'rubygems'\n\nSPEC = Gem::Specification.new do |s|\n s.name ...
ruby
chosen
[ { "from": "system", "value": "Disable generate-cf-secrets test on Mac\n\nThis test fails on Mac because there isn't an `mkpasswd` command available.\nShort of writing our own hash+salt function, it seems there is no portable\nalternative. So we have to mark this test as \"pending\" if being run on Mac.\n\nI...
ruby
chosen
[ { "from": "system", "value": "Add Json output option to showing a topic\n\nThe json object returned has the keys\n`real`: _Content of the real tweet_\n`fake`: _Content of the fake tweet_\n`real_handle`: _Handle of user who created the real tweet_\n`fake_handle`: _Handle of user who created the fake tweet_\n...
ruby
chosen
[ { "from": "system", "value": "Fix foreign keys in incline_action_groups.\n" }, { "from": "human", "value": "class CreateInclineActionGroups < ActiveRecord::Migration\n def change\n create_table :incline_action_groups do |t|\n t.belongs_to :action_security, null: false, index: true, fo...
ruby
chosen
[ { "from": "system", "value": "Make the VMs a little bigger, so users do not have to wait for too long (hopefully)\n" }, { "from": "human", "value": "# Automatically set the discovery token on 'vagrant up'\n\nif File.exists?('kubernetes-cluster.yaml') && ARGV[0].eql?('up')\n require 'open-uri'\n...
ruby
chosen
[ { "from": "system", "value": "Allow span tags and lang attributes\n" }, { "from": "human", "value": "module PostsHelper\n def post_markdown(scope, field_name)\n if params['__html'].present?\n params['__html']\n else\n render_markdown(params[scope][field_name])\n end\n end\n\...
ruby
chosen
[ { "from": "system", "value": "Make our theme loading a little more Rails 1.1ish. Should now work with respond_to\n\ngit-svn-id: 70ab0960c3db1cbf656efd6df54a8f3de72dc710@1034 820eb932-12ee-0310-9ca8-eeb645f39767\n" }, { "from": "human", "value": "module ThemeHelper\n\n # NB: This overrides an un...
ruby
chosen
[ { "from": "system", "value": "Improve code according houndci comments\n" }, { "from": "human", "value": "class InternalPost < Post\n belongs_to :user\n validates :user, presence: true\n has_many :comments, as: :parent\n\n before_save do\n parser = Redcarpet::Markdown.new(Redcarpet::Render...
ruby
chosen
[ { "from": "system", "value": "Fix napa console when using IRB.\n\nIRB was taking extra arguments, \"console\" and optionally the environment, when running `napa console <environment>`. IRB then interprets this as a script name, and errors out. These arguments are now removed from ARGV before starting the in...
ruby
chosen