rspec-fortify 1.0.0.pre

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.
@@ -0,0 +1,123 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ rspec-fortify (1.0.0.pre)
5
+ rspec-core (> 3.9)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activesupport (7.1.3.2)
11
+ base64
12
+ bigdecimal
13
+ concurrent-ruby (~> 1.0, >= 1.0.2)
14
+ connection_pool (>= 2.2.5)
15
+ drb
16
+ i18n (>= 1.6, < 2)
17
+ minitest (>= 5.1)
18
+ mutex_m
19
+ tzinfo (~> 2.0)
20
+ appraisal (2.5.0)
21
+ bundler
22
+ rake
23
+ thor (>= 0.14.0)
24
+ ast (2.4.2)
25
+ base64 (0.2.0)
26
+ betterlint (1.10.1)
27
+ rubocop (~> 1.62.0)
28
+ rubocop-performance (~> 1.21.0)
29
+ rubocop-rails (~> 2.24.0)
30
+ rubocop-rake (~> 0.6.0)
31
+ rubocop-rspec (~> 2.28.0)
32
+ bigdecimal (3.1.7)
33
+ concurrent-ruby (1.2.3)
34
+ connection_pool (2.4.1)
35
+ diff-lcs (1.5.1)
36
+ drb (2.2.1)
37
+ i18n (1.14.4)
38
+ concurrent-ruby (~> 1.0)
39
+ json (2.7.2)
40
+ language_server-protocol (3.17.0.3)
41
+ minitest (5.22.3)
42
+ mutex_m (0.2.0)
43
+ parallel (1.24.0)
44
+ parser (3.3.1.0)
45
+ ast (~> 2.4.1)
46
+ racc
47
+ pastel (0.8.0)
48
+ tty-color (~> 0.5)
49
+ racc (1.7.3)
50
+ rack (3.0.10)
51
+ rainbow (3.1.1)
52
+ rake (13.2.1)
53
+ regexp_parser (2.9.0)
54
+ rexml (3.2.6)
55
+ rspec (3.12.0)
56
+ rspec-core (~> 3.12.0)
57
+ rspec-expectations (~> 3.12.0)
58
+ rspec-mocks (~> 3.12.0)
59
+ rspec-core (3.12.3)
60
+ rspec-support (~> 3.12.0)
61
+ rspec-expectations (3.12.4)
62
+ diff-lcs (>= 1.2.0, < 2.0)
63
+ rspec-support (~> 3.12.0)
64
+ rspec-mocks (3.12.7)
65
+ diff-lcs (>= 1.2.0, < 2.0)
66
+ rspec-support (~> 3.12.0)
67
+ rspec-support (3.12.2)
68
+ rubocop (1.62.1)
69
+ json (~> 2.3)
70
+ language_server-protocol (>= 3.17.0)
71
+ parallel (~> 1.10)
72
+ parser (>= 3.3.0.2)
73
+ rainbow (>= 2.2.2, < 4.0)
74
+ regexp_parser (>= 1.8, < 3.0)
75
+ rexml (>= 3.2.5, < 4.0)
76
+ rubocop-ast (>= 1.31.1, < 2.0)
77
+ ruby-progressbar (~> 1.7)
78
+ unicode-display_width (>= 2.4.0, < 3.0)
79
+ rubocop-ast (1.31.3)
80
+ parser (>= 3.3.1.0)
81
+ rubocop-capybara (2.20.0)
82
+ rubocop (~> 1.41)
83
+ rubocop-factory_bot (2.25.1)
84
+ rubocop (~> 1.41)
85
+ rubocop-performance (1.21.0)
86
+ rubocop (>= 1.48.1, < 2.0)
87
+ rubocop-ast (>= 1.31.1, < 2.0)
88
+ rubocop-rails (2.24.1)
89
+ activesupport (>= 4.2.0)
90
+ rack (>= 1.1)
91
+ rubocop (>= 1.33.0, < 2.0)
92
+ rubocop-ast (>= 1.31.1, < 2.0)
93
+ rubocop-rake (0.6.0)
94
+ rubocop (~> 1.0)
95
+ rubocop-rspec (2.28.0)
96
+ rubocop (~> 1.40)
97
+ rubocop-capybara (~> 2.17)
98
+ rubocop-factory_bot (~> 2.22)
99
+ rubocop-rspec_rails (~> 2.28)
100
+ rubocop-rspec_rails (2.28.3)
101
+ rubocop (~> 1.40)
102
+ ruby-progressbar (1.13.0)
103
+ thor (1.3.1)
104
+ tty-color (0.6.0)
105
+ tty-command (0.10.1)
106
+ pastel (~> 0.8)
107
+ tzinfo (2.0.6)
108
+ concurrent-ruby (~> 1.0)
109
+ unicode-display_width (2.5.0)
110
+
111
+ PLATFORMS
112
+ arm64-darwin-22
113
+ ruby
114
+
115
+ DEPENDENCIES
116
+ appraisal
117
+ betterlint
118
+ rspec (~> 3.12.0)
119
+ rspec-fortify!
120
+ tty-command
121
+
122
+ BUNDLED WITH
123
+ 2.5.7
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file was generated by Appraisal
4
+
5
+ source "https://rubygems.org"
6
+
7
+ gem "appraisal"
8
+ gem "betterlint"
9
+ gem "rspec", "~> 3.13.0"
10
+ gem "tty-command"
11
+
12
+ gemspec path: "../"
@@ -0,0 +1,123 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ rspec-fortify (1.0.0.pre)
5
+ rspec-core (> 3.9)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activesupport (7.1.3.2)
11
+ base64
12
+ bigdecimal
13
+ concurrent-ruby (~> 1.0, >= 1.0.2)
14
+ connection_pool (>= 2.2.5)
15
+ drb
16
+ i18n (>= 1.6, < 2)
17
+ minitest (>= 5.1)
18
+ mutex_m
19
+ tzinfo (~> 2.0)
20
+ appraisal (2.5.0)
21
+ bundler
22
+ rake
23
+ thor (>= 0.14.0)
24
+ ast (2.4.2)
25
+ base64 (0.2.0)
26
+ betterlint (1.10.1)
27
+ rubocop (~> 1.62.0)
28
+ rubocop-performance (~> 1.21.0)
29
+ rubocop-rails (~> 2.24.0)
30
+ rubocop-rake (~> 0.6.0)
31
+ rubocop-rspec (~> 2.28.0)
32
+ bigdecimal (3.1.7)
33
+ concurrent-ruby (1.2.3)
34
+ connection_pool (2.4.1)
35
+ diff-lcs (1.5.1)
36
+ drb (2.2.1)
37
+ i18n (1.14.4)
38
+ concurrent-ruby (~> 1.0)
39
+ json (2.7.2)
40
+ language_server-protocol (3.17.0.3)
41
+ minitest (5.22.3)
42
+ mutex_m (0.2.0)
43
+ parallel (1.24.0)
44
+ parser (3.3.1.0)
45
+ ast (~> 2.4.1)
46
+ racc
47
+ pastel (0.8.0)
48
+ tty-color (~> 0.5)
49
+ racc (1.7.3)
50
+ rack (3.0.10)
51
+ rainbow (3.1.1)
52
+ rake (13.2.1)
53
+ regexp_parser (2.9.0)
54
+ rexml (3.2.6)
55
+ rspec (3.13.0)
56
+ rspec-core (~> 3.13.0)
57
+ rspec-expectations (~> 3.13.0)
58
+ rspec-mocks (~> 3.13.0)
59
+ rspec-core (3.13.0)
60
+ rspec-support (~> 3.13.0)
61
+ rspec-expectations (3.13.0)
62
+ diff-lcs (>= 1.2.0, < 2.0)
63
+ rspec-support (~> 3.13.0)
64
+ rspec-mocks (3.13.0)
65
+ diff-lcs (>= 1.2.0, < 2.0)
66
+ rspec-support (~> 3.13.0)
67
+ rspec-support (3.13.1)
68
+ rubocop (1.62.1)
69
+ json (~> 2.3)
70
+ language_server-protocol (>= 3.17.0)
71
+ parallel (~> 1.10)
72
+ parser (>= 3.3.0.2)
73
+ rainbow (>= 2.2.2, < 4.0)
74
+ regexp_parser (>= 1.8, < 3.0)
75
+ rexml (>= 3.2.5, < 4.0)
76
+ rubocop-ast (>= 1.31.1, < 2.0)
77
+ ruby-progressbar (~> 1.7)
78
+ unicode-display_width (>= 2.4.0, < 3.0)
79
+ rubocop-ast (1.31.3)
80
+ parser (>= 3.3.1.0)
81
+ rubocop-capybara (2.20.0)
82
+ rubocop (~> 1.41)
83
+ rubocop-factory_bot (2.25.1)
84
+ rubocop (~> 1.41)
85
+ rubocop-performance (1.21.0)
86
+ rubocop (>= 1.48.1, < 2.0)
87
+ rubocop-ast (>= 1.31.1, < 2.0)
88
+ rubocop-rails (2.24.1)
89
+ activesupport (>= 4.2.0)
90
+ rack (>= 1.1)
91
+ rubocop (>= 1.33.0, < 2.0)
92
+ rubocop-ast (>= 1.31.1, < 2.0)
93
+ rubocop-rake (0.6.0)
94
+ rubocop (~> 1.0)
95
+ rubocop-rspec (2.28.0)
96
+ rubocop (~> 1.40)
97
+ rubocop-capybara (~> 2.17)
98
+ rubocop-factory_bot (~> 2.22)
99
+ rubocop-rspec_rails (~> 2.28)
100
+ rubocop-rspec_rails (2.28.3)
101
+ rubocop (~> 1.40)
102
+ ruby-progressbar (1.13.0)
103
+ thor (1.3.1)
104
+ tty-color (0.6.0)
105
+ tty-command (0.10.1)
106
+ pastel (~> 0.8)
107
+ tzinfo (2.0.6)
108
+ concurrent-ruby (~> 1.0)
109
+ unicode-display_width (2.5.0)
110
+
111
+ PLATFORMS
112
+ arm64-darwin-22
113
+ ruby
114
+
115
+ DEPENDENCIES
116
+ appraisal
117
+ betterlint
118
+ rspec (~> 3.13.0)
119
+ rspec-fortify!
120
+ tty-command
121
+
122
+ BUNDLED WITH
123
+ 2.5.7
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file was generated by Appraisal
4
+
5
+ source "https://rubygems.org"
6
+
7
+ gem "appraisal"
8
+ gem "betterlint"
9
+ gem "rspec", "~> 3.9.0"
10
+ gem "tty-command"
11
+
12
+ gemspec path: "../"
@@ -0,0 +1,123 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ rspec-fortify (1.0.0.pre)
5
+ rspec-core (> 3.9)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activesupport (7.1.3.2)
11
+ base64
12
+ bigdecimal
13
+ concurrent-ruby (~> 1.0, >= 1.0.2)
14
+ connection_pool (>= 2.2.5)
15
+ drb
16
+ i18n (>= 1.6, < 2)
17
+ minitest (>= 5.1)
18
+ mutex_m
19
+ tzinfo (~> 2.0)
20
+ appraisal (2.5.0)
21
+ bundler
22
+ rake
23
+ thor (>= 0.14.0)
24
+ ast (2.4.2)
25
+ base64 (0.2.0)
26
+ betterlint (1.10.1)
27
+ rubocop (~> 1.62.0)
28
+ rubocop-performance (~> 1.21.0)
29
+ rubocop-rails (~> 2.24.0)
30
+ rubocop-rake (~> 0.6.0)
31
+ rubocop-rspec (~> 2.28.0)
32
+ bigdecimal (3.1.7)
33
+ concurrent-ruby (1.2.3)
34
+ connection_pool (2.4.1)
35
+ diff-lcs (1.5.1)
36
+ drb (2.2.1)
37
+ i18n (1.14.4)
38
+ concurrent-ruby (~> 1.0)
39
+ json (2.7.2)
40
+ language_server-protocol (3.17.0.3)
41
+ minitest (5.22.3)
42
+ mutex_m (0.2.0)
43
+ parallel (1.24.0)
44
+ parser (3.3.1.0)
45
+ ast (~> 2.4.1)
46
+ racc
47
+ pastel (0.8.0)
48
+ tty-color (~> 0.5)
49
+ racc (1.7.3)
50
+ rack (3.0.10)
51
+ rainbow (3.1.1)
52
+ rake (13.2.1)
53
+ regexp_parser (2.9.0)
54
+ rexml (3.2.6)
55
+ rspec (3.9.0)
56
+ rspec-core (~> 3.9.0)
57
+ rspec-expectations (~> 3.9.0)
58
+ rspec-mocks (~> 3.9.0)
59
+ rspec-core (3.9.3)
60
+ rspec-support (~> 3.9.3)
61
+ rspec-expectations (3.9.4)
62
+ diff-lcs (>= 1.2.0, < 2.0)
63
+ rspec-support (~> 3.9.0)
64
+ rspec-mocks (3.9.1)
65
+ diff-lcs (>= 1.2.0, < 2.0)
66
+ rspec-support (~> 3.9.0)
67
+ rspec-support (3.9.4)
68
+ rubocop (1.62.1)
69
+ json (~> 2.3)
70
+ language_server-protocol (>= 3.17.0)
71
+ parallel (~> 1.10)
72
+ parser (>= 3.3.0.2)
73
+ rainbow (>= 2.2.2, < 4.0)
74
+ regexp_parser (>= 1.8, < 3.0)
75
+ rexml (>= 3.2.5, < 4.0)
76
+ rubocop-ast (>= 1.31.1, < 2.0)
77
+ ruby-progressbar (~> 1.7)
78
+ unicode-display_width (>= 2.4.0, < 3.0)
79
+ rubocop-ast (1.31.3)
80
+ parser (>= 3.3.1.0)
81
+ rubocop-capybara (2.20.0)
82
+ rubocop (~> 1.41)
83
+ rubocop-factory_bot (2.25.1)
84
+ rubocop (~> 1.41)
85
+ rubocop-performance (1.21.0)
86
+ rubocop (>= 1.48.1, < 2.0)
87
+ rubocop-ast (>= 1.31.1, < 2.0)
88
+ rubocop-rails (2.24.1)
89
+ activesupport (>= 4.2.0)
90
+ rack (>= 1.1)
91
+ rubocop (>= 1.33.0, < 2.0)
92
+ rubocop-ast (>= 1.31.1, < 2.0)
93
+ rubocop-rake (0.6.0)
94
+ rubocop (~> 1.0)
95
+ rubocop-rspec (2.28.0)
96
+ rubocop (~> 1.40)
97
+ rubocop-capybara (~> 2.17)
98
+ rubocop-factory_bot (~> 2.22)
99
+ rubocop-rspec_rails (~> 2.28)
100
+ rubocop-rspec_rails (2.28.3)
101
+ rubocop (~> 1.40)
102
+ ruby-progressbar (1.13.0)
103
+ thor (1.3.1)
104
+ tty-color (0.6.0)
105
+ tty-command (0.10.1)
106
+ pastel (~> 0.8)
107
+ tzinfo (2.0.6)
108
+ concurrent-ruby (~> 1.0)
109
+ unicode-display_width (2.5.0)
110
+
111
+ PLATFORMS
112
+ arm64-darwin-22
113
+ ruby
114
+
115
+ DEPENDENCIES
116
+ appraisal
117
+ betterlint
118
+ rspec (~> 3.9.0)
119
+ rspec-fortify!
120
+ tty-command
121
+
122
+ BUNDLED WITH
123
+ 2.5.7
@@ -0,0 +1,65 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rspec/core/formatters/base_text_formatter'
4
+
5
+ module RSpec
6
+ module Fortify
7
+ class Formatter < RSpec::Core::Formatters::BaseTextFormatter
8
+ RSpec::Core::Formatters.register self, :example_passed
9
+
10
+ def initialize(output)
11
+ super(output)
12
+ @tries = Hash.new { |h, k| h[k] = { successes: 0, tries: 0 } }
13
+ end
14
+
15
+ def seed(_); end
16
+
17
+ def message(_message); end
18
+
19
+ def close(_); end
20
+
21
+ def dump_failures(_); end
22
+
23
+ def dump_pending(_); end
24
+
25
+ def dump_summary(notification) # rubocop:disable Metrics/AbcSize
26
+ summary = "\nRSpec Fortify Summary:\n"
27
+ @tries.each do |key, retry_data|
28
+ next if retry_data[:successes] < 1 || retry_data[:tries] <= 1
29
+
30
+ summary += "\t#{key.location}: #{key.full_description}: passed at attempt #{retry_data[:tries]}\n"
31
+ end
32
+ retried = @tries.count { |_, v| v[:tries] > 1 && (v[:successes]).positive? }
33
+ summary += "\n\t#{retried} of #{notification.example_count} tests passed with retries.\n"
34
+ summary += "\t#{notification.failure_count} tests failed all retries.\n"
35
+ output.puts summary
36
+ end
37
+
38
+ def example_passed(notification)
39
+ increment_success notification.example
40
+ end
41
+
42
+ def retry(example)
43
+ increment_tries example
44
+ end
45
+
46
+ private
47
+
48
+ def increment_success(example)
49
+ # debugger
50
+ previous = @tries[example]
51
+ @tries[example] = {
52
+ successes: previous[:successes] + 1, tries: previous[:tries] + 1
53
+ }
54
+ end
55
+
56
+ def increment_tries(example)
57
+ # debugger
58
+ previous = @tries[example]
59
+ @tries[example] = {
60
+ successes: previous[:successes], tries: previous[:tries] + 1
61
+ }
62
+ end
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RSpec
4
+ class Fortify
5
+ VERSION = '1.0.0.pre'
6
+ end
7
+ end