service_pattern 1.0.4 → 1.0.5

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: e3974115d7989020e2c18159642a70302af8a53ebe75eae03f68461a6a5bf3b4
4
- data.tar.gz: 3bdfde19ad64208f82c459c2337dcefeb6820dbf9e4a703b66f7269881f31e08
3
+ metadata.gz: 6127af0c6cf5dff009118b626338c47e85cd92f920a3721b90ff17177b6d2d6f
4
+ data.tar.gz: f9168398a91ef556e6aeff33f17e72b893e0d0c183d5923874b735278752ed61
5
5
  SHA512:
6
- metadata.gz: 0143b8fa5a7f978c9834f87b01f8bc646c329fff174ebd5e3777564f2e414477582c6a4fa87fafb9e3b45ab51a38212d3f2d931dbca1ac38c3ee920d8c7ed5b5
7
- data.tar.gz: 3005e2fe4284282b50db8a56be54450bbfe90aecbfe765f541a41e6b91705e26a71afec1b2043130f8aee00d46f7643a7439b28f884175459fbba328102a8155
6
+ metadata.gz: 55e3cb0164fc764be393f50e5ced27f2ccf698a2459d8416148692fff790317e65af55099150550099ea8a07ccf2e8badab5980d464a832ae7c40bc647f2ec63
7
+ data.tar.gz: 1f027e60f2e958df5261486e011558b0d9498765832d3f45dd7caebec6d6c1656f5b6c84da8b664ac4612aa2fa0f5c99c69b69da7b3bd72f3629c1d7e20194e3
@@ -1,7 +1,7 @@
1
1
  class ServicePattern::Service
2
2
  # The same as execute but doesn't catch FailedError so they are passed on to the parent service call
3
- def self.chain(*args, &blk)
4
- service = new(*args, &blk)
3
+ def self.chain(*args, **opts, &blk)
4
+ service = new(*args, **opts, &blk)
5
5
 
6
6
  can_execute_response = service.can_execute?
7
7
  ServicePattern::Service.fail!(can_execute_response.errors) unless can_execute_response.success?
@@ -9,16 +9,16 @@ class ServicePattern::Service
9
9
  service.perform
10
10
  end
11
11
 
12
- def self.call(*args, &blk)
13
- execute(*args, &blk)
12
+ def self.call(*args, **opts, &blk)
13
+ execute(*args, **opts, &blk)
14
14
  end
15
15
 
16
- def self.execute(*args, &blk)
17
- new(*args, &blk).execute
16
+ def self.execute(*args, **opts, &blk)
17
+ new(*args, **opts, &blk).execute
18
18
  end
19
19
 
20
- def self.execute!(*args, &blk)
21
- new(*args, &blk).execute!
20
+ def self.execute!(*args, **opts, &blk)
21
+ new(*args, **opts, &blk).execute!
22
22
  end
23
23
 
24
24
  def self.convert_errors(errors)
@@ -1,3 +1,3 @@
1
1
  module ServicePattern
2
- VERSION = "1.0.4".freeze
2
+ VERSION = "1.0.5".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: service_pattern
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - kaspernj
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-14 00:00:00.000000000 Z
11
+ date: 2021-12-30 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: ServicePattern for Ruby on Rails.
14
14
  email:
@@ -46,7 +46,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  requirements: []
49
- rubygems_version: 3.1.6
49
+ rubygems_version: 3.2.32
50
50
  signing_key:
51
51
  specification_version: 4
52
52
  summary: ServicePattern for Ruby on Rails.