apollo 1.3.0.beta.2 → 1.3.0.beta.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +2 -2
- data/VERSION +1 -1
- data/apollo.gemspec +7 -7
- data/lib/apollo.rb +5 -5
- data/lib/apollo/active_record_extensions.rb +5 -7
- metadata +12 -7
data/Rakefile
CHANGED
@@ -6,9 +6,9 @@ begin
|
|
6
6
|
Jeweler::Tasks.new do |gem|
|
7
7
|
gem.name = "apollo"
|
8
8
|
gem.summary = %Q{A fork of workflow: a finite-state-machine-inspired API for modeling and interacting with what we tend to refer to as 'workflow'.}
|
9
|
-
gem.email =
|
9
|
+
gem.email = ['warlickt@operissystems.com', 'cfis@zerista.com', 'chambb1@gmail.com']
|
10
10
|
gem.homepage = "http://github.com/tekwiz/apollo"
|
11
|
-
gem.authors = ["Travis D. Warlick, Jr."]
|
11
|
+
gem.authors = ["Travis D. Warlick, Jr.", "Charlie Savage", "Blake Chambers"]
|
12
12
|
# gem.add_development_dependency "rspec", "~> 1.3.0"
|
13
13
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
14
14
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.3.0.beta.
|
1
|
+
1.3.0.beta.3
|
data/apollo.gemspec
CHANGED
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{apollo}
|
8
|
-
s.version = "1.3.0.beta.
|
8
|
+
s.version = "1.3.0.beta.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = ["Travis D. Warlick, Jr."]
|
12
|
-
s.date = %q{2010-
|
13
|
-
s.email =
|
11
|
+
s.authors = ["Travis D. Warlick, Jr.", "Charlie Savage", "Blake Chambers"]
|
12
|
+
s.date = %q{2010-06-01}
|
13
|
+
s.email = ["warlickt@operissystems.com", "cfis@zerista.com", "chambb1@gmail.com"]
|
14
14
|
s.extra_rdoc_files = [
|
15
15
|
"LICENSE",
|
16
16
|
"README.md"
|
@@ -42,11 +42,11 @@ Gem::Specification.new do |s|
|
|
42
42
|
s.rubygems_version = %q{1.3.7}
|
43
43
|
s.summary = %q{A fork of workflow: a finite-state-machine-inspired API for modeling and interacting with what we tend to refer to as 'workflow'.}
|
44
44
|
s.test_files = [
|
45
|
-
"test/
|
46
|
-
"test/couchtiny_example.rb",
|
45
|
+
"test/couchtiny_example.rb",
|
47
46
|
"test/main_test.rb",
|
47
|
+
"test/readme_example.rb",
|
48
48
|
"test/test_helper.rb",
|
49
|
-
"test/
|
49
|
+
"test/without_active_record_test.rb"
|
50
50
|
]
|
51
51
|
|
52
52
|
if s.respond_to? :specification_version then
|
data/lib/apollo.rb
CHANGED
@@ -89,6 +89,10 @@ module Apollo
|
|
89
89
|
res || spec.initial_state
|
90
90
|
end
|
91
91
|
|
92
|
+
def current_state=(new_value)
|
93
|
+
@current_state = new_value.to_s
|
94
|
+
end
|
95
|
+
|
92
96
|
def halted?
|
93
97
|
@halted
|
94
98
|
end
|
@@ -163,7 +167,7 @@ module Apollo
|
|
163
167
|
|
164
168
|
def transition(from, to, name, *args)
|
165
169
|
run_on_exit(from, to, name, *args)
|
166
|
-
|
170
|
+
self.current_state = to
|
167
171
|
run_on_entry(to, from, name, *args)
|
168
172
|
end
|
169
173
|
|
@@ -209,10 +213,6 @@ module Apollo
|
|
209
213
|
def load_current_state
|
210
214
|
@current_state if instance_variable_defined? :@current_state
|
211
215
|
end
|
212
|
-
|
213
|
-
def persist_current_state(new_value)
|
214
|
-
@current_state = new_value
|
215
|
-
end
|
216
216
|
end
|
217
217
|
|
218
218
|
def self.included(klass)
|
@@ -9,15 +9,13 @@ module Apollo
|
|
9
9
|
end
|
10
10
|
end
|
11
11
|
|
12
|
-
|
13
|
-
# database.
|
14
|
-
def persist_current_state(new_value)
|
12
|
+
def current_state=(new_value)
|
15
13
|
if self.class.persist_string_state_name?
|
16
|
-
|
14
|
+
self[self.class.current_state_column] = new_value
|
17
15
|
else
|
18
|
-
|
19
|
-
|
20
|
-
|
16
|
+
self[self.class.current_state_id_column] = self.class.state_name_to_id(new_value)
|
17
|
+
end
|
18
|
+
self.save! unless self.new_record?
|
21
19
|
end
|
22
20
|
|
23
21
|
private
|
metadata
CHANGED
@@ -1,28 +1,33 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: apollo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 62196405
|
5
5
|
prerelease: true
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 3
|
9
9
|
- 0
|
10
10
|
- beta
|
11
|
-
-
|
12
|
-
version: 1.3.0.beta.
|
11
|
+
- 3
|
12
|
+
version: 1.3.0.beta.3
|
13
13
|
platform: ruby
|
14
14
|
authors:
|
15
15
|
- Travis D. Warlick, Jr.
|
16
|
+
- Charlie Savage
|
17
|
+
- Blake Chambers
|
16
18
|
autorequire:
|
17
19
|
bindir: bin
|
18
20
|
cert_chain: []
|
19
21
|
|
20
|
-
date: 2010-
|
22
|
+
date: 2010-06-01 00:00:00 -05:00
|
21
23
|
default_executable:
|
22
24
|
dependencies: []
|
23
25
|
|
24
26
|
description:
|
25
|
-
email:
|
27
|
+
email:
|
28
|
+
- warlickt@operissystems.com
|
29
|
+
- cfis@zerista.com
|
30
|
+
- chambb1@gmail.com
|
26
31
|
executables: []
|
27
32
|
|
28
33
|
extensions: []
|
@@ -87,8 +92,8 @@ signing_key:
|
|
87
92
|
specification_version: 3
|
88
93
|
summary: "A fork of workflow: a finite-state-machine-inspired API for modeling and interacting with what we tend to refer to as 'workflow'."
|
89
94
|
test_files:
|
90
|
-
- test/without_active_record_test.rb
|
91
95
|
- test/couchtiny_example.rb
|
92
96
|
- test/main_test.rb
|
93
|
-
- test/test_helper.rb
|
94
97
|
- test/readme_example.rb
|
98
|
+
- test/test_helper.rb
|
99
|
+
- test/without_active_record_test.rb
|