command_model 2.1.0 → 2.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ae545ab3c7c527111971b821772770a8b050f897550fa3512c6476edd67182d1
4
- data.tar.gz: be5789d54e5e90730445343e9d29bd789c6a3f5f42e34a5f78075996ae51d929
3
+ metadata.gz: e8cf40c64412f7916aa99c30322b374dc2893635561cb4d7a3a40268795d1f19
4
+ data.tar.gz: 97b8da271006b44b5c5c6ab7ef3db825f7d7696e353dae93c96baa8edbb8e1f9
5
5
  SHA512:
6
- metadata.gz: 02613c5fed0d0518ac3bff0a2d7b0fc77974d323693e1f18068d767c28bc4cc7521bb7fdece9a49ef5ef8c82a4213c098edb61972a391cb6b2be90570efc349c
7
- data.tar.gz: d683d0d3823c268784c1821c9defed0f68fb3cc7c5cda98440d2676bae7845d8b2e6aa94de6f5ce3665b9235f7bd25efe1ec51b312342441efec370feb9d2ea9
6
+ metadata.gz: 31bfe745e834a943f6221f1fd736ef2e5998ab262d15b4fa621fa733bb6cd2e1f9a9f448e263dd8565da179a766334b0ab983befe784448d9b18b91a24f8b088
7
+ data.tar.gz: 711f2f7069e0c63b1c20fe9a46faf7e737967e6aadc7292b3e40eb64adef217df1014cf199aab1fbf3aa58b462a053c0c8094ae132f26fb03207f303bbfcce1b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- command_model (2.1.0)
4
+ command_model (2.1.1)
5
5
  activemodel (> 6.1)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -204,7 +204,9 @@ $ BUNDLE_GEMFILE=gemfiles/6.1.gemfile rake
204
204
 
205
205
  ## Version History
206
206
 
207
- * 2.1.0 - March 15, 2023
207
+ * 2.1.1 - April 8, 2024
208
+ * Dependencies are set before parameters
209
+ * 2.1.0 - March 15, 2024
208
210
  * Add dependencies to CommandModel::Model
209
211
  * Allow inheritance of CommandModel::Model
210
212
  * Require Ruby 3.2+
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- command_model (2.0.1)
4
+ command_model (2.1.1)
5
5
  activemodel (> 6.1)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- command_model (2.0.1)
4
+ command_model (2.1.1)
5
5
  activemodel (> 6.1)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- command_model (2.0.1)
4
+ command_model (2.1.1)
5
5
  activemodel (> 6.1)
6
6
 
7
7
  GEM
@@ -169,9 +169,6 @@ module CommandModel
169
169
  # instance of the same class is passed in then the parameters are copied
170
170
  # to the new object.
171
171
  def initialize(parameters={}, dependencies={})
172
- @type_conversion_errors = {}
173
- set_parameters parameters
174
-
175
172
  dependencies = dependencies.symbolize_keys
176
173
  self.class.dependencies.each do |dependency|
177
174
  value = dependencies.fetch(dependency.name, dependency.default.call)
@@ -185,6 +182,9 @@ module CommandModel
185
182
  if unknown_dependencies.present?
186
183
  raise ArgumentError, "Unknown dependencies: #{bad_dependencies.join(", ")}"
187
184
  end
185
+
186
+ @type_conversion_errors = {}
187
+ set_parameters parameters
188
188
  end
189
189
 
190
190
  # Executes the command by calling the method +execute+ if the validations
@@ -1,3 +1,3 @@
1
1
  module CommandModel
2
- VERSION = "2.1.0"
2
+ VERSION = "2.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: command_model
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jack Christensen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-15 00:00:00.000000000 Z
11
+ date: 2024-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel