Sha256: 13fb14a09b709e75db6f81b5c9697297993f32807edd30549c19a1d3692613e1

Contents?: true

Size: 972 Bytes

Versions: 12

Compression:

Stored size: 972 Bytes

Contents

module Guard
  class RSpec < Plugin
    module Options
      DEFAULTS = {
        all_on_start:    false,
        all_after_pass:  false,
        run_all:         { message: "Running all specs" },
        failed_mode:     :none, # :keep and :focus are other posibilities
        spec_paths:      %w(spec),
        cmd:             nil,
        cmd_additional_args: nil,
        launchy:         nil,
        notification:    true,
        title:           "RSpec results",
        bundler_env:     :original_env
      }.freeze

      class << self
        def with_defaults(options = {})
          _deep_merge(DEFAULTS, options)
        end

        private

        def _deep_merge(hash1, hash2)
          hash1.merge(hash2) do |_key, oldval, newval|
            if oldval.instance_of?(Hash) && newval.instance_of?(Hash)
              _deep_merge(oldval, newval)
            else
              newval
            end
          end
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 6 rubygems

Version Path
honeybadger-5.4.0 vendor/bundle/ruby/3.2.0/gems/guard-rspec-4.7.3/lib/guard/rspec/options.rb
honeybadger-5.3.0 vendor/bundle/ruby/3.2.0/gems/guard-rspec-4.7.3/lib/guard/rspec/options.rb
honeybadger-4.5.3 vendor/bundle/ruby/2.6.0/gems/guard-rspec-4.7.3/lib/guard/rspec/options.rb
alimentos-alu0100945645-0.1.0 vendor/bundle/ruby/2.3.0/gems/guard-rspec-4.7.3/lib/guard/rspec/options.rb
alimentos-alu0100945645-1.0.0 vendor/bundle/ruby/2.3.0/gems/guard-rspec-4.7.3/lib/guard/rspec/options.rb
comiditaULL-0.1.1 vendor/bundle/ruby/2.3.0/gems/guard-rspec-4.7.3/lib/guard/rspec/options.rb
comidita_ull-0.1.1 vendor/bundle/ruby/2.3.0/gems/guard-rspec-4.7.3/lib/guard/rspec/options.rb
comidita_ull-0.1.0 vendor/bundle/ruby/2.3.0/gems/guard-rspec-4.7.3/lib/guard/rspec/options.rb
gameboard-3.1.0 vendor/bundle/ruby/2.3.0/gems/guard-rspec-4.7.3/lib/guard/rspec/options.rb
gameboard-3.0.0 vendor/bundle/ruby/2.3.0/gems/guard-rspec-4.7.3/lib/guard/rspec/options.rb
guard-rspec-4.7.3 lib/guard/rspec/options.rb
guard-rspec-4.7.2 lib/guard/rspec/options.rb