servactory 1.8.8 → 1.9.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4195548749c897719881d14227c7526a0be6097b38123e8556470089e867958a
4
- data.tar.gz: c096b1aacf6217243b1d292afad6cff733dfc955a3d720741de60c5a7d2420cc
3
+ metadata.gz: 7e2700452d86edebc82fa3ee39440d45e145a60ce29100beb2e60e7a8fc8421e
4
+ data.tar.gz: 12247104874465f4feb387201f52afb45ee941fce8cb18f9a303e08af117a3a7
5
5
  SHA512:
6
- metadata.gz: fff98fb471d49bb6ffda9d31d8daead860313cf12725db2251b22bf69d170bec272376bd71f1f2319ff373c962f6a06822f8e83a435140799d6698acb1454674
7
- data.tar.gz: e333261e7b6a7c5fd8cfc339ac312845bcd89b373100db21d330f89119ea3994fa5c9d66066c8b9b5705e648567513cd1ddbda6907aab4389c6b05475f36ede2
6
+ metadata.gz: 3f2a24c468da16bcc97e1e2cbbb86adf99c9e1a37b352e7e5e99e574a15333f8ca1cbf22b675fbc4387e4dfd2c6e52dc3e07bd3365569957385d4889195f02cb
7
+ data.tar.gz: e3d2122b3438fb9c5fbc637535a8450771879cde90291978bb111a0e94a4c4f9440269f2c6b253fb7d2360581166a793a12498f77544d627287eae0d56927dd5
@@ -10,7 +10,7 @@ module Servactory
10
10
 
11
11
  def initialize(context, incoming_arguments, collection_of_inputs)
12
12
  @context = context
13
- @incoming_arguments = incoming_arguments
13
+ @incoming_arguments = incoming_arguments.symbolize_keys
14
14
  @collection_of_inputs = collection_of_inputs
15
15
  end
16
16
 
@@ -3,11 +3,27 @@
3
3
  module Servactory
4
4
  module TestKit
5
5
  class Result
6
- def initialize(**attributes)
7
- attributes.each_pair do |method_name, method_return|
8
- define_singleton_method(method_name) { method_return }
6
+ def self.as_success(attributes = {})
7
+ Servactory::Result.success_for(context: new(attributes))
8
+ end
9
+
10
+ def self.as_failure(exception: nil)
11
+ Servactory::Result.failure_for(exception: exception)
12
+ end
13
+
14
+ def initialize(attributes = {})
15
+ attributes.each_pair do |name, value|
16
+ service_storage[:outputs].merge!({ name => value })
9
17
  end
10
18
  end
19
+
20
+ private_class_method :new
21
+
22
+ private
23
+
24
+ def service_storage
25
+ @service_storage ||= { outputs: {} }
26
+ end
11
27
  end
12
28
  end
13
29
  end
@@ -3,8 +3,8 @@
3
3
  module Servactory
4
4
  module VERSION
5
5
  MAJOR = 1
6
- MINOR = 8
7
- PATCH = 8
6
+ MINOR = 9
7
+ PATCH = 1
8
8
 
9
9
  STRING = [MAJOR, MINOR, PATCH].join(".")
10
10
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: servactory
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.8
4
+ version: 1.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anton Sokolov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-19 00:00:00.000000000 Z
11
+ date: 2023-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport