kettle-test 1.0.8 → 1.0.9

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: 8873d02c97ae25125b1bd5e28afb7d39569147ecf825a7ee9b1a3bf683625f00
4
- data.tar.gz: ffa4fb9d179b2c50aaee2916fb1d62f38d1b8f8223b2860b8f70fc6558cf19ed
3
+ metadata.gz: 9ade52605667c6bbffe9462d76e0229baf3b65aa885c6d6670f42dbaefb95418
4
+ data.tar.gz: 595322235266965d9ef741b6cdbc2ac0a24d52bb9032e61c2ce733d6af7080f4
5
5
  SHA512:
6
- metadata.gz: 047db72c8c38f6ff2452a02ac8e3faeebdc38a582ea052ade396114df0d367ccdc83307dc11e083347813a7b87d7febdfda210d454f549ccd8968f353a5cea77
7
- data.tar.gz: dacda95d681dc7cf866dd14d3fb13abdaff14d72771bbada906654e9231f7ce6df2db0c352537443053f29b2fe0a52c27b0167760153dae50faa8c25e5aebc99
6
+ metadata.gz: c671e937041fd20199cf52adf379886f03364f3e4b37fa5c18c97e6e6d7161115f0d5856e96d6892b63482d446292e7dc10b0aa6a9e6f489064d8ab383030d55
7
+ data.tar.gz: 4184756919209b48245f0752b1e14d7abc8f2bcbe9745feeceef53e98cbbf571a7fc584f1cb9374a8e8467c9844e3242017404c8a52148a6928cdcbf69caef19
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -30,6 +30,17 @@ Please file a bug if you notice a violation of semantic versioning.
30
30
 
31
31
  ### Security
32
32
 
33
+ ## [1.0.9] - 2026-02-06
34
+
35
+ - TAG: [v1.0.9][1.0.9t]
36
+ - COVERAGE: 100.00% -- 86/86 lines in 15 files
37
+ - BRANCH COVERAGE: 100.00% -- 2/2 branches in 15 files
38
+ - 100.00% documented
39
+
40
+ ### Added
41
+
42
+ - Document usage of rspec-pending_for
43
+
33
44
  ## [1.0.8] - 2026-02-06
34
45
 
35
46
  - TAG: [v1.0.8][1.0.8t]
@@ -174,7 +185,9 @@ Please file a bug if you notice a violation of semantic versioning.
174
185
  - silent_stream
175
186
  - timecop-rspec
176
187
 
177
- [Unreleased]: https://github.com/kettle-rb/kettle-test/compare/v1.0.8...HEAD
188
+ [Unreleased]: https://github.com/kettle-rb/kettle-test/compare/v1.0.9...HEAD
189
+ [1.0.9]: https://github.com/kettle-rb/kettle-test/compare/v1.0.8...v1.0.9
190
+ [1.0.9t]: https://github.com/kettle-rb/kettle-test/releases/tag/v1.0.9
178
191
  [1.0.8]: https://github.com/kettle-rb/kettle-test/compare/v1.0.7...v1.0.8
179
192
  [1.0.8t]: https://github.com/kettle-rb/kettle-test/releases/tag/v1.0.8
180
193
  [1.0.7]: https://github.com/kettle-rb/kettle-test/compare/v1.0.6...v1.0.7
data/README.md CHANGED
@@ -399,6 +399,94 @@ Or run:
399
399
  DEBUG=true bundle exec rspec
400
400
  ```
401
401
 
402
+ ### Version-based pending and skipping
403
+
404
+ Use rspec-pending_for to conditionally pending or skip examples based on Ruby version and engine.
405
+
406
+ The `pending_for` and `skip_for` macros support flexible version specifications:
407
+
408
+ **Supported version forms:**
409
+ - String: exact or partial match to RUBY_VERSION (e.g., "3.2.4", "3.2", or "3")
410
+ - Array of strings: any matching entry triggers pending/skip
411
+ - Range of Gem::Version: inclusive/exclusive endpoints respected
412
+ - Range of Integer: compares major version only (e.g., 2..3 for Ruby 2.x and 3.x)
413
+
414
+ **Supported engines:** :ruby (MRI), :jruby, :truffleruby
415
+
416
+ **Specifying versions:**
417
+
418
+ ```ruby
419
+ RSpec.describe("version-specific behavior") do
420
+ # Exact version string
421
+ it "pends only on Ruby 3.2.4" do
422
+ pending_for(engine: :ruby, versions: "3.2.4")
423
+ # ...
424
+ end
425
+
426
+ # Multiple exact versions
427
+ it "pends on a set of MRI versions" do
428
+ pending_for(engine: :ruby, versions: %w[2.7.10 3.0.7 3.1.6])
429
+ end
430
+
431
+ # Match any engine by version (no :engine)
432
+ it "skips on any engine if version equals 2.7.8" do
433
+ skip_for(versions: "2.7.8", reason: "Known upstream incompatibility")
434
+ end
435
+
436
+ # Range of Gem::Version (inclusive)
437
+ it "pends for MRI >= 2.6.0 and <= 3.0.0" do
438
+ pending_for(
439
+ engine: :ruby,
440
+ versions: (Gem::Version.new("2.6.0")..Gem::Version.new("3.0.0")),
441
+ )
442
+ end
443
+
444
+ # Range of Gem::Version (exclusive end)
445
+ it "skips for MRI >= 3.1.0 and < 3.3.0" do
446
+ skip_for(
447
+ engine: :ruby,
448
+ versions: (Gem::Version.new("3.1.0")...Gem::Version.new("3.3.0")),
449
+ )
450
+ end
451
+
452
+ # Range of Integer (major versions)
453
+ it "pends on all Ruby 2.x and 3.x" do
454
+ pending_for(versions: (2..3), reason: "Major series currently affected")
455
+ end
456
+
457
+ it "skips on Ruby 2.x but not 3.x" do
458
+ skip_for(versions: (2...3)) # 2 <= version < 3
459
+ end
460
+ end
461
+ ```
462
+
463
+ **Using with RSpec tags:**
464
+
465
+ ```ruby
466
+ RSpec.configure do |config|
467
+ # Auto-skip examples requiring specific Ruby versions via tags
468
+ config.before(:each, :requires_ruby_32) do
469
+ skip_for(
470
+ reason: "Requires Ruby >= 3.2",
471
+ versions: %w[2.7 3.0 3.1],
472
+ )
473
+ end
474
+ end
475
+
476
+ RSpec.describe("something") do
477
+ it "runs only on Ruby 3.2+", :requires_ruby_32 do
478
+ # ... your example code ...
479
+ end
480
+ end
481
+ ```
482
+
483
+ **Notes:**
484
+ - Omit :engine to match any Ruby engine (MRI, JRuby, TruffleRuby)
485
+ - Omit :versions with :engine to match all versions of that engine
486
+ - JRuby and TruffleRuby are matched using their RUBY_VERSION compatibility
487
+ - String matching supports partial versions ("3.1" matches "3.1.x" but not "3.0.x")
488
+ - Provide :reason to override the default message in reports
489
+
402
490
  ### CI-only filtering
403
491
 
404
492
  Examples or groups tagged with :skip_ci are excluded on CI (CI=true).
@@ -6,7 +6,7 @@ module Kettle
6
6
  module Version
7
7
  # The current version of kettle-test.
8
8
  # @return [String]
9
- VERSION = "1.0.8"
9
+ VERSION = "1.0.9"
10
10
  end
11
11
  VERSION = Version::VERSION # Traditional constant at module level
12
12
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kettle-test
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter H. Boling
@@ -418,10 +418,10 @@ licenses:
418
418
  - MIT
419
419
  metadata:
420
420
  homepage_uri: https://kettle-test.galtzo.com/
421
- source_code_uri: https://github.com/kettle-rb/kettle-test/tree/v1.0.8
422
- changelog_uri: https://github.com/kettle-rb/kettle-test/blob/v1.0.8/CHANGELOG.md
421
+ source_code_uri: https://github.com/kettle-rb/kettle-test/tree/v1.0.9
422
+ changelog_uri: https://github.com/kettle-rb/kettle-test/blob/v1.0.9/CHANGELOG.md
423
423
  bug_tracker_uri: https://github.com/kettle-rb/kettle-test/issues
424
- documentation_uri: https://www.rubydoc.info/gems/kettle-test/1.0.8
424
+ documentation_uri: https://www.rubydoc.info/gems/kettle-test/1.0.9
425
425
  funding_uri: https://github.com/sponsors/pboling
426
426
  wiki_uri: https://github.com/kettle-rb/kettle-test/wiki
427
427
  news_uri: https://www.railsbling.com/tags/kettle-test
metadata.gz.sig CHANGED
Binary file