rhino_project_core 0.30.0.alpha.30 → 0.30.0.alpha.36

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: f011c212ba395456f7c8e010cafaf2e1455e8048dbac8dabae66de8c13a52321
4
- data.tar.gz: 669e70dc432e6f50f919ffd7794c8512eaf510c274762135a5ca45ee059bb27e
3
+ metadata.gz: 46eb1594ceaa5af1f44c3da2999a556ec8720db20917cdcd49d0802a395d3576
4
+ data.tar.gz: f40d593b3a6bf6fc1e964f3aeb3020d2201b582e5e4b8f3b305926b319b92324
5
5
  SHA512:
6
- metadata.gz: 83156a24f6150e6b05c7a07a59264a5641b5f8adcf2f80fcd918d52cb3da370469b081773eeab593d8724a7643871ec564ef6f0fcd0c4cf9a26a73f280003eed
7
- data.tar.gz: 6946bfb45a565e2a83ac33d39d704cbb7d29bc204a3c99fc74d96a9b3354051f76df18d39dddffa86bad932b723d38668abe7e920517f025e5a01f53d9413826
6
+ metadata.gz: fc8752c09b6aa70efd3e87fd4ad9c3fbeb953c9de5d44e39e89d67c71c024fd1ef3be49967db1ef720f4252ad46d18f508838dfa55b889937bd722b368ab4c0d
7
+ data.tar.gz: f3310b1e8bdc7fdb31a829ee39ae01b81e4ea3cae1d3723f311c23e4bf13f10336e83ac35ac399a1dfa41855e7e748079fae5071152fada5841624e7712b0672
@@ -7,6 +7,7 @@ module Rhino
7
7
  class_option :routes_directory, type: :string, desc: "The directory to copy the routes to",
8
8
  default: "app/frontend/routes", group: :route
9
9
  class_option :route_path, type: :string, desc: "The path to routes relative to the routes directory", default: "_authenticated/$owner", group: :route
10
+ class_option :model_path, type: :string, desc: "The base path name for the model (defaults to model plural name)", group: :route
10
11
  class_option :copy_index, type: :boolean, desc: "Copy the index route", default: true, group: :route
11
12
  class_option :copy_show, type: :boolean, desc: "Copy the show route", default: true, group: :route
12
13
  class_option :copy_create, type: :boolean, desc: "Copy the create route", default: true, group: :route
@@ -35,13 +36,17 @@ module Rhino
35
36
  end
36
37
 
37
38
  private
38
- def route_file_path(file_name)
39
- File.join(options[:routes_directory], options[:route_path], singular_table_name, file_name)
39
+ def model_path
40
+ options[:model_path] || plural_table_name
40
41
  end
41
42
 
42
- # Begin and end with a slash
43
43
  def route_path
44
- File.join("/", options[:route_path], singular_table_name, "/")
44
+ File.join("/", options[:route_path], model_path, "/")
45
+ end
46
+
47
+
48
+ def route_file_path(file_name)
49
+ File.join(options[:routes_directory], options[:route_path], model_path, file_name)
45
50
  end
46
51
  end
47
52
  end
data/lib/rhino/version.rb CHANGED
@@ -10,7 +10,7 @@ module Rhino
10
10
  MAJOR = 0
11
11
  MINOR = 30
12
12
  TINY = 0
13
- PRE = "alpha.30"
13
+ PRE = "alpha.36"
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rhino_project_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.30.0.alpha.30
4
+ version: 0.30.0.alpha.36
5
5
  platform: ruby
6
6
  authors:
7
7
  - JP Rosevear
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-03-29 00:00:00.000000000 Z
10
+ date: 2025-04-19 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rails