conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Add controller specs for filtering logic\n" }, { "from": "gpt", "value": "require 'rails_helper'\n\nRSpec.describe AnalyticsController, type: :controller do\n describe 'GET system_activity_logs' do\n it 'renders the correct template' do\n get :system_activit...
ruby
chosen
[ { "from": "system", "value": "Add tests for exposing search_text and original_search_text.\n" }, { "from": "human", "value": "describe \"Searchable table spec\" do\n tests TableScreenSearchable\n\n # Override controller to properly instantiate\n def controller\n @controller ||= TableScreen...
ruby
chosen
[ { "from": "system", "value": "Add the extconf.rb to the gemspec\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n\nrequire File.expand_path('../lib/testext/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = \"testext\"\n gem.version = Testext::VERSI...
ruby
chosen
[ { "from": "system", "value": "Update Rubymine 7.1.2 => 7.1.3\n" }, { "from": "human", "value": "cask :v1 => 'rubymine' do\n version '7.1.2'\n sha256 '01d28529e7e4456b362799d7501abe6f060176df60943a9f8955403f8d4f0f22'\n\n url \"http://download-cf.jetbrains.com/ruby/RubyMine-#{version}.dmg\"\n ...
ruby
chosen
[ { "from": "system", "value": "Replace deprecated 'before_filter' with 'before_action'\n" }, { "from": "human", "value": "class ApplicationController < ActionController::Base\n # Prevent CSRF attacks by raising an exception.\n # For APIs, you may want to use :null_session instead.\n protect_fr...
ruby
chosen
[ { "from": "system", "value": "ImageUploader: Use chainable API of \"image_processing\" gem\n" }, { "from": "human", "value": "require 'image_processing/mini_magick'\n\nclass ImageUploader < Shrine\n include ImageProcessing::MiniMagick\n\n plugin :pretty_location\n plugin :validation_helpers\n...
ruby
chosen
[ { "from": "system", "value": "Add acceptance test to check for package install and uninstall.\n" }, { "from": "human", "value": "require 'spec_helper_acceptance'\n\ndescribe 'git class' do\n\n context 'default parameters' do\n # Using puppet_apply as a helper\n it 'should work with no err...
ruby
chosen
[ { "from": "system", "value": "Move sleep to before login button\n" }, { "from": "human", "value": "module PayPal\n def open_popup\n return window_opened_by do\n find(\".braintree-sheet__button--paypal\").click\n end\n end\n\n def open_popup_and_complete_login(&block)\n paypal_po...
ruby
chosen
[ { "from": "system", "value": "Set timeout setting of Capybara to 120 seconds\n" }, { "from": "human", "value": "require 'coveralls'\nrequire 'simplecov'\nSimpleCov.formatter = Coveralls::SimpleCov::Formatter\nSimpleCov.start do\n add_filter do |source_file|\n if source_file.filename.include?...
ruby
chosen
[ { "from": "system", "value": "Create OrgFile class as test helper\n" }, { "from": "human", "value": "require \"codeclimate-test-reporter\"\nCodeClimate::TestReporter.start\n\n$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)\nrequire 'organicat'\n" }, { "from": "gpt", "value...
ruby
chosen
[ { "from": "system", "value": "Sort class names when comparing\n" }, { "from": "human", "value": "require 'inky'\n\ndef reformat_html(html)\n html\n .gsub(/\\s+/, ' ') # Compact all whitespace to a single space\n .gsub(/> *</, \">\\n<\") # Us...
ruby
chosen
[ { "from": "system", "value": "Clear all fixtures before running suite\n" }, { "from": "human", "value": "$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))\nrequire 'net/https'\nrequire 'ephemeral_response'\nrequire 'fakefs/safe'\nrequire 'fakefs/spec_helpers'\nrequire 'spec/auto...
ruby
chosen
[ { "from": "system", "value": "Use English name for Ruby global\n" }, { "from": "human", "value": "$:.unshift(File.expand_path('../lib', File.dirname(__FILE__)))\n\nrequire 'sun_times'\n\nRSpec.configure do |config|\n config.treat_symbols_as_metadata_keys_with_true_values = true\n config.run_al...
ruby
chosen
[ { "from": "system", "value": "Add YAML merge keys workaround.\n\nPrevent problems when using running tests with\na mongoid.yml using YAML merge keys on Ruby 1.9.2\nand RubyGems >= 1.5\n\nWill be needed until r30629 and r30630 are backported\nto 1.9.2 (ticket #4357)\n\nhttp://redmine.ruby-lang.org/issues/sho...
ruby
chosen
[ { "from": "system", "value": "Add Andrew Garner as an author" }, { "from": "human", "value": "$:.push File.expand_path('../lib', __FILE__)\n\nrequire 'feedback/version'\n\nGem::Specification.new do |s|\n s.name = 'feedback'\n s.version = Feedback::VERSION\n s.authors = ['Pablo ...
ruby
chosen
[ { "from": "system", "value": "Update help for CLI class\n" }, { "from": "human", "value": "require 'hanzo/modules/deploy'\nrequire 'hanzo/modules/install'\n\nmodule Hanzo\n class CLI < Base\n\n def initialize(args)\n @app = (args[0] =~ /-/) ? nil : args[0]\n super\n end\n\n de...
ruby
chosen
[ { "from": "system", "value": "INF-941: Add check if remore is cloned\n" }, { "from": "human", "value": "require 'securerandom'\nrequire 'erb'\n\nmodule Skyed\n # This module encapsulates all the Git features.\n module Git\n class << self\n def clone_stack_remote(stack, options)\n ...
ruby
chosen
[ { "from": "human", "value": "Add simple snapshot handling class.\n" }, { "from": "gpt", "value": "module Humus\n \n class Snapshots\n \n attr_reader :access_key_id\n attr_reader :secret_access_key\n \n def initialize access_key_id = nil, secret_access_key = nil\n @access_ke...
ruby
chosen
[ { "from": "system", "value": "Change gemspec homepage to GitHub" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'libpixel/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Add YARD as a development dependency\n\nSigned-off-by: David Celis <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@davidcel.is>\n" }, { "from": "human", "value": "# encoding: utf-8\n$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)\nrequire 'creperie/version'\n\nGem...
ruby
chosen
[ { "from": "system", "value": "Remove post install message from 0.5.0\n\nCloses #164\n" }, { "from": "human", "value": "$LOAD_PATH.push File.expand_path('../lib', __FILE__)\n\nrequire 'griddler/version'\n\nGem::Specification.new do |s|\n s.name = 'griddler'\n s.version = Griddler::VE...
ruby
chosen
[ { "from": "system", "value": "Add tweet command to run method\n" }, { "from": "human", "value": "require 'jumpstart_auth'\n\nclass MicroBlogger\n attr_reader :client\n\n def initialize\n puts \"Initializing...\"\n @client = JumpstartAuth.twitter\n end\n\n def tweet(mess...
ruby
chosen
[ { "from": "human", "value": "Add migration to change cpu and memory columns\n" }, { "from": "gpt", "value": "class RenameHardwareColumns < ActiveRecord::Migration\n def change\n rename_column :hardwares, :cores_per_socket, :cpu_cores_per_socket\n rename_column :hardwares, :numvcpus, :cpu_...
ruby
chosen
[ { "from": "system", "value": "Use dynamic method definition in ContainerUnit\n" }, { "from": "human", "value": "module C2y\n class DSL::Context::ContainerUnit\n attr_reader :result\n\n def initialize(name, &block)\n @result = OpenStruct.new({\n name: name\n })\n\n in...
ruby
chosen
[ { "from": "system", "value": "Revert \"Fix File.lchmod spec guards\"\n\n* This reverts commit cc7b9e56898950e36221e2d4b92d6d90288244c8.\n* Not good enough: https://bugs.ruby-lang.org/issues/16756\n" }, { "from": "human", "value": "require_relative '../../spec_helper'\n\ndescribe \"File.lchmod\" ...
ruby
chosen
[ { "from": "system", "value": "Create attr_accessor based on list\n" }, { "from": "human", "value": "require 'lightspeed_restaurant/base'\n\nmodule LightspeedRestaurant\n class Customer < LightspeedRestaurant::Base\n attr_accessor :id,\n :city,\n :country,\n ...
ruby
chosen
[ { "from": "system", "value": "Revert \"Fixing preference to work with spree 1.1.0.beta\"\n\nThis reverts commit 1cac53bcc46270b619166ee9c17533e0e62a9746.\n" }, { "from": "human", "value": "module Spree\n class PagSeguroConfiguration < Spree::Preferences::Configuration\n preference :email, :s...
ruby
chosen
[ { "from": "system", "value": "Change action collection to return super class collection if available.\n" }, { "from": "human", "value": "module TableCloth\n module Extensions\n module Actions\n autoload :Action, \"table_cloth/extensions/actions/action\"\n autoload :Column, \"table_...
ruby
chosen
[ { "from": "system", "value": "Move this class to the right lexical scope\n" }, { "from": "human", "value": "require 'uuidtools'\nrequire 'xcode_snippets/bundle'\nrequire 'xcode_snippets/manifest'\n\nmodule XcodeSnippets\n class SnippetManager\n attr_accessor :xcode_snippets_path\n attr_re...
ruby
chosen
[ { "from": "system", "value": "Use Spree::State.first instead of FactoryBot.create(:state)\n\nFor Solidus v2.5 and upwards, using the aforementioned syntax caused\nan address state mismatch with the address country, causing the spec\nto fail\n" }, { "from": "human", "value": "require 'spec_helper...
ruby
chosen
[ { "from": "human", "value": "Add feature spec for the homepage\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\nRSpec.feature \"The homepage\" do\n let(:work1) { create(:work, :public, title: ['Work 1']) }\n before do\n create(:featured_work, work_id: work1.id)\n end\n\n scenario...
ruby
chosen
[ { "from": "system", "value": "Tag the Kramdown::Document specs with :integration.\n" }, { "from": "human", "value": "require_relative '../spec_helper'\n\nrequire 'kramdown/man'\n\ndescribe Kramdown::Document do\n let(:man_dir) { File.expand_path('../../../man',__FILE__) }\n let(:markdown...
ruby
chosen
[ { "from": "human", "value": "Add a test for Mal.typespec\n" }, { "from": "gpt", "value": "require_relative 'spec_helper'\n\ndescribe 'Mal' do\n describe '.typespec' do\n it 'allows shorthand typespecs to be created without module prefixing' do\n matcher = Mal.typespec { Maybe(String) }\...
ruby
chosen
[ { "from": "system", "value": "Use a custom null object in the silence output context\n" }, { "from": "human", "value": "# coding: utf-8\n\nshared_context 'silence output', silence_output: true do\n before do\n null_output = double('output').as_null_object\n\n @original_stdout = $stdout\n ...
ruby
chosen
[ { "from": "system", "value": "MINOR: Make Salad accept \"login\" or \"log in\"\n\ngit-svn-id: 6a4b03ee343470183bbb87c82a181a93d31fa3a9@101870 467b73ca-7a2a-4603-9d3b-597d59a354a9\n" }, { "from": "human", "value": "\n# Log in\nGiven /log in as (.*)$/ do |user|\n\tGiven \"I fill out the log in for...
ruby
chosen
[ { "from": "system", "value": "Add description for default api config\n" }, { "from": "human", "value": "Openapi.configure do |config|\n config.apis = {\n default: {\n title: 'Default',\n description: '',\n version: '1.0',\n base_path: '/api',\n controllers: []\n }...
ruby
chosen
[ { "from": "system", "value": "Add `references` to fixtures as well\n" }, { "from": "human", "value": "require 'rails/generators/test_unit/model/model_generator'\nrequire File.join(File.dirname(__FILE__), '../base')\n\nmodule NestedScaffold\n module Generators\n module Model\n class Test...
ruby
chosen
[ { "from": "system", "value": "Update account information controller now that accounts can have multiple consumer keys.\n" }, { "from": "human", "value": "module Twurl\n class AccountInformationController < AbstractCommandController\n def dispatch\n rcfile = OAuthClient.rcfile\n if ...
ruby
chosen
[ { "from": "system", "value": "Add test for role description helper\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass UsersHelperTest < ActionView::TestCase\nend\n" }, { "from": "gpt", "value": "require 'test_helper'\n\nclass UsersHelperTest < ActionView::TestCase\n i...
ruby
chosen
[ { "from": "system", "value": "Add test for new card form\n" }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe 'Customizing and ordering a card' do\n let(:template) { CardTemplate.create(greeting: \"nevermind\", image_file: \"123.gif\") }\n\n describe 'Viewing the customization...
ruby
chosen
[ { "from": "system", "value": "Add test that verifies the correct time is associated with the skill record\n" }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe Skill do\n it \"is valid with a title\" do\n skill = Skill.new(title: \"juggling\")\n expect(skill.valid?).to be ...
ruby
chosen
[ { "from": "system", "value": "Add DB cleaner to model tests\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'spec_helper'\n\nRSpec.describe Collection, type: :model do\n describe '#is_public' do\n it 'returns true if a collection is not restricted' do\n user ...
ruby
chosen
[ { "from": "system", "value": "Add autoload paths for development convenience\n" }, { "from": "human", "value": "require \"rails/railtie\"\n\nmodule Magi\n module SimpleCov\n class Railtie < Rails::Railtie\n config.after_initialize do\n require \"magi/simple_cov/initializer\"\n ...
ruby
chosen
[ { "from": "system", "value": "Return 'ok' in the webhook\n" }, { "from": "human", "value": "require 'sinatra'\nrequire 'yajl'\nrequire 'active_support/core_ext/hash'\nrequire 'dalli'\n\nrequire 'metriks_log_webhook/librato_metrics'\nrequire 'metriks_log_webhook/metrik_log_parser'\nrequire 'metri...
ruby
chosen
[ { "from": "system", "value": "Fix unitialized constant by including redcarpet\n\nremove puts\nremove comments\ntidy up whitespace\n" }, { "from": "human", "value": "# Require core library\nrequire \"middleman-core\"\n\n# Extension namespace\nclass I18nMarkdown < ::Middleman::Extension\n option ...
ruby
chosen
[ { "from": "system", "value": "Remove useless grouped_relations local variable\n" }, { "from": "human", "value": "# encoding: utf-8\nrequire \"mongoid/relations/eager/base\"\nrequire \"mongoid/relations/eager/belongs_to\"\nrequire \"mongoid/relations/eager/has_one\"\nrequire \"mongoid/relations/e...
ruby
chosen
[ { "from": "system", "value": "Use clearer sync DSL for controller.\n" }, { "from": "human", "value": "module Sync\n\n module ControllerHelpers\n\n include Actions\n\n def self.included(base)\n base.extend ClassMethods\n end\n\n module ClassMethods\n def sync_action(*action...
ruby
chosen
[ { "from": "system", "value": "Fix apps.json call so tests pass.\n" }, { "from": "human", "value": "# encoding: utf-8\n\nmodule Validic\n module ThirdPartyApp\n\n ##\n # Get List of Third Party Apps available base on `access_token` and organization_id\n #\n # params[:organization_id]...
ruby
chosen
[ { "from": "system", "value": "Check restricted method definitions in Album\n" }, { "from": "human", "value": "require \"spec_helper\"\n\ndescribe LastFM::Album do\n it \"should define unrestricted methods\" do\n LastFM::Album.should respond_to(:get_buy_links, :get_info, :get_top_tags, :sear...
ruby
chosen
[ { "from": "system", "value": "Check all whitespace, not just space char\n" }, { "from": "human", "value": "require_relative 'spec_helper.rb'\n\ncontext 'non-ruby files' do\n # Whitespace in ruby files is managed by Rubocop.\n # Ignore ems.proto as it's a generated file.\n failures = `git grep...
ruby
chosen
[ { "from": "human", "value": "Add spec helper for capturing stdout to a string\n\n* Shout out to @avdi for his awesome RubyTapas!\n* http://www.rubytapas.com/episodes/29-Redirecting-Output\n" }, { "from": "gpt", "value": "require 'stringio'\n\ndef capture_stdout\n captured_output = StringIO.new\...
ruby
chosen
[ { "from": "system", "value": "Remove nonexistent header search path\n\n`$(SDKROOT)/Developer/Library/Frameworks` does not exist in the OS X SDK." }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'Kiwi'\n s.version = '2.0.3'\n s.summary = 'A Behavior D...
ruby
chosen
[ { "from": "system", "value": "Use default values for definitions\n" }, { "from": "human", "value": "module CalcJSON\n\n\tclass Algorithm\n\n attr_reader :raw_js, :definitions\n\n def initialize(js, definitions)\n \t@raw_js = js\n \t@definitions = definitions\n end\n\n def ...
ruby
chosen
[ { "from": "system", "value": "Use table name in where condition to avoid ambiguous column error\n" }, { "from": "human", "value": "require 'active_record' unless defined? ActiveRecord\n\nmodule LoadMore\n module ActiveRecord\n @@per_load = 10\n\n def per_load=(limit)\n @@per_load = l...
ruby
chosen
[ { "from": "system", "value": "Add app root directory to gem path\n" }, { "from": "human", "value": "require 'sinatra'\nrequire 'sinatra/base'\n\nrequire 'json'\nrequire 'mail'\nrequire 'github_api'\n\nrequire 'pgquilter/config'\nrequire 'pgquilter/application'\nrequire 'pgquilter/git'\nrequire '...
ruby
chosen
[ { "from": "system", "value": "Fix Gemspec warnings for overzealous dependency restrictions\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 'ACLS'\n s.summary = 'ACLS - Automatic Code Loading System'\n s.description = 'ACLS is a library for autoloading Ruby source f...
ruby
chosen
[ { "from": "system", "value": "Switch back 2.2.7, last bump not required\n" }, { "from": "human", "value": "dir = File.dirname(__FILE__)\nrequire File.expand_path(File.join(dir, 'lib', 'le'))\n\nGem::Specification.new do |s|\n s.name\t= \"le\"\n s.version\t= \"2.2.8\"\n s.date\t= Time.now\n s...
ruby
chosen
[ { "from": "system", "value": "Set pre_tax_amount for shipments so that migration works\n\nOn existing installations, the migrations `IncreaseScaleOnPreTaxAmounts`\nwill fail because of existing shipments not having a `pre_tax_amount` set.\n\nFixes #6525\nFixes #6527\n" }, { "from": "human", "val...
ruby
chosen
[ { "from": "system", "value": "Add carrier and service level to the shipping method factory\n" }, { "from": "human", "value": "FactoryGirl.define do\n factory :base_shipping_method, class: Spree::ShippingMethod do\n zones { |a| [Spree::Zone.global] }\n name 'UPS Ground'\n code 'UPS_GROU...
ruby
chosen
[ { "from": "system", "value": "Install basic prometheus node exporter on UCL machines\n" }, { "from": "human", "value": "name \"ucl\"\ndescription \"Role applied to all servers at UCL\"\n\ndefault_attributes(\n :location => \"Slough, England\",\n :networking => {\n :roles => {\n :intern...
ruby
chosen
[ { "from": "human", "value": "Speed up role assignments fetch\n\n(ActionItem3197)\n" }, { "from": "gpt", "value": "class IndexRoleAssignmentsFilteredFields < ActiveRecord::Migration\n\n def self.up\n add_index :role_assignments, [:accessor_id, :accessor_type]\n add_index :role_assignments,...
ruby
chosen
[ { "from": "human", "value": "Rename UK Government Scotland back to Scotland Office\n\nScotland Office was the original name that was changed in\nhttps://github.com/alphagov/whitehall/pull/2953 but this was done\nprematurely so we're changing the name back.\n" }, { "from": "gpt", "value": "scotla...
ruby
chosen
[ { "from": "human", "value": "Update committee_member_id primary key to bigint\n" }, { "from": "gpt", "value": "class ChangeCommitteeMemberIdToBigint < ActiveRecord::Migration[6.0]\n def up\n change_column :committee_members, :id, :bigint\n end\n\n def down\n change_column :committee_mem...
ruby
chosen
[ { "from": "system", "value": "Remove other deployment_target than iOS\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'BothamUI'\n s.version = '0.0.1'\n s.license = 'Apache V2'\n s.summary = 'Model View Presenter Framework written in Swift'\n s.homepage = 'https...
ruby
chosen
[ { "from": "system", "value": "Fix typo in gem description\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'to_source'\n s.version = '0.2.17'\n s.authors = ['Markus Schirp']\n s.email = ['m...
ruby
chosen
[ { "from": "system", "value": "Add auto_updates flag to Codekit\n" }, { "from": "human", "value": "cask 'codekit' do\n version '2.6.1-19102'\n sha256 'a655aa723a9bb762a187ce14c5a70648cf62801cd264e1168b9649287910296b'\n\n url \"https://incident57.com/codekit/files/codekit-#{version.sub(%r{.*-},...
ruby
chosen
[ { "from": "system", "value": "Fix homepage to use SSL in VyprVPN Cask\n\nThe HTTP URL is already getting redirected to HTTPS. Using the HTTPS URL directly\nmakes it more secure and saves a HTTP round-trip.\n" }, { "from": "human", "value": "cask :v1 => 'vyprvpn' do\n version '2.6.1.2422'\n sha...
ruby
chosen
[ { "from": "system", "value": "Update rubocop requirement from ~> 1.30.0 to ~> 1.31.1\n\nUpdates the requirements on [rubocop](https://github.com/rubocop/rubocop) to permit the latest version.\n- [Release notes](https://github.com/rubocop/rubocop/releases)\n- [Changelog](https://github.com/rubocop/rubocop/bl...
ruby
chosen
[ { "from": "human", "value": "Add a package for Better Atmospheres.\n\nI'm not entirely sure this works properly, but it definitely has made some\nchanges.\n" }, { "from": "gpt", "value": "class BetterAtmospheresLowDef < Kosmos::Package\n title 'Better Atmospheres - Low Definition (512 x 512)'\n...
ruby
chosen
[ { "from": "system", "value": "Use the new Protobuf Enum API\n" }, { "from": "human", "value": "require 'active_support/concern'\n\nmodule Protobuf\n module ActiveRecord\n module Validations\n extend ::ActiveSupport::Concern\n\n module ClassMethods\n # Validates whether the v...
ruby
chosen
[ { "from": "system", "value": "Add reflection for exercise 4.3.\n" }, { "from": "human", "value": "puts \"Hello! What is your first name?\"\nfirst = gets.chomp\nputs \"And your middle name?\"\nmiddle = gets.chomp\nputs \"How about your last name?\"\nlast = gets.chomp\nputs \"Greetings, #{first} #...
ruby
chosen
[ { "from": "system", "value": "Revert \"rewrite save_top_ten to pull from top_ten\"\n\nThis reverts commit 311272dda2d01502b050e226d1aff59ee6af8a77.\n" }, { "from": "human", "value": "class Subscriber < ActiveRecord::Base\n # Pulls top ten posts from reddit front page\n def self.top_ten\n @f...
ruby
chosen
[ { "from": "system", "value": "Fix the call to alias, no comma is needed.\n" }, { "from": "human", "value": "class Msg::Base\n def initialize(args)\n @person = args[:person]\n @params = args[:params]\n end\n\n def body\n @body ||= @params[:Body] if @params.has_key? :Body\n end\n\n d...
ruby
chosen
[ { "from": "human", "value": "Fix links in preview that point at the old staging server.\n\nI'll run this manually on preview.\n" }, { "from": "gpt", "value": "Document.record_timestamps = false\ndocuments = Document.where(\"body like '%whitehall.staging%'\")\ndocuments.each do |document|\n fixe...
ruby
chosen
[ { "from": "system", "value": "Upgrade nokogiri because of CVE-2017-9050\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'floorplanner/version'\n\nGem::Specification.new do |spec|\n s...
ruby
chosen
[ { "from": "system", "value": "Update to use the recent gem changes\n" }, { "from": "human", "value": "module ManageIQ::Providers\n module AnsibleTower\n class ConfigurationManager::Refresher < ManageIQ::Providers::BaseManager::Refresher\n include ::EmsRefresh::Refreshers::EmsRefresherMi...
ruby
chosen
[ { "from": "system", "value": "Upgrade Blender to 2.76a bugfix release\n" }, { "from": "human", "value": "cask :v1 => 'blender' do\n version '2.76'\n sha256 '542bc7fe9871c5a8f80efd5b9657416eda45d3dbeb455189367303203da695c9'\n\n url \"https://download.blender.org/release/Blender#{version.to_f}/...
ruby
chosen
[ { "from": "system", "value": "Update MakeMKV to version 1.9.6" }, { "from": "human", "value": "cask :v1 => 'makemkv' do\n version '1.9.5'\n sha256 '091a7ae803296783f018682bda2099d53a3d4fff61560836888ac4e73607a75e'\n\n url \"http://www.makemkv.com/download/makemkv_v#{version}_osx.dmg\"\n name...
ruby
chosen
[ { "from": "system", "value": "Fix podspec for issue with new build system in xcode 10\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"SimpleAnimation\"\n s.version = \"0.4.0\"\n s.summary = \"A UIView extension to make basic animations, like ...
ruby
chosen
[ { "from": "system", "value": "Add missing dependency to gemspec\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |gem|\n gem.name = 'response'\n gem.version = '0.0.1'\n gem.authors = [ 'Markus Schirp' ]\n gem.email = [ 'mbj@seonic...
ruby
chosen
[ { "from": "system", "value": "Add SVN password to deplloy file!\n\ngit-svn-id: 96bd6241e080dd4199045f7177cf3384e2eaed71@357 2d86388d-c40f-0410-ad6a-a69da6a65d20\n" }, { "from": "human", "value": "require 'mongrel_cluster/recipes'\n\nset :application, \"obra\"\nset :repository, \"svn+ssh://butler...
ruby
chosen
[ { "from": "system", "value": "Make sure we send content-disposition for downloads\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'sinatra'\nrequire \"sinatra/json\"\nrequire 'json'\nrequire 'rest-client'\nrequire 'base64'\nrequire \"sinatra/streaming\"\n\nclass Accen...
ruby
chosen
[ { "from": "system", "value": "Fix redirect after editing a sponsor.\n\nSigned-off-by: Siddharth Kannan <805f056820c7a1cecc4ab591b8a0a604b501a0b7@gmail.com>\n" }, { "from": "human", "value": "class SponsorsController < ApplicationController\n before_filter :ensure_signed_in\n\n def show\n @a...
ruby
chosen
[ { "from": "system", "value": "Set slug value of the new_supporting_page to the old one\n\nThe slug will be set on create, but set it back to the old slug\n" }, { "from": "human", "value": "module Edition::SupportingPages\n extend ActiveSupport::Concern\n\n class Trait < Edition::Traits::Trait\...
ruby
chosen
[ { "from": "system", "value": "Fix schema route for Rails 3\n" }, { "from": "human", "value": "JsonSchemaRails::Engine.routes.draw do\n get '*schema(.:format)', to: 'schemas#get'\nend\n" }, { "from": "gpt", "value": "JsonSchemaRails::Engine.routes.draw do\n get '/:schema(.:format)',...
ruby
chosen
[ { "from": "system", "value": "Add route for show JSON endpoint\n" }, { "from": "human", "value": "Rails.application.routes.draw do\n\n resource :thermostat, only: [:new, :create, :edit, :update] do\n member do\n post :migrate_settings\n end\n end\n\n post '/im_hot' => \"thermostat...
ruby
chosen
[ { "from": "system", "value": "Update faraday_middleware dependency to ~> 0.9.1\n" }, { "from": "human", "value": "# encoding: utf-8\nrequire File.expand_path('../lib/congress/version', __FILE__)\n\nGem::Specification.new do |spec|\n spec.add_dependency 'faraday', '~> 0.8.7'\n spec.add_dependen...
ruby
chosen
[ { "from": "system", "value": "Remove the gemspec's hardcoded date\n\n`gem build` will automatically fill this in.\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.rubygems_version = \"1.8.0\"\n s.required_ruby_version = \">= 1.9.3\"\n\n s.name = \"git...
ruby
chosen
[ { "from": "system", "value": "Resolve deprecation warning from SimpleCov\n" }, { "from": "human", "value": "require 'simplecov'\nformatters = [ SimpleCov::Formatter::HTMLFormatter ]\n\nif ENV['TRAVIS']\n require 'coveralls'\n formatters << Coveralls::SimpleCov::Formatter\nend\n\nSimpleCov.form...
ruby
chosen
[ { "from": "system", "value": "Add sqlite3 boolean configuration option, avoids deprecation warning\n" }, { "from": "human", "value": "# Classes required for the tests\nclass User; end\nmodule ApplicationHelper; def current_user; raise; end; end\n\n# Create a rails app\nmodule PaulRevere\n class...
ruby
chosen
[ { "from": "system", "value": "Update OmniFocus to use versioned downloads\n\nMake the version check condition more readable\n" }, { "from": "human", "value": "cask :v1 => 'omnifocus' do\n version :latest\n sha256 :no_check\n\n url 'http://www.omnigroup.com/download/latest/omnifocus'\n homepa...
ruby
chosen
[ { "from": "system", "value": "Fix response from test stub\n" }, { "from": "human", "value": "ENV['RACK_ENV'] = 'test'\n\nrequire 'minitest/autorun'\nrequire 'rack/test'\nrequire 'webmock/minitest'\nrequire_relative '../micropub-github-pages'\n\nWebMock.disable_net_connect!(:allow_localhost => tr...
ruby
chosen
[ { "from": "system", "value": "Remove rogue assignment of RAILS_FRAMEWORK_ROOT\n" }, { "from": "human", "value": "RAILS_FRAMEWORK_ROOT='/home/aaron/Projects/Vendor/rails'\n# Load the plugin testing framework\n$:.unshift(\"#{File.dirname(__FILE__)}/../../plugin_test_helper/lib\")\nrequire 'rubygem...
ruby
chosen
[ { "from": "system", "value": "Update podspec to add UI component as a subspec\n\nRefactor core component into a subspec.\n\nNote all subspecs are included in the root spec if\ndefault_subspecs isn't specified." }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'NBClient'\n s....
ruby
chosen
[ { "from": "system", "value": "Update POST signup route to create user, save to DB and begin session\n" }, { "from": "human", "value": "get '/signin' do\n erb :'auth/signin'\nend\n\npost '/signin' do\n puts params\n redirect '/'\nend\n\npost '/signup' do\n user = User.new(params[:user])\n pu...
ruby
chosen
[ { "from": "human", "value": "Add routes to survey and dashboard\n" }, { "from": "gpt", "value": "post '/login' do\n user = User.find_by(name: params[:user][:email])\n\n if user.try(:authenticate, params[:user][:password])\n session[:user_id] = user.id\n end\n redirect \"/\"\nend\n\npost '...
ruby
chosen
[ { "from": "system", "value": "Revert \"fix for service name change in latest misty\"\n\nThis reverts commit 3ab2902\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule ServiceLayerNg\n module DnsServiceServices\n # This module implements Openstack Designate Pool API\n ...
ruby
chosen
[ { "from": "system", "value": "Enforce SSL only in Heroku\n\nEnforcing SSL with the Rails setting breaks staging and possibly production.\n\nStaging and Production already enforce SSL, so set it only for Heroku.\n" }, { "from": "human", "value": "Rails.application.configure do\n config.cache_cla...
ruby
chosen
[ { "from": "system", "value": "Revert \"Lock Octokit to v4.3.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 'jekyll-github-metadata/version'\n\nGem::Specification.new do |spec|\n ...
ruby
chosen
[ { "from": "system", "value": "Update gemspec with summary and description\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'imdb/version'\n\nGem::Specification.new do |spec|\n spec.na...
ruby
chosen