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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7b7b46d98a9c33d613f4a0c6aa3cd0b7b43f73f2117eadbed6a3ed3146536880
4
- data.tar.gz: 7ec3d164ae20f7ecd12aa85d826bffc0adeed0de2faf1b0e8e52c403bb8a032e
3
+ metadata.gz: d6e4ef257ecdb7017d0c554a6df1e4c24fcee152a0888973cd52fab9d9b4b21a
4
+ data.tar.gz: bd019c542b46e12188b759d8c7322bea99bcb016c0940ac2a67124a33fca31d8
5
5
  SHA512:
6
- metadata.gz: 4ea5e725ad6f9367807b69f7f82a5c5fef8ad3578f1394f9bf9407135e599e7ffa797efa80d76842ce7fc4ff5c114b81d090c831d3d90966d34e087c390deb99
7
- data.tar.gz: 219174af57c3c3fc4a1b9ab242ead40375c11fe9ee58a3dc084db6bc6615b6d2c908237f1b21eec55059382eac6421f4a649549a657194b6ef3e1293a14298a7
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
- value = if dep_attributes.key?(attr_name)
185
- dep_attributes[attr_name]
186
- elsif attr_config.source && respond_to?(attr_config.source)
187
- send(attr_config.source)
188
- elsif respond_to?(attr_name)
189
- send(attr_name)
190
- else
191
- attr_config.default
192
- end
193
-
194
- value = attr_config.process_value(value, self) if attr_config.respond_to?(:process_value)
195
-
196
- dep_attributes[attr_name] = value
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GlueGun
4
- VERSION = "0.1.9"
4
+ VERSION = "0.1.10"
5
5
  end
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.9
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-04 00:00:00.000000000 Z
11
+ date: 2024-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel