stimulus_spec 0.8.0 → 0.8.1

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: 6b9e26e1184c0d81c9ebcdffd070ab00c4822f76de661fc229178e2989497588
4
- data.tar.gz: 91e8c98384c15baba42e7bb5022a47eb14756a236ea6f2b340cf85ecc9bb4db7
3
+ metadata.gz: '0912c1fbe8ee121aa811782e445be9524634567f4b19b59e8921c8c8fd196f39'
4
+ data.tar.gz: c4b7149d6711bcfbda89a04d2b7095fd7996dfa8ff4adb95d034b15885ea1c9e
5
5
  SHA512:
6
- metadata.gz: 3bbf987dbddff7265d933f041e11d2e1223bfd923d855c8836721cc3b5379534b8100e099d7e3952cfba280d26feee50f07000aae6910ccf2c3c86c9cc71eac9
7
- data.tar.gz: 2d9372a0337c758b3f41eee17f6b650b285bc38e109b972017b41befdc2462f9bd0a9ac1adbcf8be1da2e7615c1cdfd1c1bf9c3b0ab3e017b4156ec84a5bbc54
6
+ metadata.gz: 0d84919b59c7d2c1bfafde03194f9db337e4cb78fb25f9f65746fa6cf35b839ca495ffa7a57fe577c0c5e93be98c1993f7fe4d572013cc6f988a02b41b70830e
7
+ data.tar.gz: 7d284dc0aba931a47d44b13e5a563372957b1ef063db08284e1fad073247f482b915d694efb561e78670840af09edc02860971b00d3194ed7675348e087ba7a8
data/CHANGELOG.md CHANGED
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.8.1] - 2026-06-30
11
+
12
+ ### Fixed
13
+
14
+ - Guard matcher requires and `RSpec.configure` behind `defined?(RSpec::Core)` so the gem is safe to auto-require in non-test contexts (e.g. asset precompilation). Previously, a partial load of `rspec-expectations` or `rspec-mocks` could define the `RSpec` constant without `RSpec::Core`, causing a `NoMethodError` when `RSpec.configure` was called. Nokogiri is now also only required when RSpec::Core is present.
15
+
10
16
  ## [0.8.0] - 2026-06-23
11
17
 
12
18
  ### Added
@@ -70,7 +76,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
70
76
  - `have_stimulus_action(descriptor)` matcher — full descriptor (`~=`) and shorthand without event (`*=`)
71
77
  - `have_stimulus_target(controller, target)` matcher — asserts `[data-{controller}-target~="target"]`
72
78
 
73
- [Unreleased]: https://github.com/eclectic-coding/stimulus_spec/compare/v0.8.0...HEAD
79
+ [Unreleased]: https://github.com/eclectic-coding/stimulus_spec/compare/v0.8.1...HEAD
80
+ [0.8.1]: https://github.com/eclectic-coding/stimulus_spec/releases/tag/v0.8.1
74
81
  [0.8.0]: https://github.com/eclectic-coding/stimulus_spec/releases/tag/v0.8.0
75
82
  [0.7.0]: https://github.com/eclectic-coding/stimulus_spec/releases/tag/v0.7.0
76
83
  [0.6.0]: https://github.com/eclectic-coding/stimulus_spec/releases/tag/v0.6.0
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module StimulusSpec
4
- VERSION = "0.8.0"
4
+ VERSION = "0.8.1"
5
5
  end
data/lib/stimulus_spec.rb CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  require_relative "stimulus_spec/version"
4
4
  require_relative "stimulus_spec/configuration"
5
- require_relative "stimulus_spec/matchers"
6
- require_relative "stimulus_spec/capybara/matchers"
7
5
 
8
6
  # RSpec matchers for testing Stimulus controller wiring in Rails applications.
9
7
  #
@@ -62,7 +60,10 @@ module StimulusSpec
62
60
  end
63
61
 
64
62
  # :nocov:
65
- if defined?(RSpec)
63
+ if defined?(RSpec::Core)
64
+ require_relative "stimulus_spec/matchers"
65
+ require_relative "stimulus_spec/capybara/matchers"
66
+
66
67
  RSpec.configure do |config|
67
68
  StimulusSpec.install_rspec_integration(config)
68
69
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stimulus_spec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chuck Smith