command_model 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +3 -1
- data/gemfiles/6.1.gemfile.lock +1 -1
- data/gemfiles/7.0.gemfile.lock +1 -1
- data/gemfiles/7.1.gemfile.lock +1 -1
- data/lib/command_model/model.rb +3 -3
- data/lib/command_model/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: e8cf40c64412f7916aa99c30322b374dc2893635561cb4d7a3a40268795d1f19
|
4
|
+
data.tar.gz: 97b8da271006b44b5c5c6ab7ef3db825f7d7696e353dae93c96baa8edbb8e1f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31bfe745e834a943f6221f1fd736ef2e5998ab262d15b4fa621fa733bb6cd2e1f9a9f448e263dd8565da179a766334b0ab983befe784448d9b18b91a24f8b088
|
7
|
+
data.tar.gz: 711f2f7069e0c63b1c20fe9a46faf7e737967e6aadc7292b3e40eb64adef217df1014cf199aab1fbf3aa58b462a053c0c8094ae132f26fb03207f303bbfcce1b
|
data/Gemfile.lock
CHANGED
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.
|
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+
|
data/gemfiles/6.1.gemfile.lock
CHANGED
data/gemfiles/7.0.gemfile.lock
CHANGED
data/gemfiles/7.1.gemfile.lock
CHANGED
data/lib/command_model/model.rb
CHANGED
@@ -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
|
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.
|
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-
|
11
|
+
date: 2024-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|