stable 1.16.1 → 1.16.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d82e13cba1b4fbd5935ca8eb0822394d434e26e5cd8f2c670fdf2943cac5573
4
- data.tar.gz: 7933dcbe1e15017fecb8e20b0c973242a68d56091a6ff5ba6fb363cea8ceda33
3
+ metadata.gz: dc0f64ae899b789c718cde6110cdda66ea263f6411329cf97d46b200c26b51f3
4
+ data.tar.gz: 18ad85589c2014d7380de310b7e42b693e772c3afcb6716849c41be5e4e492e1
5
5
  SHA512:
6
- metadata.gz: '06681c0955c34ea15775e0edbfae8fbcd33e7c1c1b1c3f0afdd67a34dbec6b0a0132481719ebeb70e0697e8064fb29cfc96ce3b06af88be083ce68af4b9b542f'
7
- data.tar.gz: 2cf447c6b0872cb987cccaadf33aab069e3058353e5cc88c4e3d564323ac0cf330582a09bfb80e28bb1e9080584dfae20b9e28e6627fb63c50180e3a6c78c6e1
6
+ metadata.gz: 9d802a71cf7b2bf2da6238c970bbcc602cd73757407af4fe84c8f93ae87bb19573f7732c5512ec5e0b27645e1be87b54fba697c3c41f39b88837a37431b4c997
7
+ data.tar.gz: 3eaabc18aa9dcc9e8af44fe819372b36f70393e550a3172bdf9e43f39cd983fac11b5a0c7f68e10740d6be03442591e4db04938bc47edc5cff5f3918d01db828
@@ -4,9 +4,12 @@ require_relative 'colors'
4
4
  module Stable
5
5
  module Formatters
6
6
  class Verbose
7
- def initialize(facts)
8
- @facts = facts
7
+ def initialize
9
8
  @start_time = Time.now
9
+ @passed_count = 0
10
+ @failed_count = 0
11
+ @pending_count = 0
12
+ @total_count = 0
10
13
  end
11
14
 
12
15
  def to_s(fact)
@@ -18,10 +21,13 @@ module Stable
18
21
  status_code = _status_code(fact)
19
22
  error_code = _error_code(fact)
20
23
 
24
+ @total_count += 1
21
25
  case fact.status
22
26
  when :passed, :passed_with_error
27
+ @passed_count += 1
23
28
  "#{desc} #{name_str} #{status_code}#{error_code} #{call}"
24
29
  when :failed
30
+ @failed_count += 1
25
31
  lines = ["#{desc} #{name_str} #{status_code}#{error_code} #{call}"]
26
32
  if fact.actual_error
27
33
  if fact.error
@@ -42,6 +48,7 @@ module Stable
42
48
  end
43
49
  lines.join("\n")
44
50
  else
51
+ @pending_count += 1
45
52
  "#{desc} #{name_str} #{status_code}#{error_code} #{call}"
46
53
  end
47
54
  end
@@ -52,11 +59,8 @@ module Stable
52
59
  end
53
60
 
54
61
  def summary
55
- passing = @facts.count { |f| f.status == :passed || f.status == :passed_with_error }
56
- failing = @facts.count { |f| f.status == :failed }
57
- pending = @facts.count { |f| f.status == :pending }
58
62
  runtime = Time.now - @start_time
59
- "\n#{@facts.count} facts, #{passing} passing, #{pending} pending, #{failing} failing, finished in #{runtime.round(2)}s"
63
+ "\n#{@total_count} facts, #{@passed_count} passing, #{@pending_count} pending, #{@failed_count} failing, finished in #{runtime.round(2)}s"
60
64
  end
61
65
 
62
66
 
@@ -1,3 +1,3 @@
1
1
  module Stable
2
- VERSION = "1.16.1"
2
+ VERSION = "1.16.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stable
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.16.1
4
+ version: 1.16.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Lunt