glue_gun_dsl 0.1.9 → 0.1.10
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/glue_gun/dsl.rb +13 -13
- data/lib/glue_gun/version.rb +1 -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: d6e4ef257ecdb7017d0c554a6df1e4c24fcee152a0888973cd52fab9d9b4b21a
|
4
|
+
data.tar.gz: bd019c542b46e12188b759d8c7322bea99bcb016c0940ac2a67124a33fca31d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f3522c171606ed23822d792e5ebc1895ac03280a9fa4bde7c9bf79daed22496c14b5d0b9a03d5063105d1611b2f11161c3c5ed74919b9c134e2f32d35b03a9a
|
7
|
+
data.tar.gz: a170db2ee61ba4c208148bcc8fb46e428bf1b04b8142ffa110f857418d7a762e759b6d13fe51333fcd829c3876d98128b0ad86d48dd9db4cf24ed027a47ba2bf
|
data/lib/glue_gun/dsl.rb
CHANGED
@@ -181,19 +181,19 @@ module GlueGun
|
|
181
181
|
def build_dependency_attributes(option_config, dep_attributes)
|
182
182
|
option_config.attributes.each do |attr_name, attr_config|
|
183
183
|
# If the attribute is already provided, use it
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
184
|
+
if dep_attributes.key?(attr_name)
|
185
|
+
value = dep_attributes[attr_name]
|
186
|
+
else
|
187
|
+
value = if attr_config.source && respond_to?(attr_config.source)
|
188
|
+
send(attr_config.source)
|
189
|
+
elsif respond_to?(attr_name)
|
190
|
+
send(attr_name)
|
191
|
+
else
|
192
|
+
attr_config.default
|
193
|
+
end
|
194
|
+
value = attr_config.process_value(value, self) if attr_config.respond_to?(:process_value)
|
195
|
+
dep_attributes[attr_name] = value
|
196
|
+
end
|
197
197
|
|
198
198
|
# After getting the value, check if it's required and nil
|
199
199
|
if value.nil? && attr_config.required
|
data/lib/glue_gun/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glue_gun_dsl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brett Shollenberger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|