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: ecafeddd844c1b0413250e832370b88742ede359cb73b4b567ed4a85e2e375d6
4
- data.tar.gz: 484ebe9506dcefe40232b5dac153f6e9d034c21b3a0f57d6b57888f740222f69
3
+ metadata.gz: ee8fc1ccf3484f2b015d6dc6f1911bcca2bddb9832809391dc48ef2aeac023bb
4
+ data.tar.gz: a0a9b4ba294d780e3a4002545e967505f8f32e15bb231e3fbd1e9d594ed4f9b1
5
5
  SHA512:
6
- metadata.gz: 6b44bb34ff3ad725bea2dbc6409830673f1553e01004b3d4476caf2b6d5dfaf5b96986d061f2a6e7ccbe3d4b5ba6a0f9108026b665dc23d9c0c9a9d2f205f77e
7
- data.tar.gz: 064be4d568511f4ec5175f9b2ab290187e5f4bca88d25f993c2ff3762b71b541b57a8d6b8f21d38ee76680ab631a83c27c7b5bdd8e0f6ac59d6c25ad2555b28d
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(routes_file_name, controller_name: controller_name) do
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MuchRails
4
- VERSION = "0.4.1"
4
+ VERSION = "0.4.2"
5
5
  end
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ url :root, "/subrouter"
@@ -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.1
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-05-28 00:00:00.000000000 Z
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