conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Change the force json mode enabling flag to XSUB_FORCE_JSON=1\n" }, { "from": "human", "value": "module Xsub\n\n class OutputHelper\n\n def self.run\n is_json_mode = (ENV['XSUB_JSON'] == '0')\n is_success = true\n\n if is_json_mode then\n r...
ruby
chosen
[ { "from": "system", "value": "Rename a local variable for clarity\n" }, { "from": "human", "value": "module Owners\n # Parses an OWNERS file and returns an array of owners\n # that have subscribed to a specified file path.\n #\n # @api private\n class Config\n COMMENT = /^\\s*\\/\\//\n\n...
ruby
chosen
[ { "from": "system", "value": "Load engine if Rails::Engine defined\n" }, { "from": "human", "value": "require 'json'\n\nrequire 'voight_kampff/test'\nrequire 'voight_kampff/methods'\nrequire 'voight_kampff/rack_request' if defined?(Rack::Request)\nrequire 'voight_kampff/engine' if defined?(Rails...
ruby
chosen
[ { "from": "system", "value": "Break from loop if format is supported\n" }, { "from": "human", "value": "require 'data_kitten/publishing_formats/datapackage'\nrequire 'data_kitten/publishing_formats/rdfa'\n\nmodule DataKitten\n \n module PublishingFormats\n\n private\n\n def detect_publis...
ruby
chosen
[ { "from": "system", "value": "Allow berkshelf 5.0 in dependencies\n" }, { "from": "human", "value": "# coding: utf-8\n\nGem::Specification.new do |spec|\n spec.name = \"chef-berksfile-env\"\n spec.version = IO.read(\"VERSION\")\n spec.authors = [\"Bryan Baugher\"]\n spec...
ruby
chosen
[ { "from": "system", "value": "Remove extra line at the end of comments\n" }, { "from": "human", "value": "require_relative 'comment'\n\nmodule GerritFS\n class FileWithComments\n def initialize(filename, a_or_b, content, comments, draft_comments)\n @filename = filename\n @a_or_b = ...
ruby
chosen
[ { "from": "system", "value": "Add method to check extension support\n" }, { "from": "human", "value": "require 'shellwords'\nrequire \"poi2csv/version\"\n\nmodule Poi2csv\n\n Poi2csvException = Class.new(StandardError)\n SUPPORTED_EXTENSIONS = [:xls, :xlsx]\n\n def self.to_csv(input_file_path...
ruby
chosen
[ { "from": "system", "value": "Use method missing to delegate any message sent to Chamber as a message for the underlying Hash\n" }, { "from": "human", "value": "require 'singleton'\nrequire 'forwardable'\nrequire 'yaml'\nrequire 'hashie/mash'\n\nclass Chamber\n include Singleton\n\n class << s...
ruby
chosen
[ { "from": "system", "value": "Rename experiment to threat assessment run.\n" }, { "from": "human", "value": "require 'faraday'\nrequire 'json'\n\nmodule Dap\n class Cli\n include RestCli\n\n def create_threat_assessment_run(name, section_ids, start_time, end_time)\n puts \"1. creatin...
ruby
chosen
[ { "from": "system", "value": "Fix exception handling for missing methods.\n" }, { "from": "human", "value": "require \"redtape/version\"\n\nrequire 'active_model'\n\nmodule Redtape\n class Form\n extend ActiveModel::Naming\n include ActiveModel::Conversion\n include ActiveModel::Valida...
ruby
chosen
[ { "from": "system", "value": "Refactor current_user_locale to a new method\n" }, { "from": "human", "value": "module I18nHelper\n def set_locale\n # Save a given locale\n if params[:locale] && available_locale?(params[:locale])\n spree_current_user&.update!(locale: params[:locale])\n...
ruby
chosen
[ { "from": "system", "value": "Update feedback tooltip message in org feedback\n" }, { "from": "human", "value": "module OrgsHelper\n # frozen_string_literal: true\n\n DEFAULT_EMAIL = '%{organisation_email}'\n\n # Tooltip string for Org feedback form.\n #\n # @param org [Org] The current Org...
ruby
chosen
[ { "from": "system", "value": "Revert \"force mailer lang ja\"\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nclass UserMailer < Devise::Mailer\n default from: ENV.fetch('SMTP_FROM_ADDRESS') { 'notifications@localhost' }\n layout 'mailer'\n\n def confirmation_instructions(...
ruby
chosen
[ { "from": "system", "value": "Remove formatted brand from email\n" }, { "from": "human", "value": "class UserMailer < ActionMailer::Base\n include ApplicationHelper\n default :from => \"no-reply@#{APP_CONFIG['mail']['domain']}\"\n def user_created(user)\n @user = user\n @brand = brand_n...
ruby
chosen
[ { "from": "system", "value": "ADD listing method for Office" }, { "from": "human", "value": "class Nwmls::Office < Nwmls::Base\n\n attr_accessor :office_mlsid, :office_name, :street_care_of, :street_address, :street_city, :street_state, :street_zip_code, :street_zip_plus4, :street_county, :offi...
ruby
chosen
[ { "from": "system", "value": "Fix mongo_pull and mongo_push tasks to use MONGO_URL" }, { "from": "human", "value": "require \"thor\"\n\nmodule Schnitzelpress\n class Cli < Thor\n include Thor::Actions\n\n source_root(File.expand_path('../../templates', __FILE__))\n\n desc \"create NAME...
ruby
chosen
[ { "from": "system", "value": "Update image_optim dependency 0.10.2 -> 0.11.1\n\nChanges can be seen at:\n\n https://github.com/toy/image_optim/compare/f1e50345206ffdd92bfeac901d43b0eff3a2f1ba...766405944890da22f3c4e7aa299e584cfcef66e0\n\nChange-Id: I1f6ff0059f5f075791c4d9edfb0a338deb45bd4d\nReviewed-on: ht...
ruby
chosen
[ { "from": "system", "value": "Fix gem packaging on JRuby.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"ladle/version\"\n\njava = (RUBY_PLATFORM == 'java')\n\nGem::Specification.new do |s|\n s.name = \"ladle\"\n s...
ruby
chosen
[ { "from": "system", "value": "Add home page to gemspec\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |s|\n s.name = 'cookie_requirement'\n s.version = '0.1.0'\n s.platform = Gem::Platform::RUBY\n s.authors = [ 'Jonah Burke' ]\n s...
ruby
chosen
[ { "from": "system", "value": "Set Resque.redis to correct ENV var\n" }, { "from": "human", "value": "worker_processes Integer(ENV[\"WEB_CONCURRENCY\"] || 3)\ntimeout 15\npreload_app true\n\nbefore_fork do |server, worker|\n Signal.trap 'TERM' do\n puts 'Unicorn master intercepting TERM and s...
ruby
chosen
[ { "from": "system", "value": "Change timestamp to be human readable\n" }, { "from": "human", "value": "module PgDrive\n module Uploader\n Drive = Google::Apis::DriveV2\n AUTH_SCOPE = \"https://www.googleapis.com/auth/drive\".freeze\n RETRY_COUNT = 3\n\n class << self\n def call...
ruby
chosen
[ { "from": "system", "value": "Refresh and clear, because we can!\n" }, { "from": "human", "value": "require 'curses'\n\nmodule Presentator\n class Slide\n include Curses\n attr_accessor :elements\n\n def initialize(opts={}, &blk)\n @elements = []\n instance_eval &blk\n end...
ruby
chosen
[ { "from": "system", "value": "Make _url helpers accessible from views.\n\n\ngit-svn-id: 30fef0787527f3d4b2d3639a5d6955e4dc84682e@112 c18eca5a-f828-0410-9317-b2e082e89db6\n" }, { "from": "human", "value": "require 'resourceful/builder'\nrequire 'resourceful/base'\n\nmodule Resourceful\n module M...
ruby
chosen
[ { "from": "system", "value": "Searchbar: Update job to run based on active educators, not sign in\n" }, { "from": "human", "value": "namespace :searchbar do\n desc 'Update educator student searchbar cached data'\n task update_for_all_educators: :environment do\n Educator.all.each do |educat...
ruby
chosen
[ { "from": "system", "value": "Test the generator is named correctly\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass InstallGeneratorTest < Rails::Generators::TestCase\n tests Transloadit::Generators::InstallGenerator\n destination File.expand_path('../../../tmp', __FILE__)\n ...
ruby
chosen
[ { "from": "system", "value": "Revert \"Add sopa blackout redirection.\"\n\nThis reverts commit 87cb8f556e4099533b61f194aa0edf74e4bb21bb.\n" }, { "from": "human", "value": "Foosball::Application.routes.draw do\n match '/' => redirect(\"http://protestsopa.org\")\n match '*players' => redirect(\"...
ruby
chosen
[ { "from": "system", "value": "Call dump on JSON, since hash has no dump message\n\n:grimacing:\n" }, { "from": "human", "value": "Tahi::Application.config.ihat_supported_formats = 'null'\nmodule IhatSupportedFormats\n def self.call\n if ENV['IHAT_URL'].present?\n begin\n response...
ruby
chosen
[ { "from": "system", "value": "Fix rails5.0 to rails5.2 behavior\n" }, { "from": "human", "value": "# Be sure to restart your server when you modify this file.\n#\n# This file contains migration options to ease your Rails 5.0 upgrade.\n#\n# Read the Guide for Upgrading Ruby on Rails for more info...
ruby
chosen
[ { "from": "system", "value": "Make test for function returning GFile a bit more explicit.\n" }, { "from": "human", "value": "require File.expand_path('test_helper.rb', File.dirname(__FILE__))\n\n# Tests generated methods and functions in the Gio namespace.\nclass GeneratedGioTest < MiniTest::Spe...
ruby
chosen
[ { "from": "system", "value": "Update rake requirement from ~> 11.2.0 to ~> 13.0.0\n\nUpdates the requirements on [rake](https://github.com/ruby/rake) to permit the latest version.\n- [Release notes](https://github.com/ruby/rake/releases)\n- [Changelog](https://github.com/ruby/rake/blob/master/History.rdoc)\...
ruby
chosen
[ { "from": "system", "value": "Add json_pure for coveralls on 1.9.2.\n" }, { "from": "human", "value": "# encoding: utf-8\n\nGem::Specification.new do |spec|\n spec.name = 'parser'\n spec.version = '0.9.alpha1'\n spec.authors = ['Peter Zotov']\n spec.email = ['whi...
ruby
chosen
[ { "from": "human", "value": "Fix translation bug in Czech\n\nWhen the :few key is missing fallback to :other key\nif present\n" }, { "from": "gpt", "value": "# config/initializers/i18n.rb\n# https://github.com/svenfuchs/i18n/issues/123\n\nmodule I18n\n module Backend\n module Pluralization\n...
ruby
chosen
[ { "from": "human", "value": "Add entities specs for resource group\n" }, { "from": "gpt", "value": "describe Dox::Entities::ResourceGroup do\n subject { described_class }\n\n let(:resource_group_name) { 'Pokemons' }\n let(:details) do\n {\n resource_group_desc: 'Pokemons'\n }\n en...
ruby
chosen
[ { "from": "human", "value": "Add integration spec for 'null' strategy\n" }, { "from": "gpt", "value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\ndescribe 'null integration' do\n\n let(:base_cmd) { 'bundle exec mutant -I lib --require test_app \"::TestApp*\"' }\n\n around do |example|\n ...
ruby
chosen
[ { "from": "system", "value": "Add specs for Header model." }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.describe Duckrails::Header, type: :model do\n pending \"add some examples to (or delete) #{__FILE__}\"\nend\n" }, { "from": "gpt", "value": "require 'rails_help...
ruby
chosen
[ { "from": "system", "value": "Update CarrierWave config for prod\n" }, { "from": "human", "value": "\nCarrierWave.configure do |config|\n\n if Rails.env.development? || Rails.env.test?\n # config.fog_directory = 'policeboard-staging'\n config.storage = :file\n end\n\n if Rails.env.prod...
ruby
chosen
[ { "from": "system", "value": "Use thor for command-line interfaces\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'tumblfetch/version'\n\nGem::Specification.new do |spec|\n spec.nam...
ruby
chosen
[ { "from": "human", "value": "Add formula for Homebrew for iOS development\n" }, { "from": "gpt", "value": "require \"formula\"\n\nclass Mogenerator < Formula\n homepage \"https://github.com/rentzsch/mogenerator\"\n\n head \"https://github.com/rentzsch/mogenerator.git\", :revision => \"258832\"...
ruby
chosen
[ { "from": "system", "value": "Expand spec for Enumerator.new with block\n" }, { "from": "human", "value": "require File.expand_path('../../../spec_helper', __FILE__)\n\nruby_version_is \"1.8.7\" do\n require File.expand_path('../../../shared/enumerator/new', __FILE__)\n\n describe \"Enumerator...
ruby
chosen
[ { "from": "human", "value": "Add spec for `markdo version`\n" }, { "from": "gpt", "value": "require 'spec_helper'\nrequire 'stringio'\nrequire 'markdo/cli'\n\nmodule Markdo\n describe CLI do\n describe 'given \"version\"' do\n it 'prints the version' do\n out = StringIO.new\n ...
ruby
chosen
[ { "from": "system", "value": "Mark gems as requiring Ruby 2.3" }, { "from": "human", "value": "require \"./lib/redis/version\"\n\nGem::Specification.new do |s|\n s.name = \"redis\"\n\n s.version = Redis::VERSION\n\n s.homepage = \"https://github.com/redis/redis-rb\"\n\n s.summary = \"A Ruby ...
ruby
chosen
[ { "from": "system", "value": "Change error level to 'warning' for login failure\n\nThis is pretty well-understood; it's always \"mwoauthdatastore-access-token-not-found\", likely because of the same token being sent twice or somesuch. We handle it well-ish on our end now.\n" }, { "from": "human", ...
ruby
chosen
[ { "from": "system", "value": "Fix nonexistent method in artifacts controller\n" }, { "from": "human", "value": "class Projects::ArtifactsController < Projects::ApplicationController\n layout 'project'\n before_action :authorize_read_build_artifacts!\n\n def download\n unless artifacts_file...
ruby
chosen
[ { "from": "system", "value": "Refactor slug counter calculation to avoid increasing queries\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule GobiertoCommon\n module Sluggable\n extend ActiveSupport::Concern\n\n included do\n before_validation :set_slug\n ...
ruby
chosen
[ { "from": "system", "value": "Update gem description and summary\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'phare/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Refactor submission pront rate spec\n" }, { "from": "human", "value": "describe \"printing submission's rates in submission show view\" do\n\nlet!(:submission) { FactoryGirl.create(:submission) }\nlet!(:user) { FactoryGirl.create(:user) }\n context \"when the submi...
ruby
chosen
[ { "from": "system", "value": "Improve ITSI authoring editor spec test.\n\n" }, { "from": "human", "value": "require \"spec_helper\"\n\ndescribe ITSIAuthoring::Editor do\n let(:author) { FactoryGirl.create(:author) }\n let(:activity) {\n activity = FactoryGirl.create(:activity)\n...
ruby
chosen
[ { "from": "system", "value": "Add basic AR setup to reproduction script\n\nMany of our bug reports involve interactions between factory_bot and\nactive_record. This will make it easier for people to submit\nreproduction scripts for those cases.\n" }, { "from": "human", "value": "require \"bundle...
ruby
chosen
[ { "from": "system", "value": "Allow scoping of requests in tests by definition of a resource_scoping method (i.e. a let) in the API tests\n" }, { "from": "human", "value": "require 'active_support/all'\nmodule ControllerHacks\n def api_get(action, params={}, session=nil, flash=nil)\n api_pro...
ruby
chosen
[ { "from": "system", "value": "Add TODO to solve participant authorization\n" }, { "from": "human", "value": "# -*- encoding : utf-8 -*-\nclass Jmd::ParticipantsController < Jmd::BaseController\n\n load_and_authorize_resource :competition\n load_and_authorize_resource :participant, through: :co...
ruby
chosen
[ { "from": "system", "value": "Upgrade version number to 0.1.1\n" }, { "from": "human", "value": "Gem::Specification.new do |gem|\n gem.name = \"pugbot\"\n gem.version = \"0.1.0\"\n gem.authors = [\"Xzanth\"]\n gem.description = \"Pug bot as cinch plugin\"\n gem.summar...
ruby
chosen
[ { "from": "system", "value": "Return only the machine's games in the API.\n" }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.describe Api::V1::GamesController, type: :controller do\n let(:winnitron) { FactoryGirl.create(:arcade_machine) }\n let(:token) { winnitron.api_keys.firs...
ruby
chosen
[ { "from": "system", "value": "Refactor opportunities controller tests to separate one assert per test\n" }, { "from": "human", "value": "require 'spec_helper'\n\nRSpec.describe OpportunitiesController, type: :controller do\n\n it 'render #index' do\n get :index\n expect(response.status).t...
ruby
chosen
[ { "from": "human", "value": "Add class design to code\n" }, { "from": "gpt", "value": "# SPECIES ------------------------\n# puppy\n\n# CHARACTERISTICS ----------------\n# color: varies\n# species: varies\n# name: varies\n\n# BEHAVIOR -----------------------\n# bark\n# wag tail\n# fetch\n\n" }...
ruby
chosen
[ { "from": "system", "value": "Fix module convenience method coverage\n" }, { "from": "human", "value": "# Sanity tests for the convenience factories\nmodule Microphite\n describe :client do\n before_block = Proc.new { @client = Microphite::Client::Socket.new(host: 'localhost') }\n after_b...
ruby
chosen
[ { "from": "system", "value": "Revise specs to provide guidelines for conservative behavior\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire 'spec_helper'\n\ndescribe 'UTF8Cleaner::Middleware' do\n let :env do\n {\n 'PATH_INFO' => 'foo/bar%2e%2fbaz',\n 'QUERY_ST...
ruby
chosen
[ { "from": "system", "value": "Fix to avoid calling db:test:prepare\n" }, { "from": "human", "value": "ENV['RAILS_ENV'] ||= 'test'\nrequire File.expand_path('../../config/environment', __FILE__)\nrequire 'rails/test_help'\nrequire \"minitest/reporters\"\nMinitest::Reporters.use!\n\nclass ActiveSu...
ruby
chosen
[ { "from": "system", "value": "Fix attribute to work with LWRP syntax\n" }, { "from": "human", "value": "require 'chef/resource/aws_resource'\nrequire 'chef/provisioning/aws_driver'\n\nclass Chef::Resource::AwsSqsQueue < Chef::Resource::AwsResource\n self.resource_name = 'aws_sqs_queue'\n\n act...
ruby
chosen
[ { "from": "system", "value": "Create a session cookie when member confirms registration\n" }, { "from": "human", "value": "# frozen_string_literal: true\nclass EmailConfirmationController < ApplicationController\n def verify\n @errors = AuthTokenVerifier.verify(params)\n view = File.read(...
ruby
chosen
[ { "from": "system", "value": "FIX: Use resource_instance_name and resource_collection_name rather than mangling with resource class name" }, { "from": "human", "value": "require 'action_controller/metal/responder'\nrequire 'active_support/core_ext/module/delegation'\n\nmodule Apiarist\n module ...
ruby
chosen
[ { "from": "system", "value": "Add AWS Asia Pacific (Seoul) Region\n" }, { "from": "human", "value": "# Copyright (c) 2012-2013 Stark & Wayne, LLC\n\nmodule Cyoi; module Providers; module Constants; end; end; end\n\nmodule Cyoi::Providers::Constants::AwsConstants\n extend self\n\n # http://docs...
ruby
chosen
[ { "from": "system", "value": "Allow the rack middle_ware to fall back from after RewindableInput to after Session::CookieStore if RewindableInput is not available. It was removed somewhere in Rails 2.3\n" }, { "from": "human", "value": "require 'rack/facebook'\nActionController::Dispatcher.midd...
ruby
chosen
[ { "from": "system", "value": ":panda_face: Remove the old settings before upload a new one.\n" }, { "from": "human", "value": "namespace :config do\n\n task settings: 'settings:show'\n\n namespace :settings do\n desc 'Update the remote config/settings/<stage>.yml file with local'\n task ...
ruby
chosen
[ { "from": "system", "value": "Revert to passenger 4 on backend servers\n" }, { "from": "human", "value": "name \"web-backend\"\ndescription \"Role applied to all web/api backend servers\"\n\ndefault_attributes(\n :apache => {\n :mpm => \"worker\",\n :worker => {\n :max_requests_per_c...
ruby
chosen
[ { "from": "system", "value": "Load helpers from main application\n\nWith this we are able to use helpers that is on the main application.\nIt also allow us to render the application layout here in the engine.\n" }, { "from": "human", "value": "module Neighborly\n module Balanced\n module Ban...
ruby
chosen
[ { "from": "system", "value": "Correct pattern arg for rspec\n" }, { "from": "human", "value": "# Constants\nBASEDIR = File.expand_path('..', File.dirname(__FILE__)).freeze\nPUPPET_BINARY = File.join(BASEDIR, 'bin', 'puppet').freeze\nTEST_COMMAND = begin\n if ENV['TRAVIS']\n \"rspec --suffix ...
ruby
chosen
[ { "from": "system", "value": "Update project_id to project for standalone ruby sample\n" }, { "from": "human", "value": "# Copyright 2017 Google, Inc\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You...
ruby
chosen
[ { "from": "system", "value": "Test for email form presence\n" }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe 'ideas/new.html.erb' do\n context 'logged in' do\n it \"WITHOUT reference should render properly\" do\n user = create(:user)\n allow(view).to receive(:cu...
ruby
chosen
[ { "from": "human", "value": "Move filtration spec into own test script\n" }, { "from": "gpt", "value": "require 'minitest/autorun'\nrequire_relative '../../../lib/Sandbox/Application'\n\ndescribe Sandbox::Application do\n\n before do\n @application = Sandbox::Application.new({\n # Do no...
ruby
chosen
[ { "from": "system", "value": "Add comment to failing ServerSpec test\n" }, { "from": "human", "value": "# Copyright 2015 Nordstrom, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a...
ruby
chosen
[ { "from": "system", "value": "Add homepage in gemspec file.\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'wp_roster/version'\n\nGem::Specification.new do |s|\n s.name = \...
ruby
chosen
[ { "from": "system", "value": "Update yard dependency to version 0.7\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/simple_oauth/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.add_development_dependency 'mocha', '~> 0.9'\n gem.add_de...
ruby
chosen
[ { "from": "system", "value": "Fix bug chef serveur dev.\n" }, { "from": "human", "value": "current_dir = File.dirname(__FILE__)\nlog_level :info\nlog_location STDOUT\nnode_name 'admin'\nclient_key \"#{current_dir}/admin-dev.pem\"\nvalidatio...
ruby
chosen
[ { "from": "system", "value": "Make the tag the version\n\n* It will never be anything else" }, { "from": "human", "value": "Pod::Spec.new do |s|\n\n s.name = \"SPTDataLoader\"\n s.version = \"1.0.1\"\n s.summary = \"SPTDataLoader is Spotify's HTTP library for Objective...
ruby
chosen
[ { "from": "system", "value": "Fix adding of top topic to site, use slug_title instead of id\n" }, { "from": "human", "value": "module Interactors\n module Channels\n class AddFact\n include Pavlov::Interactor\n\n arguments :fact, :channel\n\n def execute\n command :\"ch...
ruby
chosen
[ { "from": "system", "value": "Remove unnecessary disable transaction in add_ci_runner_namespaces\n" }, { "from": "human", "value": "class AddCiRunnerNamespaces < ActiveRecord::Migration\n include Gitlab::Database::MigrationHelpers\n\n DOWNTIME = false\n\n disable_ddl_transaction!\n\n def cha...
ruby
chosen
[ { "from": "system", "value": "Use the correct md5, why not?\n" }, { "from": "human", "value": "require 'formula'\n\nclass TokyoTyrant <Formula\n # For some reason TT-1.1.36 wouldn't compile against TC-1.4.33\n # Also it appears the Ruby (Rufus) bindings will only work with up to 1.1.33\n url ...
ruby
chosen
[ { "from": "system", "value": "Refactor server processing a little bit\n" }, { "from": "human", "value": "require 'socket'\nrequire 'debugger'\n\nclass Hyperloop\n def initialize port\n @server = TCPServer.new port\n end\n\n def start\n loop do\n socket = @server.accept\n\n dat...
ruby
chosen
[ { "from": "system", "value": "Make migration more tolerant of deleted Variants\n\nThis migration bailed for me when it found an old order (before Spree used `acts_as_paranoid`) with a line_item referencing a Variant that no longer existed.\n\nMaking the migration use `variant_id` instead of `variant.id` fix...
ruby
chosen
[ { "from": "system", "value": "Add missing dependency on Date" }, { "from": "human", "value": "#!/usr/bin/env ruby\n\nrequire 'faraday'\n\ndomain = 'https://www.pensionwise.gov.uk'\npages = %w(\n /\n /6-steps-you-need-to-take\n /benefits\n /complaints\n /divorce\n /living-abroad\n /making-...
ruby
chosen
[ { "from": "system", "value": "Upgrade FontExplorer X Pro.app to v5.0.2\n" }, { "from": "human", "value": "cask :v1 => 'fontexplorer-x-pro' do\n version '5.0.1'\n sha256 'e75369d862a186a75dcbb9d0f61a5f99f03bd1482de02f3e71ffaa29a0828b9c'\n\n url \"http://fast.fontexplorerx.com/FontExplorerXPro#...
ruby
chosen
[ { "from": "system", "value": "Add \"json\" as a dependency\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"rack/pretty_json/version\"\n\nGem::Specification.new do |s|\n s.name = \"rack-pretty_json\"\n s.version ...
ruby
chosen
[ { "from": "human", "value": "IMPLEMENT add a pod spec\n" }, { "from": "gpt", "value": "Pod::Spec.new do |s|\n\n# Library description\n s.name = 'QASwipeSelector'\n s.version = '0.0.1'\n s.author = { 'Quentin ARNAULT' => 'quentin.arnault@gmail.com' }\n s.license = {\n ...
ruby
chosen
[ { "from": "system", "value": "Remove second call to redirect_to\n" }, { "from": "human", "value": "class ApplicationController < ActionController::Base\n protect_from_forgery with: :exception\n helper_method :current_user\n\n def new\n redirect_to '/auth/twitter'\n end\n\n def signin\n ...
ruby
chosen
[ { "from": "system", "value": "Add some shared methods for dealing with users (stubbed out for current_user)\n" }, { "from": "human", "value": "class ApplicationController < ActionController::Base\n protect_from_forgery\nend\n" }, { "from": "gpt", "value": "class ApplicationControlle...
ruby
chosen
[ { "from": "system", "value": "Fix logic to not empty $api_sections hash\n" }, { "from": "human", "value": "class ApplicationController < ActionController::Base\n protect_from_forgery with: :exception\n\n before_action :set_locale, :set_section\n\n def set_locale\n I18n.locale = params[\"lo...
ruby
chosen
[ { "from": "system", "value": "Update Violation Page for Error Message\n\nUpdate the Violation page to ensure the error is displayed in the view.\n" }, { "from": "human", "value": "class ApplicationController < ActionController::Base\n protect_from_forgery\n\n rescue_from CanCan::AccessDenied d...
ruby
chosen
[ { "from": "system", "value": "Use logger to output debugging info\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_from_forgery with: :ex...
ruby
chosen
[ { "from": "human", "value": "Add integration test for creating admins\n" }, { "from": "gpt", "value": "require \"test_helper\"\n\nclass Admin::CreateAdminTest < ActionDispatch::IntegrationTest\n test \"system admin can login and create another system admin\" do\n log_in_as(\"system-admin@exa...
ruby
chosen
[ { "from": "system", "value": "Rewrite CategoriesController index action to not use inherited_resources\n" }, { "from": "human", "value": "class CategoriesController < ApplicationController\n inherit_resources\n\n actions :index, :show\n\n def index\n @node_types = collection.map(&:node_typ...
ruby
chosen
[ { "from": "system", "value": "Test that the initialization does not raise error\n\nInstead of explicitly testing instance variable setting, simply\n test that no errors are raised with refactored kw arguments.\n" }, { "from": "human", "value": "require 'spec_helper'\n\nmodule Stitches\n descri...
ruby
chosen
[ { "from": "system", "value": "Handle \"not supported\" exception when built with IM < 5.5.8\n" }, { "from": "human", "value": "#! /usr/local/bin/ruby -w\n\nrequire 'RMagick'\n\nimg = Magick::Image.read(\"images/Blonde_with_dog.jpg\").first\npreview = img.preview(Magick::SolarizePreview)\npreview...
ruby
chosen
[ { "from": "human", "value": "Test for progression through over 61 applications\n" }, { "from": "gpt", "value": "# coding: utf-8\nrequire 'rails_helper'\n\nRSpec.feature 'Completing the application details', type: :feature do\n\n include Warden::Test::Helpers\n Warden.test_mode!\n\n let!(:juri...
ruby
chosen
[ { "from": "system", "value": "Use hybrid cookie serializer until everyone's cookies are JSON\n" }, { "from": "human", "value": "# Be sure to restart your server when you modify this file.\n\nRails.application.config.action_dispatch.cookies_serializer = :json\n" }, { "from": "gpt", "v...
ruby
chosen
[ { "from": "system", "value": "Add link to GitHub repository\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 'favourite-language'\n s.version = '0.1.1'\n s.author = 'Andrew White'\n s.email = 'andyw@pixeltrix.co.uk'\n s.summary = <<-EOS\n Provides a comma...
ruby
chosen
[ { "from": "human", "value": "Add specs for Actions mixins\n" }, { "from": "gpt", "value": "require 'printfection'\n\nmodule Printfection\n class Widget < Resource\n include Actions::Retrieve\n include Actions::List\n include Actions::Create\n include Actions::Update\n include Act...
ruby
chosen
[ { "from": "human", "value": "Add spec for default recipe\n" }, { "from": "gpt", "value": "require 'chefspec'\n\ndescribe 'tdi-example-vim::default' do\n let :chef_run do\n ChefSpec::SoloRunner.new(platform: 'ubuntu', version: '12.04')\n end\n\n it 'should have default install_method \"pack...
ruby
chosen
[ { "from": "human", "value": "Add a spec to enforce formatting code well\n\nThis spec was ripped straight from Bundler\n(https://github.com/carlhuda/bundler/blob/1-0-stable/spec/quality_spec.rb)\n" }, { "from": "gpt", "value": "require \"spec_helper\"\n\n# Borrowed from Bundler\n# https://github....
ruby
chosen
[ { "from": "system", "value": "Maintain the test schema migrations automatically\n" }, { "from": "human", "value": "ENV[\"RAILS_ENV\"] ||= \"test\"\nrequire File.expand_path(\"../dummy/config/environment\", __FILE__)\n\nif Rails.env.production?\n abort(\"The Rails environment is running in produ...
ruby
chosen
[ { "from": "human", "value": "Add spec coverage of parser configuration\n\nWithout this patch we don't have any spec coverage of the :parser\nconfiguration addition in the previous patch. This patch adds two tests\nthat makes sure the setup_puppet method configures Puppet with the\n:parser setting. We don'...
ruby
chosen