para 0.12.0 → 0.12.1
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/lib/para/components_configuration.rb +10 -12
- data/lib/para/config.rb +6 -2
- data/lib/para/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ee25a77e578b14d822cbf8827991f6c6920c580acddeb2120d0e6a2570795fa
|
4
|
+
data.tar.gz: 41ee3d94327eeeacfb5ee1da6430956d5862ed0e242d0d09180bef828e46a921
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: acd659f13038e225325293d30820d115f5054ca6ba36cccc44e5404bc2e5d0e01226815b41aa38bc3f8c76f6299891c621c4e7d1d2306eaaa76a9f1c97f24891
|
7
|
+
data.tar.gz: 7da8328b9591a785d922ddd3f12c61f95d57f7c3e8a327b5667ad22cbfabeeaaabac1c7c8d0e6ed50dee7bc48ceb7e172aac92b3a9593b6919678e4b957bcc1a
|
@@ -60,13 +60,11 @@ module Para
|
|
60
60
|
sections.each do |section|
|
61
61
|
section.components.each do |component|
|
62
62
|
# If one of the section component has the searched identifier return it
|
63
|
-
if component.identifier.to_s == identifier.to_s
|
64
|
-
|
65
|
-
|
66
|
-
component
|
67
|
-
|
68
|
-
return child_component if child_component.identifier.to_s == identifier.to_s
|
69
|
-
end
|
63
|
+
return component if component.identifier.to_s == identifier.to_s
|
64
|
+
|
65
|
+
component.child_components.each do |child_component|
|
66
|
+
# If one of the component children has the searched identifier return it
|
67
|
+
return child_component if child_component.identifier.to_s == identifier.to_s
|
70
68
|
end
|
71
69
|
end
|
72
70
|
end
|
@@ -139,7 +137,7 @@ module Para
|
|
139
137
|
#
|
140
138
|
def eager_load_components!
|
141
139
|
$LOAD_PATH.each do |path|
|
142
|
-
next unless path.match(%r{
|
140
|
+
next unless path.match(%r{/#{Para.config.components_directory}$})
|
143
141
|
|
144
142
|
glob = File.join(path, '**', '*_component.rb')
|
145
143
|
|
@@ -189,10 +187,10 @@ module Para
|
|
189
187
|
# Build child components if a block is provided
|
190
188
|
instance_eval(&block) if block
|
191
189
|
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
190
|
+
return if type
|
191
|
+
|
192
|
+
raise UndefinedComponentTypeError, "Undefined Para component : #{type_identifier}. " +
|
193
|
+
'Please ensure that your app or gems define this component type.'
|
196
194
|
end
|
197
195
|
|
198
196
|
def component(*args, **child_options, &block)
|
data/lib/para/config.rb
CHANGED
@@ -16,11 +16,15 @@ module Para
|
|
16
16
|
@@default_tree_max_depth = 3
|
17
17
|
|
18
18
|
mattr_accessor :resource_name_methods
|
19
|
-
@@resource_name_methods = [
|
19
|
+
@@resource_name_methods = %i[admin_name admin_title name title]
|
20
20
|
|
21
21
|
mattr_accessor :enable_app_breadcrumbs
|
22
22
|
@@enable_app_breadcrumbs = true
|
23
23
|
|
24
|
+
# Allow changing this directory to allow using view_component gem
|
25
|
+
mattr_accessor :components_directory
|
26
|
+
@@para_components_directory = 'components'
|
27
|
+
|
24
28
|
mattr_reader :plugins
|
25
29
|
@@plugins = Para::Plugins::Set.new
|
26
30
|
|
@@ -64,7 +68,7 @@ module Para
|
|
64
68
|
# that limit after writing new keys
|
65
69
|
#
|
66
70
|
mattr_accessor :database_cache_store_max_items
|
67
|
-
@@database_cache_store_max_items =
|
71
|
+
@@database_cache_store_max_items = 10_000
|
68
72
|
|
69
73
|
# Allows accessing plugins root module to configure them through a method
|
70
74
|
# from the Para::Config class.
|
data/lib/para/version.rb
CHANGED