cequel_stateful_enum 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cequel_stateful_enum.gemspec +1 -1
- data/lib/cequel_stateful_enum/machine.rb +6 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4002b66bd606fc5646179bcd053a6d466f9a64dc
|
4
|
+
data.tar.gz: ff1294f37ea2e247056e40831e62cc02a3db68c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99e33a907d0930f0ba19748e8f02659f4159384586f686f6d0212ff115c8f1d6f2188e662a32cb49fee180c71d67b2f63bdd0088ca9a3a0631a390f253fe515e
|
7
|
+
data.tar.gz: 4a541d78cbc7baed8f58fdb749478f4674b126b29e4889696b521b0bfd73d0a527c5dc82900c9b68ff5419a8f96e34a2af8c0e6db3e5cb8e43e33b58d0fd8138
|
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |spec|
|
5
5
|
spec.name = 'cequel_stateful_enum'
|
6
|
-
spec.version = '1.1.
|
6
|
+
spec.version = '1.1.1'
|
7
7
|
spec.authors = ['Xanders', 'Akira Matsuda']
|
8
8
|
spec.email = ['necropolis@inbox.ru', 'ronnie@dio.jp']
|
9
9
|
|
@@ -52,7 +52,12 @@ module CequelStatefulEnum
|
|
52
52
|
end
|
53
53
|
|
54
54
|
define_method can do |danger: false|
|
55
|
-
from = send(column)
|
55
|
+
from = send(column)
|
56
|
+
unless from.kind_of?(String) || from.kind_of?(Symbol)
|
57
|
+
raise StateError, "can't fire #{name} event from unknown state #{from.inspect}" if danger
|
58
|
+
return false
|
59
|
+
end
|
60
|
+
from = from.to_sym
|
56
61
|
to, condition = transitions[from]
|
57
62
|
if !to
|
58
63
|
raise StateError, "can't fire #{name} event from state #{from}" if danger
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cequel_stateful_enum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Xanders
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-04-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cequel
|