rspec-pending_for 0.1.17 → 0.1.18
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +18 -5
- data/CITATION.cff +20 -0
- data/CODE_OF_CONDUCT.md +3 -4
- data/CONTRIBUTING.md +69 -48
- data/README.md +402 -183
- data/REEK +0 -0
- data/RUBOCOP.md +71 -0
- data/SECURITY.md +3 -3
- data/lib/rspec/pending_for/build.rb +49 -2
- data/lib/rspec/pending_for/version.rb +1 -1
- data/lib/rspec/pending_for.rb +20 -0
- data.tar.gz.sig +0 -0
- metadata +105 -41
- metadata.gz.sig +0 -0
data/REEK
ADDED
File without changes
|
data/RUBOCOP.md
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
# RuboCop Usage Guide
|
2
|
+
|
3
|
+
## Overview
|
4
|
+
|
5
|
+
A tale of two RuboCop plugin gems.
|
6
|
+
|
7
|
+
### RuboCop Gradual
|
8
|
+
|
9
|
+
This project uses `rubocop_gradual` instead of vanilla RuboCop for code style checking. The `rubocop_gradual` tool allows for gradual adoption of RuboCop rules by tracking violations in a lock file.
|
10
|
+
|
11
|
+
### RuboCop LTS
|
12
|
+
|
13
|
+
This project uses `rubocop-lts` to ensure, on a best-effort basis, compatibility with Ruby >= 1.9.2.
|
14
|
+
RuboCop rules are meticulously configured by the `rubocop-lts` family of gems to ensure that a project is compatible with a specific version of Ruby. See: https://rubocop-lts.gitlab.io for more.
|
15
|
+
|
16
|
+
## Checking RuboCop Violations
|
17
|
+
|
18
|
+
To check for RuboCop violations in this project, always use:
|
19
|
+
|
20
|
+
```bash
|
21
|
+
bundle exec rake rubocop_gradual:check
|
22
|
+
```
|
23
|
+
|
24
|
+
**Do not use** the standard RuboCop commands like:
|
25
|
+
- `bundle exec rubocop`
|
26
|
+
- `rubocop`
|
27
|
+
|
28
|
+
## Understanding the Lock File
|
29
|
+
|
30
|
+
The `.rubocop_gradual.lock` file tracks all current RuboCop violations in the project. This allows the team to:
|
31
|
+
|
32
|
+
1. Prevent new violations while gradually fixing existing ones
|
33
|
+
2. Track progress on code style improvements
|
34
|
+
3. Ensure CI builds don't fail due to pre-existing violations
|
35
|
+
|
36
|
+
## Common Commands
|
37
|
+
|
38
|
+
- **Check violations**
|
39
|
+
- `bundle exec rake rubocop_gradual`
|
40
|
+
- `bundle exec rake rubocop_gradual:check`
|
41
|
+
- **(Safe) Autocorrect violations, and update lockfile if no new violations**
|
42
|
+
- `bundle exec rake rubocop_gradual:autocorrect`
|
43
|
+
- **Force update the lock file (w/o autocorrect) to match violations present in code**
|
44
|
+
- `bundle exec rake rubocop_gradual:force_update`
|
45
|
+
|
46
|
+
## Workflow
|
47
|
+
|
48
|
+
1. Before submitting a PR, run `bundle exec rake rubocop_gradual:autocorrect`
|
49
|
+
a. or just the default `bundle exec rake`, as autocorrection is a pre-requisite of the default task.
|
50
|
+
2. If there are new violations, either:
|
51
|
+
- Fix them in your code
|
52
|
+
- Run `bundle exec rake rubocop_gradual:force_update` to update the lock file (only for violations you can't fix immediately)
|
53
|
+
3. Commit the updated `.rubocop_gradual.lock` file along with your changes
|
54
|
+
|
55
|
+
## Never add inline RuboCop disables
|
56
|
+
|
57
|
+
Do not add inline `rubocop:disable` / `rubocop:enable` comments anywhere in the codebase (including specs, except when following the few existing `rubocop:disable` patterns for a rule already being disabled elsewhere in the code). We handle exceptions in two supported ways:
|
58
|
+
|
59
|
+
- Permanent/structural exceptions: prefer adjusting the RuboCop configuration (e.g., in `.rubocop.yml`) to exclude a rule for a path or file pattern when it makes sense project-wide.
|
60
|
+
- Temporary exceptions while improving code: record the current violations in `.rubocop_gradual.lock` via the gradual workflow:
|
61
|
+
- `bundle exec rake rubocop_gradual:autocorrect` (preferred; will autocorrect what it can and update the lock only if no new violations were introduced)
|
62
|
+
- If needed, `bundle exec rake rubocop_gradual:force_update` (as a last resort when you cannot fix the newly reported violations immediately)
|
63
|
+
|
64
|
+
In general, treat the rules as guidance to follow; fix violations rather than ignore them. For example, RSpec conventions in this project expect `described_class` to be used in specs that target a specific class under test.
|
65
|
+
|
66
|
+
## Benefits of rubocop_gradual
|
67
|
+
|
68
|
+
- Allows incremental adoption of code style rules
|
69
|
+
- Prevents CI failures due to pre-existing violations
|
70
|
+
- Provides a clear record of code style debt
|
71
|
+
- Enables focused efforts on improving code quality over time
|
data/SECURITY.md
CHANGED
@@ -59,6 +59,53 @@ module Rspec
|
|
59
59
|
|
60
60
|
private
|
61
61
|
|
62
|
+
# Determine whether the current Ruby version matches any of the provided version specs.
|
63
|
+
# A version spec may be:
|
64
|
+
# - String: exact match against RubyVersion.to_s
|
65
|
+
# - Range[Gem::Version, Gem::Version]: inclusive/exclusive respected
|
66
|
+
# - Range[Integer, Integer]: compares major version from RubyVersion.to_s
|
67
|
+
def versions_include_current?
|
68
|
+
return false if relevant_versions.nil?
|
69
|
+
|
70
|
+
current_str = RubyVersion.to_s
|
71
|
+
current_major = current_str.to_s.split(".").first.to_i
|
72
|
+
current_gemv = begin
|
73
|
+
Gem::Version.new(current_str.to_s)
|
74
|
+
rescue StandardError
|
75
|
+
nil
|
76
|
+
end
|
77
|
+
|
78
|
+
relevant_versions.any? do |spec|
|
79
|
+
case spec
|
80
|
+
when String
|
81
|
+
spec == current_str
|
82
|
+
when Range
|
83
|
+
b = spec.begin
|
84
|
+
e = spec.end
|
85
|
+
if b.is_a?(Gem::Version) && e.is_a?(Gem::Version)
|
86
|
+
next false unless current_gemv
|
87
|
+
# Respect exclusive end
|
88
|
+
if spec.exclude_end?
|
89
|
+
b <= current_gemv && current_gemv < e
|
90
|
+
else
|
91
|
+
b <= current_gemv && current_gemv <= e
|
92
|
+
end
|
93
|
+
elsif b.is_a?(Integer) && e.is_a?(Integer)
|
94
|
+
if spec.exclude_end?
|
95
|
+
b <= current_major && current_major < e
|
96
|
+
else
|
97
|
+
b <= current_major && current_major <= e
|
98
|
+
end
|
99
|
+
else
|
100
|
+
# Fallback: try cover? with the string form (likely false if incomparable)
|
101
|
+
spec.respond_to?(:cover?) && spec.cover?(current_str)
|
102
|
+
end
|
103
|
+
else
|
104
|
+
false
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
62
109
|
def warn_about_unrecognized_engine
|
63
110
|
return false if relevant_engine.nil? || !INTERPRETER_MATRIX[relevant_engine].nil?
|
64
111
|
|
@@ -69,14 +116,14 @@ If it is a real RUBY_ENGINE, please report as a bug to #{ISSUES_LINK}
|
|
69
116
|
end
|
70
117
|
|
71
118
|
def no_engine_specified
|
72
|
-
reason || RELEVANT_VERSIONS_PROC.call(relevant_versions) if
|
119
|
+
reason || RELEVANT_VERSIONS_PROC.call(relevant_versions) if versions_include_current?
|
73
120
|
end
|
74
121
|
|
75
122
|
def engine_specified_and_relevant
|
76
123
|
if relevant_versions.empty?
|
77
124
|
# No versions specified means ALL versions for this engine
|
78
125
|
reason || "#{BROKEN_STRING} #{BUG_STRING} #{INTERPRETER_MATRIX[relevant_engine]}"
|
79
|
-
elsif
|
126
|
+
elsif versions_include_current?
|
80
127
|
reason || %[#{RELEVANT_VERSIONS_PROC.call(relevant_versions)} (#{INTERPRETER_MATRIX[relevant_engine]})]
|
81
128
|
end
|
82
129
|
end
|
data/lib/rspec/pending_for.rb
CHANGED
@@ -26,6 +26,16 @@ module Rspec
|
|
26
26
|
# end
|
27
27
|
#
|
28
28
|
# Not using named parameters because still supporting Ruby 1.9
|
29
|
+
#
|
30
|
+
# @param options [Hash] pending configuration
|
31
|
+
# @option options [String,Symbol] :engine ("ruby") Ruby engine name to match, e.g. :ruby, :jruby, :truffleruby
|
32
|
+
# @option options [String,Array<String,Range>] :versions
|
33
|
+
# A single version string or an Array of version specs. Each spec can be:
|
34
|
+
# - String: exact version match (e.g., "2.7.8")
|
35
|
+
# - Range<Gem::Version>: inclusive/exclusive bounds respected (e.g., Gem::Version.new("2.6.0")...Gem::Version.new("3.0.0"))
|
36
|
+
# - Range<Integer>: compares Ruby major version (e.g., 2..3). Inclusive/exclusive respected.
|
37
|
+
# JRuby/TruffleRuby are supported via RUBY_VERSION compatibility for Integer ranges and Gem::Version ranges.
|
38
|
+
# @option options [String] :reason Custom message to display when pending
|
29
39
|
def pending_for(options = {})
|
30
40
|
modify_example_with(:pending, options)
|
31
41
|
end
|
@@ -38,6 +48,16 @@ module Rspec
|
|
38
48
|
# end
|
39
49
|
#
|
40
50
|
# Not using named parameters because still supporting Ruby 1.9
|
51
|
+
#
|
52
|
+
# @param options [Hash] skip configuration
|
53
|
+
# @option options [String,Symbol] :engine ("ruby") Ruby engine name to match, e.g. :ruby, :jruby, :truffleruby
|
54
|
+
# @option options [String,Array<String,Range>] :versions
|
55
|
+
# A single version string or an Array of version specs. Each spec can be:
|
56
|
+
# - String: exact version match (e.g., "2.7.8")
|
57
|
+
# - Range<Gem::Version>: inclusive/exclusive bounds respected (e.g., Gem::Version.new("2.6.0")...Gem::Version.new("3.0.0"))
|
58
|
+
# - Range<Integer>: compares Ruby major version (e.g., 2..3). Inclusive/exclusive respected.
|
59
|
+
# JRuby/TruffleRuby are supported via RUBY_VERSION compatibility for Integer ranges and Gem::Version ranges.
|
60
|
+
# @option options [String] :reason Custom message to display when skipping
|
41
61
|
def skip_for(options = {})
|
42
62
|
modify_example_with(:skip, options)
|
43
63
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-pending_for
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Peter Boling
|
8
|
-
bindir:
|
7
|
+
- Peter H. Boling
|
8
|
+
bindir: exe
|
9
9
|
cert_chain:
|
10
10
|
- |
|
11
11
|
-----BEGIN CERTIFICATE-----
|
12
12
|
MIIEgDCCAuigAwIBAgIBATANBgkqhkiG9w0B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dDgQWBBQE8uWvNbPVNRXZ
|
26
|
+
HlgPbc2PCzC4bjAhBgNVHREEGjAYgRZwZXRlci5ib2xpbmdAZ21haWwuY29tMCEG
|
27
27
|
A1UdEgQaMBiBFnBldGVyLmJvbGluZ0BnbWFpbC5jb20wDQYJKoZIhvcNAQELBQAD
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
28
|
+
ggGBAJbnUwfJQFPkBgH9cL7hoBfRtmWiCvdqdjeTmi04u8zVNCUox0A4gT982DE9
|
29
|
+
wmuN12LpdajxZONqbXuzZvc+nb0StFwmFYZG6iDwaf4BPywm2e/Vmq0YG45vZXGR
|
30
|
+
L8yMDSK1cQXjmA+ZBKOHKWavxP6Vp7lWvjAhz8RFwqF9GuNIdhv9NpnCAWcMZtpm
|
31
|
+
GUPyIWw/Cw/2wZp74QzZj6Npx+LdXoLTF1HMSJXZ7/pkxLCsB8m4EFVdb/IrW/0k
|
32
|
+
kNSfjtAfBHO8nLGuqQZVH9IBD1i9K6aSs7pT6TW8itXUIlkIUI2tg5YzW6OFfPzq
|
33
|
+
QekSkX3lZfY+HTSp/o+YvKkqWLUV7PQ7xh1ZYDtocpaHwgxe/j3bBqHE+CUPH2vA
|
34
|
+
0V/FwdTRWcwsjVoOJTrYcff8pBZ8r2MvtAc54xfnnhGFzeRHfcltobgFxkAXdE6p
|
35
|
+
DVjBtqT23eugOqQ73umLcYDZkc36vnqGxUBSsXrzY9pzV5gGr2I8YUxMqf6ATrZt
|
36
|
+
L9nRqA==
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2025-
|
38
|
+
date: 2025-08-24 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: rspec-core
|
@@ -79,6 +79,20 @@ dependencies:
|
|
79
79
|
- - "~>"
|
80
80
|
- !ruby/object:Gem::Version
|
81
81
|
version: '1.0'
|
82
|
+
- !ruby/object:Gem::Dependency
|
83
|
+
name: appraisal2
|
84
|
+
requirement: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '3.0'
|
89
|
+
type: :development
|
90
|
+
prerelease: false
|
91
|
+
version_requirements: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - "~>"
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '3.0'
|
82
96
|
- !ruby/object:Gem::Dependency
|
83
97
|
name: minitest
|
84
98
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,40 +136,79 @@ dependencies:
|
|
122
136
|
- !ruby/object:Gem::Version
|
123
137
|
version: '1.0'
|
124
138
|
- !ruby/object:Gem::Dependency
|
125
|
-
name:
|
139
|
+
name: rspec_junit_formatter
|
126
140
|
requirement: !ruby/object:Gem::Requirement
|
127
141
|
requirements:
|
142
|
+
- - "~>"
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '0.6'
|
145
|
+
type: :development
|
146
|
+
prerelease: false
|
147
|
+
version_requirements: !ruby/object:Gem::Requirement
|
148
|
+
requirements:
|
149
|
+
- - "~>"
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: '0.6'
|
152
|
+
- !ruby/object:Gem::Dependency
|
153
|
+
name: kettle-dev
|
154
|
+
requirement: !ruby/object:Gem::Requirement
|
155
|
+
requirements:
|
156
|
+
- - "~>"
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: '1.0'
|
128
159
|
- - ">="
|
129
160
|
- !ruby/object:Gem::Version
|
130
|
-
version:
|
131
|
-
type: :
|
161
|
+
version: 1.0.8
|
162
|
+
type: :development
|
132
163
|
prerelease: false
|
133
164
|
version_requirements: !ruby/object:Gem::Requirement
|
134
165
|
requirements:
|
166
|
+
- - "~>"
|
167
|
+
- !ruby/object:Gem::Version
|
168
|
+
version: '1.0'
|
135
169
|
- - ">="
|
136
170
|
- !ruby/object:Gem::Version
|
137
|
-
version:
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
171
|
+
version: 1.0.8
|
172
|
+
- !ruby/object:Gem::Dependency
|
173
|
+
name: rake
|
174
|
+
requirement: !ruby/object:Gem::Requirement
|
175
|
+
requirements:
|
176
|
+
- - "~>"
|
177
|
+
- !ruby/object:Gem::Version
|
178
|
+
version: '13.0'
|
179
|
+
type: :development
|
180
|
+
prerelease: false
|
181
|
+
version_requirements: !ruby/object:Gem::Requirement
|
182
|
+
requirements:
|
183
|
+
- - "~>"
|
184
|
+
- !ruby/object:Gem::Version
|
185
|
+
version: '13.0'
|
186
|
+
description: "⏳️ Mark specs pending or skipped for specific Ruby engine (e.g. MRI
|
187
|
+
or JRuby) & versions, or version ranges. Fund overlooked open source projects -
|
188
|
+
bottom of stack, dev/test dependencies: floss-funding.dev"
|
142
189
|
email:
|
143
|
-
-
|
190
|
+
- floss@galtzo.com
|
144
191
|
executables: []
|
145
192
|
extensions: []
|
146
193
|
extra_rdoc_files:
|
147
194
|
- CHANGELOG.md
|
195
|
+
- CITATION.cff
|
148
196
|
- CODE_OF_CONDUCT.md
|
149
197
|
- CONTRIBUTING.md
|
150
198
|
- LICENSE.txt
|
151
199
|
- README.md
|
200
|
+
- REEK
|
201
|
+
- RUBOCOP.md
|
152
202
|
- SECURITY.md
|
153
203
|
files:
|
154
204
|
- CHANGELOG.md
|
205
|
+
- CITATION.cff
|
155
206
|
- CODE_OF_CONDUCT.md
|
156
207
|
- CONTRIBUTING.md
|
157
208
|
- LICENSE.txt
|
158
209
|
- README.md
|
210
|
+
- REEK
|
211
|
+
- RUBOCOP.md
|
159
212
|
- SECURITY.md
|
160
213
|
- lib/rspec-pending_for.rb
|
161
214
|
- lib/rspec/pending_for.rb
|
@@ -163,16 +216,28 @@ files:
|
|
163
216
|
- lib/rspec/pending_for/engine_or_versions_required.rb
|
164
217
|
- lib/rspec/pending_for/rspec.rb
|
165
218
|
- lib/rspec/pending_for/version.rb
|
166
|
-
homepage: https://github.com/
|
219
|
+
homepage: https://github.com/galtzo-floss/rspec-pending_for
|
167
220
|
licenses:
|
168
221
|
- MIT
|
169
|
-
metadata:
|
222
|
+
metadata:
|
223
|
+
homepage_uri: https://rspec-pending-for.galtzo.com/
|
224
|
+
source_code_uri: https://github.com/galtzo-floss/rspec-pending_for/tree/v0.1.18
|
225
|
+
changelog_uri: https://github.com/galtzo-floss/rspec-pending_for/blob/v0.1.18/CHANGELOG.md
|
226
|
+
bug_tracker_uri: https://github.com/galtzo-floss/rspec-pending_for/issues
|
227
|
+
documentation_uri: https://www.rubydoc.info/gems/rspec-pending_for/0.1.18
|
228
|
+
funding_uri: https://github.com/sponsors/pboling
|
229
|
+
wiki_uri: https://github.com/galtzo-floss/rspec-pending_for/wiki
|
230
|
+
news_uri: https://www.railsbling.com/tags/rspec-pending_for
|
231
|
+
discord_uri: https://discord.gg/3qme4XHNKN
|
232
|
+
rubygems_mfa_required: 'true'
|
170
233
|
rdoc_options:
|
171
234
|
- "--title"
|
172
|
-
- rspec-pending_for - Mark specs pending or skipped for
|
173
|
-
|
235
|
+
- rspec-pending_for - ⏳️ Mark specs pending or skipped for specified Ruby versions
|
236
|
+
or engines
|
174
237
|
- "--main"
|
175
238
|
- README.md
|
239
|
+
- "--exclude"
|
240
|
+
- "^sig/"
|
176
241
|
- "--line-numbers"
|
177
242
|
- "--inline-source"
|
178
243
|
- "--quiet"
|
@@ -189,8 +254,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
189
254
|
- !ruby/object:Gem::Version
|
190
255
|
version: '0'
|
191
256
|
requirements: []
|
192
|
-
rubygems_version: 3.
|
257
|
+
rubygems_version: 3.7.1
|
193
258
|
specification_version: 4
|
194
|
-
summary: Mark specs pending or skipped for
|
195
|
-
/ version combinations
|
259
|
+
summary: "⏳️ Mark specs pending or skipped for specified Ruby versions or engines"
|
196
260
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|