MINT-statemachine 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +5 -0
- data/MINT-statemachine.gemspec +2 -2
- data/lib/statemachine/parallelstate.rb +1 -1
- data/lib/statemachine/transition.rb +1 -4
- data/lib/statemachine/version.rb +1 -1
- data/spec/sm_parallel_state_spec.rb +13 -1
- metadata +3 -3
data/CHANGES
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
= Statemachine Changelog
|
2
2
|
|
3
|
+
== Version 1.4.1 (2013/07/02)
|
4
|
+
|
5
|
+
* bug fixed: direct entry into a parallel state child state that has been already entered has not reseted parallel state
|
6
|
+
contents to initial.
|
7
|
+
|
3
8
|
== Version 1.4.0 (2013/07/02)
|
4
9
|
|
5
10
|
* Changed behavior: Entry into a parallel state that has been already entered before resets parallel state
|
data/MINT-statemachine.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "MINT-statemachine"
|
5
|
-
s.version = "1.4.
|
5
|
+
s.version = "1.4.1"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Sebastian Feuerstack"]
|
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.homepage = "http://www.multi-access.de"
|
14
14
|
s.require_paths = ["lib"]
|
15
15
|
s.rubygems_version = "1.8.15"
|
16
|
-
s.summary = "MINT-Statemachine-1.4.
|
16
|
+
s.summary = "MINT-Statemachine-1.4.1 - Statemachine Library for Ruby based on statemachine from http://slagyr.github.com/statemachine http://www.multi-access.de/open-source-software/third-party-software-extensions/"
|
17
17
|
s.test_files = ["spec/default_transition_spec.rb", "spec/sm_super_state_spec.rb", "spec/sm_action_parameterization_spec.rb", "spec/sm_entry_exit_actions_spec.rb", "spec/sm_simple_spec.rb", "spec/sm_parallel_state_spec.rb", "spec/transition_spec.rb", "spec/sm_activation_spec.rb", "spec/builder_spec.rb", "spec/action_invokation_spec.rb", "spec/sm_turnstile_spec.rb", "spec/history_spec.rb", "spec/sm_odds_n_ends_spec.rb"]
|
18
18
|
|
19
19
|
if s.respond_to? :specification_version then
|
@@ -43,10 +43,7 @@ module Statemachine
|
|
43
43
|
#entries.each { |entered_state| entered_state.activate(terminal_state.id) if entered_state.is_parallel }
|
44
44
|
statemachine.state = terminal_state if statemachine.has_state(terminal_state.id) and statemachine.is_parallel
|
45
45
|
|
46
|
-
|
47
|
-
if terminal_state.is_parallel
|
48
|
-
terminal_state.reset
|
49
|
-
end
|
46
|
+
|
50
47
|
|
51
48
|
if is_self_transition? # handle special case of self transition
|
52
49
|
new_states = [@destination_id]
|
data/lib/statemachine/version.rb
CHANGED
@@ -11,6 +11,7 @@ describe "Parallel states" do
|
|
11
11
|
trans :start,:go,:p
|
12
12
|
# state :maintenance
|
13
13
|
trans :maintenance,:go,:p
|
14
|
+
trans :maintenance,:go2,:locked
|
14
15
|
|
15
16
|
parallel :p do
|
16
17
|
event :activate_exit, :maintain
|
@@ -124,7 +125,7 @@ describe "Parallel states" do
|
|
124
125
|
@noodle2.cooked.should equal(true)
|
125
126
|
end
|
126
127
|
|
127
|
-
it "should support state recovery to initial state
|
128
|
+
it "should support state recovery to initial states upon entering the parallel super state if without history state" do
|
128
129
|
@sm.states=[:locked,:on]
|
129
130
|
@sm.toggle
|
130
131
|
@sm.states_id.should == [:locked,:off]
|
@@ -134,6 +135,17 @@ describe "Parallel states" do
|
|
134
135
|
@sm.states_id.should == [:locked,:on]
|
135
136
|
end
|
136
137
|
|
138
|
+
|
139
|
+
it "should support state recovery to initial states upon direct entering a child of the parallel super state if without history state" do
|
140
|
+
@sm.states=[:locked,:on]
|
141
|
+
@sm.toggle
|
142
|
+
@sm.states_id.should == [:locked,:off]
|
143
|
+
@sm.maintain
|
144
|
+
@sm.states_id.should == [:maintenance]
|
145
|
+
@sm.go2
|
146
|
+
@sm.states_id.should == [:locked,:on]
|
147
|
+
end
|
148
|
+
|
137
149
|
it "should support parallel states inside superstates" do
|
138
150
|
@sm = Statemachine.build do
|
139
151
|
trans :start,:go,:s
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: MINT-statemachine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -73,7 +73,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
73
73
|
version: '0'
|
74
74
|
segments:
|
75
75
|
- 0
|
76
|
-
hash:
|
76
|
+
hash: 115116705
|
77
77
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
78
78
|
none: false
|
79
79
|
requirements:
|
@@ -85,7 +85,7 @@ rubyforge_project:
|
|
85
85
|
rubygems_version: 1.8.15
|
86
86
|
signing_key:
|
87
87
|
specification_version: 3
|
88
|
-
summary: MINT-Statemachine-1.4.
|
88
|
+
summary: MINT-Statemachine-1.4.1 - Statemachine Library for Ruby based on statemachine
|
89
89
|
from http://slagyr.github.com/statemachine http://www.multi-access.de/open-source-software/third-party-software-extensions/
|
90
90
|
test_files:
|
91
91
|
- spec/default_transition_spec.rb
|