conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix version number to something valid to rubygems\n" }, { "from": "human", "value": "\r\nGem::Specification.new do |s|\r\n s.name = 'jekyll-compass'\r\n s.version = '0.2-dev'\r\n s.summary = \"Jekyll generator plugin to build Compass projects durin...
ruby
chosen
[ { "from": "system", "value": "Make clear it's a ruby client\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'contentful/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Make sure rs:ln and rs:md appear last\n" }, { "from": "human", "value": "require_relative 'shared/link_collection'\nrequire_relative 'xml'\nrequire_relative 'metadata'\n\nmodule Resync\n class Resource < LinkCollection\n include ::XML::Mapping\n include XML::...
ruby
chosen
[ { "from": "system", "value": "Sort the file list so it is in a reliable order\n\nSo that the compile file is reliably the same no matter where or when it\nis run.\n" }, { "from": "human", "value": "require 'shared_mustache/config'\nrequire 'shared_mustache/engine'\nrequire 'shared_mustache/railt...
ruby
chosen
[ { "from": "system", "value": "Refactor to remove begin in begin/rescue block" }, { "from": "human", "value": "require 'active_model'\n\nmodule Sequent\n module Core\n module Helpers\n # Validates DateTimes\n # Automatically included when using a\n #\n # attrs value: Dat...
ruby
chosen
[ { "from": "system", "value": "Stop all this redis stuff. Don't need it. Entry and its data is \"authoritatively\" stored in Mongo, lets use it.\n" }, { "from": "human", "value": "require 'json'\nrequire 'crocoduck/job'\nrequire 'crocoduck/redis'\nrequire 'crocoduck/resque'\nrequire 'crocoduck/...
ruby
chosen
[ { "from": "system", "value": "Add specs for Post model.\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Post do\nend\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe Post do\n describe 'create' do\n before do\n Post.create(\n tit...
ruby
chosen
[ { "from": "system", "value": "Configure Capybara to support single and multi tenant feature specs\n" }, { "from": "human", "value": "require \"capybara/rails\"\nrequire \"capybara/rspec\"\nrequire \"capybara-webkit\"\n\nCapybara.configure do |config|\n config.ignore_hidden_elements = true\n co...
ruby
chosen
[ { "from": "human", "value": "Add PHPStorm with bundled JDK\n" }, { "from": "gpt", "value": "cask :v1 => 'phpstorm-bundled-jdk' do\n version '9.0.1'\n sha256 '274f050445971108e503655cad01d407ee24b078a9a8d7075bd260bea4c3eb35'\n\n url 'http://download-cf.jetbrains.com/webide/PhpStorm-#{version}-...
ruby
chosen
[ { "from": "system", "value": "Use Fauxhai platform version 10.11.1 instead of 10.8.2\n" }, { "from": "human", "value": "require 'spec_helper'\nrequire 'chefspec'\nrequire 'chefspec/librarian'\n\nRSpec.configure do |config|\n config.platform = 'mac_os_x'\n config.version = '10.8.2' # FIXME: sys...
ruby
chosen
[ { "from": "system", "value": "Remove executables. Install interference fix\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'garager/version'\n\nGem::Specification.new do |s|\n s.name...
ruby
chosen
[ { "from": "system", "value": "Remove student searchbar caching from educator import job\n\n+ Good catch from @jhilde: this isn't needed on every import since all the main educator users of the platform have had this data precomputed for them with a background job.\n+ https://github.com/studentinsights/stude...
ruby
chosen
[ { "from": "human", "value": "Add the gemspec for the new name" }, { "from": "gpt", "value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |s|\n s.name = \"roger\"\n s.version = \"0.0.1\"\n \n s.authors = [\"Flurin Egger\", \"Edwin van der Graaf\", \"Joran Kapteijns\"]\n s.email = ...
ruby
chosen
[ { "from": "system", "value": "Add local admin accounts for NCHC machines\n" }, { "from": "human", "value": "name \"nchc\"\ndescription \"Role applied to all servers at NCHC\"\n\ndefault_attributes(\n :networking => {\n :nameservers => [ \"8.8.8.8\", \"8.8.4.4\" ],\n :roles => {\n :ex...
ruby
chosen
[ { "from": "system", "value": "Update gemspec for new readme.\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\nrequire \"git_wit/version\"\n\nGem::Specification.new do |s|\n s.name = \"git_wit\"\n s.version = GitWit::VERSION\n s.authors = [\"G...
ruby
chosen
[ { "from": "system", "value": "Fix unused interpolation in mock route validator." }, { "from": "human", "value": "class RouteValidator < ActiveModel::EachValidator\n def validate_each(record, attribute, value)\n return if record.request_method.blank?\n\n valid = begin\n # Parse path t...
ruby
chosen
[ { "from": "system", "value": "Fix podspec to depend on official crashlytics\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"CrashlyticsLumberjack\"\n s.version = \"2.0.1-beta\"\n s.summary = \"A Crashlytics Logging->CocoaLumberjack Bridge.\" \n s.homep...
ruby
chosen
[ { "from": "system", "value": "Fix tiny typo in encoding declaration" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'osrshighscores/version'\n\nGem::Specification.new do |spec|\n spec....
ruby
chosen
[ { "from": "system", "value": "Add missing empty lines between test cases" }, { "from": "human", "value": "describe AnsibleRepositoryController do\n include CompressedIds\n\n before do\n EvmSpecHelper.create_guid_miq_server_zone\n login_as FactoryGirl.create(:user_admin)\n end\n\n conte...
ruby
chosen
[ { "from": "system", "value": "Add more items to authors test array.\n" }, { "from": "human", "value": "class AuthorsController < ApplicationController\n def index\n ['casey', 'kelly']\n end\nend" }, { "from": "gpt", "value": "class AuthorsController < ApplicationController\n de...
ruby
chosen
[ { "from": "system", "value": "Make sure feed discovery url includes host name.\n" }, { "from": "human", "value": "class ContentController < ApplicationController\n class ExpiryFilter\n def before(controller)\n @request_time = Time.now\n end\n\n def after(controller)\n future...
ruby
chosen
[ { "from": "system", "value": "Refactor create bosh release test\n\nSigned-off-by: Maria Shaldibina <dc03896a0185453e5852a5e0f0fab6cbd2e026ff@pivotal.io>\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'create bosh release', type: :integration do\n it 'creates a bosh dev rel...
ruby
chosen
[ { "from": "system", "value": "Fix BundleCheck spec to stub in_path?\n\nThis spec didn't stub the call to `in_path?` when it should have. It\nworked because `bundler` is installed on Travis, but it is better form\nto not make that assumption.\n\nChange-Id: Ie974f5e22f55c3ab977c69f232e8667a4b34460c\nReviewed-...
ruby
chosen
[ { "from": "system", "value": "Add Rails filters to remove more sensitive fields\n\nThis focuses on removing sensitive parameter fields related to users and\nauthentication. We exclude specific fields in the auth hash, in case\napps use them elsewhere, as well as the entire raw auth hash.\nAdditionally, this...
ruby
chosen
[ { "from": "system", "value": "Update PaginatedArray that conforms Kaminari::PaginatableArray\n" }, { "from": "human", "value": "class PaginatedArray < Array\n attr_reader(:total_count)\n def initialize(values, total_count)\n super(values)\n @total_count = total_count\n end\n\n def self...
ruby
chosen
[ { "from": "system", "value": "Add test for getting and evaluation gameplay time\n" }, { "from": "human", "value": "require 'minitest/autorun'\nrequire 'minitest/reporters'\nrequire \"mastermind/oscar/time_manager\"\n\nclass TimeManagerTest < Minitest::Test\n def setup\n @client = Mastermind::...
ruby
chosen
[ { "from": "system", "value": "Allow the 'list' command to work with no flags." }, { "from": "human", "value": "require 'trollop'\nrequire 'rubygems'\nrequire 'stickler/client/config_file'\n\nmodule Stickler\n class Client\n\n attr_reader :argv\n attr_reader :sources\n\n def self.config...
ruby
chosen
[ { "from": "system", "value": "Update Gemspec to Recognise Windows\n\nIf we're on windows we need to get the WDM module. WE can't have the Terminfo module either. Still need to update snoop to recognise this." }, { "from": "human", "value": "$:.unshift File.expand_path('../lib/', __FILE__)\n\nreq...
ruby
chosen
[ { "from": "system", "value": "Remove date field from gemspec\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = \"brew-cask-upgrade\"\n s.version = \"0.1.1\"\n s.date = \"2015-11-06\"\n s.summary = \"A command line tool for Homebrew Cask\"\n s....
ruby
chosen
[ { "from": "system", "value": "Remove development gem dependency version pins.\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'evtx/version'\n\nGem::Specification.new do |spec|\n spe...
ruby
chosen
[ { "from": "human", "value": "Add ActiveJob that will just free existing users for worker\n\nJobs that are in the queue currently will still retry a few times (or go\nto the deadset). If there's no job they will be sent straight to the\ndead queue. With this the existing jobs will not fail and will\ntransiti...
ruby
chosen
[ { "from": "system", "value": "Add educator labels for K8 counselor and housemaster to validation\n" }, { "from": "human", "value": "# For tagging educators with particular labels (eg, for\n# membership into different educators cohorts like NGE).\nclass EducatorLabel < ActiveRecord::Base\n belon...
ruby
chosen
[ { "from": "system", "value": "Make resource groups taggable concerns\n" }, { "from": "human", "value": "class ResourceGroup < ApplicationRecord\n alias_attribute :images, :templates\n\n has_many :vm_or_templates\n\n # Rely on default scopes to get expected information\n has_many :vms, :class...
ruby
chosen
[ { "from": "system", "value": "Fix undefined method error in Sinatra adapter.\n" }, { "from": "human", "value": "# Authlogic bridge for Sinatra\nmodule Authlogic\n module ControllerAdapters\n module SinatraAdapter\n class Cookies\n attr_reader :request, :response\n\n def in...
ruby
chosen
[ { "from": "system", "value": "Use finder to eager-load results\n" }, { "from": "human", "value": "module Concerns\n module OverallBar\n module Races\n extend ActiveSupport::Concern\n \n def find_race(discipline, category)\n if Discipline[:overall] == discipline\n ...
ruby
chosen
[ { "from": "system", "value": "Improve Rails app generation step (speedup)\n" }, { "from": "human", "value": "Given /^a pristine Rails application$/ do\n @aruba_timeout_seconds = 20\n\n run_simple 'bundle exec rails new test_app --skip-test-unit'\n assert_passing_with('README')\n\n cd 'test_a...
ruby
chosen
[ { "from": "system", "value": "Remove priviledged status from Plex\n" }, { "from": "human", "value": "#\n# Cookbook Name:: media-server\n# Recipe:: plex\n#\n# Copyright 2014, Seth Kingry\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in...
ruby
chosen
[ { "from": "system", "value": "Update summary and description in gemspec\n" }, { "from": "human", "value": "$:.push File.expand_path('../lib', __FILE__)\n\n# Maintain your gem's version:\nrequire 'disqus_rails/version'\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new d...
ruby
chosen
[ { "from": "system", "value": "Install Xorg on non-nvidia systems.\n" }, { "from": "human", "value": "#\n# Cookbook Name:: desktop\n# Recipe:: default\n#\n# Copyright 2015, YOUR_COMPANY_NAME\n#\n# All rights reserved - Do Not Redistribute\n#\n\n# apt\ninclude_recipe 'desktop::apt'\n\n# Hardware.\...
ruby
chosen
[ { "from": "system", "value": "Use clearer(?) `reduce` block for setter\n" }, { "from": "human", "value": "require \"enum_set/version\"\n\nmodule EnumSet\n EnumError = Class.new(NameError)\n\n def self.included(base)\n base.extend ClassMethods\n end\n\n module ClassMethods\n def enum_se...
ruby
chosen
[ { "from": "system", "value": "Resolve home path for windows users from environment variables\n\nFixes #20 .\nMy ruby skills are non-existant, but it seems to run here...\n" }, { "from": "human", "value": "require 'etc'\nrequire 'json'\nrequire 'yaml'\nrequire 'fileutils'\nrequire 'faraday'\nrequ...
ruby
chosen
[ { "from": "system", "value": "Add tests checking for esi:include tag when feature is enabled\n" }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.describe WelcomeController, type: :controller do\n\n it \"should get the root page at least...\" do\n get :index\n expect(respons...
ruby
chosen
[ { "from": "system", "value": "Update capistrano provider spec to use decoded fixture data\n" }, { "from": "human", "value": "require \"spec_helper\"\n\ndescribe Heaven::Provider::Capistrano do\n include FixtureHelper\n\n let(:deployment) { Heaven::Provider::Capistrano.new(SecureRandom.uuid, fi...
ruby
chosen
[ { "from": "system", "value": "Math: Make Float fixture inherit from Numeric for 1.9.\n" }, { "from": "human", "value": "class IncludesMath\n include Math\nend\n\nmodule MathSpecs\n class Float\n def initialize(value=1.0)\n @value = value\n end\n\n def to_f\n @value\n end\...
ruby
chosen
[ { "from": "system", "value": "Check if params are valid\n" }, { "from": "human", "value": "namespace :config do\n def file_name\n fetch(:environment_file)\n end\n\n desc 'Set config value by key'\n task :set, :options do |task, args|\n config = Hash[[:key, :value].zip(args[:options].sp...
ruby
chosen
[ { "from": "system", "value": "Add filter policy property to sns subscriptions resource\n" }, { "from": "human", "value": "require_relative '../resource'\n\nmodule Convection\n module Model\n class Template\n class Resource\n # @example\n # sns_subscription 'MySubscriptio...
ruby
chosen
[ { "from": "system", "value": "Use update_all instead of update_attribute\n" }, { "from": "human", "value": "class WallpaperPurityLockerWorker\n include Sidekiq::Worker\n include Sidetiq::Schedulable\n\n recurrence { hourly 2 }\n\n def perform\n Wallpaper.where('updated_at < ?', 1.hour.ago...
ruby
chosen
[ { "from": "system", "value": "Unify rotate method definitions to take keyword arguments\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule ActiveSupport\n module Messages\n class RotationConfiguration # :nodoc:\n attr_reader :signed, :encrypted\n\n def initi...
ruby
chosen
[ { "from": "system", "value": "Update parallel console to use new features.\n" }, { "from": "human", "value": "$:.unshift File.join(File.dirname(__FILE__), \"../lib\")\n\nrequire \"readline\"\nrequire \"weave\"\n\nusage = <<-EOS\nUsage:\n $ ./parallel-ssh user@host1 user@host2 ...\nEOS\n\nabort ...
ruby
chosen
[ { "from": "system", "value": "Update monkey patch to work with AASM 2.0.5\n" }, { "from": "human", "value": "module AASMWithFixes\n def self.included(base)\n base.send(:include, AASM)\n base.module_eval do\n class << self\n def inherited(child)\n AASM::StateMachine[ch...
ruby
chosen
[ { "from": "system", "value": "Change extended method into setup and alias extended to it\n\n* The setup method is what is being used directly so I thought it\n would be better to have it be the explicitly named method rather\n than extended, which is only used as a side effect.\n" }, { "from": "hu...
ruby
chosen
[ { "from": "system", "value": "Make attendees autocomplete case insensitive\n" }, { "from": "human", "value": "class AttendeesController < ApplicationController\n\n before_action :load_meeting, except: [:autocomplete]\n \n def autocomplete\n matching_attendees = current_user.attendees.where...
ruby
chosen
[ { "from": "system", "value": "Add required versions for dependent gems\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'experian/version'\n\nGem::Specification.new do |spec|\n spec.n...
ruby
chosen
[ { "from": "system", "value": "Use plural rules from govuk_app_config\n\nWe're moving these rules into govuk_app_config so that it is easier to maintain them.\n" }, { "from": "human", "value": "{\n # Dari - this isn't an iso code. Probably should be 'prs' as per ISO 639-3.\n dr: { i18n: { plura...
ruby
chosen
[ { "from": "system", "value": "Update description and homepage for gem\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'knapsack/version'\n\nGem::Specification.new do |spec|\n spec.na...
ruby
chosen
[ { "from": "system", "value": "Fix more deprecated GraphQL queries in tests\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass GraphqlControllerTest < ActionDispatch::IntegrationTest\n let(:user_con_profile) { create :user_con_profile }\n let(:convention) { user_con_profile.conve...
ruby
chosen
[ { "from": "system", "value": "Add tests to verify that lookup_codevalues is working correctly\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass ChecklistTestsHelperTest < ActiveSupport::TestCase\n include ChecklistTestsHelper\n\n def test_checklist_test_criteria_attribute\n ...
ruby
chosen
[ { "from": "system", "value": "Add development dependencies for testing\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'shogi_koma/version'\n\nGem::Specification.new do |spec|\n spec...
ruby
chosen
[ { "from": "system", "value": "Set gem homepage to openlogic repo.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'signed_xml/version'\n\nGem::Specification.new do |gem|\n ...
ruby
chosen
[ { "from": "human", "value": "Add verify 2FA webhook signature Ruby snippet\n" }, { "from": "gpt", "value": "require 'uri'\n\nclass CallbackVerifier\n\n # @param [request] A Rails request object\n # @param [api_key] The API key used to sign the request\n # @return [boolean] True if verified\n ...
ruby
chosen
[ { "from": "system", "value": "Add brief comments to ApiCall::Call methods.\n" }, { "from": "human", "value": "require 'open-uri'\nrequire 'rest_client'\nrequire 'json'\n\nmodule ApiCall\n class Call\n attr_accessor :title\n\n def initialize(title)\n @title = title\n @action = 'q...
ruby
chosen
[ { "from": "system", "value": "Add option parsing, among other changes\n" }, { "from": "human", "value": "require 'faye/websocket'\nrequire 'eventmachine'\nrequire 'net/http'\nrequire 'json'\nrequire 'fileutils'\nrequire './app/chatbot.rb'\nrequire './app/chathandler.rb'\nrequire './app/consolein...
ruby
chosen
[ { "from": "system", "value": "Reduce memory usage when storing files\n" }, { "from": "human", "value": "module DatastaxRails\n module Types\n class BinaryType < BaseType\n DEFAULTS = {:solr_type => false, :indexed => false, :stored => false, :multi_valued => false, :sortable => false, :...
ruby
chosen
[ { "from": "system", "value": "Rename rake task namespace to redmine_recurring_tasks.\n" }, { "from": "human", "value": "namespace :weekly_scheduler do\n desc 'Run issues check'\n task exec: :environment do\n date = Time.now\n week_day = date.strftime('%A').downcase\n\n WeeklySchedule....
ruby
chosen
[ { "from": "system", "value": "Fix issue on JRuby 1.8.\n" }, { "from": "human", "value": "require 'redis'\nrequire 'rollout'\nrequire 'active_support/deprecation'\nrequire 'active_support/core_ext/module'\n\nmodule Travis\n module Features\n mattr_accessor :redis, :rollout\n class << self\...
ruby
chosen
[ { "from": "system", "value": "Maintain _id when copying index\n" }, { "from": "human", "value": "module ES\n def self.copy_index(from_index, to_index, opts = {})\n scroll_timeout = opts.fetch(:scroll_timeout, '5m')\n scroll_size = opts.fetch(:scroll_size, 100)\n\n from = new(host: opts...
ruby
chosen
[ { "from": "system", "value": "Fix CLI and document a little better.\n" }, { "from": "human", "value": "require 'fire/core_ext'\nrequire 'fire/session'\n\nmodule Fire\n\n #\n class CLI\n\n #\n def self.run(argv=ARGV)\n new(argv).run\n end\n\n #\n def self.autorun(argv=ARGV)\...
ruby
chosen
[ { "from": "system", "value": "Make inspect slightly more useful\n" }, { "from": "human", "value": "require \"rolistic/version\"\nrequire \"rolistic/class_methods\"\nrequire \"rolistic/everything\"\n\nmodule Rolistic\n def self.included(klass)\n klass.class_exec do\n attr_reader :name, :...
ruby
chosen
[ { "from": "system", "value": "Add required params constant to Map\n" }, { "from": "human", "value": "require 'rmagick'\n\nmodule Poke\n # Map reads an ASCII file and coverts it to an object that can be read and\n # manipulated by other program objects.\n class Map\n\n include Poke::ReadMap...
ruby
chosen
[ { "from": "system", "value": "Fix derp with dev dependencies.\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 'srl-api'\n s.version = File.read('lib/srl.rb')[/RELEASE += +([\\\"\\'])([\\d][\\w\\.]+)\\1/, 2]\n s.platform = Gem::Platform::RUBY\n s.homepage = 'https:...
ruby
chosen
[ { "from": "system", "value": "Fix error path for rails 4.2\n" }, { "from": "human", "value": "desc \"Generates static error pages\"\ntask static_error_pages: :environment do\n app = ActionDispatch::Integration::Session.new(Rails.application)\n StaticErrorPages.supported_errors.each do |error|\...
ruby
chosen
[ { "from": "system", "value": "Update dependency versioning to not be pessimistic\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path('../lib', __FILE__)\n\nrequire 'grit/ext/version'\n\nGem::Specification.new do |s|\n s.name = 'grit-ext'\n s.version ...
ruby
chosen
[ { "from": "system", "value": "Allow strings as update assignments\n" }, { "from": "human", "value": "module Arel\n class Deletion < Compound\n def to_sql(formatter = nil)\n build_query \\\n \"DELETE\",\n \"FROM #{table_sql}\",\n (\"WHERE #{wheres.collect(&:to_sql).j...
ruby
chosen
[ { "from": "system", "value": "Make dependency on grape open-ended\n" }, { "from": "human", "value": "require File.join(Dir.pwd, 'lib', 'grape-route-helpers', 'version')\n\nGem::Specification.new do |gem|\n gem.name = 'grape-route-helpers'\n gem.version = GrapeRouteHelpers::VERSION\n...
ruby
chosen
[ { "from": "system", "value": "Update Google App Engine Launcher to v1.9.2\n" }, { "from": "human", "value": "class Googleappenginelauncher < Cask\n url 'https://commondatastorage.googleapis.com/appengine-sdks/featured/GoogleAppEngineLauncher-1.9.1.dmg'\n homepage 'https://developers.google.com...
ruby
chosen
[ { "from": "system", "value": "Refactor initialiser config for Edition Services\n\nChanges to make the code easier to read and understand.\n\n* Removes duplicate patterns\n* Shortens line lengths\n* Makes method chaining clearer\n" }, { "from": "human", "value": "Whitehall.edition_services.tap do...
ruby
chosen
[ { "from": "system", "value": "Update gemspec to include license\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/hideable/version', __FILE__)\n\nGem::Specification.new do |s|\n s.name = 'hideable'\n s.version = Hideable::VERSION\n s.pla...
ruby
chosen
[ { "from": "system", "value": "Return DIFFERENT error messages for DIFFERENT problems\n" }, { "from": "human", "value": "module QuickTravel\n class Status\n def self.check!\n # Test Cache\n QuickTravel::Cache.clear\n QuickTravel::Cache.cache('status-check') { 'start' }\n u...
ruby
chosen
[ { "from": "system", "value": "Handle exception by Sidekiq error handler" }, { "from": "human", "value": "require 'sidekiq'\nrequire 'sidekiq/util'\nrequire 'sidekiq/cron'\nrequire 'sidekiq/scheduled'\n\nmodule Sidekiq\n module Cron\n POLL_INTERVAL = 30\n\n # The Poller checks Redis every ...
ruby
chosen
[ { "from": "system", "value": "Add log for no ssh key.\n" }, { "from": "human", "value": "# Cookbook Name:: rs_utils\n# Recipe:: setup_ssh\n#\n# Copyright (c) 2011 RightScale Inc\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated ...
ruby
chosen
[ { "from": "system", "value": "Add description and URL to gemspec\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'pagelapse/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Update for use with v5.0.0 of community coookbook\n" }, { "from": "human", "value": "# coding: utf-8\n#\n# Cookbook Name:: rax-wordpress\n# Recipe:: wp-database\n#\n# Copyright 2014\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may n...
ruby
chosen
[ { "from": "human", "value": "Make the filename more descriptive\n" }, { "from": "gpt", "value": "namespace :maintenance do\n desc \"Dump the current database, replace it with what's in production\"\n task export: :environment do\n filename = File.join(Rails.root, \"#{Rails.env}.sql.gz\")\n ...
ruby
chosen
[ { "from": "system", "value": "Add matching_relation and pk_matching_relation to UnitOfWork::Update\n" }, { "from": "human", "value": "module Alf\n module Sequel\n module UnitOfWork\n class Update\n include UnitOfWork::Atomic\n\n def initialize(connection, relvar_name, upda...
ruby
chosen
[ { "from": "system", "value": "Clean the backtraces a bit more\n\nIgnore the test loaders from the backtrace, it's irrelevant to the test\nwhen it fails if it's loaded via rake, testrb, or whatever.\n\nAnd if it's not, then your problem isn't the backtrace :P\n" }, { "from": "human", "value": "mo...
ruby
chosen
[ { "from": "system", "value": "Make use `config_for` method for loading config file\n\nSince Rails 4.2 YAML configuration files can be easily loaded with the\nnew config_for\n" }, { "from": "human", "value": "require 'hashie'\n\nmodule Kuroko2\n class Configuration\n class << self\n DEFA...
ruby
chosen
[ { "from": "system", "value": "Add a clear screen function on game start" }, { "from": "human", "value": "class Mastermind\n def initialize\n end\n\n def run\n puts 'Welcome to MASTERMIND'\n puts 'Would you like to (p)lay, read the (i)nstructions, or (q)uit?'\n command = ''\n while...
ruby
chosen
[ { "from": "system", "value": "Fix rails 5 belongs_to require validation\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule Monarchy\n module ActsAsRole\n extend ActiveSupport::Concern\n\n module ClassMethods\n def acts_as_role\n self.table_name = 'monar...
ruby
chosen
[ { "from": "system", "value": "Set Oj to compat mode\n" }, { "from": "human", "value": "require 'oj' unless defined?(Oj)\n\nmodule MultiJson\n module Engines\n # Use the Oj library to encode/decode.\n class Oj\n ParseError = SyntaxError\n\n def self.decode(string, options = {}) #...
ruby
chosen
[ { "from": "system", "value": "Deal with escaped spaces better. Ruby commit r22791\n" }, { "from": "human", "value": "module Rake\n\n # Makefile loader to be used with the import file loader.\n class MakefileLoader\n include Rake::DSL\n\n SPACE_MARK = \"__&NBSP;__\"\n\n # Load the mak...
ruby
chosen
[ { "from": "system", "value": "Switch the view helpers to the new Ruby hash notation\n" }, { "from": "human", "value": "module Realtime\n\tmodule ViewHelpers\n\n\t\tdef realtime_support\n\t\t\treturn render(:template =>\"realtime/realtime_support\", \n\t\t\t\t\t:layout => nil, \n\t\t\t\t\t:locals...
ruby
chosen
[ { "from": "system", "value": "Use ENV, fixes uninitialized constant Rails (NameError)\n" }, { "from": "human", "value": "Rails.env = \"test\"\nrequire File.expand_path(\"../../config/environment\", __FILE__)\nrequire \"rails/test_help\"\nrequire \"minitest/rails\"\n\n# To add Capybara feature te...
ruby
chosen
[ { "from": "system", "value": "Add missing files to gemspec\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = \"rumember\"\n s.version = \"0.0.0\"\n\n s.summary = \"Remember The Milk Ruby API and command line client\"\n s.author...
ruby
chosen
[ { "from": "system", "value": "Initialize locations with hash list.\n" }, { "from": "human", "value": "require 'spec_helper'\nrequire 'models_require'\nrequire 'location_repository'\n\ndescribe \"LocationRepository\" do\n it \"Location can be stored and then found\" do\n location_repository =...
ruby
chosen
[ { "from": "system", "value": "Fix syntax of require statement.\n" }, { "from": "human", "value": "# This file is executed in the Rails environment by rails-post-install\n\n# Create any necessary global Censor rules\nrequire 'censor_rules.rb'\n" }, { "from": "gpt", "value": "# This fi...
ruby
chosen
[ { "from": "system", "value": "Remove versions from development dependencies.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/paperclip-sftp/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Yury Velikanau\"]\n gem.ema...
ruby
chosen
[ { "from": "system", "value": "Add a friendly password generator.\n" }, { "from": "human", "value": "require \"thor\"\nrequire \"jimsy/git\"\nrequire \"jimsy/bus_service\"\n\nmodule Jimsy\n class CLI < Thor\n # rubocop:disable Metrics/AbcSize\n\n desc \"bus\", \"List the next bunch of buss...
ruby
chosen
[ { "from": "system", "value": "Use Process.pid instead of $$\n\nThis is a bit clearer, and I think makes the comment for this block\nunnecessary.\n" }, { "from": "human", "value": "require 'forwardable'\n\n# LightStep Tracer\nmodule LightStep\n extend SingleForwardable\n\n # Base class for all ...
ruby
chosen
[ { "from": "system", "value": "Add the ability to pass in template options.\n" }, { "from": "human", "value": "require \"cuba/rum\"\nrequire \"tilt\"\n\nmodule Cuba\n class Ron < Rum\n def _cache\n Thread.current[:_cache] ||= Tilt::Cache.new\n end\n\n def render(template, locals = ...
ruby
chosen
[ { "from": "system", "value": "Update gemspec - README.rdoc was renamed to .md\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s.name = \"yubikey\"\n s.version = \"1.3.0\"\n s.description = \"A library to verify, decode, decrypt and parse ...
ruby
chosen