Sha256: e39ae62cfd8147fecc473b1ac0f3737474b2f52781ffd133e4e643d1d3d0d213

Contents?: true

Size: 791 Bytes

Versions: 14

Compression:

Stored size: 791 Bytes

Contents

require_relative "rspec_defaults"

module Guard
  # Just a wrapper class for the results file filename
  class RSpecFormatterResultsPath
    WIKI_ENV_WARN_URL =
      "https://github.com/guard/guard-rspec/wiki/Warning:-no-environment".
      freeze

    NO_ENV_WARNING_MSG =
      "no environment passed - see #{WIKI_ENV_WARN_URL}".freeze

    NO_RESULTS_VALUE_MSG =
      ":results_file value unknown (using defaults)".freeze

    attr_reader :path

    def initialize
      path = ENV["GUARD_RSPEC_RESULTS_FILE"]
      if path.nil?
        STDERR.puts("Guard::RSpec: Warning: #{NO_ENV_WARNING_MSG}\n" \
                    "Guard::RSpec: Warning: #{NO_RESULTS_VALUE_MSG}")
        path = RSpecDefaults::TEMPORARY_FILE_PATH
      end

      @path = File.expand_path(path)
    end
  end
end

Version data entries

14 entries across 14 versions & 6 rubygems

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