yasm 0.0.9 → 0.0.10
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/CHANGELOG +3 -0
- data/Gemfile.lock +1 -1
- data/VERSION +1 -1
- data/features/states_with_context.feature +5 -0
- data/features/step_definitions/persistence/couchrest_model_persistence_steps.rb +5 -1
- data/features/step_definitions/states_with_context_steps.rb +15 -0
- data/lib/yasm/manager.rb +1 -0
- data/lib/yasm/state.rb +1 -0
- metadata +5 -1
data/CHANGELOG
CHANGED
data/Gemfile.lock
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.10
|
@@ -19,6 +19,9 @@ Given /^a couchrest model context$/ do
|
|
19
19
|
include Yasm::Context
|
20
20
|
|
21
21
|
start :couch_state1
|
22
|
+
property :user
|
23
|
+
|
24
|
+
view_by :user
|
22
25
|
end
|
23
26
|
class CouchState1
|
24
27
|
include Yasm::State
|
@@ -30,10 +33,11 @@ Given /^a couchrest model context$/ do
|
|
30
33
|
include Yasm::Action
|
31
34
|
triggers :couch_state2
|
32
35
|
end
|
33
|
-
@couch_context = CouchContext.
|
36
|
+
@couch_context = CouchContext.create! :user => "moonmaster9000"
|
34
37
|
end
|
35
38
|
|
36
39
|
When /^I save that context to CouchDB$/ do
|
40
|
+
@couch_context.save
|
37
41
|
@couch_context.do! GoToState2
|
38
42
|
@state_start_time = @couch_context.state.value.instantiated_at
|
39
43
|
@couch_context.save
|
@@ -0,0 +1,15 @@
|
|
1
|
+
Given /^a context with a state$/ do
|
2
|
+
class ContextWithState
|
3
|
+
include Yasm::Context
|
4
|
+
start :some_state
|
5
|
+
end
|
6
|
+
|
7
|
+
class SomeState
|
8
|
+
include Yasm::State
|
9
|
+
end
|
10
|
+
@context_with_state = ContextWithState.new
|
11
|
+
end
|
12
|
+
|
13
|
+
Then /^I should be able to access the context from the state$/ do
|
14
|
+
@context_with_state.state.value.context.should == @context_with_state
|
15
|
+
end
|
data/lib/yasm/manager.rb
CHANGED
data/lib/yasm/state.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: yasm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.10
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Matt Parker
|
@@ -89,12 +89,14 @@ files:
|
|
89
89
|
- features/final_states.feature
|
90
90
|
- features/persistance/couchrest_model_persistance.feature
|
91
91
|
- features/state_with_limited_actions.feature
|
92
|
+
- features/states_with_context.feature
|
92
93
|
- features/states_with_time_limits.feature
|
93
94
|
- features/step_definitions/action_callback_steps.rb
|
94
95
|
- features/step_definitions/action_steps.rb
|
95
96
|
- features/step_definitions/final_state_steps.rb
|
96
97
|
- features/step_definitions/persistence/couchrest_model_persistence_steps.rb
|
97
98
|
- features/step_definitions/state_with_limited_actions_steps.rb
|
99
|
+
- features/step_definitions/states_with_context_steps.rb
|
98
100
|
- features/step_definitions/states_with_time_limits_steps.rb
|
99
101
|
- features/support/setup.rb
|
100
102
|
- lib/yasm.rb
|
@@ -148,11 +150,13 @@ test_files:
|
|
148
150
|
- features/final_states.feature
|
149
151
|
- features/persistance/couchrest_model_persistance.feature
|
150
152
|
- features/state_with_limited_actions.feature
|
153
|
+
- features/states_with_context.feature
|
151
154
|
- features/states_with_time_limits.feature
|
152
155
|
- features/step_definitions/action_callback_steps.rb
|
153
156
|
- features/step_definitions/action_steps.rb
|
154
157
|
- features/step_definitions/final_state_steps.rb
|
155
158
|
- features/step_definitions/persistence/couchrest_model_persistence_steps.rb
|
156
159
|
- features/step_definitions/state_with_limited_actions_steps.rb
|
160
|
+
- features/step_definitions/states_with_context_steps.rb
|
157
161
|
- features/step_definitions/states_with_time_limits_steps.rb
|
158
162
|
- features/support/setup.rb
|