status_workflow 3.0.0 → 3.0.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
  SHA1:
3
- metadata.gz: 130b12c5b45db744a86537b671118ce01f0b1be9
4
- data.tar.gz: 912a5a9530aa43e9cf1c0c96af814352f2acbf49
3
+ metadata.gz: eb9130d6f16327b6b45eede2597c13cde33c20dc
4
+ data.tar.gz: '08197cc5822f7b153e01c691d0f21166a1942414'
5
5
  SHA512:
6
- metadata.gz: f943c7f5188f83493092bd7474878f8f4f47acdc262c1cd08d4fe581d4a1056bf38b4f537b5eab8713af0016e34c2602d1a389ad39c0ae95f3a6c7a99117edd2
7
- data.tar.gz: 484a3306cb84e9f2bfe0f100c51dac8c9cbbccc798943bf5d6f36b07c0e1bf560c15ad0580b1ae19cbc9dd4fda2c6d97e22ceba6341b92a1b1c92ad0159409b1
6
+ metadata.gz: 3c5f5b2008ed00ddb9c6f0ace025e0f6ae2753101fae3be9d88d52712551595b3720f7724de94470e13a16bf74e64d6310382c10f15ce9c9cec879f35cf3ec14
7
+ data.tar.gz: bef5b253cc517f759915498e7c43ea6d65f75e4e7b99935304fe83d6b60a89c44521f8afb1482bea0fd7c7c4c1ac09eedc234be9a9ce384bc5d36fdc723d8c08
data/CHANGELOG CHANGED
@@ -1,3 +1,13 @@
1
+ 3.0.1 / 2018-10-24
2
+
3
+ Enhancements
4
+
5
+ * Always allow entering error
6
+
7
+ Bug fixes
8
+
9
+ * Don't fail if transition map is specified as strings
10
+
1
11
  3.0.0 / 2018-10-24
2
12
 
3
13
  Breaking changes
@@ -96,10 +96,16 @@ module StatusWorkflow
96
96
  end
97
97
  transitions.inject({}) do |memo, (from_status, to_statuses)|
98
98
  to_statuses.each do |to_status|
99
+ to_status = to_status.to_sym
99
100
  memo[to_status] ||= Set.new
100
- memo[to_status] << from_status
101
+ memo[to_status] << from_status.to_sym
101
102
  end
102
103
  memo
104
+ end.tap do |to_from|
105
+ to_from[:error] = Set.new
106
+ to_from.each do |to_status, from_statuses|
107
+ to_from[:error].merge from_statuses
108
+ end
103
109
  end.each do |to_status, from_statuses|
104
110
  define_method "#{prefix_}enter_#{to_status}!" do
105
111
  send "#{prefix_}status_transition!", nil, to_status
@@ -1,3 +1,3 @@
1
1
  module StatusWorkflow
2
- VERSION = '3.0.0'
2
+ VERSION = '3.0.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: status_workflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seamus Abshere