avo 3.14.1 → 3.14.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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/avo/resources/base.rb +1 -3
- data/lib/avo/version.rb +1 -1
- data/lib/generators/avo/eject_generator.rb +8 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4afa827148ace09b3603b6cb458ad21bc4c80836049d113873e1fac697e2aafb
|
|
4
|
+
data.tar.gz: 273c05e9e9e996b2c8032f80d653b2bdc9a7395d84303040daf9099257d164d5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 91ddea0958d710e3c15e55366de8d557731bacdeaa4d024ee26fddb7520aa85151cad47807d0f8a2e5f8ce6937a91847bf167babacaa58ba681f14c4c617eb5b
|
|
7
|
+
data.tar.gz: 35b5bf5e62b17a771e712f7f05f7ad9396bb745f31e1b631c0e079db3a65ed318b9b84be5a97474c78b9499150510103dd09850784c83e2516d616d4d3d28e5e
|
data/Gemfile.lock
CHANGED
data/lib/avo/resources/base.rb
CHANGED
|
@@ -179,7 +179,7 @@ module Avo
|
|
|
179
179
|
end
|
|
180
180
|
|
|
181
181
|
def name
|
|
182
|
-
|
|
182
|
+
name_from_translation_key(count: 1, default: class_name.underscore.humanize)
|
|
183
183
|
end
|
|
184
184
|
alias_method :singular_name, :name
|
|
185
185
|
|
|
@@ -203,8 +203,6 @@ module Avo
|
|
|
203
203
|
end
|
|
204
204
|
|
|
205
205
|
def underscore_name
|
|
206
|
-
return @name if @name.present?
|
|
207
|
-
|
|
208
206
|
name.demodulize.underscore
|
|
209
207
|
end
|
|
210
208
|
|
data/lib/avo/version.rb
CHANGED
|
@@ -118,7 +118,14 @@ module Generators
|
|
|
118
118
|
component = component_to_eject.underscore
|
|
119
119
|
|
|
120
120
|
# Get the component path for both, the rb and erb files
|
|
121
|
-
rb, erb =
|
|
121
|
+
rb, erb = if (component_constant = component_to_eject.safe_constantize)
|
|
122
|
+
# If component is a constant, find the source location
|
|
123
|
+
source_location = component_constant.source_location
|
|
124
|
+
|
|
125
|
+
[source_location, source_location.gsub(".rb", ".html.erb")]
|
|
126
|
+
else
|
|
127
|
+
["app/components/#{component}.rb", "app/components/#{component}.html.erb"]
|
|
128
|
+
end
|
|
122
129
|
|
|
123
130
|
# Return if one of the components doesn't exist
|
|
124
131
|
if !path_exists?(rb) || !path_exists?(erb)
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: avo
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.14.
|
|
4
|
+
version: 3.14.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Adrian Marin
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2024-11-
|
|
13
|
+
date: 2024-11-21 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: activerecord
|