on_strum-service 1.0.2 → 1.1.0

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: 7131fa690f8510959fdfccd7f88c46541e9b59cec92dd8e01fdd9bc33ce364af
4
- data.tar.gz: c0b7d320b5aad204d47c573db2e27808144f654be203c9f90483821224a7ab5c
3
+ metadata.gz: 7d777a3659a501c17e784ff331b152e5dad518a57a19da6b9ba073051fa7b35e
4
+ data.tar.gz: 7c6d10faaadbe712b2fa3e1721fc311369697cf8a7f7c52005e72e9f29092fde
5
5
  SHA512:
6
- metadata.gz: 8195cc677e846f06ed52ca7672a919674156e045fbddb0147c473a698e574ff403503f5a0330caf3bd5f08e28af3a0895f377af4493a9294a850b3b18ba4cb74
7
- data.tar.gz: 9f4c30ab307aaa38a14f7de2c1899baec4f4339ea441a374603079eff31801f743fd27214daebc1e73e8c3d667b5ffde9d8172e7ec768ff465f00e6ebee34a9b
6
+ metadata.gz: 137d0b95b48b72a11e00882ccd42cd73e6ba977a255f35af6484631b5904c7bd325b1dcaa566c8d516bc5be660c21d2212f5ed8927983a5a20e47ba5f7c8962f
7
+ data.tar.gz: 78f4c9f1c777e2aecf531640be2665dea8645bff9dfe3599420708d551b05c3d194ffdc356617d9599236d6cea13996c40ae0358765ce623cedb770b2174ce10
@@ -3,8 +3,11 @@
3
3
  module OnStrum
4
4
  module Service
5
5
  module ClassMethods
6
- def call(ctx, **args, &block)
7
- new(ctx, **args).execute(&block)
6
+ def call(*args, **kwargs, &block)
7
+ # For Ruby 2.7: call({key: 'value'}) -> args=[], kwargs={key: 'value'}
8
+ # For Ruby 3.0: call({key: 'value'}) -> args=[{key: 'value'}], kwargs={}
9
+ ctx = ::RUBY_VERSION < '3.0' && args.empty? ? kwargs : args.first
10
+ new(ctx || {}, **kwargs).execute(&block)
8
11
  end
9
12
  end
10
13
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OnStrum
4
4
  module Service
5
- VERSION = '1.0.2'
5
+ VERSION = '1.1.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: on_strum-service
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Serhiy Nazarov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-01-03 00:00:00.000000000 Z
11
+ date: 2025-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake