Sha256: 2fc6871720532f5ebff1f8f5aca308c79ca6ab826895cc9a92d59b6e12bd4331

Contents?: true

Size: 546 Bytes

Versions: 12

Compression:

Stored size: 546 Bytes

Contents

module Guard
  class RSpec < Plugin
    class Results
      class InvalidData < RuntimeError
      end

      attr_reader :summary
      attr_reader :failed_paths

      def initialize(filename)
        lines = File.readlines(filename)
        if lines.empty? || lines.first.empty?
          dump = lines.inspect
          fail InvalidData, "Invalid results in: #{filename},"\
            " lines:\n#{dump}\n"
        end

        @summary = lines.first.chomp
        @failed_paths = lines[1..11].map(&:chomp).compact
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 3 rubygems

Version Path
guard-rspec-4.6.5 lib/guard/rspec/results.rb
mastermind_adeybee-0.1.4 vendor/bundle/ruby/2.2.0/gems/guard-rspec-4.6.4/lib/guard/rspec/results.rb
mastermind_adeybee-0.1.3 vendor/bundle/ruby/2.2.0/gems/guard-rspec-4.6.4/lib/guard/rspec/results.rb
mastermind_adeybee-0.1.2 vendor/bundle/ruby/2.2.0/gems/guard-rspec-4.6.4/lib/guard/rspec/results.rb
mastermind_adeybee-0.1.1 vendor/bundle/ruby/2.2.0/gems/guard-rspec-4.6.4/lib/guard/rspec/results.rb
geminfo-0.1.0 path/gems/guard-rspec-4.6.4/lib/guard/rspec/results.rb
guard-rspec-4.6.4 lib/guard/rspec/results.rb
guard-rspec-4.6.3 lib/guard/rspec/results.rb
guard-rspec-4.6.2 lib/guard/rspec/results.rb
guard-rspec-4.6.1 lib/guard/rspec/results.rb
guard-rspec-4.6.0 lib/guard/rspec/results.rb
guard-rspec-4.5.2 lib/guard/rspec/results.rb