conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "[Spec] Add unit test for redacting paths from Subject's execution output\n" }, { "from": "gpt", "value": "require File.expand_path('../spec_helper', __FILE__)\n\ndescribe CLIntegracon::Subject do\n\n def subject\n CLIntegracon::Subject\n end\n\n before do\n ...
ruby
chosen
[ { "from": "system", "value": "Move on_load outside the block because in tests the :on_load doesn't seem to be correctly triggered.\n\nThe other alternative is to trigger the event manually, like several libraries do.\n\nE.g. https://github.com/voxdolo/decent_exposure/blob/master/spec/lib/rails_integration_s...
ruby
chosen
[ { "from": "system", "value": "Update path to work with new rake task location\n" }, { "from": "human", "value": "require 'fileutils'\n\nnamespace :simple_config do\n include FileUtils\n \n task :setup do\n raise \"This task should be run from within a Rails application.\" unless File.exist...
ruby
chosen
[ { "from": "system", "value": "Fix block for nonlogged users\n" }, { "from": "human", "value": "class DistributionPlugin::OrderBlock < Block\n\n def self.short_description\n _(\"Orders' cycles\")\n end\n\n def self.description\n _(\"Distribution orders' cycles for members\")\n end\n\n def sel...
ruby
chosen
[ { "from": "system", "value": "Make sure Containers Before Processing\n\nThe crosslink code for the Swift Manager refresh parser\nattempts to loop through the set of containers for the\nmanager without checking if any exist first.\nFix by checking first.\n" }, { "from": "human", "value": "module ...
ruby
chosen
[ { "from": "system", "value": "Change default redirect to root_path\n\nFixes #6\n" }, { "from": "human", "value": "class Spree::UserSessionsController < Devise::SessionsController\n include SslRequirement\n helper 'spree/users', 'spree/base'\n\n include Spree::Core::CurrentOrder\n include Spr...
ruby
chosen
[ { "from": "system", "value": "Add option to use Mailgun addon keys.\n" }, { "from": "human", "value": "SMTP_SETTINGS = {\n address: ENV.fetch(\"SMTP_ADDRESS\"), # example: \"smtp.sendgrid.net\"\n authentication: :plain,\n domain: ENV.fetch(\"SMTP_DOMAIN\"), # example: \"heroku.com\"\n enable...
ruby
chosen
[ { "from": "system", "value": "Make Wacky::SpecialPagesController derive from\nWacky::ApplicationController\n" }, { "from": "human", "value": "class Wacky::SpecialPagesController < ApplicationController\n def recently_updated\n @pages = Page.order(\"updated_at DESC\").limit(10)\n end\nend\n"...
ruby
chosen
[ { "from": "system", "value": "Tweak bootstrap process of workers\n" }, { "from": "human", "value": "require_relative \"distributor\"\nrequire_relative \"socket_builder/unix_socket\"\nrequire_relative \"worker\"\n\nmodule RSpec\n module Parallel\n class Master\n # @return [Array<Integer>...
ruby
chosen
[ { "from": "system", "value": "Exclude .specjour dir when rsyncing project\n" }, { "from": "human", "value": "module Specjour\n class RsyncDaemon\n require 'fileutils'\n\n attr_reader :project_path, :project_name\n def initialize(project_path, project_name)\n @project_path = projec...
ruby
chosen
[ { "from": "system", "value": "Use JSON.pretty_generate to format config\n\nCloses #13.\n" }, { "from": "human", "value": "require 'json'\nrequire 'travis/lite/views/layout'\n\nmodule Travis\n module Lite\n module Views\n class Job < Layout\n def slug\n @repository.slug\n...
ruby
chosen
[ { "from": "system", "value": "[BUGFIX] Handle incorrect generator names properly again" }, { "from": "human", "value": "# encoding: utf-8\n\nmodule Adhearsion\n module Generators\n extend ActiveSupport::Autoload\n\n autoload :Generator\n\n class << self\n\n # Show help message wit...
ruby
chosen
[ { "from": "system", "value": "Clear nginx cache of review apps by accessing to /review_apps/clear endpoint\n" }, { "from": "human", "value": "class PullRequest::Actions::Synchronized < PullRequest::Actions\n def handle\n target.update\n end\nend\n" }, { "from": "gpt", "value": "...
ruby
chosen
[ { "from": "human", "value": "Add new report class for MI provisional assessments\n" }, { "from": "gpt", "value": "module Reports\n class ProvisionalAssessments\n NAME = 'provisional_assessment'.freeze\n COLUMNS = %w[provider_name provider_type provider_claims supplier_number\n ...
ruby
chosen
[ { "from": "system", "value": "Attach effective_at to name in serialiser\n" }, { "from": "human", "value": "class Species::EventSerializer < ActiveModel::Serializer\n attributes :id, :name, :type\nend\n" }, { "from": "gpt", "value": "class Species::EventSerializer < ActiveModel::Seri...
ruby
chosen
[ { "from": "system", "value": "Return error payload when not found\n" }, { "from": "human", "value": "module Api\n module V1\n class NdcFullTextsController < ApiController\n def index\n @ndcs = Ndc.includes(:location)\n @ndcs = apply_query_with_highlights(@ndcs, false)\n ...
ruby
chosen
[ { "from": "system", "value": "Add this for testing purposes\n" }, { "from": "human", "value": "module SnlAdmin\n class ApplicationController < ActionController::Base\n\n protected\n\n def current_user\n return nil unless session[:user_id]\n @current_user ||= SnlAdmin.user_class....
ruby
chosen
[ { "from": "system", "value": "Add offset to query for relationships so pagination works in has_many view\n" }, { "from": "human", "value": "module Admin::Resources::RelationshipsHelper\n\n def setup_relationship(field)\n @field = field\n @model_to_relate = @resource.reflect_on_association...
ruby
chosen
[ { "from": "system", "value": "Rename signifyd link deface override\n\nThe commit introducing the signifyd_link reused the same name between\nthe two overrides, cancelling the first one.\n" }, { "from": "human", "value": "Deface::Override.new(\n virtual_path: \"spree/admin/orders/_risk_analysis\...
ruby
chosen
[ { "from": "system", "value": "Use version of atspi_app_driver with fixed focus tracking\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |s|\n s.name = 'mdv'\n s.version = '0.1.6'\n\n s.summary = 'Simple Markdown Viewer'\n s.description = 'Quickly vie...
ruby
chosen
[ { "from": "system", "value": "Fix missed dependency on ephemeral_lvm\n" }, { "from": "human", "value": "name 'spacewalk-server'\nmaintainer 'Yet Another Clever Name'\nmaintainer_email 'admin@yacn.pw'\nlicense 'MIT'\ndescription 'Installs/Configures a Spacewalk Ser...
ruby
chosen
[ { "from": "system", "value": "Allow running the yum 4.0 cookbook\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "from": "human", "value": "name 'yum-chef'\nmaintainer 'Chef Software, Inc.'\nmaintainer_email 'cookbooks@chef.io'\nlicense 'Apache 2.0'\ndescri...
ruby
chosen
[ { "from": "system", "value": "Document the attributes for the glassfish gem\n" }, { "from": "human", "value": "maintainer \"Fire Information Systems Group\"\nmaintainer_email \"peter@realityforge.org\"\nlicense \"Apache 2.0\"\ndescription \"Installs/Configures GlassFish Appli...
ruby
chosen
[ { "from": "system", "value": "Add context to avoid unnecessary renders; CR: EF" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Feedshub::FeedsController do\n routes { Feedshub::Engine.routes }\n\n describe 'github_feeds' do\n render_views\n\n before :each do\n lin...
ruby
chosen
[ { "from": "system", "value": "Order by category.order on /editor/categories\n" }, { "from": "human", "value": "class Editor::CategoriesController < Editor::ApplicationController\n def index\n @categories = categories\n end\n\n def show\n @category = categories.find(params[:id])\n end\n...
ruby
chosen
[ { "from": "system", "value": "Clean up deploy restart hooks for capistrano 3\n\nSee:\nhttps://github.com/capistrano/capistrano/blob/master/CHANGELOG.md#310" }, { "from": "human", "value": "namespace :load do\n\n task :defaults do\n set :eye_config, -> { \"config/eye.yml\" }\n set :eye_bin...
ruby
chosen
[ { "from": "system", "value": "Fix form helper for forms without a real record.\n" }, { "from": "human", "value": "module Formulate\n module FormHelper\n FIELD_ERROR_PROC = proc { |html_tag, instance_tag| html_tag }\n\n def form_for(record, options={}, &proc)\n options[:html] ||= {}\n...
ruby
chosen
[ { "from": "system", "value": "Fix typo in DoCM importer\n" }, { "from": "human", "value": "module Genome\n module Importers\n module Docm\n\n def self.source_info\n {\n base_url: 'http://docm.genome.wustl.edu/',\n citation: 'Manuscript in preparation. Please...
ruby
chosen
[ { "from": "system", "value": "Revert \"temporarily disable migration for new index\"\n\nThis reverts commit 83a5e9a72aed134d117c096d02dbf1095d762a8e.\n" }, { "from": "human", "value": "class ChangeAllowNull < ActiveRecord::Migration\n def up\n change_column :sources, :group_id, :integer, :nu...
ruby
chosen
[ { "from": "human", "value": "Add description for upcoming PoC2\n" }, { "from": "gpt", "value": "# Proof of Concept - insta-scaling\n# ------\n# So the title is obviously ~satirical, but the goal of this PoC is to show\n# that with little effort, we can build a system atop DCell that can\n# autom...
ruby
chosen
[ { "from": "system", "value": "Change signature to use yard.signature if found\n" }, { "from": "human", "value": "def init\n sections :list, [T('docstring')]\nend\n\ndef tag_signature(tag)\n types = tag.types || []\n signature = \"<strong>#{tag_link_name(tag)}</strong> \"\n case types.first\n...
ruby
chosen
[ { "from": "human", "value": "Add basic test coverage for CompetitorsController\n" }, { "from": "gpt", "value": "require 'test_helper'\n\nclass CompetitorsControllerTest < ActionController::TestCase\n test \"#search\" do\n WcaGateway.any_instance.expects(:search_by_id).returns([])\n get :s...
ruby
chosen
[ { "from": "system", "value": "Fix brew audit warning message : \"Head-only…\"\n\nHead-only (no stable download)\n" }, { "from": "human", "value": "require 'formula'\n\nclass Phpenv < Formula\n homepage 'https://github.com/CHH/phpenv'\n head 'https://github.com/CHH/phpenv.git'\n\n option 'skip...
ruby
chosen
[ { "from": "human", "value": "Add formula for the Judy dynamic array library\n\nFrom the website:\n\n\"Judy is a C library that provides a state-of-the-art core technology\nthat implements a sparse dynamic array. Judy arrays are declared simply\nwith a null pointer. A Judy array consumes memory only when it ...
ruby
chosen
[ { "from": "system", "value": "Remove allegro_font and allegro_ttf from linker option\n" }, { "from": "human", "value": "MRuby::Gem::Specification.new('mruby-minigame') do |spec|\n spec.license = 'MIT'\n spec.author = 'bggd'\n\n case RUBY_PLATFORM\n when /linux/i\n spec.linker.libraries <...
ruby
chosen
[ { "from": "system", "value": "Update Ruby version for Ruby 3\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'affirm/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Fix for Error w/ Ruby 1.9.2 and Rubygems 1.5\n\n`<class:UI>': uninitialized constant Gem::SilentUI (NameError)\n" }, { "from": "human", "value": "require 'rubygems/user_interaction'\n\nmodule Bundler\n class UI\n def warn(message)\n end\n\n def debug(messa...
ruby
chosen
[ { "from": "system", "value": "Fix Tire index prefis to be valid.\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'tire'\nrequire \"changeling/version\"\n\nmodule Changeling\n Tire::Model::Search.index_prefix \"Changeling\"\n\n autoload :Trackling, 'changeling/trackling'\n autol...
ruby
chosen
[ { "from": "system", "value": "Add .pre for next version\n\nChange-Id: Iaa2c3e86978f32433b0f469938768f7a8194a1e6\nReviewed-on: http://review.engineyard.com/253\nReviewed-by: Sam Merritt <5aec43857f03982d0d771daf2f8c2a359d3ce580@engineyard.com>\nTested-by: Sam Merritt <5aec43857f03982d0d771daf2f8c2a359d3ce580...
ruby
chosen
[ { "from": "system", "value": "Set default credentials based on ENV\n" }, { "from": "human", "value": "module Userbin\n class Configuration\n attr_accessor :app_id\n attr_accessor :api_secret\n attr_accessor :user_model\n attr_accessor :restricted_path\n end\nend\n" }, { "fr...
ruby
chosen
[ { "from": "system", "value": "Update args for part_class in spec" }, { "from": "human", "value": "RSpec.describe 'decorator' do\n before do\n module Test\n class CustomPart < Dry::View::Part\n def to_s\n \"Custom part wrapping #{_value}\"\n end\n end\n end...
ruby
chosen
[ { "from": "human", "value": "Add school to User model\n" }, { "from": "gpt", "value": "class AddSchoolToUsers < ActiveRecord::Migration\n def up\n add_column :users, :school, :string\n say_with_time \"Migrating User school.\" do\n User.all.each do |user|\n user.update_attribut...
ruby
chosen
[ { "from": "system", "value": "AACT-204: Create user: aact when db dropped/re-created" }, { "from": "human", "value": "class CreateAdminTables < ActiveRecord::Migration\n\n def change\n\n create_table \"load_events\", force: :cascade do |t|\n t.string \"event_type\"\n t.string ...
ruby
chosen
[ { "from": "human", "value": "Create a new migration for the Votes table\n\nMigration will recreate the votes table with the default 'id' field and\nindex over the 'id's of the associated ideas and users.\n" }, { "from": "gpt", "value": "class RecreateVotes < ActiveRecord::Migration\n def self.u...
ruby
chosen
[ { "from": "system", "value": "Update model_options in example app\n\n" }, { "from": "human", "value": "# Be sure to restart your server when you modify this file. Action Cable runs in a loop that does not support auto reloading.\nclass TodoChannel < ApplicationCable::Channel\n include ActionCab...
ruby
chosen
[ { "from": "system", "value": "Refactor rule: Plann - fix blank title\n" }, { "from": "human", "value": "module DataCleanup\n module Rules\n module Plan\n class FixBlankTitle < Rules::Base\n\n def description\n \"Fix blank title on Plan\"\n end\n\n def call\...
ruby
chosen
[ { "from": "human", "value": "Set method for generating non-sensitive digests\n\nconfig.active_support.hash_digest_class allows configuring the digest class\nto use to generate non-sensitive digests, such as the ETag header.\n\nThe default method changes with Rails 5.2 to OpenSSL::Digest::SHA1. This commit\n...
ruby
chosen
[ { "from": "system", "value": "Switch master to logstash v5 development\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 'logstash-output-jdbc'\n s.version = \"0.2.6.rc1\"\n s.licenses = [ \"Apache License (2.0)\" ]\n s.summary = \"This plugin allows you to output t...
ruby
chosen
[ { "from": "system", "value": "Remove a reference to managed_by_transition from an import rake task\n\n- A transtion-postgres Errbit error\n (https://errbit.preview.alphagov.co.uk/apps/53e8c4e40da115dfc200684d/problems/5425716e0da11550d7001181)\n made me do a full search\n everywhere. Clearly nothing has ...
ruby
chosen
[ { "from": "system", "value": "Fix outdated reference to racers in migration\n" }, { "from": "human", "value": "class AddStatusToRacers < ActiveRecord::Migration\n def self.up\n return if ASSOCIATION.short_name == \"MBRA\"\n\n add_column :racers, :status, :string\n end\n\n def self.down\...
ruby
chosen
[ { "from": "system", "value": "Add missing sec groups -> vms relationship\n\nAdd missing sec groups -> vms relationship\n" }, { "from": "human", "value": "class ManageIQ::Providers::Openstack::NetworkManager::SecurityGroup < ::SecurityGroup\nend\n" }, { "from": "gpt", "value": "class ...
ruby
chosen
[ { "from": "system", "value": "Add middle name to license text\n" }, { "from": "human", "value": "# Copyright 2007-2022 James (Jamie) Orchard-Hays\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...
ruby
chosen
[ { "from": "system", "value": "Fix for Proc arity and Ruby 1.9\n" }, { "from": "human", "value": "class HighVoltage::PagesController < ApplicationController\n\n unloadable\n layout Proc.new { HighVoltage::layout }\n\n rescue_from ActionView::MissingTemplate do |exception|\n if exception.mes...
ruby
chosen
[ { "from": "system", "value": "Use update_column to set :last_activity_at for project\n" }, { "from": "human", "value": "class ProjectActivityCacheObserver < BaseObserver\n observe :event\n\n def after_create(event)\n event.project.update_attribute(:last_activity_at, event.created_at) if eve...
ruby
chosen
[ { "from": "system", "value": "Move regex to a constant\n" }, { "from": "human", "value": "module Linguist\n module Strategy\n class Modeline\n # Public: Detects language based on Vim and Emacs modelines\n #\n # blob - An object that quacks like a blob.\n #\n...
ruby
chosen
[ { "from": "system", "value": "Improve comment in fixity check service\n" }, { "from": "human", "value": "module Hyrax\n class RepositoryFixityCheckService\n def self.fixity_check_everything\n ::FileSet.find_each do |gf|\n Hyrax::FileSetFixityCheckService.new(gf).fixity_check\n ...
ruby
chosen
[ { "from": "system", "value": "JariBakken: Use \"wb\" mode string when saving screenshots (needed on Windows).\n\ngit-svn-id: aa1aa1384423cb28c2b1e29129bb3a91de1d9196@9686 07704840-8298-11de-bf8c-fd130f914ac9\n" }, { "from": "human", "value": "module Selenium\n module WebDriver\n\n #\n # @...
ruby
chosen
[ { "from": "system", "value": "Revert \"try deploy heroku removing add_providers\"\n\nThis reverts commit 01139b52fb93394ee18035c6afe363f27acfa6f1.\n" }, { "from": "human", "value": "class OmniauthCallbacksController < Devise::OmniauthCallbacksController\n skip_before_filter :set_locale\n\n #de...
ruby
chosen
[ { "from": "system", "value": "Remove the do not redistribute clause in the zookeeper cookbook. There's nothing webtrends specific in this\n" }, { "from": "human", "value": "#\n# Cookbook Name:: zookeeper\n# Attributes:: default\n#\n# Copyright 2012, Webtrends Inc.\n#\n# All rights reserved - Do...
ruby
chosen
[ { "from": "system", "value": "maint: Remove trailing space from RemoteDeviceInfo fact\n" }, { "from": "human", "value": "require 'json'\r\n\r\n# Base class for all possible facts\r\nmodule PuppetX::Brocade::PossibleFacts::Custom\r\n def self.register(base)\r\n\r\n fcport = base.facts['FC Por...
ruby
chosen
[ { "from": "human", "value": "Add task to initialize default stages\n" }, { "from": "gpt", "value": "desc \"Trigger segment events for automatic sales events\"\ntask :trigger_auto_sales_events => :environment do\n User.joins(:school).where('users.role = ?', 'teacher').find_each do |teacher|\n ...
ruby
chosen
[ { "from": "system", "value": "Correct field for purchase price for jET Schweiz AG\n" }, { "from": "human", "value": "# encoding: utf-8\nrequire 'supplier_util'\n\nclass JetUtil < SupplierUtil\n\n def initialize\n \n @supplier = Supplier.where(:name => 'jET Schweiz IT AG').first\n if @sup...
ruby
chosen
[ { "from": "system", "value": "Set proper content type and clear operations after request\n" }, { "from": "human", "value": "class Fog::Rackspace::CDNV2::Real\n def update_service(service)\n request(\n :expects => [201, 202],\n :method => 'PATCH',\n :body => Fog::JSON.encod...
ruby
chosen
[ { "from": "system", "value": "Fix a bug with VLANs\n" }, { "from": "human", "value": "class Arp\n def self.all\n `ip neigh show`.split(/\\n/).map do |entry|\n Arp.new *entry.scan(/\\A([0-9a-f:.]*?) dev ([a-z0-9]*?) lladdr ([0-9a-f:].*?) .*\\z/i).first\n end\n end\n\n def self.prese...
ruby
chosen
[ { "from": "system", "value": "Edit invalid login info flash notice\n" }, { "from": "human", "value": "class Admin::SessionsController < ApplicationController\n\n def new\n end\n\n def create\n @user = User.find_by_email params[:email]\n if @user && @user.authenticate(params[:password])\...
ruby
chosen
[ { "from": "system", "value": "Add tests to work with generator plugin" }, { "from": "human", "value": "require File.dirname(File.expand_path(__FILE__)) + \"/../lib/sass-fontimage.rb\"\n\nrequire 'sass'\n\nrequire File.dirname(File.expand_path(__FILE__)) + \"/../lib/sass_fontimage/sass_extensions...
ruby
chosen
[ { "from": "system", "value": "Use glob for finding acknowledgements path for CocoaPods\n\nFixes #177\n\nSigned-off-by: Alpha Chen <7364008dc3be68102ea8f9d7e1fdcc07eb756637@pivotal.io>\n" }, { "from": "human", "value": "require \"json\"\n\nmodule LicenseFinder\n class CocoaPods < PackageManager\...
ruby
chosen
[ { "from": "system", "value": "Install yard (and redcarpet for markdown support)\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path(\"../lib\", __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire \"geezeo/version\"\n\nGem::Specification.new do |spec...
ruby
chosen
[ { "from": "system", "value": "Use pathname's `sub_ext` method to its full potential\n" }, { "from": "human", "value": "module Rubycritic\n\n module ViewHelpers\n def javascript_path(file)\n asset_path(File.join(\"javascripts\", \"#{file}.js\"))\n end\n\n def stylesheet_path(file)\...
ruby
chosen
[ { "from": "human", "value": "Add knife digital_ocean droplet resize\n" }, { "from": "gpt", "value": "# 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 of the License at\n#\n# http:/...
ruby
chosen
[ { "from": "system", "value": "Change order of scheme filter, defaulting to all\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule Stats\n module ManagementInformation\n module ClaimTypeQueryable\n extend ActiveSupport::Concern\n\n included do\n delega...
ruby
chosen
[ { "from": "system", "value": "Remove ids as suggested storable attributes\n" }, { "from": "human", "value": "Redcrumbs.setup do |config|\n # If your activity feeds are user-based you can store creator and target \n # attributes on the crumb object to avoid having to touch your main database\n ...
ruby
chosen
[ { "from": "system", "value": "Raise exception for scheduling jobs in the inline adapter\n" }, { "from": "human", "value": "module ActiveJob\n module QueueAdapters\n class InlineAdapter\n class << self\n def enqueue(job, *args)\n job.new.execute *args\n end\n\n ...
ruby
chosen
[ { "from": "system", "value": "Fix issue introduced in ec2cbdb while running db:schema:load\n" }, { "from": "human", "value": "module PublicActivity\n module ORM\n module ActiveRecord\n # The ActiveRecord model containing\n # details about recorded activity.\n class Activity < ...
ruby
chosen
[ { "from": "system", "value": "Make the path absolute when the file is not found (sqlite3).\n" }, { "from": "human", "value": "require __DIR__ + 'data_objects_adapter'\nrequire 'do_sqlite3'\n\nmodule DataMapper\n module Adapters\n \n class Sqlite3Adapter < DataObjectsAdapter\n \n ...
ruby
chosen
[ { "from": "system", "value": "Fix on yubikey auth. strategy\n" }, { "from": "human", "value": "module Devise\n module Models\n module YkOtpAuthenticatable\n include ActiveSupport::Concern\n\n included do\n attr_accessor :yk_otp\n end\n\n def valid_yk_otp?(yk_otp)\n...
ruby
chosen
[ { "from": "system", "value": "Add before_validation method to Compatibility\n" }, { "from": "human", "value": "module Devise\n module Orm\n module DataMapper\n module Compatibility\n extend ActiveSupport::Concern\n\n module ClassMethods\n # Hooks for confirmable\n...
ruby
chosen
[ { "from": "system", "value": "Add reset_session for the :reset_session strategy.\n" }, { "from": "human", "value": "# Protects OmniAuth request phase against CSRF.\n\nmodule OmniAuth\n # Based from ActionController::RequestForgeryProtection.\n class RequestForgeryProtection\n def initialize...
ruby
chosen
[ { "from": "system", "value": "Fix issue converting from strings in YAML settings file to symbols expected by RefinerySetting logic.\n" }, { "from": "human", "value": "module Refinery\n module SettingsInitializer\n class Loader\n attr_reader :settings\n\n def initialize(settings)\n ...
ruby
chosen
[ { "from": "human", "value": "Add integration spec for creating a person while adding it as a contact\n" }, { "from": "gpt", "value": "require \"rails_helper\"\nrequire \"test_support/autocomplete_helpers\"\nrequire \"test_support/ajax_helpers\"\n\nRSpec.describe \"Add person to directory and ass...
ruby
chosen
[ { "from": "system", "value": "Create binstubs for bundler audit too\n" }, { "from": "human", "value": "require \"rails/generators\"\n\nmodule Suspenders\n class SecurityGenerator < Rails::Generators::Base\n source_root File.expand_path(\n File.join(\"..\", \"..\", \"..\", \"templates\")...
ruby
chosen
[ { "from": "human", "value": "Add spec for user default address setter\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\n\nrequire 'spec_helper'\n\ndescribe UserDefaultAddressSetter do\n let(:customer_address) { create(:address, address1: \"customer road\") }\n let(:order_address)...
ruby
chosen
[ { "from": "system", "value": "Change mailer generator to 0.2 templater syntax\n" }, { "from": "human", "value": "module Merb::Generators\n class MailerGenerator < NamespacedGenerator\n \n def self.source_root\n File.dirname(__FILE__) / 'templates' / 'mailer'\n end\n \n desc <<-...
ruby
chosen
[ { "from": "system", "value": "Support reset tag as replaceable value\n" }, { "from": "human", "value": "module Wovnrb\n class InputReplacer < ReplacerBase\n def initialize(text_index)\n @text_index = text_index\n end\n\n def replace(dom, lang)\n dom.xpath('//input').each do |...
ruby
chosen
[ { "from": "system", "value": "Add a basic spec for gethostbyname with broadcast and any addrs.\n" }, { "from": "human", "value": "require File.dirname(__FILE__) + '/../../../spec_helper'\nrequire File.dirname(__FILE__) + '/../fixtures/classes'\n" }, { "from": "gpt", "value": "require...
ruby
chosen
[ { "from": "human", "value": "Add smoke test that asserts something came from the API\n\nThis tests that the walking skeleton (bare-bones end-to-end flow) works.\n" }, { "from": "gpt", "value": "require 'rails_helper'\n\nRSpec.describe PortfoliosController, type: :controller do\n render_views\n\...
ruby
chosen
[ { "from": "system", "value": "Fix test accrodint to new pct counting\n\nSee:\nhttps://github.com/ONLYOFFICE/ooxml_parser/pull/427\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'Add tables with differnt types of width' do\n it 'Table with auto width' do\n docx = builder...
ruby
chosen
[ { "from": "system", "value": "Add uniqueness constraint test for applying to a chair\n" }, { "from": "human", "value": "require 'rails_helper'\n\n\n\nfeature \"First login as User\" do\n background do\n @current_user = FactoryGirl.create(:user)\n login_as @current_user\n end\n\n scenari...
ruby
chosen
[ { "from": "system", "value": "Refactor the AddColumnWithDefault cop to use node matchers\n" }, { "from": "human", "value": "require_relative '../../migration_helpers'\n\nmodule RuboCop\n module Cop\n module Migration\n # Cop that checks if `add_column_with_default` is used with `up`/`do...
ruby
chosen
[ { "from": "system", "value": "Fix error in is:foil condition\n" }, { "from": "human", "value": "class ConditionIsfoil < ConditionSimple\n def match?(card)\n [\"foilonly\", \"both\"].include?(card.foiling)\n end\n\n def to_s\n \"is:foil\"\n end\nend\n" }, { "from": "gpt", "v...
ruby
chosen
[ { "from": "system", "value": "Add test for logging user out; test passes\n" }, { "from": "human", "value": "require 'rails_helper'\nrequire 'capybara/rails'\n\ndescribe \"the log out process\", type: :feature do\n\tlet!(:user) {create(:user)}\n\n\tscenario 'logging out the current user' do\n\t\t...
ruby
chosen
[ { "from": "human", "value": "Add specs for CloudObjectContainerStoreContainer queue method.\n" }, { "from": "gpt", "value": "RSpec.describe CloudObjectStoreContainer do\n let(:ems) { FactoryBot.create(:ems_vmware) }\n let(:user) { FactoryBot.create(:user, :userid => 'test') }\n\n context \"qu...
ruby
chosen
[ { "from": "human", "value": "Fix for ExceptionNotifier failing to send emails\n\nFix for smtp breaking on an array of destination\naddresses.\n\nThe exception notifier, specifically, was\nfailing to deliver emails because of this problem.\n\nThe fix is from Dmitry Polushkin\nhttps://rails.lighthouseapp.com/...
ruby
chosen
[ { "from": "system", "value": "Remove a test fail always\n" }, { "from": "human", "value": "require \"spec_helper\"\n\nRSpec.describe Kushojin do\n it \"has a version number\" do\n expect(Kushojin::VERSION).not_to be nil\n end\n\n it \"does something useful\" do\n expect(false).to eq(tru...
ruby
chosen
[ { "from": "system", "value": "Drop threshold back down to a passing 10\n" }, { "from": "human", "value": "require_relative \"./helper\"\n\nclass TestColorThreshold < Minitest::Test\n include Linguist\n\n def test_color_threshold\n langs_with_colors = Language.all.reject { |language| languag...
ruby
chosen
[ { "from": "system", "value": "Rework to not use SupportsFeatureMixin::UnknownFeatureError which no longer exists\n" }, { "from": "human", "value": "class ApplicationHelper::Button::GenericFeatureButtonWithDisable < ApplicationHelper::Button::GenericFeatureButton\n needs :@record\n\n def disabl...
ruby
chosen
[ { "from": "system", "value": "Add in a note to the Blog::Output::Page class\n" }, { "from": "human", "value": "require_relative 'file_base'\nrequire_relative 'post_template'\n\nmodule Everything\n class Blog\n module Output\n class Page < Everything::Blog::Output::FileBase\n def ...
ruby
chosen
[ { "from": "system", "value": "Check for method existence rather than ruby version\n" }, { "from": "human", "value": "# encoding: utf-8\nclass String #:nodoc:\n \n def to_crlf\n self.gsub(/\\n|\\r\\n|\\r/) { \"\\r\\n\" }\n end\n\n def to_lf\n self.gsub(/\\n|\\r\\n|\\r/) { \"\\n\" }\n e...
ruby
chosen
[ { "from": "system", "value": "Fix typo `delegte` => `delegate`\n" }, { "from": "human", "value": "module Arel\n module Visitors\n class BindSubstitute\n def initialize delegte\n @delegate = delegate\n end\n end\n end\nend\n" }, { "from": "gpt", "value": "modu...
ruby
chosen
[ { "from": "system", "value": "Add crosscheck option to rule define helper\n" }, { "from": "human", "value": "module Bouncefetch\n class Application\n class Rules < Configuration\n alias_method :type, :setup\n\n def crosschecks &block\n setup :crosschecks, &block\n end\n...
ruby
chosen