aasm 5.1.0 → 5.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/build.yml +100 -0
- data/Appraisals +18 -34
- data/CHANGELOG.md +28 -0
- data/Gemfile +3 -2
- data/README.md +93 -15
- data/aasm.gemspec +1 -1
- data/gemfiles/norails.gemfile +1 -0
- data/gemfiles/rails_4.2.gemfile +2 -2
- data/gemfiles/rails_4.2_mongoid_5.gemfile +2 -2
- data/gemfiles/rails_4.2_nobrainer.gemfile +2 -1
- data/gemfiles/rails_5.2.gemfile +2 -2
- data/gemfiles/rails_6.0.gemfile +14 -0
- data/gemfiles/rails_6.1.gemfile +14 -0
- data/gemfiles/rails_7.0.gemfile +14 -0
- data/lib/aasm/base.rb +44 -12
- data/lib/aasm/configuration.rb +3 -0
- data/lib/aasm/core/event.rb +12 -6
- data/lib/aasm/core/state.rb +6 -5
- data/lib/aasm/core/transition.rb +1 -1
- data/lib/aasm/dsl_helper.rb +24 -22
- data/lib/aasm/instance_base.rb +14 -4
- data/lib/aasm/localizer.rb +13 -3
- data/lib/aasm/persistence/active_record_persistence.rb +18 -13
- data/lib/aasm/persistence/base.rb +13 -2
- data/lib/aasm/persistence/orm.rb +1 -1
- data/lib/aasm/version.rb +1 -1
- data/lib/aasm.rb +0 -2
- data/lib/generators/active_record/templates/migration.rb +1 -1
- data/spec/database.rb +9 -11
- data/spec/en.yml +0 -3
- data/spec/{en_deprecated_style.yml → localizer_test_model_deprecated_style.yml} +6 -3
- data/spec/localizer_test_model_new_style.yml +11 -0
- data/spec/models/active_record/localizer_test_model.rb +11 -3
- data/spec/models/active_record/namespaced.rb +16 -0
- data/spec/models/active_record/timestamp_example.rb +16 -0
- data/spec/models/default_state.rb +1 -1
- data/spec/models/event_with_keyword_arguments.rb +16 -0
- data/spec/models/mongoid/timestamp_example_mongoid.rb +20 -0
- data/spec/models/timestamps_example.rb +19 -0
- data/spec/models/timestamps_with_named_machine_example.rb +13 -0
- data/spec/spec_helper.rb +5 -0
- data/spec/spec_helpers/dynamoid.rb +5 -1
- data/spec/unit/api_spec.rb +4 -0
- data/spec/unit/callbacks_spec.rb +34 -4
- data/spec/unit/complex_example_spec.rb +8 -0
- data/spec/unit/event_with_keyword_arguments_spec.rb +10 -0
- data/spec/unit/inspection_multiple_spec.rb +9 -5
- data/spec/unit/inspection_spec.rb +7 -3
- data/spec/unit/localizer_spec.rb +49 -18
- data/spec/unit/persistence/active_record_persistence_multiple_spec.rb +17 -0
- data/spec/unit/persistence/active_record_persistence_spec.rb +12 -0
- data/spec/unit/persistence/mongoid_persistence_spec.rb +12 -0
- data/spec/unit/state_spec.rb +21 -5
- data/spec/unit/timestamps_spec.rb +32 -0
- data/test/minitest_helper.rb +5 -1
- metadata +28 -16
- data/.travis.yml +0 -93
- data/gemfiles/rails_5.0.gemfile +0 -14
- data/gemfiles/rails_5.0_nobrainer.gemfile +0 -9
- data/gemfiles/rails_5.1.gemfile +0 -14
data/spec/spec_helper.rb
CHANGED
@@ -13,6 +13,7 @@ $LOAD_PATH.unshift(File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib
|
|
13
13
|
require 'aasm'
|
14
14
|
require 'rspec'
|
15
15
|
require 'aasm/rspec'
|
16
|
+
require 'i18n'
|
16
17
|
require 'pry'
|
17
18
|
|
18
19
|
# require 'ruby-debug'; Debugger.settings[:autoeval] = true; debugger; rubys_debugger = 'annoying'
|
@@ -34,3 +35,7 @@ Dir[File.dirname(__FILE__) + "/spec_helpers/**/*.rb"].sort.each { |f| require Fi
|
|
34
35
|
|
35
36
|
# example model classes
|
36
37
|
Dir[File.dirname(__FILE__) + "/models/*.rb"].sort.each { |f| require File.expand_path(f) }
|
38
|
+
|
39
|
+
I18n.load_path << 'spec/en.yml'
|
40
|
+
I18n.enforce_available_locales = false
|
41
|
+
I18n.default_locale = :en
|
@@ -2,8 +2,12 @@
|
|
2
2
|
|
3
3
|
begin
|
4
4
|
require 'dynamoid'
|
5
|
-
require 'aws-sdk-resources'
|
6
5
|
puts "dynamoid #{Dynamoid::VERSION} gem found, running Dynamoid specs \e[32m#{'✔'}\e[0m"
|
6
|
+
if Gem::Version.new(Dynamoid::VERSION) >= Gem::Version.new('3.0.0')
|
7
|
+
require 'aws-sdk-dynamodb'
|
8
|
+
else
|
9
|
+
require 'aws-sdk-resources'
|
10
|
+
end
|
7
11
|
|
8
12
|
ENV['ACCESS_KEY'] ||= 'abcd'
|
9
13
|
ENV['SECRET_KEY'] ||= '1234'
|
data/spec/unit/api_spec.rb
CHANGED
@@ -13,6 +13,10 @@ if defined?(ActiveRecord)
|
|
13
13
|
expect(DefaultState.new.aasm.current_state).to eql :alpha
|
14
14
|
end
|
15
15
|
|
16
|
+
it "uses display option" do
|
17
|
+
expect(DefaultState.new.aasm.human_state).to eql "ALPHA"
|
18
|
+
end
|
19
|
+
|
16
20
|
it "uses the provided method" do
|
17
21
|
expect(ProvidedState.new.aasm.current_state).to eql :beta
|
18
22
|
end
|
data/spec/unit/callbacks_spec.rb
CHANGED
@@ -90,11 +90,9 @@ describe 'callbacks for the new DSL' do
|
|
90
90
|
expect(callback).to receive(:ensure_on_all_events).once.ordered
|
91
91
|
end
|
92
92
|
|
93
|
-
# puts "------- close!"
|
94
93
|
callback.close!
|
95
94
|
end
|
96
95
|
|
97
|
-
|
98
96
|
it "works fine after reload" do
|
99
97
|
show_debug_log = false
|
100
98
|
|
@@ -125,10 +123,43 @@ describe 'callbacks for the new DSL' do
|
|
125
123
|
expect(callback).to receive(:after_event).once.ordered
|
126
124
|
end
|
127
125
|
|
128
|
-
# puts "------- close!"
|
129
126
|
callback.close!
|
130
127
|
end
|
131
128
|
|
129
|
+
it 'does not run callbacks if firing an unknown event' do
|
130
|
+
show_debug_log = false
|
131
|
+
|
132
|
+
callback = Callbacks::Basic.new(:log => show_debug_log)
|
133
|
+
|
134
|
+
expect(callback).to_not receive(:before_all_events).ordered
|
135
|
+
expect(callback).to_not receive(:before_event).ordered
|
136
|
+
expect(callback).to_not receive(:event_guard).ordered
|
137
|
+
expect(callback).to_not receive(:transition_guard)
|
138
|
+
expect(callback).to_not receive(:before_exit_open)
|
139
|
+
expect(callback).to_not receive(:exit_open)
|
140
|
+
expect(callback).to_not receive(:after_all_transitions)
|
141
|
+
expect(callback).to_not receive(:after_transition)
|
142
|
+
expect(callback).to_not receive(:before_enter_closed)
|
143
|
+
expect(callback).to_not receive(:enter_closed)
|
144
|
+
expect(callback).to_not receive(:aasm_write_state)
|
145
|
+
expect(callback).to_not receive(:event_before_success)
|
146
|
+
expect(callback).to_not receive(:success_transition)
|
147
|
+
expect(callback).to_not receive(:after_exit_open)
|
148
|
+
expect(callback).to_not receive(:after_enter_closed)
|
149
|
+
expect(callback).to_not receive(:after_event)
|
150
|
+
expect(callback).to_not receive(:after_all_events)
|
151
|
+
expect(callback).to_not receive(:ensure_event).ordered
|
152
|
+
expect(callback).to_not receive(:ensure_on_all_events).ordered
|
153
|
+
|
154
|
+
expect {
|
155
|
+
callback.aasm.fire(:unknown)
|
156
|
+
}.to raise_error(AASM::UndefinedState, "State :unknown doesn't exist")
|
157
|
+
|
158
|
+
expect {
|
159
|
+
callback.aasm.fire!(:unknown)
|
160
|
+
}.to raise_error(AASM::UndefinedState, "State :unknown! doesn't exist")
|
161
|
+
end
|
162
|
+
|
132
163
|
it "does not run any state callback if the event guard fails" do
|
133
164
|
callback = Callbacks::Basic.new(:log => false)
|
134
165
|
callback.aasm.current_state
|
@@ -164,7 +195,6 @@ describe 'callbacks for the new DSL' do
|
|
164
195
|
callback = Callbacks::PrivateMethod.new(:log => show_debug_log)
|
165
196
|
callback.aasm.current_state
|
166
197
|
|
167
|
-
# puts "------- close!"
|
168
198
|
expect {
|
169
199
|
callback.close!
|
170
200
|
}.to_not raise_error
|
@@ -90,4 +90,12 @@ describe 'when being unsuspended' do
|
|
90
90
|
it "should not be able to fire unknown events" do
|
91
91
|
expect(auth.aasm.may_fire_event?(:unknown)).to be false
|
92
92
|
end
|
93
|
+
|
94
|
+
it "should raise AASM::UndefinedState when firing unknown events" do
|
95
|
+
expect { auth.aasm.fire(:unknown) }.to raise_error(AASM::UndefinedState, "State :unknown doesn't exist")
|
96
|
+
end
|
97
|
+
|
98
|
+
it "should raise AASM::UndefinedState when firing unknown bang events" do
|
99
|
+
expect { auth.aasm.fire!(:unknown) }.to raise_error(AASM::UndefinedState, "State :unknown! doesn't exist")
|
100
|
+
end
|
93
101
|
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe EventWithKeywordArguments do
|
4
|
+
let(:example) { EventWithKeywordArguments.new }
|
5
|
+
describe 'enable keyword arguments' do
|
6
|
+
it 'should be executed correctly that method registered by "before hooks" for events with keyword arguments.' do
|
7
|
+
expect(example.close(key: 1)).to be_truthy
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
@@ -166,11 +166,15 @@ describe "special cases" do
|
|
166
166
|
end
|
167
167
|
|
168
168
|
describe 'aasm.states_for_select' do
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
169
|
+
context 'without I18n' do
|
170
|
+
before { allow(Module).to receive(:const_defined?).with(:I18n).and_return(nil) }
|
171
|
+
|
172
|
+
it "should return a select friendly array of states" do
|
173
|
+
expect(FooMultiple.aasm(:left)).to respond_to(:states_for_select)
|
174
|
+
expect(FooMultiple.aasm(:left).states_for_select).to eq(
|
175
|
+
[['Open', 'open'], ['Closed', 'closed'], ['Final', 'final']]
|
176
|
+
)
|
177
|
+
end
|
174
178
|
end
|
175
179
|
end
|
176
180
|
|
@@ -102,9 +102,13 @@ describe "special cases" do
|
|
102
102
|
end
|
103
103
|
|
104
104
|
describe 'aasm.states_for_select' do
|
105
|
-
|
106
|
-
|
107
|
-
|
105
|
+
context 'without I18n' do
|
106
|
+
before { allow(Module).to receive(:const_defined?).with(:I18n).and_return(nil) }
|
107
|
+
|
108
|
+
it "should return a select friendly array of states" do
|
109
|
+
expect(Foo.aasm).to respond_to(:states_for_select)
|
110
|
+
expect(Foo.aasm.states_for_select).to eq([['Open', 'open'], ['Closed', 'closed'], ['Final', 'final']])
|
111
|
+
end
|
108
112
|
end
|
109
113
|
end
|
110
114
|
|
data/spec/unit/localizer_spec.rb
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
if defined?(
|
4
|
-
require '
|
5
|
-
|
6
|
-
I18n.enforce_available_locales = false
|
3
|
+
if defined?(ActiveRecord)
|
4
|
+
require 'models/active_record/localizer_test_model'
|
7
5
|
load_schema
|
8
6
|
|
9
7
|
describe AASM::Localizer, "new style" do
|
10
8
|
before(:all) do
|
11
|
-
I18n.load_path << 'spec/
|
12
|
-
I18n.default_locale = :en
|
9
|
+
I18n.load_path << 'spec/localizer_test_model_new_style.yml'
|
13
10
|
I18n.reload!
|
14
11
|
end
|
15
12
|
|
16
13
|
after(:all) do
|
17
|
-
I18n.load_path.
|
14
|
+
I18n.load_path.delete('spec/localizer_test_model_new_style.yml')
|
15
|
+
I18n.backend.load_translations
|
18
16
|
end
|
19
17
|
|
20
18
|
let (:foo_opened) { LocalizerTestModel.new }
|
@@ -31,25 +29,42 @@ if defined?(ActiceRecord)
|
|
31
29
|
end
|
32
30
|
|
33
31
|
context 'aasm.human_event_name' do
|
34
|
-
|
35
|
-
|
32
|
+
context 'with event name' do
|
33
|
+
it 'should return translated event name' do
|
34
|
+
expect(LocalizerTestModel.aasm.human_event_name(:close)).to eq("Let's close it!")
|
35
|
+
end
|
36
|
+
|
37
|
+
it 'should return humanized event name' do
|
38
|
+
expect(LocalizerTestModel.aasm.human_event_name(:open)).to eq("Open")
|
39
|
+
end
|
36
40
|
end
|
37
41
|
|
38
|
-
|
39
|
-
|
42
|
+
context 'with event object' do
|
43
|
+
it 'should return translated event name' do
|
44
|
+
event = LocalizerTestModel.aasm.events.detect { |e| e.name == :close }
|
45
|
+
|
46
|
+
expect(LocalizerTestModel.aasm.human_event_name(event)).to eq("Let's close it!")
|
47
|
+
end
|
48
|
+
|
49
|
+
it 'should return humanized event name' do
|
50
|
+
event = LocalizerTestModel.aasm.events.detect { |e| e.name == :open }
|
51
|
+
|
52
|
+
expect(LocalizerTestModel.aasm.human_event_name(event)).to eq("Open")
|
53
|
+
end
|
40
54
|
end
|
41
55
|
end
|
42
56
|
end
|
43
57
|
|
44
58
|
describe AASM::Localizer, "deprecated style" do
|
45
59
|
before(:all) do
|
46
|
-
I18n.load_path << 'spec/
|
47
|
-
I18n.default_locale = :en
|
60
|
+
I18n.load_path << 'spec/localizer_test_model_deprecated_style.yml'
|
48
61
|
I18n.reload!
|
62
|
+
I18n.backend.load_translations
|
49
63
|
end
|
50
64
|
|
51
65
|
after(:all) do
|
52
|
-
I18n.load_path.
|
66
|
+
I18n.load_path.delete('spec/localizer_test_model_deprecated_style.yml')
|
67
|
+
I18n.backend.load_translations
|
53
68
|
end
|
54
69
|
|
55
70
|
let (:foo_opened) { LocalizerTestModel.new }
|
@@ -66,12 +81,28 @@ if defined?(ActiceRecord)
|
|
66
81
|
end
|
67
82
|
|
68
83
|
context 'aasm.human_event_name' do
|
69
|
-
|
70
|
-
|
84
|
+
context 'with event name' do
|
85
|
+
it 'should return translated event name' do
|
86
|
+
expect(LocalizerTestModel.aasm.human_event_name(:close)).to eq("Let's close it!")
|
87
|
+
end
|
88
|
+
|
89
|
+
it 'should return humanized event name' do
|
90
|
+
expect(LocalizerTestModel.aasm.human_event_name(:open)).to eq("Open")
|
91
|
+
end
|
71
92
|
end
|
72
93
|
|
73
|
-
|
74
|
-
|
94
|
+
context 'with event object' do
|
95
|
+
it 'should return translated event name' do
|
96
|
+
event = LocalizerTestModel.aasm.events.detect { |e| e.name == :close }
|
97
|
+
|
98
|
+
expect(LocalizerTestModel.aasm.human_event_name(event)).to eq("Let's close it!")
|
99
|
+
end
|
100
|
+
|
101
|
+
it 'should return humanized event name' do
|
102
|
+
event = LocalizerTestModel.aasm.events.detect { |e| e.name == :open }
|
103
|
+
|
104
|
+
expect(LocalizerTestModel.aasm.human_event_name(event)).to eq("Open")
|
105
|
+
end
|
75
106
|
end
|
76
107
|
end
|
77
108
|
end
|
@@ -331,6 +331,23 @@ if defined?(ActiveRecord)
|
|
331
331
|
expect(MultipleSimpleNewDsl.unknown_scope).to contain_exactly(dsl2)
|
332
332
|
end
|
333
333
|
end
|
334
|
+
|
335
|
+
context "when namespeced" do
|
336
|
+
it "add namespaced scopes" do
|
337
|
+
expect(MultipleNamespaced).to respond_to(:car_unsold)
|
338
|
+
expect(MultipleNamespaced).to respond_to(:car_sold)
|
339
|
+
|
340
|
+
expect(MultipleNamespaced.car_unsold.is_a?(ActiveRecord::Relation)).to be_truthy
|
341
|
+
expect(MultipleNamespaced.car_sold.is_a?(ActiveRecord::Relation)).to be_truthy
|
342
|
+
end
|
343
|
+
it "add unnamespaced scopes" do
|
344
|
+
expect(MultipleNamespaced).to respond_to(:unsold)
|
345
|
+
expect(MultipleNamespaced).to respond_to(:sold)
|
346
|
+
|
347
|
+
expect(MultipleNamespaced.unsold.is_a?(ActiveRecord::Relation)).to be_truthy
|
348
|
+
expect(MultipleNamespaced.sold.is_a?(ActiveRecord::Relation)).to be_truthy
|
349
|
+
end
|
350
|
+
end
|
334
351
|
end # scopes
|
335
352
|
|
336
353
|
describe "direct assignment" do
|
@@ -837,4 +837,16 @@ if defined?(ActiveRecord)
|
|
837
837
|
expect(example.complete!).to be_falsey
|
838
838
|
end
|
839
839
|
end
|
840
|
+
|
841
|
+
describe 'testing the timestamps option' do
|
842
|
+
let(:example) { TimestampExample.create! }
|
843
|
+
|
844
|
+
it 'should update existing timestamp columns' do
|
845
|
+
expect { example.open! }.to change { example.reload.opened_at }.from(nil).to(instance_of(::Time))
|
846
|
+
end
|
847
|
+
|
848
|
+
it 'should not fail if there is no corresponding timestamp column' do
|
849
|
+
expect { example.close! }.to change { example.reload.aasm_state }
|
850
|
+
end
|
851
|
+
end
|
840
852
|
end
|
@@ -161,5 +161,17 @@ if defined?(Mongoid::Document)
|
|
161
161
|
end
|
162
162
|
end
|
163
163
|
|
164
|
+
describe 'testing the timestamps option' do
|
165
|
+
let(:example) { TimestampExampleMongoid.create }
|
166
|
+
|
167
|
+
it 'should update existing timestamp fields' do
|
168
|
+
expect { example.open! }.to change { example.reload.opened_at }.from(nil).to(instance_of(::Time))
|
169
|
+
end
|
170
|
+
|
171
|
+
it 'should not fail if there is no corresponding timestamp field' do
|
172
|
+
expect { example.close! }.to change { example.reload.status }
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
164
176
|
end
|
165
177
|
end
|
data/spec/unit/state_spec.rb
CHANGED
@@ -17,12 +17,28 @@ describe AASM::Core::State do
|
|
17
17
|
expect(state.name).to eq(:astate)
|
18
18
|
end
|
19
19
|
|
20
|
-
|
21
|
-
|
22
|
-
|
20
|
+
describe '#display_name' do
|
21
|
+
subject(:display_name) { new_state(options).display_name }
|
22
|
+
|
23
|
+
context 'without options' do
|
24
|
+
let(:options) { {} }
|
25
|
+
|
26
|
+
context 'without I18n' do
|
27
|
+
before { allow(Module).to receive(:const_defined?).with(:I18n).and_return(nil) }
|
28
|
+
|
29
|
+
it 'should set the display_name from name' do
|
30
|
+
expect(display_name).to eq('Astate')
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
context 'with :display option' do
|
36
|
+
let(:options) { { display: "A State" } }
|
23
37
|
|
24
|
-
|
25
|
-
|
38
|
+
it 'should set the display_name from options' do
|
39
|
+
expect(display_name).to eq('A State')
|
40
|
+
end
|
41
|
+
end
|
26
42
|
end
|
27
43
|
|
28
44
|
it 'should set the options and expose them as options' do
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'timestamps option' do
|
4
|
+
it 'calls a timestamp setter based on the state name when entering a new state' do
|
5
|
+
object = TimestampsExample.new
|
6
|
+
expect { object.open }.to change { object.opened_at }.from(nil).to(instance_of(::Time))
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'overwrites any previous timestamp if a state is entered repeatedly' do
|
10
|
+
object = TimestampsExample.new
|
11
|
+
object.opened_at = ::Time.new(2000, 1, 1)
|
12
|
+
expect { object.open }.to change { object.opened_at }
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'does nothing if there is no setter matching the new state' do
|
16
|
+
object = TimestampsExample.new
|
17
|
+
expect { object.close }.not_to change { object.closed_at }
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'can be turned off and on' do
|
21
|
+
object = TimestampsExample.new
|
22
|
+
object.class.aasm.state_machine.config.timestamps = false
|
23
|
+
expect { object.open }.not_to change { object.opened_at }
|
24
|
+
object.class.aasm.state_machine.config.timestamps = true
|
25
|
+
expect { object.open }.to change { object.opened_at }
|
26
|
+
end
|
27
|
+
|
28
|
+
it 'calls a timestamp setter when using a named state machine' do
|
29
|
+
object = TimestampsWithNamedMachineExample.new
|
30
|
+
expect { object.open }.to change { object.opened_at }.from(nil).to(instance_of(::Time))
|
31
|
+
end
|
32
|
+
end
|
data/test/minitest_helper.rb
CHANGED
@@ -23,7 +23,11 @@ end
|
|
23
23
|
# Dynamoid initialization
|
24
24
|
begin
|
25
25
|
require 'dynamoid'
|
26
|
-
|
26
|
+
if Gem::Version.new(Dynamoid::VERSION) >= Gem::Version.new('3.0.0')
|
27
|
+
require 'aws-sdk-dynamodb'
|
28
|
+
else
|
29
|
+
require 'aws-sdk-resources'
|
30
|
+
end
|
27
31
|
|
28
32
|
ENV['ACCESS_KEY'] ||= 'abcd'
|
29
33
|
ENV['SECRET_KEY'] ||= '1234'
|
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: 5.
|
4
|
+
version: 5.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thorsten Boettger
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2022-07-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: concurrent-ruby
|
@@ -115,20 +115,14 @@ dependencies:
|
|
115
115
|
requirements:
|
116
116
|
- - ">="
|
117
117
|
- !ruby/object:Gem::Version
|
118
|
-
version: 0.1.
|
119
|
-
- - "<"
|
120
|
-
- !ruby/object:Gem::Version
|
121
|
-
version: 0.1.20
|
118
|
+
version: 0.1.21
|
122
119
|
type: :development
|
123
120
|
prerelease: false
|
124
121
|
version_requirements: !ruby/object:Gem::Requirement
|
125
122
|
requirements:
|
126
123
|
- - ">="
|
127
124
|
- !ruby/object:Gem::Version
|
128
|
-
version: 0.1.
|
129
|
-
- - "<"
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: 0.1.20
|
125
|
+
version: 0.1.21
|
132
126
|
- !ruby/object:Gem::Dependency
|
133
127
|
name: pry
|
134
128
|
requirement: !ruby/object:Gem::Requirement
|
@@ -153,8 +147,8 @@ files:
|
|
153
147
|
- ".document"
|
154
148
|
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
155
149
|
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
150
|
+
- ".github/workflows/build.yml"
|
156
151
|
- ".gitignore"
|
157
|
-
- ".travis.yml"
|
158
152
|
- API
|
159
153
|
- Appraisals
|
160
154
|
- CHANGELOG.md
|
@@ -176,10 +170,10 @@ files:
|
|
176
170
|
- gemfiles/rails_4.2.gemfile
|
177
171
|
- gemfiles/rails_4.2_mongoid_5.gemfile
|
178
172
|
- gemfiles/rails_4.2_nobrainer.gemfile
|
179
|
-
- gemfiles/rails_5.0.gemfile
|
180
|
-
- gemfiles/rails_5.0_nobrainer.gemfile
|
181
|
-
- gemfiles/rails_5.1.gemfile
|
182
173
|
- gemfiles/rails_5.2.gemfile
|
174
|
+
- gemfiles/rails_6.0.gemfile
|
175
|
+
- gemfiles/rails_6.1.gemfile
|
176
|
+
- gemfiles/rails_7.0.gemfile
|
183
177
|
- lib/aasm.rb
|
184
178
|
- lib/aasm/aasm.rb
|
185
179
|
- lib/aasm/base.rb
|
@@ -232,10 +226,11 @@ files:
|
|
232
226
|
- spec/database.rb
|
233
227
|
- spec/database.yml
|
234
228
|
- spec/en.yml
|
235
|
-
- spec/en_deprecated_style.yml
|
236
229
|
- spec/generators/active_record_generator_spec.rb
|
237
230
|
- spec/generators/mongoid_generator_spec.rb
|
238
231
|
- spec/generators/no_brainer_generator_spec.rb
|
232
|
+
- spec/localizer_test_model_deprecated_style.yml
|
233
|
+
- spec/localizer_test_model_new_style.yml
|
239
234
|
- spec/models/active_record/active_record_callback.rb
|
240
235
|
- spec/models/active_record/basic_active_record_two_state_machines_example.rb
|
241
236
|
- spec/models/active_record/complex_active_record_example.rb
|
@@ -245,6 +240,7 @@ files:
|
|
245
240
|
- spec/models/active_record/instance_level_skip_validation_example.rb
|
246
241
|
- spec/models/active_record/invalid_persistor.rb
|
247
242
|
- spec/models/active_record/localizer_test_model.rb
|
243
|
+
- spec/models/active_record/namespaced.rb
|
248
244
|
- spec/models/active_record/no_direct_assignment.rb
|
249
245
|
- spec/models/active_record/no_scope.rb
|
250
246
|
- spec/models/active_record/persisted_state.rb
|
@@ -255,6 +251,7 @@ files:
|
|
255
251
|
- spec/models/active_record/silent_persistor.rb
|
256
252
|
- spec/models/active_record/simple_new_dsl.rb
|
257
253
|
- spec/models/active_record/thief.rb
|
254
|
+
- spec/models/active_record/timestamp_example.rb
|
258
255
|
- spec/models/active_record/transactor.rb
|
259
256
|
- spec/models/active_record/transient.rb
|
260
257
|
- spec/models/active_record/validator.rb
|
@@ -285,6 +282,7 @@ files:
|
|
285
282
|
- spec/models/dynamoid/complex_dynamoid_example.rb
|
286
283
|
- spec/models/dynamoid/dynamoid_multiple.rb
|
287
284
|
- spec/models/dynamoid/dynamoid_simple.rb
|
285
|
+
- spec/models/event_with_keyword_arguments.rb
|
288
286
|
- spec/models/foo.rb
|
289
287
|
- spec/models/foo_callback_multiple.rb
|
290
288
|
- spec/models/guard_arguments_check.rb
|
@@ -301,6 +299,7 @@ files:
|
|
301
299
|
- spec/models/mongoid/silent_persistor_mongoid.rb
|
302
300
|
- spec/models/mongoid/simple_mongoid.rb
|
303
301
|
- spec/models/mongoid/simple_new_dsl_mongoid.rb
|
302
|
+
- spec/models/mongoid/timestamp_example_mongoid.rb
|
304
303
|
- spec/models/mongoid/validator_mongoid.rb
|
305
304
|
- spec/models/multi_transitioner.rb
|
306
305
|
- spec/models/multiple_transitions_that_differ_only_by_guard.rb
|
@@ -342,6 +341,8 @@ files:
|
|
342
341
|
- spec/models/sub_classing.rb
|
343
342
|
- spec/models/super_class.rb
|
344
343
|
- spec/models/this_name_better_not_be_in_use.rb
|
344
|
+
- spec/models/timestamps_example.rb
|
345
|
+
- spec/models/timestamps_with_named_machine_example.rb
|
345
346
|
- spec/models/valid_state_name.rb
|
346
347
|
- spec/spec_helper.rb
|
347
348
|
- spec/spec_helpers/active_record.rb
|
@@ -362,6 +363,7 @@ files:
|
|
362
363
|
- spec/unit/event_multiple_spec.rb
|
363
364
|
- spec/unit/event_naming_spec.rb
|
364
365
|
- spec/unit/event_spec.rb
|
366
|
+
- spec/unit/event_with_keyword_arguments_spec.rb
|
365
367
|
- spec/unit/exception_spec.rb
|
366
368
|
- spec/unit/guard_arguments_check_spec.rb
|
367
369
|
- spec/unit/guard_multiple_spec.rb
|
@@ -406,6 +408,7 @@ files:
|
|
406
408
|
- spec/unit/states_on_one_line_example_spec.rb
|
407
409
|
- spec/unit/subclassing_multiple_spec.rb
|
408
410
|
- spec/unit/subclassing_spec.rb
|
411
|
+
- spec/unit/timestamps_spec.rb
|
409
412
|
- spec/unit/transition_spec.rb
|
410
413
|
- test/minitest_helper.rb
|
411
414
|
- test/unit/minitest_matcher_test.rb
|
@@ -436,10 +439,11 @@ test_files:
|
|
436
439
|
- spec/database.rb
|
437
440
|
- spec/database.yml
|
438
441
|
- spec/en.yml
|
439
|
-
- spec/en_deprecated_style.yml
|
440
442
|
- spec/generators/active_record_generator_spec.rb
|
441
443
|
- spec/generators/mongoid_generator_spec.rb
|
442
444
|
- spec/generators/no_brainer_generator_spec.rb
|
445
|
+
- spec/localizer_test_model_deprecated_style.yml
|
446
|
+
- spec/localizer_test_model_new_style.yml
|
443
447
|
- spec/models/active_record/active_record_callback.rb
|
444
448
|
- spec/models/active_record/basic_active_record_two_state_machines_example.rb
|
445
449
|
- spec/models/active_record/complex_active_record_example.rb
|
@@ -449,6 +453,7 @@ test_files:
|
|
449
453
|
- spec/models/active_record/instance_level_skip_validation_example.rb
|
450
454
|
- spec/models/active_record/invalid_persistor.rb
|
451
455
|
- spec/models/active_record/localizer_test_model.rb
|
456
|
+
- spec/models/active_record/namespaced.rb
|
452
457
|
- spec/models/active_record/no_direct_assignment.rb
|
453
458
|
- spec/models/active_record/no_scope.rb
|
454
459
|
- spec/models/active_record/persisted_state.rb
|
@@ -459,6 +464,7 @@ test_files:
|
|
459
464
|
- spec/models/active_record/silent_persistor.rb
|
460
465
|
- spec/models/active_record/simple_new_dsl.rb
|
461
466
|
- spec/models/active_record/thief.rb
|
467
|
+
- spec/models/active_record/timestamp_example.rb
|
462
468
|
- spec/models/active_record/transactor.rb
|
463
469
|
- spec/models/active_record/transient.rb
|
464
470
|
- spec/models/active_record/validator.rb
|
@@ -489,6 +495,7 @@ test_files:
|
|
489
495
|
- spec/models/dynamoid/complex_dynamoid_example.rb
|
490
496
|
- spec/models/dynamoid/dynamoid_multiple.rb
|
491
497
|
- spec/models/dynamoid/dynamoid_simple.rb
|
498
|
+
- spec/models/event_with_keyword_arguments.rb
|
492
499
|
- spec/models/foo.rb
|
493
500
|
- spec/models/foo_callback_multiple.rb
|
494
501
|
- spec/models/guard_arguments_check.rb
|
@@ -505,6 +512,7 @@ test_files:
|
|
505
512
|
- spec/models/mongoid/silent_persistor_mongoid.rb
|
506
513
|
- spec/models/mongoid/simple_mongoid.rb
|
507
514
|
- spec/models/mongoid/simple_new_dsl_mongoid.rb
|
515
|
+
- spec/models/mongoid/timestamp_example_mongoid.rb
|
508
516
|
- spec/models/mongoid/validator_mongoid.rb
|
509
517
|
- spec/models/multi_transitioner.rb
|
510
518
|
- spec/models/multiple_transitions_that_differ_only_by_guard.rb
|
@@ -546,6 +554,8 @@ test_files:
|
|
546
554
|
- spec/models/sub_classing.rb
|
547
555
|
- spec/models/super_class.rb
|
548
556
|
- spec/models/this_name_better_not_be_in_use.rb
|
557
|
+
- spec/models/timestamps_example.rb
|
558
|
+
- spec/models/timestamps_with_named_machine_example.rb
|
549
559
|
- spec/models/valid_state_name.rb
|
550
560
|
- spec/spec_helper.rb
|
551
561
|
- spec/spec_helpers/active_record.rb
|
@@ -566,6 +576,7 @@ test_files:
|
|
566
576
|
- spec/unit/event_multiple_spec.rb
|
567
577
|
- spec/unit/event_naming_spec.rb
|
568
578
|
- spec/unit/event_spec.rb
|
579
|
+
- spec/unit/event_with_keyword_arguments_spec.rb
|
569
580
|
- spec/unit/exception_spec.rb
|
570
581
|
- spec/unit/guard_arguments_check_spec.rb
|
571
582
|
- spec/unit/guard_multiple_spec.rb
|
@@ -610,6 +621,7 @@ test_files:
|
|
610
621
|
- spec/unit/states_on_one_line_example_spec.rb
|
611
622
|
- spec/unit/subclassing_multiple_spec.rb
|
612
623
|
- spec/unit/subclassing_spec.rb
|
624
|
+
- spec/unit/timestamps_spec.rb
|
613
625
|
- spec/unit/transition_spec.rb
|
614
626
|
- test/minitest_helper.rb
|
615
627
|
- test/unit/minitest_matcher_test.rb
|