inertia_rails 1.9.1 → 1.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/inertia_rails/rspec.rb +7 -1
- data/lib/inertia_rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 84d7a55c30678d9984236bdca8442ff34268cb09ff8795560d0506678acf9ab8
|
4
|
+
data.tar.gz: 48308b96e0e2cf06c70027649acc8e992f280743fd5cae05c70a49c4d8ec343e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8ab3b00e2ee6a44649924fd60aefad32bd5bd33621a12c45ddb692f49d7220a4f1a3837334d983ce614a30c9144249c23f280918b8fbc9b75aef2f97cfad04d
|
7
|
+
data.tar.gz: de4d10ec3200f4d45a50c2a1cb2abcc479182f4cee135b9401f43679ad1e296031c644982b9d2fa5e5a5875f1fe909b8dfcda941e933927028b0f7cbdbbb8d97
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
+
## [1.9.2] - 2021-02-23
|
8
|
+
|
9
|
+
* Improve method for detecting whether a user used the RSpec helpers without adding `inertia: true` to the spec
|
10
|
+
* Emit a warning when expecting an Inertia response in RSpec and never reaching a `render inertia:` call
|
11
|
+
|
7
12
|
## [1.9.1] - 2021-02-10
|
8
13
|
|
9
14
|
* Define `redirect_to` and `redirect_back` as public methods for compatibility with other code using them
|
data/lib/inertia_rails/rspec.rb
CHANGED
@@ -35,6 +35,9 @@ module InertiaRails
|
|
35
35
|
def inertia
|
36
36
|
raise 'Inertia test helpers aren\'t set up! Make sure you add inertia: true to describe blocks using inertia tests.' unless inertia_tests_setup?
|
37
37
|
|
38
|
+
if @_inertia_render_wrapper.nil? && !::RSpec.configuration.inertia[:skip_missing_renderer_warnings]
|
39
|
+
warn 'WARNING: the test never created an Inertia renderer. Maybe the code wasn\'t able to reach a `render inertia:` call? If this was intended, or you don\'t want to see this message, set ::RSpec.configuration.inertia[:skip_missing_renderer_warnings] = true'
|
40
|
+
end
|
38
41
|
@_inertia_render_wrapper
|
39
42
|
end
|
40
43
|
|
@@ -49,7 +52,7 @@ module InertiaRails
|
|
49
52
|
protected
|
50
53
|
|
51
54
|
def inertia_tests_setup?
|
52
|
-
|
55
|
+
::RSpec.current_example.metadata.fetch(:inertia, false)
|
53
56
|
end
|
54
57
|
end
|
55
58
|
end
|
@@ -57,6 +60,9 @@ end
|
|
57
60
|
|
58
61
|
RSpec.configure do |config|
|
59
62
|
config.include ::InertiaRails::RSpec::Helpers
|
63
|
+
config.add_setting :inertia, default: {
|
64
|
+
skip_missing_renderer_warnings: false
|
65
|
+
}
|
60
66
|
|
61
67
|
config.before(:each, inertia: true) do
|
62
68
|
new_renderer = InertiaRails::Renderer.method(:new)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inertia_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Knoles
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-02-
|
13
|
+
date: 2021-02-23 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|