much-rails 0.4.1 → 0.4.2
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ee8fc1ccf3484f2b015d6dc6f1911bcca2bddb9832809391dc48ef2aeac023bb
|
|
4
|
+
data.tar.gz: a0a9b4ba294d780e3a4002545e967505f8f32e15bb231e3fbd1e9d594ed4f9b1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f47fe549b83381ec39c226cf52760d8b5ca2d386c66e3e4db3b37f22ce07d855dd665e499fe5db15e54e7263a5903f5759cbb2d9d60a175dffead64917388f79
|
|
7
|
+
data.tar.gz: 3c50dc018ab3d5e0d6bf98cc8725b99314e9527d400890500c5ffbc8bf1e9ed2772da689b00bd7ef4b8fdf4d256927a71e338401da57ec53879019ad5a4ae5f2
|
|
@@ -39,7 +39,10 @@ class MuchRails::Action::Router < MuchRails::Action::BaseRouter
|
|
|
39
39
|
raise ArgumentError, "routes file `#{file_path.inspect}` does not exist."
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
-
new(
|
|
42
|
+
new(
|
|
43
|
+
routes_file_name.to_s.split(File::SEPARATOR).join("_"),
|
|
44
|
+
controller_name: controller_name,
|
|
45
|
+
) do
|
|
43
46
|
instance_eval(File.read(file_path), file_path.to_s, 1)
|
|
44
47
|
end
|
|
45
48
|
end
|
data/lib/much-rails/version.rb
CHANGED
|
@@ -45,6 +45,12 @@ class MuchRails::Action::Router
|
|
|
45
45
|
assert_that(router.url_set.fetch(:root).path).equals("/")
|
|
46
46
|
end
|
|
47
47
|
|
|
48
|
+
should "eval the nested named routes file" do
|
|
49
|
+
router = unit_class.load("test/subrouter")
|
|
50
|
+
assert_that(router.url_set).is_not_empty
|
|
51
|
+
assert_that(router.url_set.fetch(:root).path).equals("/subrouter")
|
|
52
|
+
end
|
|
53
|
+
|
|
48
54
|
should "complain if no file name given" do
|
|
49
55
|
assert_that{ unit_class.load([nil, "", " "]) }.raises(ArgumentError)
|
|
50
56
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: much-rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kelly Redding
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2021-
|
|
12
|
+
date: 2021-06-11 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: much-style-guide
|
|
@@ -305,6 +305,7 @@ files:
|
|
|
305
305
|
- test/helper.rb
|
|
306
306
|
- test/support/actions/show.rb
|
|
307
307
|
- test/support/config/routes/test.rb
|
|
308
|
+
- test/support/config/routes/test/subrouter.rb
|
|
308
309
|
- test/support/factory.rb
|
|
309
310
|
- test/support/fake_action_controller.rb
|
|
310
311
|
- test/system/.keep
|
|
@@ -381,6 +382,7 @@ test_files:
|
|
|
381
382
|
- test/helper.rb
|
|
382
383
|
- test/support/actions/show.rb
|
|
383
384
|
- test/support/config/routes/test.rb
|
|
385
|
+
- test/support/config/routes/test/subrouter.rb
|
|
384
386
|
- test/support/factory.rb
|
|
385
387
|
- test/support/fake_action_controller.rb
|
|
386
388
|
- test/system/.keep
|