davidlee-state-fu 0.11.0 → 0.11.1
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/lib/{state_fu/binding.rb → binding.rb} +31 -33
- data/lib/{state_fu/event.rb → event.rb} +12 -17
- data/lib/{state_fu/executioner.rb → executioner.rb} +8 -19
- data/lib/{state_fu/hooks.rb → hooks.rb} +13 -10
- data/lib/{state_fu/interface.rb → interface.rb} +0 -0
- data/lib/{state_fu/lathe.rb → lathe.rb} +12 -2
- data/lib/{state_fu/machine.rb → machine.rb} +0 -0
- data/lib/{state_fu/method_factory.rb → method_factory.rb} +0 -0
- data/lib/{state_fu/persistence.rb → persistence.rb} +0 -0
- data/lib/{state_fu/persistence → persistence}/active_record.rb +0 -0
- data/lib/{state_fu/persistence → persistence}/attribute.rb +0 -0
- data/lib/{state_fu/persistence → persistence}/base.rb +0 -0
- data/lib/{state_fu/persistence → persistence}/relaxdb.rb +0 -0
- data/lib/{state_fu/persistence → persistence}/session.rb +0 -0
- data/lib/{state_fu/sprocket.rb → sprocket.rb} +0 -0
- data/lib/state-fu.rb +11 -52
- data/lib/{state_fu/state.rb → state.rb} +0 -0
- data/lib/{state_fu → support}/active_support_lite/array.rb +0 -0
- data/lib/{state_fu → support}/active_support_lite/array/access.rb +0 -0
- data/lib/{state_fu → support}/active_support_lite/array/conversions.rb +0 -0
- data/lib/{state_fu → support}/active_support_lite/array/extract_options.rb +0 -0
- data/lib/{state_fu → support}/active_support_lite/array/grouping.rb +0 -0
- data/lib/{state_fu → support}/active_support_lite/array/random_access.rb +0 -0
- data/lib/{state_fu → support}/active_support_lite/array/wrapper.rb +0 -0
- data/lib/{state_fu → support}/active_support_lite/blank.rb +0 -0
- data/lib/{state_fu → support}/active_support_lite/cattr_reader.rb +0 -0
- data/lib/{state_fu → support}/active_support_lite/keys.rb +0 -0
- data/lib/{state_fu → support}/active_support_lite/misc.rb +0 -0
- data/lib/{state_fu → support}/active_support_lite/module.rb +0 -0
- data/lib/{state_fu → support}/active_support_lite/module/delegation.rb +0 -0
- data/lib/{state_fu → support}/active_support_lite/object.rb +0 -0
- data/lib/{state_fu → support}/active_support_lite/string.rb +0 -0
- data/lib/{state_fu → support}/active_support_lite/symbol.rb +0 -0
- data/lib/{state_fu → support}/applicable.rb +0 -0
- data/lib/{state_fu → support}/arrays.rb +0 -0
- data/lib/{state_fu → support}/core_ext.rb +1 -0
- data/lib/{state_fu → support}/exceptions.rb +0 -0
- data/lib/{state_fu → support}/has_options.rb +0 -0
- data/lib/{state_fu → support}/logger.rb +0 -0
- data/lib/{state_fu → support}/methodical.rb +0 -0
- data/lib/{no_stdout.rb → support/no_stdout.rb} +0 -0
- data/lib/{state_fu → support}/plotter.rb +1 -1
- data/lib/{vizier.rb → support/vizier.rb} +0 -0
- data/lib/{state_fu/transition.rb → transition.rb} +5 -4
- data/lib/{state_fu/transition_query.rb → transition_query.rb} +44 -67
- data/spec/integration/state_definition_spec.rb +0 -20
- data/spec/integration/transition_spec.rb +1 -1
- data/spec/state_fu_spec.rb +127 -127
- metadata +47 -48
- data/lib/state_fu.rb +0 -1
- data/lib/state_fu/nil_transition.rb +0 -49
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: davidlee-state-fu
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.11.
|
|
4
|
+
version: 0.11.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Lee
|
|
@@ -24,55 +24,53 @@ extra_rdoc_files:
|
|
|
24
24
|
- README.textile
|
|
25
25
|
files:
|
|
26
26
|
- Rakefile
|
|
27
|
-
- lib/
|
|
27
|
+
- lib/binding.rb
|
|
28
|
+
- lib/event.rb
|
|
29
|
+
- lib/executioner.rb
|
|
30
|
+
- lib/hooks.rb
|
|
31
|
+
- lib/interface.rb
|
|
32
|
+
- lib/lathe.rb
|
|
33
|
+
- lib/machine.rb
|
|
34
|
+
- lib/method_factory.rb
|
|
35
|
+
- lib/persistence.rb
|
|
36
|
+
- lib/persistence/active_record.rb
|
|
37
|
+
- lib/persistence/attribute.rb
|
|
38
|
+
- lib/persistence/base.rb
|
|
39
|
+
- lib/persistence/relaxdb.rb
|
|
40
|
+
- lib/persistence/session.rb
|
|
41
|
+
- lib/sprocket.rb
|
|
28
42
|
- lib/state-fu.rb
|
|
29
|
-
- lib/
|
|
30
|
-
- lib/
|
|
31
|
-
- lib/
|
|
32
|
-
- lib/
|
|
33
|
-
- lib/
|
|
34
|
-
- lib/
|
|
35
|
-
- lib/
|
|
36
|
-
- lib/
|
|
37
|
-
- lib/
|
|
38
|
-
- lib/
|
|
39
|
-
- lib/
|
|
40
|
-
- lib/
|
|
41
|
-
- lib/
|
|
42
|
-
- lib/
|
|
43
|
-
- lib/
|
|
44
|
-
- lib/
|
|
45
|
-
- lib/
|
|
46
|
-
- lib/
|
|
47
|
-
- lib/
|
|
48
|
-
- lib/
|
|
49
|
-
- lib/
|
|
50
|
-
- lib/
|
|
51
|
-
- lib/
|
|
52
|
-
- lib/
|
|
53
|
-
- lib/
|
|
54
|
-
- lib/
|
|
55
|
-
- lib/
|
|
56
|
-
- lib/state_fu/lathe.rb
|
|
57
|
-
- lib/state_fu/logger.rb
|
|
58
|
-
- lib/state_fu/machine.rb
|
|
59
|
-
- lib/state_fu/method_factory.rb
|
|
60
|
-
- lib/state_fu/methodical.rb
|
|
61
|
-
- lib/state_fu/nil_transition.rb
|
|
62
|
-
- lib/state_fu/persistence.rb
|
|
63
|
-
- lib/state_fu/persistence/active_record.rb
|
|
64
|
-
- lib/state_fu/persistence/attribute.rb
|
|
65
|
-
- lib/state_fu/persistence/base.rb
|
|
66
|
-
- lib/state_fu/persistence/relaxdb.rb
|
|
67
|
-
- lib/state_fu/persistence/session.rb
|
|
68
|
-
- lib/state_fu/plotter.rb
|
|
69
|
-
- lib/state_fu/sprocket.rb
|
|
70
|
-
- lib/state_fu/state.rb
|
|
71
|
-
- lib/state_fu/transition.rb
|
|
72
|
-
- lib/state_fu/transition_query.rb
|
|
43
|
+
- lib/state.rb
|
|
44
|
+
- lib/support/active_support_lite/array.rb
|
|
45
|
+
- lib/support/active_support_lite/array/access.rb
|
|
46
|
+
- lib/support/active_support_lite/array/conversions.rb
|
|
47
|
+
- lib/support/active_support_lite/array/extract_options.rb
|
|
48
|
+
- lib/support/active_support_lite/array/grouping.rb
|
|
49
|
+
- lib/support/active_support_lite/array/random_access.rb
|
|
50
|
+
- lib/support/active_support_lite/array/wrapper.rb
|
|
51
|
+
- lib/support/active_support_lite/blank.rb
|
|
52
|
+
- lib/support/active_support_lite/cattr_reader.rb
|
|
53
|
+
- lib/support/active_support_lite/keys.rb
|
|
54
|
+
- lib/support/active_support_lite/misc.rb
|
|
55
|
+
- lib/support/active_support_lite/module.rb
|
|
56
|
+
- lib/support/active_support_lite/module/delegation.rb
|
|
57
|
+
- lib/support/active_support_lite/object.rb
|
|
58
|
+
- lib/support/active_support_lite/string.rb
|
|
59
|
+
- lib/support/active_support_lite/symbol.rb
|
|
60
|
+
- lib/support/applicable.rb
|
|
61
|
+
- lib/support/arrays.rb
|
|
62
|
+
- lib/support/core_ext.rb
|
|
63
|
+
- lib/support/exceptions.rb
|
|
64
|
+
- lib/support/has_options.rb
|
|
65
|
+
- lib/support/logger.rb
|
|
66
|
+
- lib/support/methodical.rb
|
|
67
|
+
- lib/support/no_stdout.rb
|
|
68
|
+
- lib/support/plotter.rb
|
|
69
|
+
- lib/support/vizier.rb
|
|
73
70
|
- lib/tasks/spec_last.rake
|
|
74
71
|
- lib/tasks/state_fu.rake
|
|
75
|
-
- lib/
|
|
72
|
+
- lib/transition.rb
|
|
73
|
+
- lib/transition_query.rb
|
|
76
74
|
- spec/custom_formatter.rb
|
|
77
75
|
- spec/features/binding_and_transition_helper_mixin_spec.rb
|
|
78
76
|
- spec/features/method_missing_only_once_spec.rb
|
|
@@ -111,6 +109,7 @@ files:
|
|
|
111
109
|
- README.textile
|
|
112
110
|
has_rdoc: false
|
|
113
111
|
homepage: http://github.com/davidlee/state-fu
|
|
112
|
+
licenses:
|
|
114
113
|
post_install_message:
|
|
115
114
|
rdoc_options:
|
|
116
115
|
- --charset=UTF-8
|
|
@@ -131,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
131
130
|
requirements: []
|
|
132
131
|
|
|
133
132
|
rubyforge_project: state-fu
|
|
134
|
-
rubygems_version: 1.
|
|
133
|
+
rubygems_version: 1.3.5
|
|
135
134
|
signing_key:
|
|
136
135
|
specification_version: 3
|
|
137
136
|
summary: A rich library for state-oriented programming with state machines / workflows
|
data/lib/state_fu.rb
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require File.expand_path(File.join(File.basename(__FILE__, 'state-fu')))
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
module StateFu
|
|
2
|
-
|
|
3
|
-
class NilTransition
|
|
4
|
-
def method_missing(method_name, *args, &block)
|
|
5
|
-
nil
|
|
6
|
-
end
|
|
7
|
-
|
|
8
|
-
def blank?
|
|
9
|
-
true
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def nil?
|
|
13
|
-
true
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
# def <=> x
|
|
17
|
-
# false <=> x
|
|
18
|
-
# end
|
|
19
|
-
#
|
|
20
|
-
# def | x
|
|
21
|
-
# false
|
|
22
|
-
# end
|
|
23
|
-
#
|
|
24
|
-
# def & x
|
|
25
|
-
# false
|
|
26
|
-
# end
|
|
27
|
-
#
|
|
28
|
-
# def ^ x
|
|
29
|
-
# false
|
|
30
|
-
# end
|
|
31
|
-
#
|
|
32
|
-
# def equal? x
|
|
33
|
-
# x.is_a? NilTransition || x == nil
|
|
34
|
-
# end
|
|
35
|
-
|
|
36
|
-
def == x
|
|
37
|
-
case x
|
|
38
|
-
when false
|
|
39
|
-
true
|
|
40
|
-
when true
|
|
41
|
-
false
|
|
42
|
-
else
|
|
43
|
-
nil
|
|
44
|
-
end
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
end
|