rails_anonymous_controller_testing 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 806ed4f101b16a4baade5b23b7af947809fa5f7e2d070001437ae44b5b2d4dc7
|
4
|
+
data.tar.gz: 5461ffdf99fd003cb1e5e345e6a127cfaa0f96c4f7f655dcf7518a1934c584ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 148a834923806eeb61ffb38fb561f3a0f0596b94aacdc9d4910541b92fcd18b0fa9fdb383c031305dfce4123ffcdc4d3195bfb8a99ee6cd6dcda691a67724615
|
7
|
+
data.tar.gz: 6989348f767f3497142d64df8de6b56f159b050f6899b9ad7d9b3ea7348831dea4bfbbba0923f671c8d20f3a5309a485689513b2b8fd17096c01bc6e0be56270
|
@@ -15,6 +15,10 @@ class RailsAnonymousControllerTesting::Railtie < ::Rails::Railtie
|
|
15
15
|
@_anonymous_controller_name ||= "AnonymousController"
|
16
16
|
end
|
17
17
|
|
18
|
+
def self._anonymous_controller_name=(value)
|
19
|
+
@_anonymous_controller_name = value
|
20
|
+
end
|
21
|
+
|
18
22
|
def self._anonymous_view_cache?
|
19
23
|
if instance_variable_defined?(:@_anonymous_view_cache)
|
20
24
|
@_anonymous_view_cache
|
@@ -39,7 +43,7 @@ class RailsAnonymousControllerTesting::Railtie < ::Rails::Railtie
|
|
39
43
|
@_anonymous_views = value
|
40
44
|
end
|
41
45
|
|
42
|
-
def self.controller(base_controller, routes: nil, &block)
|
46
|
+
def self.controller(base_controller, routes: nil, controller_name: "AnonymousController", &block)
|
43
47
|
caller_location = caller_locations(1, 10).find { |location| location.absolute_path != __FILE__ }
|
44
48
|
|
45
49
|
display_name =
|
@@ -60,6 +64,7 @@ class RailsAnonymousControllerTesting::Railtie < ::Rails::Railtie
|
|
60
64
|
end
|
61
65
|
|
62
66
|
anonymous_view_path = _anonymous_view_base_path.join("#{display_name}_#{unique_identifier}")
|
67
|
+
self._anonymous_controller_name = controller_name
|
63
68
|
anonymous_controller_name = _anonymous_controller_name
|
64
69
|
|
65
70
|
# Define the controller
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_anonymous_controller_testing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zach Ahn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-09-
|
11
|
+
date: 2021-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|