ruby-state-machine 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +6 -0
- data/lib/ruby-state-machine.rb +1 -1
- data/lib/ruby-state-machine/state_machine.rb +4 -3
- metadata +3 -3
data/History.txt
CHANGED
@@ -23,4 +23,10 @@
|
|
23
23
|
* 1 bug fix:
|
24
24
|
* Fix initialize to call super when used on AR models.
|
25
25
|
|
26
|
+
== 1.0.2 2010-05-18
|
27
|
+
|
28
|
+
* 1 behavioral change:
|
29
|
+
* No longer returns to default state upon InvalidStateException. This was making several unit tests more difficult than necessary.
|
30
|
+
|
31
|
+
|
26
32
|
|
data/lib/ruby-state-machine.rb
CHANGED
@@ -83,9 +83,10 @@ module StateMachine
|
|
83
83
|
next_state_instruction = self.class.next_state_instruction(@current_state, event)
|
84
84
|
if next_state_instruction.nil?
|
85
85
|
cs = @current_state
|
86
|
-
|
87
|
-
|
88
|
-
|
86
|
+
# This was causing problems in unit tests:
|
87
|
+
# @current_state = default_state
|
88
|
+
# puts "Returned to default state: [#{@current_state}]."
|
89
|
+
raise InvalidStateError, "No valid next state for #{cs.inspect} using event #{event.inspect} (#{cs.class}/#{event.class})."
|
89
90
|
end
|
90
91
|
|
91
92
|
if(next_state_instruction)
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 1.0.
|
8
|
+
- 2
|
9
|
+
version: 1.0.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- stevenmiers
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-05-
|
17
|
+
date: 2010-05-18 00:00:00 -05:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|