state_machine 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. data/.gitignore +1 -0
  2. data/.travis.yml +0 -2
  3. data/.yardopts +3 -2
  4. data/Appraisals +48 -0
  5. data/{CHANGELOG.rdoc → CHANGELOG.md} +63 -46
  6. data/README.md +1029 -0
  7. data/gemfiles/active_model-3.0.0.gemfile.lock +1 -3
  8. data/gemfiles/active_model-3.0.5.gemfile.lock +1 -3
  9. data/gemfiles/active_model-3.1.1.gemfile +7 -0
  10. data/gemfiles/active_model-3.1.1.gemfile.lock +32 -0
  11. data/gemfiles/active_record-2.0.0.gemfile.lock +1 -3
  12. data/gemfiles/active_record-2.0.5.gemfile.lock +1 -3
  13. data/gemfiles/active_record-2.1.0.gemfile.lock +1 -3
  14. data/gemfiles/active_record-2.1.2.gemfile.lock +1 -3
  15. data/gemfiles/active_record-2.2.3.gemfile.lock +1 -3
  16. data/gemfiles/active_record-2.3.12.gemfile.lock +1 -3
  17. data/gemfiles/active_record-3.0.0.gemfile.lock +1 -3
  18. data/gemfiles/active_record-3.0.5.gemfile.lock +1 -3
  19. data/gemfiles/active_record-3.1.1.gemfile +8 -0
  20. data/gemfiles/active_record-3.1.1.gemfile.lock +43 -0
  21. data/gemfiles/data_mapper-0.10.2.gemfile.lock +1 -3
  22. data/gemfiles/data_mapper-0.9.11.gemfile.lock +1 -3
  23. data/gemfiles/data_mapper-0.9.4.gemfile.lock +1 -3
  24. data/gemfiles/data_mapper-0.9.7.gemfile.lock +1 -3
  25. data/gemfiles/data_mapper-1.0.0.gemfile.lock +1 -3
  26. data/gemfiles/data_mapper-1.0.1.gemfile.lock +1 -3
  27. data/gemfiles/data_mapper-1.0.2.gemfile.lock +1 -3
  28. data/gemfiles/data_mapper-1.1.0.gemfile.lock +1 -3
  29. data/gemfiles/data_mapper-1.2.0.gemfile +12 -0
  30. data/gemfiles/data_mapper-1.2.0.gemfile.lock +49 -0
  31. data/gemfiles/default.gemfile.lock +1 -3
  32. data/gemfiles/graphviz-0.9.0.gemfile +7 -0
  33. data/gemfiles/graphviz-0.9.0.gemfile.lock +24 -0
  34. data/gemfiles/graphviz-0.9.21.gemfile +7 -0
  35. data/gemfiles/graphviz-0.9.21.gemfile.lock +24 -0
  36. data/gemfiles/graphviz-1.0.0.gemfile +7 -0
  37. data/gemfiles/graphviz-1.0.0.gemfile.lock +24 -0
  38. data/gemfiles/mongo_mapper-0.10.0.gemfile +7 -0
  39. data/gemfiles/mongo_mapper-0.10.0.gemfile.lock +41 -0
  40. data/gemfiles/mongo_mapper-0.5.5.gemfile.lock +1 -3
  41. data/gemfiles/mongo_mapper-0.5.8.gemfile.lock +1 -3
  42. data/gemfiles/mongo_mapper-0.6.0.gemfile.lock +1 -3
  43. data/gemfiles/mongo_mapper-0.6.10.gemfile.lock +1 -3
  44. data/gemfiles/mongo_mapper-0.7.0.gemfile.lock +1 -3
  45. data/gemfiles/mongo_mapper-0.7.5.gemfile.lock +1 -3
  46. data/gemfiles/mongo_mapper-0.8.0.gemfile.lock +1 -3
  47. data/gemfiles/mongo_mapper-0.8.3.gemfile.lock +1 -3
  48. data/gemfiles/mongo_mapper-0.8.4.gemfile.lock +1 -3
  49. data/gemfiles/mongo_mapper-0.8.6.gemfile.lock +1 -3
  50. data/gemfiles/mongo_mapper-0.9.0.gemfile.lock +1 -3
  51. data/gemfiles/mongoid-2.0.0.gemfile.lock +1 -3
  52. data/gemfiles/mongoid-2.1.4.gemfile.lock +1 -3
  53. data/gemfiles/mongoid-2.2.4.gemfile +7 -0
  54. data/gemfiles/mongoid-2.2.4.gemfile.lock +40 -0
  55. data/gemfiles/mongoid-2.3.3.gemfile +7 -0
  56. data/gemfiles/mongoid-2.3.3.gemfile.lock +40 -0
  57. data/gemfiles/sequel-2.11.0.gemfile.lock +1 -3
  58. data/gemfiles/sequel-2.12.0.gemfile.lock +1 -3
  59. data/gemfiles/sequel-2.8.0.gemfile.lock +1 -3
  60. data/gemfiles/sequel-3.0.0.gemfile.lock +1 -3
  61. data/gemfiles/sequel-3.13.0.gemfile.lock +1 -3
  62. data/gemfiles/sequel-3.14.0.gemfile.lock +1 -3
  63. data/gemfiles/sequel-3.23.0.gemfile.lock +1 -3
  64. data/gemfiles/sequel-3.24.0.gemfile.lock +1 -3
  65. data/gemfiles/sequel-3.29.0.gemfile +8 -0
  66. data/gemfiles/sequel-3.29.0.gemfile.lock +26 -0
  67. data/lib/state_machine.rb +45 -0
  68. data/lib/state_machine/event.rb +18 -3
  69. data/lib/state_machine/event_collection.rb +1 -1
  70. data/lib/state_machine/integrations/active_model.rb +59 -16
  71. data/lib/state_machine/integrations/active_model/observer.rb +3 -15
  72. data/lib/state_machine/integrations/active_record.rb +46 -9
  73. data/lib/state_machine/integrations/data_mapper.rb +42 -2
  74. data/lib/state_machine/integrations/data_mapper/versions.rb +22 -10
  75. data/lib/state_machine/integrations/mongo_mapper.rb +55 -0
  76. data/lib/state_machine/integrations/mongo_mapper/versions.rb +3 -3
  77. data/lib/state_machine/integrations/mongoid.rb +57 -12
  78. data/lib/state_machine/integrations/mongoid/versions.rb +22 -4
  79. data/lib/state_machine/integrations/sequel.rb +45 -0
  80. data/lib/state_machine/integrations/sequel/versions.rb +3 -0
  81. data/lib/state_machine/machine.rb +148 -34
  82. data/lib/state_machine/node_collection.rb +36 -3
  83. data/lib/state_machine/state.rb +6 -3
  84. data/lib/state_machine/state_collection.rb +1 -1
  85. data/lib/state_machine/version.rb +1 -1
  86. data/lib/tasks/state_machine.rb +11 -9
  87. data/state_machine.gemspec +2 -3
  88. data/test/functional/state_machine_test.rb +54 -1
  89. data/test/unit/event_collection_test.rb +4 -0
  90. data/test/unit/event_test.rb +34 -1
  91. data/test/unit/integrations/active_model_test.rb +80 -0
  92. data/test/unit/integrations/active_record_test.rb +105 -2
  93. data/test/unit/integrations/data_mapper_test.rb +27 -25
  94. data/test/unit/integrations/mongo_mapper_test.rb +80 -25
  95. data/test/unit/integrations/mongoid_test.rb +61 -6
  96. data/test/unit/integrations/sequel_test.rb +8 -2
  97. data/test/unit/machine_test.rb +87 -9
  98. data/test/unit/node_collection_test.rb +129 -12
  99. data/test/unit/state_collection_test.rb +4 -0
  100. data/test/unit/state_test.rb +2 -2
  101. metadata +30 -24
  102. data/README.rdoc +0 -844
data/.gitignore CHANGED
@@ -1,5 +1,6 @@
1
1
  *.gem
2
2
  .bundle
3
+ .yardoc
3
4
  coverage
4
5
  doc
5
6
  pkg
@@ -1,8 +1,6 @@
1
1
  script: "bundle exec rake appraisal:integration test"
2
2
  rvm:
3
- - 1.8.6
4
3
  - 1.8.7
5
- - 1.9.1
6
4
  - 1.9.2
7
5
  env:
8
6
  - INTEGRATION=default TRAVIS=true
data/.yardopts CHANGED
@@ -1,5 +1,6 @@
1
1
  --title "state_machine"
2
- --readme README.rdoc
2
+ --readme README.md
3
+ --markup-provider redcarpet
3
4
  -
4
- CHANGELOG.rdoc
5
+ CHANGELOG.md
5
6
  LICENSE
data/Appraisals CHANGED
@@ -1,6 +1,19 @@
1
1
  appraise "default" do
2
2
  end
3
3
 
4
+ # GraphViz
5
+ appraise "graphviz-0.9.0" do
6
+ gem "ruby-graphviz", "0.9.0"
7
+ end
8
+
9
+ appraise "graphviz-0.9.21" do
10
+ gem "ruby-graphviz", "0.9.21"
11
+ end
12
+
13
+ appraise "graphviz-1.0.0" do
14
+ gem "ruby-graphviz", "1.0.0"
15
+ end
16
+
4
17
  # ActiveRecord integrations
5
18
  if RUBY_VERSION < "1.9.1"
6
19
  appraise "active_record-2.0.0" do
@@ -44,6 +57,11 @@ if RUBY_VERSION > "1.8.6"
44
57
  gem "sqlite3-ruby"
45
58
  gem "activerecord", "3.0.5"
46
59
  end
60
+
61
+ appraise "active_record-3.1.1" do
62
+ gem "sqlite3-ruby"
63
+ gem "activerecord", "3.1.1"
64
+ end
47
65
  end
48
66
 
49
67
  # ActiveModel integrations
@@ -55,6 +73,10 @@ if RUBY_VERSION > "1.8.6"
55
73
  appraise "active_model-3.0.5" do
56
74
  gem "activemodel", "3.0.5"
57
75
  end
76
+
77
+ appraise "active_model-3.1.1" do
78
+ gem "activemodel", "3.1.1"
79
+ end
58
80
  end
59
81
 
60
82
  # MongoMapper integrations
@@ -120,6 +142,10 @@ if RUBY_VERSION > "1.8.6"
120
142
  appraise "mongo_mapper-0.9.0" do
121
143
  gem "mongo_mapper", "0.9.0"
122
144
  end
145
+
146
+ appraise "mongo_mapper-0.10.0" do
147
+ gem "mongo_mapper", "0.10.0"
148
+ end
123
149
  end
124
150
  end
125
151
 
@@ -132,6 +158,14 @@ if RUBY_VERSION > "1.8.6"
132
158
  appraise "mongoid-2.1.4" do
133
159
  gem "mongoid", "2.1.4"
134
160
  end
161
+
162
+ appraise "mongoid-2.2.4" do
163
+ gem "mongoid", "2.2.4"
164
+ end
165
+
166
+ appraise "mongoid-2.3.3" do
167
+ gem "mongoid", "2.3.3"
168
+ end
135
169
  end
136
170
 
137
171
  # Sequel integrations
@@ -175,6 +209,11 @@ appraise "sequel-3.24.0" do
175
209
  gem "sequel", "3.24.0"
176
210
  end
177
211
 
212
+ appraise "sequel-3.29.0" do
213
+ gem "sqlite3-ruby", "1.3.1"
214
+ gem "sequel", "3.29.0"
215
+ end
216
+
178
217
  # DataMapper
179
218
  if RUBY_VERSION < "1.9.1"
180
219
  appraise "data_mapper-0.9.4" do
@@ -258,3 +297,12 @@ appraise "data_mapper-1.1.0" do
258
297
  gem "dm-transactions", "1.1.0"
259
298
  gem "dm-sqlite-adapter", "1.1.0"
260
299
  end
300
+
301
+ appraise "data_mapper-1.2.0" do
302
+ gem "dm-core", "1.2.0"
303
+ gem "dm-migrations", "1.2.0"
304
+ gem "dm-validations", "1.2.0"
305
+ gem "dm-observer", "1.2.0"
306
+ gem "dm-transactions", "1.2.0"
307
+ gem "dm-sqlite-adapter", "1.2.0"
308
+ end
@@ -1,6 +1,23 @@
1
- == master
2
-
3
- == 1.0.2 / 2011-08-09
1
+ # master
2
+
3
+ ## 1.0.3 / 2011-11-03
4
+
5
+ * Fix MongoMapper 0.10.0+ integrations not matching versions properly
6
+ * Update warnings for method conflicts to include instructions on how to ignore conflicts
7
+ * Fix state initialization in Mongoid 2.3.x integrations [Durran Jordan]
8
+ * Fix after_transition callbacks sometimes not running in Mongoid 2.2.x integrations
9
+ * Automatically load the plugins required in Sequel integrations
10
+ * Allow all / any matcher helpers to be used when defining states / events
11
+ * Allow states / events to be referenced by the string equivalent of their name
12
+ * Fix observer callbacks being run incorrectly when using nil states in ActiveModel-based integrations
13
+ * Remove ActiveModel Observer method chains in order to better ensure compatibility
14
+ * Update DataMapper integration for 1.2.0+ support [Markus Schirp]
15
+ * Provide access to the human state name in invalid_transition translations
16
+ * Add support for i18n keys in the form of #{i18n_scope}.state_machines.#{model_name}.states/events.#{value}
17
+ * Clarify documentation on writing to state machine attributes, using factory_girl and can_#{event} / #{event}_transition helpers
18
+ * Add documentation for dynmically generating state machines
19
+
20
+ ## 1.0.2 / 2011-08-09
4
21
 
5
22
  * Allow transitions to be defined within a state, event, or machine context
6
23
  * Use supported framework hooks for integrating Sequel 3.24.0+
@@ -15,7 +32,7 @@
15
32
  * Fix ActiveModel / DataMapper integrations not overriding StateMachine::Machine#after_initialize properly
16
33
  * Improve documentation for overriding states and integration transactions
17
34
 
18
- == 1.0.1 / 2011-05-30
35
+ ## 1.0.1 / 2011-05-30
19
36
 
20
37
  * Add the ability to ignore method conflicts for helpers
21
38
  * Generate warnings for any helper, not just state helpers, that has a conflicting method defined in the class
@@ -23,19 +40,19 @@
23
40
  * Add full support for chaining state scopes within Sequel integrations
24
41
  * Fix Rails 3.1 deprecation warnings for configuring engine locales [Stefan Penner]
25
42
 
26
- == 1.0.0 / 2011-05-12
43
+ ## 1.0.0 / 2011-05-12
27
44
 
28
45
  * Celebrate
29
46
 
30
- == 0.10.4 / 2011-04-14
47
+ ## 0.10.4 / 2011-04-14
31
48
 
32
49
  * Fix translations not being available under certain environments in Rails applications
33
50
 
34
- == 0.10.3 / 2011-04-07
51
+ ## 0.10.3 / 2011-04-07
35
52
 
36
53
  * Fix state initialization failing in ActiveRecord 3.0.2+ when using with_state scopes for the default scope
37
54
 
38
- == 0.10.2 / 2011-03-31
55
+ ## 0.10.2 / 2011-03-31
39
56
 
40
57
  * Use more integrated state initialization hooks for ActiveRecord, Mongoid, and Sequel
41
58
  * Remove mass-assignment filtering usage in all ORM integrations
@@ -44,11 +61,11 @@
44
61
  * Only initialize states if state is blank and blank is not a valid state
45
62
  * Fix instance / class helpers failing when used with certain libraries (such as Thin)
46
63
 
47
- == 0.10.1 / 2011-03-22
64
+ ## 0.10.1 / 2011-03-22
48
65
 
49
66
  * Fix classes with multiple state machines failing to initialize in ActiveRecord / Mongoid / Sequel integrations
50
67
 
51
- == 0.10.0 / 2011-03-19
68
+ ## 0.10.0 / 2011-03-19
52
69
 
53
70
  * Support callback terminators in MongoMapper 0.9.0+
54
71
  * Fix pluralization integration on DataMapper 1.0.0 and 1.1.0
@@ -68,7 +85,7 @@
68
85
  * Replace :include_failures after_transition option with new after_failure callback
69
86
  * Provide access to transition context when raising InvalidEvent / InvalidTransition exceptions
70
87
 
71
- == 0.9.4 / 2010-08-01
88
+ ## 0.9.4 / 2010-08-01
72
89
 
73
90
  * Fix validation / save hooks in Sequel 3.14.0+
74
91
  * Fix integration with dirty attribute tracking on DataMapper 1.0.1+
@@ -76,7 +93,7 @@
76
93
  * Fix validation error warnings in ActiveModel / ActiveRecord 3.0.0 beta5+
77
94
  * Fix mass-assignment sanitization breaking in ActiveRecord 3.0.0 beta5+ [Akira Matsuda]
78
95
 
79
- == 0.9.3 / 2010-06-26
96
+ ## 0.9.3 / 2010-06-26
80
97
 
81
98
  * Allow access to human state / event names in transitions and for the current state
82
99
  * Use human state / event names in error messages
@@ -86,23 +103,23 @@
86
103
  * Fix i18n deprecation warnings in ActiveModel / ActiveRecord 3.0.0.beta4
87
104
  * Fix default error message translations overriding existing locales in ActiveModel / ActiveRecord
88
105
 
89
- == 0.9.2 / 2010-05-24
106
+ ## 0.9.2 / 2010-05-24
90
107
 
91
108
  * Fix MongoMapper integration failing in Ruby 1.9.2
92
109
  * Fix Rakefile not loading in Ruby 1.9.2 [Andrea Longhi]
93
110
  * Fix nil / false :integration configuration not being respected
94
111
 
95
- == 0.9.1 / 2010-05-02
112
+ ## 0.9.1 / 2010-05-02
96
113
 
97
114
  * Fix ActiveRecord 2.0.0 - 2.2.3 integrations failing if version info isn't already loaded
98
115
  * Fix integration with dirty attribute tracking on DataMapper 0.10.3
99
116
  * Fix observers failing in ActiveRecord 3.0.0.beta4+ integrations
100
117
  * Fix deprecation warning in Rails 3 railtie [Chris Yuan]
101
118
 
102
- == 0.9.0 / 2010-04-12
119
+ ## 0.9.0 / 2010-04-12
103
120
 
104
121
  * Use attribute-based event transitions whenever possible to ensure consistency
105
- * Fix action helpers being defined when the action is *only* defined in the machine's owner class
122
+ * Fix action helpers being defined when the action is **only** defined in the machine's owner class
106
123
  * Disable attribute-based event transitions in DataMapper 0.9.4 - 0.9.6 when dm-validations is being used
107
124
  * Add support for DataMapper 0.10.3+
108
125
  * Add around_transition callbacks
@@ -116,7 +133,7 @@
116
133
  * Remove app-specific rails / merb rake tasks in favor of always running state_machine:draw
117
134
  * Add Rails 3 railtie for automatically loading rake tasks when installed as a gem
118
135
 
119
- == 0.8.1 / 2010-03-14
136
+ ## 0.8.1 / 2010-03-14
120
137
 
121
138
  * Release gems via rake-gemcutter instead of rubyforge
122
139
  * Move rake tasks to lib/tasks
@@ -135,7 +152,7 @@
135
152
  * Fix default states not getting set in ORM integrations if the column has a default
136
153
  * Fix event transitions being kept around while running actions/callbacks, sometimes preventing object marshalling
137
154
 
138
- == 0.8.0 / 2009-08-15
155
+ ## 0.8.0 / 2009-08-15
139
156
 
140
157
  * Add support for DataMapper 0.10.0
141
158
  * Always interpet nil return values from actions as failed attempts
@@ -152,7 +169,7 @@
152
169
  * Use friendly validation errors for nil states
153
170
  * Fix states not being validated properly when using custom names in ActiveRecord / DataMapper integrations
154
171
 
155
- == 0.7.6 / 2009-06-17
172
+ ## 0.7.6 / 2009-06-17
156
173
 
157
174
  * Allow multiple state machines on the same class to target the same attribute
158
175
  * Add support for :attribute to customize the attribute target, assuming the name is the first argument of #state_machine
@@ -162,7 +179,7 @@
162
179
  * Use Ruby 1.9's built-in Object#instance_exec for bound callbacks when it's available
163
180
  * Improve performance of cached dynamic state lookups by 25%
164
181
 
165
- == 0.7.5 / 2009-05-25
182
+ ## 0.7.5 / 2009-05-25
166
183
 
167
184
  * Add built-in caching for dynamic state values when the value only needs to be generated once
168
185
  * Fix flawed example for using record ids as state values
@@ -170,12 +187,12 @@
170
187
  * Make it easier to use event attributes for actions defined in the same class as the state machine
171
188
  * Fix #save/save! running transitions in ActiveRecord integrations even when a machine's action is not :save
172
189
 
173
- == 0.7.4 / 2009-05-23
190
+ ## 0.7.4 / 2009-05-23
174
191
 
175
192
  * Fix #save! not firing event attributes properly in ActiveRecord integrations
176
193
  * Fix log files being included in gems
177
194
 
178
- == 0.7.3 / 2009-04-25
195
+ ## 0.7.3 / 2009-04-25
179
196
 
180
197
  * Require DataMapper version be >= 0.9.4
181
198
  * Explicitly load Sequel's built-in inflector (>= 2.12.0) for scope names
@@ -183,18 +200,18 @@
183
200
  * Fix #valid? being defined for DataMapper resources when dm-validations isn't loaded
184
201
  * Add auto-validation of values allowed for the state attribute in ORM integrations
185
202
 
186
- == 0.7.2 / 2009-04-08
203
+ ## 0.7.2 / 2009-04-08
187
204
 
188
205
  * Add support for running multiple methods in a callback without using blocks
189
206
  * Add more flexibility around how callbacks are defined
190
207
  * Add security documentation around mass-assignment in ORM integrations
191
208
  * Fix event attribute transitions being publicly accessible
192
209
 
193
- == 0.7.1 / 2009-04-05
210
+ ## 0.7.1 / 2009-04-05
194
211
 
195
212
  * Fix machines failing to generate graphs when run from Merb tasks
196
213
 
197
- == 0.7.0 / 2009-04-04
214
+ ## 0.7.0 / 2009-04-04
198
215
 
199
216
  * Add #{attribute}_event for automatically firing events when the object's action is called
200
217
  * Make it easier to override state-driven behaviors
@@ -224,22 +241,22 @@
224
241
  * Use generated non-bang event when running bang version so that overriding one affects the other
225
242
  * Provide access to arguments passed into an event from transition callbacks via Transition#args
226
243
 
227
- == 0.6.3 / 2009-03-10
244
+ ## 0.6.3 / 2009-03-10
228
245
 
229
246
  * Add support for customizing the graph's orientation
230
247
  * Use the standard visualizations for initial (open arrow) and final (double circle) states
231
248
  * Highlight final states in GraphViz drawings
232
249
 
233
- == 0.6.2 / 2009-03-08
250
+ ## 0.6.2 / 2009-03-08
234
251
 
235
252
  * Make it easier to override generated instance / class methods
236
253
 
237
- == 0.6.1 / 2009-03-07
254
+ ## 0.6.1 / 2009-03-07
238
255
 
239
256
  * Add i18n support for ActiveRecord validation errors
240
257
  * Add a validation error when failing to transition for ActiveRecord / DataMapper / Sequel integrations
241
258
 
242
- == 0.6.0 / 2009-03-03
259
+ ## 0.6.0 / 2009-03-03
243
260
 
244
261
  * Allow multiple conditions for callbacks / class behaviors
245
262
  * Add support for state-driven class behavior with :if/:unless options
@@ -248,20 +265,20 @@
248
265
  * Simplify hooking callbacks into loopbacks
249
266
  * Add simplified transition/callback requirement syntax
250
267
 
251
- == 0.5.2 / 2009-02-17
268
+ ## 0.5.2 / 2009-02-17
252
269
 
253
270
  * Improve pretty-print of events
254
271
  * Simplify state/event matching design, improving guard performance by 30%
255
272
  * Add better error notification when conflicting guard options are defined
256
273
  * Fix scope name pluralization not being applied correctly
257
274
 
258
- == 0.5.1 / 2009-02-11
275
+ ## 0.5.1 / 2009-02-11
259
276
 
260
277
  * Allow states to be drawn as ellipses to accommodate long names
261
278
  * Fix rake tasks not being registered in Rails/Merb applications
262
279
  * Never automatically define machine attribute accessors when using an integration
263
280
 
264
- == 0.5.0 / 2009-01-11
281
+ ## 0.5.0 / 2009-01-11
265
282
 
266
283
  * Add to_name and from_name to transition objects
267
284
  * Add nicely formatted #inspect for transitions
@@ -278,12 +295,12 @@
278
295
  * Add support for customizing the actual stored value for a state
279
296
  * Add compatibility with Ruby 1.9+
280
297
 
281
- == 0.4.3 / 2008-12-28
298
+ ## 0.4.3 / 2008-12-28
282
299
 
283
300
  * Allow dm-observer integration to be optional
284
301
  * Fix non-lambda callbacks not working for DataMapper/Sequel
285
302
 
286
- == 0.4.2 / 2008-12-28
303
+ ## 0.4.2 / 2008-12-28
287
304
 
288
305
  * Fix graphs not being drawn the same way consistently
289
306
  * Add support for sharing transitions across multiple events
@@ -291,7 +308,7 @@
291
308
  * Simplify initialize hooks, requiring super to be called instead
292
309
  * Add :namespace option for generated state predicates / event methods
293
310
 
294
- == 0.4.1 / 2008-12-16
311
+ ## 0.4.1 / 2008-12-16
295
312
 
296
313
  * Fix nil states not being handled properly in guards, known states, or visualizations
297
314
  * Fix the same node being used for different dynamic states in GraphViz output
@@ -300,7 +317,7 @@
300
317
  * Allow blocks to be directly passed into machine class
301
318
  * Fix attribute predicates not working on attributes that represent columns in ActiveRecord
302
319
 
303
- == 0.4.0 / 2008-12-14
320
+ ## 0.4.0 / 2008-12-14
304
321
 
305
322
  * Remove the PluginAWeek namespace
306
323
  * Add generic attribute predicate (e.g. "#{attribute}?(state_name)") and state predicates (e.g. "#{state}?")
@@ -320,18 +337,18 @@
320
337
  * Include states referenced in transition callbacks in the list of a machine's known states
321
338
  * Only generate the known states for a machine on demand, rather than calculating beforehand
322
339
  * Add the ability to skip state change actions during a transition (e.g. vehicle.ignite(false))
323
- * Add the ability for the state change action (e.g. +save+ for ActiveRecord) to be configurable
324
- * Allow state machines to be defined on *any* Ruby class, not just ActiveRecord (removes all external dependencies)
340
+ * Add the ability for the state change action (e.g. `save` for ActiveRecord) to be configurable
341
+ * Allow state machines to be defined on **any** Ruby class, not just ActiveRecord (removes all external dependencies)
325
342
  * Refactor transitions, guards, and callbacks for better organization/design
326
343
  * Use a class containing the transition context in callbacks, rather than an ordered list of each individual attribute
327
344
  * Add without_#{attribute} named scopes (opposite of the existing with_#{attribute} named scopes) [Sean O'Brien]
328
345
 
329
- == 0.3.1 / 2008-10-26
346
+ ## 0.3.1 / 2008-10-26
330
347
 
331
348
  * Fix the initial state not getting set when the state attribute is mass-assigned but protected
332
349
  * Change how the base module is included to prevent namespacing conflicts
333
350
 
334
- == 0.3.0 / 2008-09-07
351
+ ## 0.3.0 / 2008-09-07
335
352
 
336
353
  * No longer allow additional arguments to be passed into event actions
337
354
  * Add support for can_#{event}? for checking whether an event can be fired based on the current state of the record
@@ -346,28 +363,28 @@
346
363
  * Ensure initial state callbacks are invoked in the proper order when an event is fired on a new record
347
364
  * Add before_loopback and after_loopback hooks [Jürgen Strobel]
348
365
 
349
- == 0.2.1 / 2008-07-05
366
+ ## 0.2.1 / 2008-07-05
350
367
 
351
368
  * Add more descriptive exceptions
352
369
  * Assume the default state attribute is "state" if one is not provided
353
370
  * Add :except_from option for transitions if you want to blacklist states
354
371
  * Add PluginAWeek::StateMachine::Machine#states
355
372
  * Add PluginAWeek::StateMachine::Event#transitions
356
- * Allow creating transitions with no from state (effectively allowing the transition for *any* from state)
373
+ * Allow creating transitions with no from state (effectively allowing the transition for **any** from state)
357
374
  * Reduce the number of objects created for each transition
358
375
 
359
- == 0.2.0 / 2008-06-29
376
+ ## 0.2.0 / 2008-06-29
360
377
 
361
378
  * Add a non-bang version of events (e.g. park) that will return a boolean value for success
362
379
  * Raise an exception if the bang version of events are used (e.g. park!) and no transition is successful
363
380
  * Change callbacks to act a little more like ActiveRecord
364
381
  * Avoid using string evaluation for dynamic methods
365
382
 
366
- == 0.1.1 / 2008-06-22
383
+ ## 0.1.1 / 2008-06-22
367
384
 
368
385
  * Remove log files from gems
369
386
 
370
- == 0.1.0 / 2008-05-05
387
+ ## 0.1.0 / 2008-05-05
371
388
 
372
389
  * Completely rewritten from scratch
373
390
  * Renamed to state_machine
@@ -378,7 +395,7 @@
378
395
  * Added functional tests
379
396
  * Updated documentation
380
397
 
381
- == 0.0.1 / 2007-09-26
398
+ ## 0.0.1 / 2007-09-26
382
399
 
383
400
  * Add dependency on custom_callbacks
384
401
  * Move test fixtures out of the test application root directory