apollo 1.3.0.beta.2 → 1.3.0.beta.3

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/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 = "warlickt@operissystems.com"
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.2
1
+ 1.3.0.beta.3
@@ -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.2"
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-05-25}
13
- s.email = %q{warlickt@operissystems.com}
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/without_active_record_test.rb",
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/readme_example.rb"
49
+ "test/without_active_record_test.rb"
50
50
  ]
51
51
 
52
52
  if s.respond_to? :specification_version then
@@ -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
- persist_current_state to.to_s
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
- # On transition the new current state is immediately saved in the
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
- update_attribute self.class.current_state_column, new_value
14
+ self[self.class.current_state_column] = new_value
17
15
  else
18
- update_attribute self.class.current_state_id_column,
19
- self.class.state_name_to_id(new_value)
20
- end
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: 62196407
4
+ hash: 62196405
5
5
  prerelease: true
6
6
  segments:
7
7
  - 1
8
8
  - 3
9
9
  - 0
10
10
  - beta
11
- - 2
12
- version: 1.3.0.beta.2
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-05-25 00:00:00 -05:00
22
+ date: 2010-06-01 00:00:00 -05:00
21
23
  default_executable:
22
24
  dependencies: []
23
25
 
24
26
  description:
25
- email: warlickt@operissystems.com
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