aasm 3.0.24 → 3.0.25
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +21 -3
- data/CHANGELOG.md +8 -0
- data/Gemfile +9 -1
- data/LICENSE +1 -1
- data/README.md +9 -8
- data/aasm.gemspec +4 -5
- data/gemfiles/rails_3.2.gemfile +11 -0
- data/gemfiles/rails_4.0.gemfile +10 -0
- data/lib/aasm.rb +0 -3
- data/lib/aasm/aasm.rb +31 -27
- data/lib/aasm/base.rb +14 -5
- data/lib/aasm/event.rb +16 -16
- data/lib/aasm/instance_base.rb +1 -1
- data/lib/aasm/persistence/active_record_persistence.rb +10 -8
- data/lib/aasm/persistence/base.rb +1 -1
- data/lib/aasm/persistence/mongoid_persistence.rb +10 -8
- data/lib/aasm/version.rb +1 -1
- data/spec/models/mongoid/no_scope_mongoid.rb +1 -1
- data/spec/models/mongoid/simple_mongoid.rb +5 -4
- data/spec/models/mongoid/simple_new_dsl_mongoid.rb +1 -1
- data/spec/models/not_auto_loaded/process.rb +10 -8
- data/spec/models/persistence.rb +5 -13
- data/spec/unit/callbacks_spec.rb +4 -20
- data/spec/unit/complex_example_spec.rb +4 -4
- data/spec/unit/event_spec.rb +49 -36
- data/spec/unit/initial_state_spec.rb +4 -5
- data/spec/unit/inspection_spec.rb +11 -24
- data/spec/unit/localizer_spec.rb +12 -12
- data/spec/unit/persistence/active_record_persistence_spec.rb +13 -31
- data/spec/unit/persistence/mongoid_persistance_spec.rb +102 -81
- data/spec/unit/simple_example_spec.rb +1 -2
- data/spec/unit/subclassing_spec.rb +7 -7
- data/spec/unit/transition_spec.rb +5 -5
- metadata +4 -75
- data/lib/aasm/deprecated/aasm.rb +0 -15
- data/spec/models/callback_old_dsl.rb +0 -41
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aasm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.25
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott Barron
|
@@ -11,36 +11,8 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2013-
|
14
|
+
date: 2013-12-16 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
|
-
- !ruby/object:Gem::Dependency
|
17
|
-
name: activerecord
|
18
|
-
requirement: !ruby/object:Gem::Requirement
|
19
|
-
requirements:
|
20
|
-
- - '='
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: 3.2.15
|
23
|
-
type: :development
|
24
|
-
prerelease: false
|
25
|
-
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
requirements:
|
27
|
-
- - '='
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: 3.2.15
|
30
|
-
- !ruby/object:Gem::Dependency
|
31
|
-
name: mongoid
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
33
|
-
requirements:
|
34
|
-
- - '>='
|
35
|
-
- !ruby/object:Gem::Version
|
36
|
-
version: '0'
|
37
|
-
type: :development
|
38
|
-
prerelease: false
|
39
|
-
version_requirements: !ruby/object:Gem::Requirement
|
40
|
-
requirements:
|
41
|
-
- - '>='
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
version: '0'
|
44
16
|
- !ruby/object:Gem::Dependency
|
45
17
|
name: rake
|
46
18
|
requirement: !ruby/object:Gem::Requirement
|
@@ -97,20 +69,6 @@ dependencies:
|
|
97
69
|
- - '>='
|
98
70
|
- !ruby/object:Gem::Version
|
99
71
|
version: '0'
|
100
|
-
- !ruby/object:Gem::Dependency
|
101
|
-
name: sqlite3
|
102
|
-
requirement: !ruby/object:Gem::Requirement
|
103
|
-
requirements:
|
104
|
-
- - '>='
|
105
|
-
- !ruby/object:Gem::Version
|
106
|
-
version: '0'
|
107
|
-
type: :development
|
108
|
-
prerelease: false
|
109
|
-
version_requirements: !ruby/object:Gem::Requirement
|
110
|
-
requirements:
|
111
|
-
- - '>='
|
112
|
-
- !ruby/object:Gem::Version
|
113
|
-
version: '0'
|
114
72
|
- !ruby/object:Gem::Dependency
|
115
73
|
name: minitest
|
116
74
|
requirement: !ruby/object:Gem::Requirement
|
@@ -125,20 +83,6 @@ dependencies:
|
|
125
83
|
- - '>='
|
126
84
|
- !ruby/object:Gem::Version
|
127
85
|
version: '0'
|
128
|
-
- !ruby/object:Gem::Dependency
|
129
|
-
name: ruby-debug-completion
|
130
|
-
requirement: !ruby/object:Gem::Requirement
|
131
|
-
requirements:
|
132
|
-
- - '>='
|
133
|
-
- !ruby/object:Gem::Version
|
134
|
-
version: '0'
|
135
|
-
type: :development
|
136
|
-
prerelease: false
|
137
|
-
version_requirements: !ruby/object:Gem::Requirement
|
138
|
-
requirements:
|
139
|
-
- - '>='
|
140
|
-
- !ruby/object:Gem::Version
|
141
|
-
version: '0'
|
142
86
|
- !ruby/object:Gem::Dependency
|
143
87
|
name: mime-types
|
144
88
|
requirement: !ruby/object:Gem::Requirement
|
@@ -153,20 +97,6 @@ dependencies:
|
|
153
97
|
- - ~>
|
154
98
|
- !ruby/object:Gem::Version
|
155
99
|
version: '1.25'
|
156
|
-
- !ruby/object:Gem::Dependency
|
157
|
-
name: coveralls
|
158
|
-
requirement: !ruby/object:Gem::Requirement
|
159
|
-
requirements:
|
160
|
-
- - '>='
|
161
|
-
- !ruby/object:Gem::Version
|
162
|
-
version: '0'
|
163
|
-
type: :development
|
164
|
-
prerelease: false
|
165
|
-
version_requirements: !ruby/object:Gem::Requirement
|
166
|
-
requirements:
|
167
|
-
- - '>='
|
168
|
-
- !ruby/object:Gem::Version
|
169
|
-
version: '0'
|
170
100
|
description: AASM is a continuation of the acts as state machine rails plugin, built
|
171
101
|
for plain Ruby objects.
|
172
102
|
email: scott@elitists.net, ttilley@gmail.com, aasm@mt7.de
|
@@ -185,10 +115,11 @@ files:
|
|
185
115
|
- README.md
|
186
116
|
- Rakefile
|
187
117
|
- aasm.gemspec
|
118
|
+
- gemfiles/rails_3.2.gemfile
|
119
|
+
- gemfiles/rails_4.0.gemfile
|
188
120
|
- lib/aasm.rb
|
189
121
|
- lib/aasm/aasm.rb
|
190
122
|
- lib/aasm/base.rb
|
191
|
-
- lib/aasm/deprecated/aasm.rb
|
192
123
|
- lib/aasm/errors.rb
|
193
124
|
- lib/aasm/event.rb
|
194
125
|
- lib/aasm/instance_base.rb
|
@@ -209,7 +140,6 @@ files:
|
|
209
140
|
- spec/models/auth_machine.rb
|
210
141
|
- spec/models/bar.rb
|
211
142
|
- spec/models/callback_new_dsl.rb
|
212
|
-
- spec/models/callback_old_dsl.rb
|
213
143
|
- spec/models/conversation.rb
|
214
144
|
- spec/models/father.rb
|
215
145
|
- spec/models/foo.rb
|
@@ -278,7 +208,6 @@ test_files:
|
|
278
208
|
- spec/models/auth_machine.rb
|
279
209
|
- spec/models/bar.rb
|
280
210
|
- spec/models/callback_new_dsl.rb
|
281
|
-
- spec/models/callback_old_dsl.rb
|
282
211
|
- spec/models/conversation.rb
|
283
212
|
- spec/models/father.rb
|
284
213
|
- spec/models/foo.rb
|
data/lib/aasm/deprecated/aasm.rb
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
module AASM
|
2
|
-
|
3
|
-
module ClassMethods
|
4
|
-
def human_event_name(*args)
|
5
|
-
warn "AASM.human_event_name is deprecated and will be removed in version 3.1.0; please use AASM.aasm_human_event_name instead!"
|
6
|
-
aasm_human_event_name(*args)
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
|
-
def human_state
|
11
|
-
warn "AASM#human_state is deprecated and will be removed in version 3.1.0; please use AASM#aasm_human_state instead!"
|
12
|
-
aasm_human_state
|
13
|
-
end
|
14
|
-
|
15
|
-
end
|
@@ -1,41 +0,0 @@
|
|
1
|
-
class CallbackOldDsl
|
2
|
-
include AASM
|
3
|
-
|
4
|
-
aasm_initial_state :open
|
5
|
-
aasm_state :open,
|
6
|
-
:before_enter => :before_enter_open,
|
7
|
-
:after_enter => :after_enter_open,
|
8
|
-
:before_exit => :before_exit_open,
|
9
|
-
:exit => :exit_open,
|
10
|
-
:after_exit => :after_exit_open
|
11
|
-
aasm_state :closed,
|
12
|
-
:before_enter => :before_enter_closed,
|
13
|
-
:enter => :enter_closed,
|
14
|
-
:after_enter => :after_enter_closed,
|
15
|
-
:before_exit => :before_exit_closed,
|
16
|
-
:after_exit => :after_exit_closed
|
17
|
-
|
18
|
-
aasm_event :close, :before => :before, :after => :after do
|
19
|
-
transitions :to => :closed, :from => [:open]
|
20
|
-
end
|
21
|
-
|
22
|
-
aasm_event :open, :before => :before, :after => :after do
|
23
|
-
transitions :to => :open, :from => :closed
|
24
|
-
end
|
25
|
-
|
26
|
-
def before_enter_open; end
|
27
|
-
def before_exit_open; end
|
28
|
-
def after_enter_open; end
|
29
|
-
def after_exit_open; end
|
30
|
-
|
31
|
-
def before_enter_closed; end
|
32
|
-
def before_exit_closed; end
|
33
|
-
def after_enter_closed; end
|
34
|
-
def after_exit_closed; end
|
35
|
-
|
36
|
-
def before; end
|
37
|
-
def after; end
|
38
|
-
|
39
|
-
def enter_closed; end
|
40
|
-
def exit_open; end
|
41
|
-
end
|