plutonium 0.19.1 → 0.19.3

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: 62cab2661ac6715e42aa70ae1f08573f5d6842a1a131f75f516837920c357f40
4
- data.tar.gz: 897018abad42c36358bcf3cb36851c3b3f71eaaecfc04613b59ed57e59738326
3
+ metadata.gz: 90334ca76362d14c0666cc221dda19671f8ded4348f65e61e7a0044251dbf153
4
+ data.tar.gz: 9e941a439c725b2df639d0c48f3dbdaed1f73abcc515ef4cff938653ce8cadcd
5
5
  SHA512:
6
- metadata.gz: d3a63013631d682097278c4edc0b9e1da054a62fc088f2cd9c25510997642284ec49202ba1893091fab35982e9633532dbe108d4e403e694db34bb72349370b2
7
- data.tar.gz: 127b4b2711d759fd834631b4bdee90375218baee8f760a2732b65c1cd4394989c851f43551817b021908ea24d0b11566c9f40429626cf7036fa1f930f5ce66c9
6
+ metadata.gz: 45c602ae6961272dde234ede40560e832f9d5ae81244d284c0691f17989ac4d64cf33a4f7fab3a7a7c57ec433fdd01d289ff1c4add954cab54673dfc1b420472
7
+ data.tar.gz: b837a486e11096bc39678e4dcf3ca0a854f3718bbc6fc5c09cf8ab56400555bee09d074ecab7fdd797289ac61bcd36fd8a26d546761a390f0f5118156ff895ab
@@ -4,7 +4,7 @@ require_relative "../../lib/plutonium_generators"
4
4
 
5
5
  module Pu
6
6
  module Gem
7
- class AnnotateGenerator < Rails::Generators::Base
7
+ class AnnotatedGenerator < Rails::Generators::Base
8
8
  include PlutoniumGenerators::Generator
9
9
 
10
10
  source_root File.expand_path("templates", __dir__)
@@ -82,13 +82,13 @@ module Plutonium
82
82
  @engine ||= determine_engine
83
83
  end
84
84
 
85
- private
86
-
87
85
  # @return [Hash] A lookup table for resource route configurations.
88
86
  def resource_route_config_lookup
89
87
  @resource_route_config_lookup ||= {}
90
88
  end
91
89
 
90
+ private
91
+
92
92
  # Determines the appropriate engine based on the current scope.
93
93
  #
94
94
  # @return [Class] The determined engine class.
@@ -88,27 +88,29 @@ module Plutonium
88
88
 
89
89
  # Record
90
90
  if resource_record?
91
- # Record Resource
92
- li(class: "flex items-center") do
93
- svg(
94
- class: "rtl:rotate-180 block w-3 h-3 mx-1 text-gray-400",
95
- aria_hidden: "true",
96
- xmlns: "http://www.w3.org/2000/svg",
97
- fill: "none",
98
- viewbox: "0 0 6 10"
99
- ) do |s|
100
- s.path(
101
- stroke: "currentColor",
102
- stroke_linecap: "round",
103
- stroke_linejoin: "round",
104
- stroke_width: "2",
105
- d: "m1 9 4-4-4-4"
106
- )
91
+ unless current_engine.routes.resource_route_config_lookup[resource_class.model_name.plural][:route_type] == :resource
92
+ # Record Resource
93
+ li(class: "flex items-center") do
94
+ svg(
95
+ class: "rtl:rotate-180 block w-3 h-3 mx-1 text-gray-400",
96
+ aria_hidden: "true",
97
+ xmlns: "http://www.w3.org/2000/svg",
98
+ fill: "none",
99
+ viewbox: "0 0 6 10"
100
+ ) do |s|
101
+ s.path(
102
+ stroke: "currentColor",
103
+ stroke_linecap: "round",
104
+ stroke_linejoin: "round",
105
+ stroke_width: "2",
106
+ d: "m1 9 4-4-4-4"
107
+ )
108
+ end
109
+ link_to resource_name_plural(resource_class),
110
+ resource_url_for(resource_class),
111
+ class:
112
+ "ms-1 text-sm font-medium text-gray-700 hover:text-primary-600 md:ms-2 dark:text-gray-200 dark:hover:text-white"
107
113
  end
108
- link_to resource_name_plural(resource_class),
109
- resource_url_for(resource_class),
110
- class:
111
- "ms-1 text-sm font-medium text-gray-700 hover:text-primary-600 md:ms-2 dark:text-gray-200 dark:hover:text-white"
112
114
  end
113
115
 
114
116
  # Record Itself
@@ -1,5 +1,5 @@
1
1
  module Plutonium
2
- VERSION = "0.19.1"
2
+ VERSION = "0.19.3"
3
3
  NEXT_MAJOR_VERSION = VERSION.split(".").tap { |v|
4
4
  v[1] = v[1].to_i + 1
5
5
  v[2] = 0
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plutonium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.1
4
+ version: 0.19.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Froelich
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-01-13 00:00:00.000000000 Z
11
+ date: 2025-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: zeitwerk