ruby-state-machine 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
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
 
@@ -2,5 +2,5 @@ $:.unshift(File.dirname(__FILE__)) unless
2
2
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
3
3
 
4
4
  module RubyStateMachine
5
- VERSION = '1.0.1'
5
+ VERSION = '1.0.2'
6
6
  end
@@ -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
- @current_state = default_state
87
- puts "Returned to default state: [#{@current_state}]."
88
- raise InvalidStateError, "No valid next state for #{cs} using event #{event} (#{cs.class}/#{event.class})."
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
- - 1
9
- version: 1.0.1
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-03 00:00:00 -05:00
17
+ date: 2010-05-18 00:00:00 -05:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency