aasm 5.4.0 → 5.5.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: 7d206aa3c586ccaa0d24a9096e78bf0fbb8a80b4e981538a7e1b016a389e8edc
4
- data.tar.gz: 64f6da6f80a5f7e76aed9cc422c9c401fa62ba30f02493e24d78caf58a6a4de2
3
+ metadata.gz: a088e1285940890f3c1a87b6cf0534e80702a96d2fb6eb42b43ff0cf50e6c57d
4
+ data.tar.gz: b96c64d2458639d217540b8787b1f718d80cd8e64b2661825435a795d5796a93
5
5
  SHA512:
6
- metadata.gz: 0d1f425fa7bdf12b633f97621e28d0376c1582bb2cc131d96a9c7d1df1550e2c68a9019e7a28d5c56fa6fa9099ce4a021d5b1e6003ccfb364125688f78ea4f4a
7
- data.tar.gz: 78819143fc5c9bf3d52ec545a9a8d2ab174bbff1ac4eb3ff38e4a49524654c24aa585c43b9f9e39440284612b8a72913927ebb3eb0fd7392ca197270fd02ad9f
6
+ metadata.gz: 85a0532a6257477070680b2864c27191f618a61091fe9ba0c2c0672e99aa53c4b61968e4987607c4e5747bb42686cff6667966c90cf4592e87ad0324175e711c
7
+ data.tar.gz: 1abfc89101b1cdf7440a82446b6c600d65fe6f2bfc83575a85dc2ef0edb04968cc509c9ff88ec2ce68f4aa8b72283f75301a0fcfefffa16fc0347cb31f11c492
@@ -17,7 +17,7 @@ module AASM
17
17
  end
18
18
 
19
19
  def invoke_subject
20
- @result = retrieve_instance.call
20
+ @result = instance.call
21
21
  end
22
22
 
23
23
  private
@@ -30,7 +30,9 @@ module AASM
30
30
  raise(*record_error) unless record.respond_to?(subject, true)
31
31
  return record.__send__(subject) if subject_arity.zero?
32
32
  return record.__send__(subject, *args) if subject_arity < 0
33
- record.__send__(subject, *args[0..(subject_arity - 1)])
33
+ req_args = args[0..(subject_arity - 1)]
34
+ return record.__send__(subject, **req_args[0]) if req_args[0].is_a?(Hash)
35
+ record.__send__(subject, *req_args)
34
36
  end
35
37
  # rubocop:enable Metrics/AbcSize
36
38
 
data/lib/aasm/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module AASM
2
- VERSION = "5.4.0"
2
+ VERSION = "5.5.0"
3
3
  end
@@ -29,7 +29,7 @@ RUBY
29
29
  end
30
30
 
31
31
  def model_exists?
32
- File.exists?(File.join(destination_root, model_path))
32
+ File.exist?(File.join(destination_root, model_path))
33
33
  end
34
34
 
35
35
  def model_path
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aasm
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.4.0
4
+ version: 5.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thorsten Boettger
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-10-07 00:00:00.000000000 Z
12
+ date: 2023-02-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: concurrent-ruby
@@ -214,7 +214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
214
214
  - !ruby/object:Gem::Version
215
215
  version: '0'
216
216
  requirements: []
217
- rubygems_version: 3.0.3
217
+ rubygems_version: 3.0.9
218
218
  signing_key:
219
219
  specification_version: 4
220
220
  summary: State machine mixin for Ruby objects