rails_anonymous_controller_testing 0.0.4 → 0.0.5

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: 70bf6129e4aae446b3466c9c8d1bdf534248645892896dc70ae2e2b0041ee668
4
- data.tar.gz: d382411629f666e21e1e9ed06c875b018247e6f5ff2c3f7afcc13e26bbe2beaf
3
+ metadata.gz: 806ed4f101b16a4baade5b23b7af947809fa5f7e2d070001437ae44b5b2d4dc7
4
+ data.tar.gz: 5461ffdf99fd003cb1e5e345e6a127cfaa0f96c4f7f655dcf7518a1934c584ba
5
5
  SHA512:
6
- metadata.gz: 2c25a28667ef38908a028f1c092de6282c928f1401628a021ae48d7b1dfeb684390c857a2b05fc2533344507846e55a294b06af19e221b0d06080bd1eb16748a
7
- data.tar.gz: cbbfaddef07e6221537f295463987ff9d05f206b3a5bb806f6cd2dc68e6c6a95457ca28b8b13814217a12708f181566ba70e97bcc7a897d8ec19fa4484a1754e
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
@@ -1,3 +1,3 @@
1
1
  module RailsAnonymousControllerTesting
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
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
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-14 00:00:00.000000000 Z
11
+ date: 2021-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack