aasm 3.0.23 → 3.0.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +4 -0
- data/README.md +9 -0
- data/aasm.gemspec +5 -3
- data/lib/aasm/aasm.rb +7 -3
- data/lib/aasm/base.rb +4 -4
- data/lib/aasm/persistence/active_record_persistence.rb +1 -1
- data/lib/aasm/version.rb +1 -1
- data/spec/unit/callbacks_spec.rb +5 -5
- data/spec/unit/event_spec.rb +6 -6
- data/spec/unit/persistence/active_record_persistence_spec.rb +3 -3
- data/spec/unit/state_spec.rb +5 -5
- data/spec/unit/transition_spec.rb +41 -18
- metadata +41 -49
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 0a95f430c49bb639c7f0df66dc4ce2998636ef6a
|
4
|
+
data.tar.gz: 67293708b7b6fbaae038e97d229367d0ca074aa8
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 90707f9d64e5e03e9b58acde6081c9fe5239ff5599ece71a1909abad871dfdb99dfe8d1d63fae89a94d6f5a908754649387cb792f150d09a94f3a3acab2f2714
|
7
|
+
data.tar.gz: 20f34ec847d1fe22c59a7e077c5ccdd54f5ab6483dbab086544c7f7995f8df408a018344248ed9017ce9f8ed23f5d64dfe549855700d68c8797911edae9ceafc
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -69,6 +69,15 @@ job.may_run? # => false
|
|
69
69
|
job.run # => false
|
70
70
|
```
|
71
71
|
|
72
|
+
When firing an event, you can pass a block to the method, it will be called only if
|
73
|
+
the transition succeeds :
|
74
|
+
|
75
|
+
```ruby
|
76
|
+
job.run do
|
77
|
+
job.user.notify_job_ran # Will be called if job.may_run? is true
|
78
|
+
end
|
79
|
+
```
|
80
|
+
|
72
81
|
### Callbacks
|
73
82
|
|
74
83
|
You can define a number of callbacks for your transitions. These methods will be
|
data/aasm.gemspec
CHANGED
@@ -13,19 +13,21 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.date = Time.now
|
14
14
|
s.licenses = ["MIT"]
|
15
15
|
|
16
|
-
s.add_development_dependency 'activerecord', '3.2.
|
17
|
-
# s.add_development_dependency 'activerecord', '4.0.
|
16
|
+
s.add_development_dependency 'activerecord', '3.2.15'
|
17
|
+
# s.add_development_dependency 'activerecord', '4.0.1'
|
18
18
|
|
19
19
|
s.add_development_dependency 'mongoid' if Gem::Version.create(RUBY_VERSION.dup) >= Gem::Version.create('1.9.3')
|
20
20
|
s.add_development_dependency 'rake'
|
21
21
|
s.add_development_dependency 'sdoc'
|
22
|
-
s.add_development_dependency 'rspec', '~> 2.
|
22
|
+
s.add_development_dependency 'rspec', '~> 2.14'
|
23
23
|
s.add_development_dependency 'rr'
|
24
24
|
s.add_development_dependency 'sqlite3'
|
25
25
|
s.add_development_dependency 'minitest'
|
26
26
|
# s.add_development_dependency 'debugger'
|
27
27
|
# s.add_development_dependency 'pry'
|
28
28
|
s.add_development_dependency 'ruby-debug-completion'
|
29
|
+
|
30
|
+
s.add_development_dependency 'mime-types', '~> 1.25' # needed by coveralls (>= 2.0 needs Ruby >=1.9.2)
|
29
31
|
s.add_development_dependency 'coveralls'
|
30
32
|
|
31
33
|
s.files = `git ls-files`.split("\n")
|
data/lib/aasm/aasm.rb
CHANGED
@@ -141,7 +141,7 @@ module AASM
|
|
141
141
|
|
142
142
|
private
|
143
143
|
|
144
|
-
def aasm_fire_event(event_name, options, *args)
|
144
|
+
def aasm_fire_event(event_name, options, *args, &block)
|
145
145
|
event = self.class.aasm_events[event_name]
|
146
146
|
begin
|
147
147
|
old_state = aasm.state_object_for_name(aasm.current_state)
|
@@ -151,7 +151,7 @@ private
|
|
151
151
|
event.fire_callbacks(:before, self)
|
152
152
|
|
153
153
|
if new_state_name = event.fire(self, *args)
|
154
|
-
fired(event, old_state, new_state_name, options)
|
154
|
+
fired(event, old_state, new_state_name, options, &block)
|
155
155
|
else
|
156
156
|
failed(event_name, old_state)
|
157
157
|
end
|
@@ -174,9 +174,13 @@ private
|
|
174
174
|
persist_successful = true
|
175
175
|
if persist
|
176
176
|
persist_successful = aasm.set_current_state_with_persistence(new_state_name)
|
177
|
-
|
177
|
+
if persist_successful
|
178
|
+
yield if block_given?
|
179
|
+
event.fire_callbacks(:success, self)
|
180
|
+
end
|
178
181
|
else
|
179
182
|
aasm.current_state = new_state_name
|
183
|
+
yield if block_given?
|
180
184
|
end
|
181
185
|
|
182
186
|
if persist_successful
|
data/lib/aasm/base.rb
CHANGED
@@ -57,12 +57,12 @@ module AASM
|
|
57
57
|
aasm.may_fire_event?(name, *args)
|
58
58
|
end
|
59
59
|
|
60
|
-
@clazz.send(:define_method, "#{name.to_s}!") do |*args|
|
61
|
-
aasm_fire_event(name, {:persist => true}, *args)
|
60
|
+
@clazz.send(:define_method, "#{name.to_s}!") do |*args, &block|
|
61
|
+
aasm_fire_event(name, {:persist => true}, *args, &block)
|
62
62
|
end
|
63
63
|
|
64
|
-
@clazz.send(:define_method, "#{name.to_s}") do |*args|
|
65
|
-
aasm_fire_event(name, {:persist => false}, *args)
|
64
|
+
@clazz.send(:define_method, "#{name.to_s}") do |*args, &block|
|
65
|
+
aasm_fire_event(name, {:persist => false}, *args, &block)
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
@@ -131,7 +131,7 @@ module AASM
|
|
131
131
|
aasm.enter_initial_state if send(self.class.aasm_column).blank?
|
132
132
|
end
|
133
133
|
|
134
|
-
def aasm_fire_event(name, options, *args)
|
134
|
+
def aasm_fire_event(name, options, *args, &block)
|
135
135
|
success = self.class.transaction(:requires_new => true) do
|
136
136
|
super
|
137
137
|
end
|
data/lib/aasm/version.rb
CHANGED
data/spec/unit/callbacks_spec.rb
CHANGED
@@ -51,19 +51,19 @@ describe 'event callbacks' do
|
|
51
51
|
it "should run error_callback if an exception is raised and error_callback defined" do
|
52
52
|
def @foo.error_callback(e); end
|
53
53
|
|
54
|
-
@foo.stub
|
54
|
+
@foo.stub(:enter).and_raise(e=StandardError.new)
|
55
55
|
@foo.should_receive(:error_callback).with(e)
|
56
56
|
|
57
57
|
@foo.safe_close!
|
58
58
|
end
|
59
59
|
|
60
60
|
it "should raise NoMethodError if exceptionis raised and error_callback is declared but not defined" do
|
61
|
-
@foo.stub
|
61
|
+
@foo.stub(:enter).and_raise(StandardError)
|
62
62
|
lambda{@foo.safe_close!}.should raise_error(NoMethodError)
|
63
63
|
end
|
64
64
|
|
65
65
|
it "should propagate an error if no error callback is declared" do
|
66
|
-
@foo.stub
|
66
|
+
@foo.stub(:enter).and_raise("Cannot enter safe")
|
67
67
|
lambda{@foo.close!}.should raise_error(StandardError, "Cannot enter safe")
|
68
68
|
end
|
69
69
|
end
|
@@ -85,7 +85,7 @@ describe 'event callbacks' do
|
|
85
85
|
end
|
86
86
|
|
87
87
|
it 'should not call it for failing bang fire' do
|
88
|
-
@foo.aasm.stub
|
88
|
+
@foo.aasm.stub(:set_current_state_with_persistence).and_return(false)
|
89
89
|
@foo.should_not_receive(:aasm_event_fired)
|
90
90
|
@foo.close!
|
91
91
|
end
|
@@ -108,7 +108,7 @@ describe 'event callbacks' do
|
|
108
108
|
end
|
109
109
|
|
110
110
|
it 'should not call it if persist fails for bang fire' do
|
111
|
-
@foo.aasm.stub
|
111
|
+
@foo.aasm.stub(:set_current_state_with_persistence).and_return(false)
|
112
112
|
@foo.should_receive(:aasm_event_failed)
|
113
113
|
@foo.close!
|
114
114
|
end
|
data/spec/unit/event_spec.rb
CHANGED
@@ -60,8 +60,8 @@ end
|
|
60
60
|
|
61
61
|
describe 'firing an event' do
|
62
62
|
it 'should return nil if the transitions are empty' do
|
63
|
-
obj =
|
64
|
-
obj.stub
|
63
|
+
obj = double('object')
|
64
|
+
obj.stub(:aasm_current_state)
|
65
65
|
|
66
66
|
event = AASM::Event.new(:event)
|
67
67
|
event.fire(obj).should be_nil
|
@@ -72,8 +72,8 @@ describe 'firing an event' do
|
|
72
72
|
transitions :to => :closed, :from => [:open, :received]
|
73
73
|
end
|
74
74
|
|
75
|
-
obj =
|
76
|
-
obj.stub
|
75
|
+
obj = double('object')
|
76
|
+
obj.stub(:aasm_current_state).and_return(:open)
|
77
77
|
|
78
78
|
event.fire(obj).should == :closed
|
79
79
|
end
|
@@ -83,8 +83,8 @@ describe 'firing an event' do
|
|
83
83
|
transitions :to => :closed, :from => [:open, :received], :guard => :guard_fn
|
84
84
|
end
|
85
85
|
|
86
|
-
obj =
|
87
|
-
obj.stub
|
86
|
+
obj = double('object')
|
87
|
+
obj.stub(:aasm_current_state).and_return(:open)
|
88
88
|
obj.should_receive(:guard_fn).with('arg1', 'arg2').and_return(true)
|
89
89
|
|
90
90
|
event.fire(obj, nil, 'arg1', 'arg2').should == :closed
|
@@ -33,13 +33,13 @@ describe "instance methods" do
|
|
33
33
|
end
|
34
34
|
|
35
35
|
it "should return the aasm column when not new and the aasm_column is not nil" do
|
36
|
-
gate.stub
|
36
|
+
gate.stub(:new_record?).and_return(false)
|
37
37
|
gate.aasm_state = "state"
|
38
38
|
gate.aasm_current_state.should == :state
|
39
39
|
end
|
40
40
|
|
41
41
|
it "should allow a nil state" do
|
42
|
-
gate.stub
|
42
|
+
gate.stub(:new_record?).and_return(false)
|
43
43
|
gate.aasm_state = nil
|
44
44
|
gate.aasm_current_state.should be_nil
|
45
45
|
end
|
@@ -50,7 +50,7 @@ describe "instance methods" do
|
|
50
50
|
end
|
51
51
|
|
52
52
|
it "should not call aasm_ensure_initial_state on validation before update" do
|
53
|
-
gate.stub
|
53
|
+
gate.stub(:new_record?).and_return(false)
|
54
54
|
gate.should_not_receive(:aasm_ensure_initial_state)
|
55
55
|
gate.valid?
|
56
56
|
end
|
data/spec/unit/state_spec.rb
CHANGED
@@ -38,7 +38,7 @@ describe AASM::State do
|
|
38
38
|
it 'should send a message to the record for an action if the action is present as a symbol' do
|
39
39
|
state = new_state(:entering => :foo)
|
40
40
|
|
41
|
-
record =
|
41
|
+
record = double('record')
|
42
42
|
record.should_receive(:foo)
|
43
43
|
|
44
44
|
state.fire_callbacks(:entering, record)
|
@@ -47,7 +47,7 @@ describe AASM::State do
|
|
47
47
|
it 'should send a message to the record for an action if the action is present as a string' do
|
48
48
|
state = new_state(:entering => 'foo')
|
49
49
|
|
50
|
-
record =
|
50
|
+
record = double('record')
|
51
51
|
record.should_receive(:foo)
|
52
52
|
|
53
53
|
state.fire_callbacks(:entering, record)
|
@@ -56,7 +56,7 @@ describe AASM::State do
|
|
56
56
|
it 'should send a message to the record for each action' do
|
57
57
|
state = new_state(:entering => [:a, :b, "c", lambda {|r| r.foobar }])
|
58
58
|
|
59
|
-
record =
|
59
|
+
record = double('record')
|
60
60
|
record.should_receive(:a)
|
61
61
|
record.should_receive(:b)
|
62
62
|
record.should_receive(:c)
|
@@ -68,7 +68,7 @@ describe AASM::State do
|
|
68
68
|
it "should stop calling actions if one of them raises :halt_aasm_chain" do
|
69
69
|
state = new_state(:entering => [:a, :b, :c])
|
70
70
|
|
71
|
-
record =
|
71
|
+
record = double('record')
|
72
72
|
record.should_receive(:a)
|
73
73
|
record.should_receive(:b).and_throw(:halt_aasm_chain)
|
74
74
|
record.should_not_receive(:c)
|
@@ -79,7 +79,7 @@ describe AASM::State do
|
|
79
79
|
it 'should call a proc, passing in the record for an action if the action is present' do
|
80
80
|
state = new_state(:entering => Proc.new {|r| r.foobar})
|
81
81
|
|
82
|
-
record =
|
82
|
+
record = double('record')
|
83
83
|
record.should_receive(:foobar)
|
84
84
|
|
85
85
|
state.fire_callbacks(:entering, record)
|
@@ -26,6 +26,29 @@ describe 'transitions' do
|
|
26
26
|
silencer.should be_smiling
|
27
27
|
end
|
28
28
|
|
29
|
+
it 'should call the block when success' do
|
30
|
+
silencer = Silencer.new
|
31
|
+
success = false
|
32
|
+
lambda {
|
33
|
+
silencer.smile_any! do
|
34
|
+
success = true
|
35
|
+
end
|
36
|
+
}.should change { success }.to(true)
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'should not call the block when failure' do
|
40
|
+
silencer = Silencer.new
|
41
|
+
success = false
|
42
|
+
lambda {
|
43
|
+
silencer.smile! do
|
44
|
+
success = true
|
45
|
+
end
|
46
|
+
}.should_not change { success }.to(true)
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
50
|
+
|
51
|
+
describe 'blocks' do
|
29
52
|
end
|
30
53
|
|
31
54
|
describe AASM::Transition do
|
@@ -42,9 +65,9 @@ describe AASM::Transition do
|
|
42
65
|
opts = {:from => 'foo', :to => 'bar', :guard => 'g'}
|
43
66
|
st = AASM::Transition.new(opts)
|
44
67
|
|
45
|
-
obj =
|
46
|
-
obj.stub
|
47
|
-
obj.stub
|
68
|
+
obj = double('object')
|
69
|
+
obj.stub(:from).and_return(opts[:from])
|
70
|
+
obj.stub(:to).and_return(opts[:to])
|
48
71
|
|
49
72
|
st.should == obj
|
50
73
|
end
|
@@ -53,9 +76,9 @@ describe AASM::Transition do
|
|
53
76
|
opts = {:from => 'foo', :to => 'bar', :guard => 'g'}
|
54
77
|
st = AASM::Transition.new(opts)
|
55
78
|
|
56
|
-
obj =
|
57
|
-
obj.stub
|
58
|
-
obj.stub
|
79
|
+
obj = double('object')
|
80
|
+
obj.stub(:from).and_return('blah')
|
81
|
+
obj.stub(:to).and_return(opts[:to])
|
59
82
|
|
60
83
|
st.should_not == obj
|
61
84
|
end
|
@@ -64,9 +87,9 @@ describe AASM::Transition do
|
|
64
87
|
opts = {:from => 'foo', :to => 'bar', :guard => 'g'}
|
65
88
|
st = AASM::Transition.new(opts)
|
66
89
|
|
67
|
-
obj =
|
68
|
-
obj.stub
|
69
|
-
obj.stub
|
90
|
+
obj = double('object')
|
91
|
+
obj.stub(:from).and_return(opts[:from])
|
92
|
+
obj.stub(:to).and_return('blah')
|
70
93
|
|
71
94
|
st.should_not == obj
|
72
95
|
end
|
@@ -84,7 +107,7 @@ describe AASM::Transition, '- when performing guard checks' do
|
|
84
107
|
opts = {:from => 'foo', :to => 'bar', :guard => :test}
|
85
108
|
st = AASM::Transition.new(opts)
|
86
109
|
|
87
|
-
obj =
|
110
|
+
obj = double('object')
|
88
111
|
obj.should_receive(:test)
|
89
112
|
|
90
113
|
st.perform(obj)
|
@@ -94,7 +117,7 @@ describe AASM::Transition, '- when performing guard checks' do
|
|
94
117
|
opts = {:from => 'foo', :to => 'bar', :guard => 'test'}
|
95
118
|
st = AASM::Transition.new(opts)
|
96
119
|
|
97
|
-
obj =
|
120
|
+
obj = double('object')
|
98
121
|
obj.should_receive(:test)
|
99
122
|
|
100
123
|
st.perform(obj)
|
@@ -104,7 +127,7 @@ describe AASM::Transition, '- when performing guard checks' do
|
|
104
127
|
opts = {:from => 'foo', :to => 'bar', :guard => Proc.new {|o| o.test}}
|
105
128
|
st = AASM::Transition.new(opts)
|
106
129
|
|
107
|
-
obj =
|
130
|
+
obj = double('object')
|
108
131
|
obj.should_receive(:test)
|
109
132
|
|
110
133
|
st.perform(obj)
|
@@ -116,7 +139,7 @@ describe AASM::Transition, '- when executing the transition with a Proc' do
|
|
116
139
|
opts = {:from => 'foo', :to => 'bar', :on_transition => Proc.new {|o| o.test}}
|
117
140
|
st = AASM::Transition.new(opts)
|
118
141
|
args = {:arg1 => '1', :arg2 => '2'}
|
119
|
-
obj =
|
142
|
+
obj = double('object')
|
120
143
|
|
121
144
|
opts[:on_transition].should_receive(:call).with(any_args)
|
122
145
|
|
@@ -127,7 +150,7 @@ describe AASM::Transition, '- when executing the transition with a Proc' do
|
|
127
150
|
opts = {:from => 'foo', :to => 'bar', :on_transition => Proc.new {||}}
|
128
151
|
st = AASM::Transition.new(opts)
|
129
152
|
args = {:arg1 => '1', :arg2 => '2'}
|
130
|
-
obj =
|
153
|
+
obj = double('object')
|
131
154
|
|
132
155
|
opts[:on_transition].should_receive(:call).with(no_args)
|
133
156
|
|
@@ -140,7 +163,7 @@ describe AASM::Transition, '- when executing the transition with an :on_transtio
|
|
140
163
|
opts = {:from => 'foo', :to => 'bar', :on_transition => 'test'}
|
141
164
|
st = AASM::Transition.new(opts)
|
142
165
|
args = {:arg1 => '1', :arg2 => '2'}
|
143
|
-
obj =
|
166
|
+
obj = double('object')
|
144
167
|
|
145
168
|
obj.should_receive(:test)
|
146
169
|
|
@@ -151,7 +174,7 @@ describe AASM::Transition, '- when executing the transition with an :on_transtio
|
|
151
174
|
opts = {:from => 'foo', :to => 'bar', :on_transition => :test}
|
152
175
|
st = AASM::Transition.new(opts)
|
153
176
|
args = {:arg1 => '1', :arg2 => '2'}
|
154
|
-
obj =
|
177
|
+
obj = double('object')
|
155
178
|
|
156
179
|
obj.should_receive(:test)
|
157
180
|
|
@@ -162,7 +185,7 @@ describe AASM::Transition, '- when executing the transition with an :on_transtio
|
|
162
185
|
opts = {:from => 'foo', :to => 'bar', :on_transition => :test}
|
163
186
|
st = AASM::Transition.new(opts)
|
164
187
|
args = {:arg1 => '1', :arg2 => '2'}
|
165
|
-
obj =
|
188
|
+
obj = double('object')
|
166
189
|
|
167
190
|
obj.class.class_eval do
|
168
191
|
define_method(:test) {|*args| 'success'}
|
@@ -177,7 +200,7 @@ describe AASM::Transition, '- when executing the transition with an :on_transtio
|
|
177
200
|
opts = {:from => 'foo', :to => 'bar', :on_transition => :test}
|
178
201
|
st = AASM::Transition.new(opts)
|
179
202
|
args = {:arg1 => '1', :arg2 => '2'}
|
180
|
-
obj =
|
203
|
+
obj = double('object')
|
181
204
|
|
182
205
|
obj.class.class_eval do
|
183
206
|
define_method(:test) {|*args| 'success'}
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aasm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
5
|
-
prerelease:
|
4
|
+
version: 3.0.24
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Scott Barron
|
@@ -12,166 +11,160 @@ authors:
|
|
12
11
|
autorequire:
|
13
12
|
bindir: bin
|
14
13
|
cert_chain: []
|
15
|
-
date: 2013-
|
14
|
+
date: 2013-11-20 00:00:00.000000000 Z
|
16
15
|
dependencies:
|
17
16
|
- !ruby/object:Gem::Dependency
|
18
17
|
name: activerecord
|
19
18
|
requirement: !ruby/object:Gem::Requirement
|
20
|
-
none: false
|
21
19
|
requirements:
|
22
20
|
- - '='
|
23
21
|
- !ruby/object:Gem::Version
|
24
|
-
version: 3.2.
|
22
|
+
version: 3.2.15
|
25
23
|
type: :development
|
26
24
|
prerelease: false
|
27
25
|
version_requirements: !ruby/object:Gem::Requirement
|
28
|
-
none: false
|
29
26
|
requirements:
|
30
27
|
- - '='
|
31
28
|
- !ruby/object:Gem::Version
|
32
|
-
version: 3.2.
|
29
|
+
version: 3.2.15
|
33
30
|
- !ruby/object:Gem::Dependency
|
34
31
|
name: mongoid
|
35
32
|
requirement: !ruby/object:Gem::Requirement
|
36
|
-
none: false
|
37
33
|
requirements:
|
38
|
-
- -
|
34
|
+
- - '>='
|
39
35
|
- !ruby/object:Gem::Version
|
40
36
|
version: '0'
|
41
37
|
type: :development
|
42
38
|
prerelease: false
|
43
39
|
version_requirements: !ruby/object:Gem::Requirement
|
44
|
-
none: false
|
45
40
|
requirements:
|
46
|
-
- -
|
41
|
+
- - '>='
|
47
42
|
- !ruby/object:Gem::Version
|
48
43
|
version: '0'
|
49
44
|
- !ruby/object:Gem::Dependency
|
50
45
|
name: rake
|
51
46
|
requirement: !ruby/object:Gem::Requirement
|
52
|
-
none: false
|
53
47
|
requirements:
|
54
|
-
- -
|
48
|
+
- - '>='
|
55
49
|
- !ruby/object:Gem::Version
|
56
50
|
version: '0'
|
57
51
|
type: :development
|
58
52
|
prerelease: false
|
59
53
|
version_requirements: !ruby/object:Gem::Requirement
|
60
|
-
none: false
|
61
54
|
requirements:
|
62
|
-
- -
|
55
|
+
- - '>='
|
63
56
|
- !ruby/object:Gem::Version
|
64
57
|
version: '0'
|
65
58
|
- !ruby/object:Gem::Dependency
|
66
59
|
name: sdoc
|
67
60
|
requirement: !ruby/object:Gem::Requirement
|
68
|
-
none: false
|
69
61
|
requirements:
|
70
|
-
- -
|
62
|
+
- - '>='
|
71
63
|
- !ruby/object:Gem::Version
|
72
64
|
version: '0'
|
73
65
|
type: :development
|
74
66
|
prerelease: false
|
75
67
|
version_requirements: !ruby/object:Gem::Requirement
|
76
|
-
none: false
|
77
68
|
requirements:
|
78
|
-
- -
|
69
|
+
- - '>='
|
79
70
|
- !ruby/object:Gem::Version
|
80
71
|
version: '0'
|
81
72
|
- !ruby/object:Gem::Dependency
|
82
73
|
name: rspec
|
83
74
|
requirement: !ruby/object:Gem::Requirement
|
84
|
-
none: false
|
85
75
|
requirements:
|
86
76
|
- - ~>
|
87
77
|
- !ruby/object:Gem::Version
|
88
|
-
version: '2.
|
78
|
+
version: '2.14'
|
89
79
|
type: :development
|
90
80
|
prerelease: false
|
91
81
|
version_requirements: !ruby/object:Gem::Requirement
|
92
|
-
none: false
|
93
82
|
requirements:
|
94
83
|
- - ~>
|
95
84
|
- !ruby/object:Gem::Version
|
96
|
-
version: '2.
|
85
|
+
version: '2.14'
|
97
86
|
- !ruby/object:Gem::Dependency
|
98
87
|
name: rr
|
99
88
|
requirement: !ruby/object:Gem::Requirement
|
100
|
-
none: false
|
101
89
|
requirements:
|
102
|
-
- -
|
90
|
+
- - '>='
|
103
91
|
- !ruby/object:Gem::Version
|
104
92
|
version: '0'
|
105
93
|
type: :development
|
106
94
|
prerelease: false
|
107
95
|
version_requirements: !ruby/object:Gem::Requirement
|
108
|
-
none: false
|
109
96
|
requirements:
|
110
|
-
- -
|
97
|
+
- - '>='
|
111
98
|
- !ruby/object:Gem::Version
|
112
99
|
version: '0'
|
113
100
|
- !ruby/object:Gem::Dependency
|
114
101
|
name: sqlite3
|
115
102
|
requirement: !ruby/object:Gem::Requirement
|
116
|
-
none: false
|
117
103
|
requirements:
|
118
|
-
- -
|
104
|
+
- - '>='
|
119
105
|
- !ruby/object:Gem::Version
|
120
106
|
version: '0'
|
121
107
|
type: :development
|
122
108
|
prerelease: false
|
123
109
|
version_requirements: !ruby/object:Gem::Requirement
|
124
|
-
none: false
|
125
110
|
requirements:
|
126
|
-
- -
|
111
|
+
- - '>='
|
127
112
|
- !ruby/object:Gem::Version
|
128
113
|
version: '0'
|
129
114
|
- !ruby/object:Gem::Dependency
|
130
115
|
name: minitest
|
131
116
|
requirement: !ruby/object:Gem::Requirement
|
132
|
-
none: false
|
133
117
|
requirements:
|
134
|
-
- -
|
118
|
+
- - '>='
|
135
119
|
- !ruby/object:Gem::Version
|
136
120
|
version: '0'
|
137
121
|
type: :development
|
138
122
|
prerelease: false
|
139
123
|
version_requirements: !ruby/object:Gem::Requirement
|
140
|
-
none: false
|
141
124
|
requirements:
|
142
|
-
- -
|
125
|
+
- - '>='
|
143
126
|
- !ruby/object:Gem::Version
|
144
127
|
version: '0'
|
145
128
|
- !ruby/object:Gem::Dependency
|
146
129
|
name: ruby-debug-completion
|
147
130
|
requirement: !ruby/object:Gem::Requirement
|
148
|
-
none: false
|
149
131
|
requirements:
|
150
|
-
- -
|
132
|
+
- - '>='
|
151
133
|
- !ruby/object:Gem::Version
|
152
134
|
version: '0'
|
153
135
|
type: :development
|
154
136
|
prerelease: false
|
155
137
|
version_requirements: !ruby/object:Gem::Requirement
|
156
|
-
none: false
|
157
138
|
requirements:
|
158
|
-
- -
|
139
|
+
- - '>='
|
159
140
|
- !ruby/object:Gem::Version
|
160
141
|
version: '0'
|
142
|
+
- !ruby/object:Gem::Dependency
|
143
|
+
name: mime-types
|
144
|
+
requirement: !ruby/object:Gem::Requirement
|
145
|
+
requirements:
|
146
|
+
- - ~>
|
147
|
+
- !ruby/object:Gem::Version
|
148
|
+
version: '1.25'
|
149
|
+
type: :development
|
150
|
+
prerelease: false
|
151
|
+
version_requirements: !ruby/object:Gem::Requirement
|
152
|
+
requirements:
|
153
|
+
- - ~>
|
154
|
+
- !ruby/object:Gem::Version
|
155
|
+
version: '1.25'
|
161
156
|
- !ruby/object:Gem::Dependency
|
162
157
|
name: coveralls
|
163
158
|
requirement: !ruby/object:Gem::Requirement
|
164
|
-
none: false
|
165
159
|
requirements:
|
166
|
-
- -
|
160
|
+
- - '>='
|
167
161
|
- !ruby/object:Gem::Version
|
168
162
|
version: '0'
|
169
163
|
type: :development
|
170
164
|
prerelease: false
|
171
165
|
version_requirements: !ruby/object:Gem::Requirement
|
172
|
-
none: false
|
173
166
|
requirements:
|
174
|
-
- -
|
167
|
+
- - '>='
|
175
168
|
- !ruby/object:Gem::Version
|
176
169
|
version: '0'
|
177
170
|
description: AASM is a continuation of the acts as state machine rails plugin, built
|
@@ -255,27 +248,26 @@ files:
|
|
255
248
|
homepage: https://github.com/aasm/aasm
|
256
249
|
licenses:
|
257
250
|
- MIT
|
251
|
+
metadata: {}
|
258
252
|
post_install_message:
|
259
253
|
rdoc_options: []
|
260
254
|
require_paths:
|
261
255
|
- lib
|
262
256
|
required_ruby_version: !ruby/object:Gem::Requirement
|
263
|
-
none: false
|
264
257
|
requirements:
|
265
|
-
- -
|
258
|
+
- - '>='
|
266
259
|
- !ruby/object:Gem::Version
|
267
260
|
version: '0'
|
268
261
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
269
|
-
none: false
|
270
262
|
requirements:
|
271
|
-
- -
|
263
|
+
- - '>='
|
272
264
|
- !ruby/object:Gem::Version
|
273
265
|
version: '0'
|
274
266
|
requirements: []
|
275
267
|
rubyforge_project:
|
276
|
-
rubygems_version: 1.
|
268
|
+
rubygems_version: 2.1.11
|
277
269
|
signing_key:
|
278
|
-
specification_version:
|
270
|
+
specification_version: 4
|
279
271
|
summary: State machine mixin for Ruby objects
|
280
272
|
test_files:
|
281
273
|
- spec/database.yml
|