conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Tweak sensitive data filters of vcr\n"
},
{
"from": "human",
"value": "require 'simplecov'\nSimpleCov.start do\n add_filter '/spec/'\nend\n\n$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)\nrequire 'backlog_kit'\nrequire 'webmock/rspec'\nrequire 'vcr'\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Remove fakefs as a dependecy during test\n"
},
{
"from": "human",
"value": "require 'fakefs/safe'\n\nrequire 'trustworthy'\n\nRSpec.configure do |config|\n config.order = 'random'\n config.before(:each) do\n Trustworthy::Random.stub(:_source).and_return('/dev/u... | ruby | chosen |
[
{
"from": "system",
"value": "Fix cleaning up anonymous classes in spec helper for 1.9.2\n\nExplanation: https://gist.github.com/1053556\n"
},
{
"from": "human",
"value": "require 'pathname'\nrequire 'rubygems'\nrequire 'rspec'\n\nrequire 'virtus'\n\nENV['TZ'] = 'UTC'\n\nSPEC_ROOT = Pathname(__F... | ruby | chosen |
[
{
"from": "system",
"value": "Make travis build fail if coverage is below 100%\n"
},
{
"from": "human",
"value": "require \"simplecov\"\n\nSimpleCov.start do\n add_filter \"/.bundle/\"\nend\n\nrequire \"gnucash\"\n"
},
{
"from": "gpt",
"value": "require \"simplecov\"\n\nSimpleCov.st... | ruby | chosen |
[
{
"from": "system",
"value": "Allow Travis to use different handlers.\n"
},
{
"from": "human",
"value": "require File.expand_path(File.dirname(__FILE__) + '/../lib/feedjira_atypon')\nrequire 'sample_feeds'\n\nRSpec.configure do |c|\n c.include SampleFeeds\nend\n"
},
{
"from": "gpt",
... | ruby | chosen |
[
{
"from": "system",
"value": "Fix spec helper to match osl-mysql\n"
},
{
"from": "human",
"value": "require 'chefspec'\nrequire 'chefspec/berkshelf'\n\nChefSpec::Coverage.start! { add_filter 'osl-postgresql' }\n\nCENTOS_7_OPTS = {\n platform: 'centos',\n version: '7.2.1511'\n}.freeze\n\nCENTOS... | ruby | chosen |
[
{
"from": "system",
"value": "Disable `should` syntax in Rspec\n\n`should` syntax is deprecated as of Rspec version 3.0 and the previous\ncommit converts all of our tests to use `expect` for consistency.\n\nTo prevent regressions, this change disables `should` syntax for this\ngem.\n"
},
{
"from": "... | ruby | chosen |
[
{
"from": "system",
"value": "Disable WebMock for the CodeClimate connection\n"
},
{
"from": "human",
"value": "# Let's get coverage reporting from Codeclimate\nWebMock.disable_net_connect!(:allow => \"codeclimate.com\")\nrequire \"codeclimate-test-reporter\"\nCodeClimate::TestReporter.start\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix broken require in spec helper so specs run\n"
},
{
"from": "human",
"value": "require 'rspec'\nrequire 'rails' # load rails before sprites for the engine to be loaded\nrequire 'sprites'\n\nGEM_ROOT = Pathname(File.expand_path('../..', __FILE__))\n\nDir['spec/sup... | ruby | chosen |
[
{
"from": "system",
"value": "Support deriving modules based on files in the correct directories\n"
},
{
"from": "human",
"value": "#\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 copy ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a leak in bd280b2 :Rename class name from Cli to Executor[ci skip]\n"
},
{
"from": "human",
"value": "# coding: utf-8\nrequire 'thor'\n\nmodule Cocoapods::Search\n class Command < Thor\n map '-v' => :version,\n '--version' => :version\n\n default_c... | ruby | chosen |
[
{
"from": "system",
"value": "Fix incompatibility with Vagrant 1.7.2\n\nFix #6 and #11"
},
{
"from": "human",
"value": "module VagrantPlugins\n module Ohai\n #\n module Helpers\n def chef_provisioners\n @machine.config.vm.provisioners.find_all do |provisioner|\n [:she... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor with text method instead of first.content\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\n\nmodule DineroMailIpn\n class Reporter\n\n # Report status list\n VALID_REPORT_STATUS = 1\n MALFORMED_REPORT_STATUS = 2\n INVALID_ACCOUNT_NUMBER_RE... | ruby | chosen |
[
{
"from": "system",
"value": "Handle cases when there is no :token_expires_at value\n"
},
{
"from": "human",
"value": "<% module_namespacing do -%>\nclass <%= class_name %>Authentication < ActiveRecord::Base\n belongs_to :<%= class_name.downcase %>\n belongs_to :authentication_provider\n\n se... | ruby | chosen |
[
{
"from": "system",
"value": "Use sudo to restart passenger\n"
},
{
"from": "human",
"value": "# config valid only for current version of Capistrano\nlock '~> 3.14'\n\nset :application, 'ft-forms'\nset :repo_url, 'https://github.com/umts/ft-forms.git'\nset :branch, :master\nset :deploy_to, \"/sr... | ruby | chosen |
[
{
"from": "system",
"value": "Add named route for canceling a scheduled session\n\nAdd route api/timeslots/:id/cancel to allow either the tutor or student\nto cancel a previously scheduled session.\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n\n root \"dashboard#index\"\... | ruby | chosen |
[
{
"from": "system",
"value": "Add update to user resources\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n mount RedactorRails::Engine => '/redactor_rails'\n resources :snippets\n\n get '/signup', to: 'users#new'\n post '/signup', to: 'users#create', as: 'new_sign_up'\n... | ruby | chosen |
[
{
"from": "human",
"value": "Add route for replying to OPTIONS requests\n"
},
{
"from": "gpt",
"value": "OpenStax::Api::Engine.routes.draw do\n\n # respond to a CORS OPTIONS request.\n # The origin of the request is validated using the\n # configuration setting `validate_cors_origin`\n match... | ruby | chosen |
[
{
"from": "system",
"value": "Add rubocop as dev dependency.\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 gem.n... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Add support for darwin20\"\n"
},
{
"from": "human",
"value": "require 'etc'\n\nmodule Parallel\n # TODO: inline this method into parallel.rb and kill physical_processor_count in next major release\n module ProcessorCount\n # Number of processors seen b... | ruby | chosen |
[
{
"from": "system",
"value": "Add :before timer support to SubscriptionsMatcher\n"
},
{
"from": "human",
"value": "module ChefSpec::Matchers\n class SubscribesMatcher\n include ChefSpec::Normalize\n\n def initialize(signature)\n signature.match(/^([^\\[]*)\\[(.*)\\]$/)\n @expect... | ruby | chosen |
[
{
"from": "system",
"value": "Support for message, default one and explicitly set one\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\n\nmodule GoodData\n class NoProjectError < RuntimeError\n end\nend\n"
},
{
"from": "gpt",
"value": "# encoding: UTF-8\n\nmodule GoodData\n cl... | ruby | chosen |
[
{
"from": "system",
"value": "Set up cache store correctly\n"
},
{
"from": "human",
"value": "require 'ostruct'\n\nmodule RenderAnywhere\n class RenderingController < AbstractController::Base\n # Include all the concerns we need to make this work\n include AbstractController::Logger\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add some formatting to the rails log subscriber\n"
},
{
"from": "human",
"value": "require 'active_support/log_subscriber'\n\nmodule ROM\n module SQL\n\n class RailsLogSubscriber < ActiveSupport::LogSubscriber\n\n def sql(event)\n debug \"#{event.pay... | ruby | chosen |
[
{
"from": "system",
"value": "Allow empty Strings when using `whiny` Accessor.\n\nWhen setting `accessor: :whiny`, you are permitted to pass in a key value of `nil` but not an empty String `\"\"`. \r\n\r\n```ruby\r\nto_do.state = nil\r\n#=> nil\r\n\r\nto_do.state = \"\"\r\n#=> ArgumentError ( is not a valid... | ruby | chosen |
[
{
"from": "system",
"value": "Remove aerobase.rb file check on recover command\n"
},
{
"from": "human",
"value": "external_url 'http://aerobase.example.com'\nkeycloak_server['theme_cache'] = false\n\n#postgresql['enable'] = false\n#postgresql['server'] = \"172.18.0.1\"\n#postgresql['username'] =... | ruby | chosen |
[
{
"from": "system",
"value": "Add in a configure block."
},
{
"from": "human",
"value": "module ActionMailer\n module Demuxer\n class Railtie < Rails::Railtie\n initializer 'action_mailer.demuxer.add_delivery_method' do\n ActiveSupport.on_load :action_mailer do\n ActionM... | ruby | chosen |
[
{
"from": "system",
"value": "Stop rushing. Accidentally a character\n"
},
{
"from": "human",
"value": "require \"alephant/broker/errors/invalid_cache_key\"\nrequire \"alephant/logger\"\nrequire \"aws-sdk\"\nrequire \"ostruct\"\nrequire \"date\"\n\nmodule Alephant\n module Broker\n module R... | ruby | chosen |
[
{
"from": "system",
"value": "Use timestamp for post time if specified.\n"
},
{
"from": "human",
"value": "module Awestruct\n module Extensions\n class Atomizer\n def initialize(entries_name, output_path, opts={})\n @entries_name = entries_name\n @output_path = output_path... | ruby | chosen |
[
{
"from": "system",
"value": "Fix issue where subqueries (...) did not work\n"
},
{
"from": "human",
"value": "module ChefZero\n module Solr\n module Query\n class Subquery\n def initialize(subquery)\n @subquery = subquery\n end\n\n def to_s\n \"(#... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary autoload call from PasswordStrategies module.\n"
},
{
"from": "human",
"value": "module Clearance\n module PasswordStrategies\n autoload :BCrypt, 'clearance/password_strategies/bcrypt'\n autoload :BCryptMigrationFromSHA1,\n 'clearance/... | ruby | chosen |
[
{
"from": "system",
"value": "Order annotations by date descending (with dateless annotations at the top)\n"
},
{
"from": "human",
"value": "class AnnotationsController < ApplicationController\n before_action :set_annotation, only: [:show, :edit, :update, :destroy]\n\n def index\n # Phrase ... | ruby | chosen |
[
{
"from": "system",
"value": "Add exception handlers in base API controller\n\n* For record not found returns a 404 response\n* For wrong parameters returns a 400 response\n* For other exceptions returns a 500 response\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule Ap... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Revert \"Show profiler info to mlandauer in production\"\"\n\nThis reverts commit 2bf7847896cfdcde354a1e739089ab0460360edf.\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n # Prevent CSRF attacks by raising an excep... | ruby | chosen |
[
{
"from": "system",
"value": "Fix problem encountered at initial login\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n\n # Lazy way to add additional parameters to devise - see http://devise.plataformatec.com.br/#strong-parameters\n# before_action :con... | ruby | chosen |
[
{
"from": "system",
"value": "Make newest updates display first on index\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n protect_from_forgery with: :exception\n before_action :configure_permitted_parameters, if: :devise_controller?\n\n \n def index\n... | ruby | chosen |
[
{
"from": "system",
"value": "Make all quizzes hardcoded to Question 1.\n"
},
{
"from": "human",
"value": "class WaitingroomController < ApplicationController\n\n def new\n end\n\n def index\n end\n\n def check\n if request.xhr?\n if Waitingroom.all.length == 1\n render json:... | ruby | chosen |
[
{
"from": "system",
"value": "Switch CI username to travis (again)\n"
},
{
"from": "human",
"value": "user = \"vagrant\"\n\ndefault[:travis_build_environment] = {\n :user => user,\n :group => user,\n :home => \"/home/#{user}\",\n :hosts ... | ruby | chosen |
[
{
"from": "system",
"value": "Define the minute to run on the first minute of the hour only\n\n\nFormer-commit-id: 54d8cbfaa60951eb18b1f787e0c968b98d329100 [formerly 13f10dd83f17911e46a5871e1a08f35b2dafe861] [formerly 436054e333c925cbf302bd686741cfcb6b6cbc40 [formerly 9d6e02a312d17c22e2bf59283157f4f472ec618... | ruby | chosen |
[
{
"from": "system",
"value": "Change zip_code property to String\n"
},
{
"from": "human",
"value": "# The Walkmydog users representing database class\nclass Profile\n include DataMapper::Resource\n property :id, Serial\n property :firstname, Text, required: true\n prop... | ruby | chosen |
[
{
"from": "system",
"value": "Use underscore to set db_name"
},
{
"from": "human",
"value": "task :kill_postgres_connections => :environment do\n db_name = \"#{File.basename(Rails.root)}_#{Rails.env}\"\n sh = <<EOF\nps xa \\\n | grep postgres: \\\n | grep #{db_name} \\\n | grep -v grep \\\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add dependencies on haml-rails & decent_exposure\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/hashrocket-rails/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Hashrocket\", \"Lar Van ... | ruby | chosen |
[
{
"from": "system",
"value": "Rewrite Placement to pass PlacementTest\n\nPlacementTest had been modified and it specified a new public\ninterface.\n\nPlacement had to be rewritten. In the process it was simplified.\n"
},
{
"from": "human",
"value": "require 'forwardable'\n\nclass Placement\n ex... | ruby | chosen |
[
{
"from": "system",
"value": "Change to use actuall errors.\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nmodule TTY\n class Prompt\n class ConverterRegistry\n def initialize\n @_registry = {}\n end\n\n # Register converter\n #\n # @api public\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update LaunchCluster action to trigger StartService instead of PropagateInstances.\n\nPreviously, the cluster model was designed to create service instance objects during launch time. The design has been changed\nto just kick services off by retrieving the existing object tree.... | ruby | chosen |
[
{
"from": "system",
"value": "Clear cookie if visit is destroyed\n"
},
{
"from": "human",
"value": "module Ahoy\n module ControllerExtensions\n\n def self.included(base)\n base.helper_method :current_visit\n end\n\n protected\n\n def current_visit\n @current_visit ||= Ahoy... | ruby | chosen |
[
{
"from": "system",
"value": "Update The Unarchiver to v. 3.8\n"
},
{
"from": "human",
"value": "class TheUnarchiver < Cask\n url 'http://theunarchiver.googlecode.com/files/TheUnarchiver3.7.zip'\n homepage 'http://unarchiver.c3.cx/'\n version '3.7'\n sha1 'da29b9f591d299cf1f869b7c77aac389087... | ruby | chosen |
[
{
"from": "system",
"value": "Handle other mailers in fact resolution\n\nCalling the sendmail executable might not be reliable if another mailer\n(Exim, Postfix) is installed.\n"
},
{
"from": "human",
"value": "# Fact: sendmail_version\n#\n# Get the sendmail version\n#\nFacter.add(:sendmail_vers... | ruby | chosen |
[
{
"from": "system",
"value": "Send GUID & API key\n"
},
{
"from": "human",
"value": "require \"rest_client\"\n\nmodule CatsocketClient\n class Publisher < Struct.new(:url, :api_key)\n\n def publish(channel, data)\n RestClient.post(url, channel: channel, data: data )\n end\n\n end\ne... | ruby | chosen |
[
{
"from": "system",
"value": "Fix registration to make it work once one key is registered\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nmodule CurrentUser\n class U2fRegistrationsController < ApplicationController\n before_action :require_login\n\n def new\n @regi... | ruby | chosen |
[
{
"from": "system",
"value": "Add RBENV_VERSION and BUNDLE_BIN_PATH to list of sensitive environment variables\n"
},
{
"from": "human",
"value": "module Juici\n BUILD_SENSITIVE_VARIABLES = %w[RUBYOPT BUNDLE_GEMFILE RACK_ENV MONGOLAB_URI GEM_PATH WORKING_DIR]\n class BuildEnvironment\n\n att... | ruby | chosen |
[
{
"from": "system",
"value": "Fix runner not picking up violated files\n"
},
{
"from": "human",
"value": "require 'pronto/swiftlint/wrapper'\nrequire 'pronto'\n\nmodule Pronto\n class SwiftlintRunner < Runner\n def run(patches, _)\n return [] unless patches\n\n offences = Swiftlint... | ruby | chosen |
[
{
"from": "system",
"value": "Call super with no arguments.\n\nWhen calling super, it makes to sense to pass the attributes argument,\nas this is specific to the Restalicious Module.\n"
},
{
"from": "human",
"value": "module Restulicious\n module Attributes\n extend ::ActiveSupport::Concern\... | ruby | chosen |
[
{
"from": "system",
"value": "Allow the `radio` display adapter to be used."
},
{
"from": "human",
"value": "require \"dry-container\"\nrequire \"formalist/display_adapters/default\"\nrequire \"formalist/display_adapters/select\"\nrequire \"formalist/display_adapters/textarea\"\n\nmodule Formali... | ruby | chosen |
[
{
"from": "system",
"value": "Allow DocumentViewAdapter to humanize attributes\n"
},
{
"from": "human",
"value": "require \"forwardable\"\n\nclass DocumentViewAdapter < SimpleDelegator\n extend Forwardable\n extend ActiveModel::Naming\n include ActiveModel::Conversion\n\n def initialize(docu... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a side effect causing environment to be always loaded\n"
},
{
"from": "human",
"value": "config_path = File.expand_path(File.join(RAILS_ROOT, 'config'))\nrequire File.join(config_path, 'environment')\n\nnamespace :translate_routes do\n\n desc \"Updates yaml tra... | ruby | chosen |
[
{
"from": "system",
"value": "Add RSpec configure helper for one shot setup\n"
},
{
"from": "human",
"value": "module Pharrell\n module Integration\n module RSpec\n def self.included(base)\n base.extend(ClassMethods)\n end\n\n module ClassMethods\n def use_config... | ruby | chosen |
[
{
"from": "human",
"value": "Add rake task for redacting customer details\n\nAdds a rake task that accepts a booking reference and removes any\nidentifying customer data.\n"
},
{
"from": "gpt",
"value": "namespace :confidentiality do\n desc 'Process a confidentiality request (REFERENCE=x)'\n t... | ruby | chosen |
[
{
"from": "system",
"value": "Return RSpec Expectations to 3.5.0.pre\n"
},
{
"from": "human",
"value": "module RSpec\n module Expectations\n # @private\n module Version\n STRING = '3.5.0.beta1'\n end\n end\nend\n"
},
{
"from": "gpt",
"value": "module RSpec\n module E... | ruby | chosen |
[
{
"from": "system",
"value": "Fix const_get for Ruby 2.0-\n"
},
{
"from": "human",
"value": "module Trackets\n module Plugins\n class Loader\n\n def initialize\n Trackets.configuration.load_plugins.each do |plugin_name|\n require \"trackets/plugins/#{plugin_name}\"\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Raise error on bad return status\n"
},
{
"from": "human",
"value": "require 'faraday_middleware'\n\nmodule TumblrOAuth\n # @private\n module Connection\n private\n\n def connection\n options = {\n :headers => {'Accept' => \"application/json\"},\n... | ruby | chosen |
[
{
"from": "system",
"value": "Update signal tests for readability\n"
},
{
"from": "human",
"value": "require 'helper'\n\nclass SignalHandlerTest < Test::Unit::TestCase\n def setup\n @exp = Expectr.new(\"bc\", flush_buffer: false, timeout: 1)\n end\n\n def test_winsz_change\n winsize = $... | ruby | chosen |
[
{
"from": "human",
"value": "Add some indexes on the attendance_records table.\n"
},
{
"from": "gpt",
"value": "class AddIndexToAttendanceRecords < ActiveRecord::Migration\n def self.up\n add_index \"attendance_records\", [\"site_id\"], :name => \"index_site_id_on_attendance_records\"\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix an error when running specs under spork\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nshared_examples \"a participation\" do\n\tlet(:project) { FactoryGirl.create(:project) }\n\tlet!(:unfilled_participation) { described_class.create(project_id: pro... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a test that wasn't looking at the href attribute\n"
},
{
"from": "human",
"value": "describe '/_user_util_links.html.erb', type: :view do\n let(:join_date) { 5.days.ago }\n before do\n allow(view).to receive(:user_signed_in?).and_return(true)\n allow(vie... | ruby | chosen |
[
{
"from": "system",
"value": "Return Enumerator instead of yield\n"
},
{
"from": "human",
"value": "require 'flickraw'\n\nmodule FlickrToGooglePhotos\n class Flickr\n include Enumerable\n\n FLICKR_API = 'https://www.flickr.com/services'\n PER_PAGE = 500\n\n def initialize(consumer_k... | ruby | chosen |
[
{
"from": "system",
"value": "Include domain when present & not nil\n\nAdding the `domain` key to the cookie when it's either not present, or\n`localhost` results in the cookie not being deleted. The code already\nhandled the nil case, but not the `localhost` case. This handles both.\n"
},
{
"from":... | ruby | chosen |
[
{
"from": "system",
"value": "Remove hash syntax introduced in 1.9.\n"
},
{
"from": "human",
"value": "Capistrano::Configuration.instance(:must_exist).load do\n after \"deploy:finalize_update\", \"config:symlink\"\n\n namespace :config do\n set :config_files, fetch(:config_files, [])\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change default index? policy to false\n\nSee gh-17 for initial discussion. I think that the default provided\nbefore this commit is confusing, because an empty result is not a\ngood indicator of authorization failure. Returning false better\ncommunicates \"override this is yo... | ruby | chosen |
[
{
"from": "system",
"value": "Fix LDAP setting in connection initializer\n"
},
{
"from": "human",
"value": "module Jackad\n class AdConnect\n\n attr_reader :ldap, :attribute\n\n def initialize(params = {})\n\n @ldap = Net::LDAP.new(params)\n @ldap.host = LDAP_CONFIG[:host]\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for rubocop, use is_a instead of kind_of\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire_relative \"../../../test_helper\"\n\nclass AnotherTestController < ApplicationController; end\n\nclass Comfy::Cms::BaseControllerTest < ActionDis... | ruby | chosen |
[
{
"from": "system",
"value": "Add comments for optional notification fields\n"
},
{
"from": "human",
"value": "class CreateNotifiableNotifications < ActiveRecord::Migration\n \n def change\n create_table :notifiable_notifications do |t|\n t.text :title\n t.text :message\n t.t... | ruby | chosen |
[
{
"from": "system",
"value": "Fix db type for snowflake\n"
},
{
"from": "human",
"value": "class CreateUsers < ActiveRecord::Migration[5.1]\n def change\n create_table :users do |t|\n t.integer :uid\n\n t.timestamps\n end\n end\nend\n"
},
{
"from": "gpt",
"value": "... | ruby | chosen |
[
{
"from": "system",
"value": "Improve cancel method to set cancelled attribute as true only if payment status is 10\n"
},
{
"from": "human",
"value": "module BraspagRest\n class Sale < Hashie::IUTrash\n include Hashie::Extensions::Coercion\n\n attr_reader :errors\n\n property :request_... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor to allow change of web automation suite\n"
},
{
"from": "human",
"value": "require_relative 'site'\n\nmodule CodeBadges\n # Service object class that takes credentials and username\n # returns a hash of user's badges information\n class GetCodecademyBadg... | ruby | chosen |
[
{
"from": "system",
"value": "Fix error in parse an empty Hash to Struct\n"
},
{
"from": "human",
"value": "class Hash\n\n # Only symbolize all keys, including all key in sub-hashes. \n def symbolize_keys\n return self.clone if self.empty?\n self.inject({}) do |hash, (key, value)|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix indentation error that makes question edit and update unreachable. Whoops.\n"
},
{
"from": "human",
"value": "class QuestionsController < ApplicationController\n\n def index\n @questions = Question.all\n @questions_grid = QuestionsGrid.new(params[:questio... | ruby | chosen |
[
{
"from": "human",
"value": "Add integration test for segmentation endpoint\n"
},
{
"from": "gpt",
"value": "require 'acceptance_helper'\n\nfeature \"Overview page\" do\n\n let(:project) { FactoryGirl.create(:project) }\n\n background do\n 3.times { |i| project.events.create(type: \"sale\",... | ruby | chosen |
[
{
"from": "system",
"value": "Update unit test for building simple domain name\n\nMake the unit test match the new requirement that if a _ postfix is desired\r\nwhen default_prefix is defined, then it must be added to the default_prefix."
},
{
"from": "human",
"value": "require 'spec_helper'\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Remove inherit_resources from authorizations controller\n"
},
{
"from": "human",
"value": "class Users::AuthorizationsController < ApplicationController\n inherit_resources\n belongs_to :user\n actions :destroy\n\n def destroy\n authorize resource\n destro... | ruby | chosen |
[
{
"from": "system",
"value": "Update Homebrew formula for v0.8.0\n"
},
{
"from": "human",
"value": "require 'formula'\n\nclass ChrubyFish < Formula\n desc \"Thin wrapper around chruby to make it work with the Fish shell\"\n homepage \"https://github.com/JeanMertz/chruby-fish#readme\"\n url \"... | ruby | chosen |
[
{
"from": "system",
"value": "Use news articles for slimmer header exclusion test\n\nAfter deleting the statistical data sets controller these tests were\nfailing.\n"
},
{
"from": "human",
"value": "require \"test_helper\"\n\nclass DocumentsControllerWorldwideSlimmerHeadersExclusionTest < Action... | ruby | chosen |
[
{
"from": "system",
"value": "Support Ruby2.1. Bump version of ruby-anything.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'anything-gorepo/version'\n\nGem::Specification.new do |s... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec for blank line between method definitions\n"
},
{
"from": "human",
"value": "require 'minitest/autorun'\nrequire 'rubyfmt'\n\ndescribe \"Rubyfmt\" do\n it do\n assert_fixture 'person'\n end\n\n it \"adds blank line between class definitions\" do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Modify Style/RedundantFreeze to use NodePattern\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule RuboCop\n module Cop\n module Style\n # This cop check for uses of Object#freeze on immutable objects.\n #\n # @example\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update preflight check to require 2.21"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule SystemCheck\n module App\n class GitVersionCheck < SystemCheck::BaseCheck\n set_name -> { \"Git version >= #{self.required_version} ?\" }\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add rake task to unpublish/redirect brexit checker\n"
},
{
"from": "gpt",
"value": "namespace :brexit_checker do\n desc \"Unpublish the brexit checker and redirect to new slugs\"\n task unpublish: [:environment] do\n BrexitCheckerUnpublisher.call\n end\nend\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Use a custom matcher for checking face value\n"
},
{
"from": "human",
"value": "require_relative '../lib/poker_dice'\n\ndescribe PokerDice::Die do\n def die(numeric_value)\n PokerDice::Die.new(numeric_value)\n end\n\n it \"should have a face value of 9 when it... | ruby | chosen |
[
{
"from": "system",
"value": "Fix also tests for \"File.exist?\"\n"
},
{
"from": "human",
"value": "require 'test_helper'\nrequire 'apns-s3'\n\nclass TestApnsS3 < Test::Unit::TestCase\n setup do\n @pem_filename = 'dummy.pem'\n end\n\n test \"pemfile exists\" do\n stub(File).exists?(@pem... | ruby | chosen |
[
{
"from": "system",
"value": "Fix sorting of detail views.\n"
},
{
"from": "human",
"value": "class CrimeAnnotation\n\n #Creates the new crime object\n def initialize(crime, type)\n @crime = crime\n \t@coordinate = CLLocationCoordinate2D.new\n @type = type\n end\n\n #Return the offen... | ruby | chosen |
[
{
"from": "system",
"value": "Fix `send_key` to `send_keys` and add EOF newline"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nfeature 'Dashboard shortcuts', :feature, :js do\n context 'logged in' do\n before do\n login_as :user\n visit root_dashboard_path\n end\n\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add a failing spec for the worker lists\n\nThese lists should really contain all the defined workers\n"
},
{
"from": "gpt",
"value": "describe \"worker types lists\" do\n let(:all_defined_workers) do\n exceptions = %w[ManageIQ::Providers::BaseManager::OperationsW... | ruby | chosen |
[
{
"from": "human",
"value": "Add simple contacts controller test\n"
},
{
"from": "gpt",
"value": "RSpec.describe ContactsController, type: :controller do\n it 'should return data from ContactsService' do\n expected = {\n 'answered_calls' => 11,\n 'average_call_duration' => 123,\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change minitest-reporters dependency to > 1.0\n"
},
{
"from": "human",
"value": "require_relative 'lib/minitest_rollbar/version'\n\nGem::Specification.new do |spec|\n spec.author = 'Yuesong Wang'\n spec.email = ['wangyuesong0@qq.com']\n spec.files = Dir.glob('lib... | ruby | chosen |
[
{
"from": "system",
"value": "Adjust routes to display kinder errors and changes new to create so valid? will work\n"
},
{
"from": "human",
"value": "post '/login' do\n @user = User.find_by(name: params[:user][:email])\n\n if @user.try(:authenticate, params[:user][:password])\n session[:use... | ruby | chosen |
[
{
"from": "system",
"value": "Update PlantUML gem license to correct SPDX identifier\n"
},
{
"from": "human",
"value": "# coding: utf-8\n\nGem::Specification.new do |s|\n s.name = 'asciidoctor-diagram-plantuml'\n s.version = '1.2022.1'\n s.authors = ['Pepijn Van Eeckhoudt... | ruby | chosen |
[
{
"from": "system",
"value": "[Rails] Allow use of before_action or before_filter\n\nAllow usage of Rails 3-4 syntax as well as 5"
},
{
"from": "human",
"value": "module Bugsnag::Rails\n module ControllerMethods\n def self.included(base)\n base.extend ClassMethods\n end\n\n module... | ruby | chosen |
[
{
"from": "system",
"value": "Add support for rendered email templates\n"
},
{
"from": "human",
"value": "module Closeio\n class Client\n module EmailTemplate\n\n def list_email_templates(paginate = false)\n if paginate\n paginate(email_template_path)\n else\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Convert all string stuff to strings\n"
},
{
"from": "human",
"value": "module DatastaxRails\n module Types\n class StringType < BaseType\n DEFAULTS = {:solr_type => 'string', :indexed => true, :stored => true, :multi_valued => false, :sortable => true, :tok... | ruby | chosen |
[
{
"from": "system",
"value": "Implement constructor of \"Context\" class\n"
},
{
"from": "human",
"value": "module Sastrawi\n module Stemmer\n module Context\n class Context\n def initialize\n # TODO: Implement this method here.\n end\n\n def init_visitors\... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.