turbo_rspec 1.6.0 → 1.6.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 +4 -4
- data/CHANGELOG.md +6 -0
- data/CONTRIBUTING.md +90 -0
- data/README.md +1 -1
- data/lib/turbo_rspec/shared_examples.rb +1 -1
- data/lib/turbo_rspec/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a307e4f793b6394100ac49bfe9e360cf1ca378e3204dfeb4070a839781eb6e1b
|
|
4
|
+
data.tar.gz: 7d0bf9057477f2c5188c050c0f90ea1be1a7732f016d5b86180f4cdde51f0073
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ff66bd9fcee4b8feca948ec65598f98ee54be6dd7a8bb23fd1d71632d1c93ec11b9589648d50256da25ac7022c1414d7351c0021738318ce9b296a743c893d38
|
|
7
|
+
data.tar.gz: bb0efb7f7b138f5052eb7cc2fc5cbed38f97799c0aceaff6420e4df01502aab436527eb53606f0fa0d10a0442320c4552bf6b7506f7ac42495a29c2f6120052f
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [1.6.1] - 2026-06-07
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- `shared_examples.rb` now guards on `RSpec.respond_to?(:shared_examples)` in addition to `defined?(RSpec)`, preventing errors when the `rspec` meta-gem is required but `rspec-core` is not yet fully initialized (e.g. during `rails assets:precompile` in the test environment)
|
|
8
|
+
|
|
3
9
|
## [1.6.0] - 2026-06-02
|
|
4
10
|
|
|
5
11
|
### Added
|
data/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Contributing to turbo_rspec
|
|
2
|
+
|
|
3
|
+
Bug reports and pull requests are welcome. This guide covers everything you need to get up and running.
|
|
4
|
+
|
|
5
|
+
## Setup
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
git clone https://github.com/eclectic-coding/turbo_rspec.git
|
|
9
|
+
cd turbo_rspec
|
|
10
|
+
bin/setup # installs gems and wires up the pre-push hook
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Running the suite
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
bundle exec rake # full suite: lint + tests (what CI runs)
|
|
17
|
+
bundle exec rspec # tests only
|
|
18
|
+
bundle exec rspec spec/path/to/foo_spec.rb # single file
|
|
19
|
+
bundle exec rspec spec/path/to/foo_spec.rb:42 # single example
|
|
20
|
+
bundle exec standardrb --no-fix # lint only
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
CI requires **100% line and branch coverage** — SimpleCov will exit non-zero if either drops below that threshold.
|
|
24
|
+
|
|
25
|
+
## Branch workflow
|
|
26
|
+
|
|
27
|
+
Always work on a feature or chore branch — never commit directly to `main`:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
feat/short-description # new matchers, new API
|
|
31
|
+
chore/short-description # docs, tooling, dependency bumps
|
|
32
|
+
fix/short-description # bug fixes
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## CHANGELOG
|
|
36
|
+
|
|
37
|
+
Add an entry under `## [Unreleased]` **on your branch before opening a PR**, not after merging. Use these section headers in order (omit any that have no entries):
|
|
38
|
+
|
|
39
|
+
```markdown
|
|
40
|
+
### Added
|
|
41
|
+
### Changed
|
|
42
|
+
### Fixed
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
CHANGELOG entries are **user-facing only** — document changes to the public API. Pure internal refactors, docs updates, and CI fixes don't need an entry.
|
|
46
|
+
|
|
47
|
+
## Pre-push hook
|
|
48
|
+
|
|
49
|
+
`bin/setup` installs a pre-push hook that runs automatically on every push:
|
|
50
|
+
|
|
51
|
+
- **Blocks** the push if `lib/` files changed but `CHANGELOG.md` has no new entry under `## [Unreleased]`.
|
|
52
|
+
- **Warns** (advisory, doesn't block) if `README.md` or `ROADMAP.md` look untouched.
|
|
53
|
+
|
|
54
|
+
To bypass when the push genuinely doesn't need a CHANGELOG entry (tooling-only changes):
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
git push --no-verify
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Pull requests
|
|
61
|
+
|
|
62
|
+
1. Open a PR against `main`.
|
|
63
|
+
2. All CI checks must pass: lint, security audit, and the full test matrix (Ruby 3.3–4.0 × Rails 7.2–8.1).
|
|
64
|
+
3. Link the relevant GitHub issue in the PR description (`Closes #N`).
|
|
65
|
+
|
|
66
|
+
## Code conventions
|
|
67
|
+
|
|
68
|
+
- **StandardRB** enforces style — run `bundle exec rake standard:fix` to auto-correct before pushing.
|
|
69
|
+
- Match the surrounding style for failure messages: use `✓`/`✗` indicators and a "closest match" section when showing constraint diffs.
|
|
70
|
+
- New public methods need YARD `@param` and `@return` tags, and an entry in `sig/turbo_rspec.rbs`.
|
|
71
|
+
- Private helpers don't need YARD docs.
|
|
72
|
+
|
|
73
|
+
## Custom Turbo actions
|
|
74
|
+
|
|
75
|
+
If a spec needs to assert a custom Turbo stream action, register it in the test setup rather than using `--no-verify` to bypass the `ArgumentError`:
|
|
76
|
+
|
|
77
|
+
```ruby
|
|
78
|
+
before { TurboRspec.register_action(:my_action) }
|
|
79
|
+
after { TurboRspec.reset_configuration! }
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Releasing (maintainers only)
|
|
83
|
+
|
|
84
|
+
Releases are cut from `main` using the release script:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
bin/release 1.2.0
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
This bumps the version, updates `CHANGELOG.md` and `Gemfile.lock`, commits, tags, and pushes. CI picks up the tag and publishes to RubyGems via Trusted Publishing.
|
data/README.md
CHANGED
|
@@ -445,7 +445,7 @@ refute_broadcasted_turbo_stream_to("notifications") { MyJob.perform_now }
|
|
|
445
445
|
|
|
446
446
|
## Contributing
|
|
447
447
|
|
|
448
|
-
Bug reports and pull requests are welcome on [GitHub](https://github.com/eclectic-coding/turbo_rspec).
|
|
448
|
+
Bug reports and pull requests are welcome on [GitHub](https://github.com/eclectic-coding/turbo_rspec). See [CONTRIBUTING.md](CONTRIBUTING.md) for setup instructions, branch conventions, CHANGELOG requirements, and the PR checklist.
|
|
449
449
|
|
|
450
450
|
## License
|
|
451
451
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
# :nocov:
|
|
4
|
-
if defined?(RSpec)
|
|
4
|
+
if defined?(RSpec) && RSpec.respond_to?(:shared_examples)
|
|
5
5
|
# :nocov:
|
|
6
6
|
RSpec.shared_examples "a turbo stream response" do |action: nil, target: nil, targets: nil, content: nil, partial: nil|
|
|
7
7
|
it "responds with a turbo stream" do
|
data/lib/turbo_rspec/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: turbo_rspec
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.6.
|
|
4
|
+
version: 1.6.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chuck Smith
|
|
@@ -41,6 +41,7 @@ files:
|
|
|
41
41
|
- ".yardopts"
|
|
42
42
|
- CHANGELOG.md
|
|
43
43
|
- CLAUDE.md
|
|
44
|
+
- CONTRIBUTING.md
|
|
44
45
|
- LICENSE.txt
|
|
45
46
|
- README.md
|
|
46
47
|
- ROADMAP.md
|