statesman 7.4.0 → 10.2.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.
@@ -27,6 +27,112 @@ describe Statesman::Machine do
27
27
  end
28
28
  end
29
29
 
30
+ describe ".remove_state" do
31
+ subject(:remove_state) { machine.remove_state(:x) }
32
+
33
+ before do
34
+ machine.class_eval do
35
+ state :x
36
+ state :y
37
+ state :z
38
+ end
39
+ end
40
+
41
+ it "removes the state" do
42
+ expect { remove_state }.
43
+ to change(machine, :states).
44
+ from(match_array(%w[x y z])).
45
+ to(%w[y z])
46
+ end
47
+
48
+ context "with a transition from the removed state" do
49
+ before { machine.transition from: :x, to: :y }
50
+
51
+ it "removes the transition" do
52
+ expect { remove_state }.
53
+ to change(machine, :successors).
54
+ from({ "x" => ["y"] }).
55
+ to({})
56
+ end
57
+
58
+ context "with multiple transitions" do
59
+ before { machine.transition from: :x, to: :z }
60
+
61
+ it "removes all transitions" do
62
+ expect { remove_state }.
63
+ to change(machine, :successors).
64
+ from({ "x" => %w[y z] }).
65
+ to({})
66
+ end
67
+ end
68
+ end
69
+
70
+ context "with a transition to the removed state" do
71
+ before { machine.transition from: :y, to: :x }
72
+
73
+ it "removes the transition" do
74
+ expect { remove_state }.
75
+ to change(machine, :successors).
76
+ from({ "y" => ["x"] }).
77
+ to({})
78
+ end
79
+
80
+ context "with multiple transitions" do
81
+ before { machine.transition from: :z, to: :x }
82
+
83
+ it "removes all transitions" do
84
+ expect { remove_state }.
85
+ to change(machine, :successors).
86
+ from({ "y" => ["x"], "z" => ["x"] }).
87
+ to({})
88
+ end
89
+ end
90
+ end
91
+
92
+ context "with a callback from the removed state" do
93
+ before do
94
+ machine.class_eval do
95
+ transition from: :x, to: :y
96
+ transition from: :x, to: :z
97
+ guard_transition(from: :x) { return false }
98
+ guard_transition(from: :x, to: :z) { return true }
99
+ end
100
+ end
101
+
102
+ let(:guards) do
103
+ [having_attributes(from: "x", to: []), having_attributes(from: "x", to: ["z"])]
104
+ end
105
+
106
+ it "removes the guard" do
107
+ expect { remove_state }.
108
+ to change(machine, :callbacks).
109
+ from(a_hash_including(guards: match_array(guards))).
110
+ to(a_hash_including(guards: []))
111
+ end
112
+ end
113
+
114
+ context "with a callback to the removed state" do
115
+ before do
116
+ machine.class_eval do
117
+ transition from: :y, to: :x
118
+ guard_transition(to: :x) { return false }
119
+ guard_transition(from: :y, to: :x) { return true }
120
+ end
121
+ end
122
+
123
+ let(:guards) do
124
+ [having_attributes(from: nil, to: ["x"]), having_attributes(from: "y", to: ["x"])]
125
+ end
126
+
127
+ it "removes the guard" do
128
+ expect { remove_state }.
129
+ to change(machine, :callbacks).
130
+ from(a_hash_including(guards: match_array(guards))).
131
+ to(a_hash_including(guards: []))
132
+ end
133
+ end
134
+ end
135
+
30
136
  describe ".retry_conflicts" do
31
137
  subject(:transition_state) do
32
138
  described_class.retry_conflicts(retry_attempts) do
@@ -170,6 +276,42 @@ describe Statesman::Machine do
170
276
  end
171
277
  end
172
278
 
279
+ describe ".remove_transitions" do
280
+ before do
281
+ machine.class_eval do
282
+ state :x
283
+ state :y
284
+ state :z
285
+ transition from: :x, to: :y
286
+ transition from: :x, to: :z
287
+ transition from: :y, to: :z
288
+ end
289
+ end
290
+
291
+ let(:initial_successors) { { "x" => %w[y z], "y" => ["z"] } }
292
+
293
+ it "removes the correct transitions when given a from state" do
294
+ expect { machine.remove_transitions(from: :x) }.
295
+ to change(machine, :successors).
296
+ from(initial_successors).
297
+ to({ "y" => ["z"] })
298
+ end
299
+
300
+ it "removes the correct transitions when given a to state" do
301
+ expect { machine.remove_transitions(to: :z) }.
302
+ to change(machine, :successors).
303
+ from(initial_successors).
304
+ to({ "x" => ["y"] })
305
+ end
306
+
307
+ it "removes the correct transitions when given a from and to state" do
308
+ expect { machine.remove_transitions(from: :x, to: :z) }.
309
+ to change(machine, :successors).
310
+ from(initial_successors).
311
+ to({ "x" => ["y"], "y" => ["z"] })
312
+ end
313
+ end
314
+
173
315
  describe ".validate_callback_condition" do
174
316
  before do
175
317
  machine.class_eval do
@@ -234,11 +376,9 @@ describe Statesman::Machine do
234
376
 
235
377
  it "does not add a callback" do
236
378
  expect do
237
- begin
238
- set_callback
239
- rescue error_type
240
- nil
241
- end
379
+ set_callback
380
+ rescue error_type
381
+ nil
242
382
  end.to_not change(machine.callbacks[callback_store], :count)
243
383
  end
244
384
  end
@@ -537,6 +677,34 @@ describe Statesman::Machine do
537
677
  end
538
678
  end
539
679
 
680
+ describe "#last_transition_to" do
681
+ subject { instance.last_transition_to(:y) }
682
+
683
+ before do
684
+ machine.class_eval do
685
+ state :x, initial: true
686
+ state :y
687
+ state :z
688
+ transition from: :x, to: :y
689
+ transition from: :y, to: :z
690
+ transition from: :z, to: :y
691
+ end
692
+
693
+ instance.transition_to!(:y)
694
+ instance.transition_to!(:z)
695
+ end
696
+
697
+ let(:instance) { machine.new(my_model) }
698
+
699
+ it { is_expected.to have_attributes(to_state: "y") }
700
+
701
+ context "when there are 2 transitions to the state" do
702
+ before { instance.transition_to!(:y) }
703
+
704
+ it { is_expected.to eq(instance.last_transition) }
705
+ end
706
+ end
707
+
540
708
  describe "#can_transition_to?" do
541
709
  subject(:can_transition_to?) { instance.can_transition_to?(new_state, metadata) }
542
710
 
@@ -767,10 +935,10 @@ describe Statesman::Machine do
767
935
  it { is_expected.to be(:some_state) }
768
936
  end
769
937
 
770
- context "when it is unsuccesful" do
938
+ context "when it is unsuccessful" do
771
939
  before do
772
940
  allow(instance).to receive(:transition_to!).
773
- and_raise(Statesman::GuardFailedError.new(:x, :some_state))
941
+ and_raise(Statesman::GuardFailedError.new(:x, :some_state, nil))
774
942
  end
775
943
 
776
944
  it { is_expected.to be_falsey }
@@ -808,20 +976,20 @@ describe Statesman::Machine do
808
976
  end
809
977
 
810
978
  context "with defined callbacks" do
811
- let(:callback_1) { -> { "Hi" } }
812
- let(:callback_2) { -> { "Bye" } }
979
+ let(:callback_one) { -> { "Hi" } }
980
+ let(:callback_two) { -> { "Bye" } }
813
981
 
814
982
  before do
815
- machine.send(definer, from: :x, to: :y, &callback_1)
816
- machine.send(definer, from: :y, to: :z, &callback_2)
983
+ machine.send(definer, from: :x, to: :y, &callback_one)
984
+ machine.send(definer, from: :y, to: :z, &callback_two)
817
985
  end
818
986
 
819
987
  it "contains the relevant callback" do
820
- expect(callbacks.map(&:callback)).to include(callback_1)
988
+ expect(callbacks.map(&:callback)).to include(callback_one)
821
989
  end
822
990
 
823
991
  it "does not contain the irrelevant callback" do
824
- expect(callbacks.map(&:callback)).to_not include(callback_2)
992
+ expect(callbacks.map(&:callback)).to_not include(callback_two)
825
993
  end
826
994
  end
827
995
  end
@@ -20,10 +20,22 @@ class MyStateMachine
20
20
  transition from: :failed, to: :initial
21
21
  end
22
22
 
23
+ class MyActiveRecordModelTransition < ActiveRecord::Base
24
+ include Statesman::Adapters::ActiveRecordTransition
25
+
26
+ belongs_to :my_active_record_model
27
+ serialize :metadata, JSON
28
+ end
29
+
23
30
  class MyActiveRecordModel < ActiveRecord::Base
24
31
  has_many :my_active_record_model_transitions, autosave: false
25
32
  alias_method :transitions, :my_active_record_model_transitions
26
33
 
34
+ include Statesman::Adapters::ActiveRecordQueries[
35
+ transition_class: MyActiveRecordModelTransition,
36
+ initial_state: :initial
37
+ ]
38
+
27
39
  def state_machine
28
40
  @state_machine ||= MyStateMachine.new(
29
41
  self, transition_class: MyActiveRecordModelTransition
@@ -35,13 +47,6 @@ class MyActiveRecordModel < ActiveRecord::Base
35
47
  end
36
48
  end
37
49
 
38
- class MyActiveRecordModelTransition < ActiveRecord::Base
39
- include Statesman::Adapters::ActiveRecordTransition
40
-
41
- belongs_to :my_active_record_model
42
- serialize :metadata, JSON
43
- end
44
-
45
50
  class MyActiveRecordModelTransitionWithoutInclude < ActiveRecord::Base
46
51
  self.table_name = "my_active_record_model_transitions"
47
52
 
@@ -59,7 +64,6 @@ class CreateMyActiveRecordModelMigration < MIGRATION_CLASS
59
64
  end
60
65
 
61
66
  # TODO: make this a module we can extend from the app? Or a generator?
62
- # rubocop:disable MethodLength, Metrics/AbcSize
63
67
  class CreateMyActiveRecordModelTransitionMigration < MIGRATION_CLASS
64
68
  def change
65
69
  create_table :my_active_record_model_transitions do |t|
@@ -105,7 +109,6 @@ class CreateMyActiveRecordModelTransitionMigration < MIGRATION_CLASS
105
109
  end
106
110
  end
107
111
  end
108
- # rubocop:enable MethodLength, Metrics/AbcSize
109
112
 
110
113
  class OtherActiveRecordModel < ActiveRecord::Base
111
114
  has_many :other_active_record_model_transitions, autosave: false
@@ -139,7 +142,6 @@ class CreateOtherActiveRecordModelMigration < MIGRATION_CLASS
139
142
  end
140
143
  end
141
144
 
142
- # rubocop:disable MethodLength
143
145
  class CreateOtherActiveRecordModelTransitionMigration < MIGRATION_CLASS
144
146
  def change
145
147
  create_table :other_active_record_model_transitions do |t|
@@ -172,18 +174,17 @@ class CreateOtherActiveRecordModelTransitionMigration < MIGRATION_CLASS
172
174
  %i[other_active_record_model_id most_recent],
173
175
  unique: true,
174
176
  where: "most_recent",
175
- name: "index_other_active_record_model_transitions_"\
177
+ name: "index_other_active_record_model_transitions_" \
176
178
  "parent_latest"
177
179
  else
178
180
  add_index :other_active_record_model_transitions,
179
181
  %i[other_active_record_model_id most_recent],
180
182
  unique: true,
181
- name: "index_other_active_record_model_transitions_"\
183
+ name: "index_other_active_record_model_transitions_" \
182
184
  "parent_latest"
183
185
  end
184
186
  end
185
187
  end
186
- # rubocop:enable MethodLength
187
188
 
188
189
  class DropMostRecentColumn < MIGRATION_CLASS
189
190
  def change
@@ -237,7 +238,6 @@ class CreateNamespacedARModelMigration < MIGRATION_CLASS
237
238
  end
238
239
  end
239
240
 
240
- # rubocop:disable MethodLength
241
241
  class CreateNamespacedARModelTransitionMigration < MIGRATION_CLASS
242
242
  def change
243
243
  create_table :my_namespace_my_active_record_model_transitions do |t|
@@ -277,5 +277,95 @@ class CreateNamespacedARModelTransitionMigration < MIGRATION_CLASS
277
277
  name: "index_namespace_model_transitions_parent_latest"
278
278
  end
279
279
  end
280
- # rubocop:enable MethodLength
280
+ end
281
+
282
+ class StiActiveRecordModel < ActiveRecord::Base
283
+ has_many :sti_a_active_record_model_transitions, autosave: false
284
+ has_many :sti_b_active_record_model_transitions, autosave: false
285
+
286
+ def state_machine_a
287
+ @state_machine_a ||= MyStateMachine.new(
288
+ self, transition_class: StiAActiveRecordModelTransition
289
+ )
290
+ end
291
+
292
+ def state_machine_b
293
+ @state_machine_b ||= MyStateMachine.new(
294
+ self, transition_class: StiBActiveRecordModelTransition
295
+ )
296
+ end
297
+
298
+ def metadata
299
+ super || {}
300
+ end
301
+
302
+ def reload(*)
303
+ state_machine_a.reset
304
+ state_machine_b.reset
305
+ super
306
+ end
307
+ end
308
+
309
+ class StiActiveRecordModelTransition < ActiveRecord::Base
310
+ include Statesman::Adapters::ActiveRecordTransition
311
+
312
+ belongs_to :sti_active_record_model
313
+ serialize :metadata, JSON
314
+ end
315
+
316
+ class StiAActiveRecordModelTransition < StiActiveRecordModelTransition
317
+ end
318
+
319
+ class StiBActiveRecordModelTransition < StiActiveRecordModelTransition
320
+ end
321
+
322
+ class CreateStiActiveRecordModelMigration < MIGRATION_CLASS
323
+ def change
324
+ create_table :sti_active_record_models do |t|
325
+ t.timestamps null: false
326
+ end
327
+ end
328
+ end
329
+
330
+ class CreateStiActiveRecordModelTransitionMigration < MIGRATION_CLASS
331
+ def change
332
+ create_table :sti_active_record_model_transitions do |t|
333
+ t.string :to_state
334
+ t.integer :sti_active_record_model_id
335
+ t.integer :sort_key
336
+ t.string :type
337
+
338
+ # MySQL doesn't allow default values on text fields
339
+ if ActiveRecord::Base.connection.adapter_name == "Mysql2"
340
+ t.text :metadata
341
+ else
342
+ t.text :metadata, default: "{}"
343
+ end
344
+
345
+ if Statesman::Adapters::ActiveRecord.database_supports_partial_indexes?
346
+ t.boolean :most_recent, default: true, null: false
347
+ else
348
+ t.boolean :most_recent, default: true
349
+ end
350
+
351
+ t.timestamps null: false
352
+ end
353
+
354
+ add_index :sti_active_record_model_transitions,
355
+ %i[type sti_active_record_model_id sort_key],
356
+ unique: true, name: "sti_sort_key_index"
357
+
358
+ if Statesman::Adapters::ActiveRecord.database_supports_partial_indexes?
359
+ add_index :sti_active_record_model_transitions,
360
+ %i[type sti_active_record_model_id most_recent],
361
+ unique: true,
362
+ where: "most_recent",
363
+ name: "index_sti_active_record_model_transitions_parent_latest"
364
+ else
365
+ add_index :sti_active_record_model_transitions,
366
+ %i[type sti_active_record_model_id most_recent],
367
+ unique: true,
368
+ name: "index_sti_active_record_model_transitions_parent_latest"
369
+ end
370
+ end
281
371
  end
data/statesman.gemspec CHANGED
@@ -18,24 +18,22 @@ Gem::Specification.new do |spec|
18
18
 
19
19
  spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
20
20
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
21
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
22
21
  spec.require_paths = ["lib"]
23
22
 
24
- spec.required_ruby_version = ">= 2.2"
23
+ spec.required_ruby_version = ">= 2.7"
25
24
 
26
25
  spec.add_development_dependency "ammeter", "~> 1.1"
27
- spec.add_development_dependency "bundler", "~> 2.1.4"
28
- spec.add_development_dependency "gc_ruboconfig", "~> 2.3.9"
26
+ spec.add_development_dependency "bundler", "~> 2"
27
+ spec.add_development_dependency "gc_ruboconfig", "~> 3.6.0"
29
28
  spec.add_development_dependency "mysql2", ">= 0.4", "< 0.6"
30
- spec.add_development_dependency "pg", ">= 0.18", "<= 1.3"
31
- spec.add_development_dependency "pry"
29
+ spec.add_development_dependency "pg", ">= 0.18", "<= 1.5"
32
30
  spec.add_development_dependency "rails", ">= 5.2"
33
31
  spec.add_development_dependency "rake", "~> 13.0.0"
34
32
  spec.add_development_dependency "rspec", "~> 3.1"
33
+ spec.add_development_dependency "rspec-github", "~> 2.4.0"
35
34
  spec.add_development_dependency "rspec-its", "~> 1.1"
36
- spec.add_development_dependency "rspec-rails", "~> 3.1"
37
- spec.add_development_dependency "rspec_junit_formatter", "~> 0.4.0"
38
- spec.add_development_dependency "sqlite3", "~> 1.4.2"
35
+ spec.add_development_dependency "rspec-rails", "~> 6.0"
36
+ spec.add_development_dependency "sqlite3", "~> 1.6.1"
39
37
  spec.add_development_dependency "timecop", "~> 0.9.1"
40
38
 
41
39
  spec.metadata = {
@@ -44,5 +42,6 @@ Gem::Specification.new do |spec|
44
42
  "documentation_uri" => "#{GITHUB_URL}/blob/master/README.md",
45
43
  "homepage_uri" => GITHUB_URL,
46
44
  "source_code_uri" => GITHUB_URL,
45
+ "rubygems_mfa_required" => "true",
47
46
  }
48
47
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: statesman
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.4.0
4
+ version: 10.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - GoCardless
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-26 00:00:00.000000000 Z
11
+ date: 2023-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ammeter
@@ -30,28 +30,28 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 2.1.4
33
+ version: '2'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 2.1.4
40
+ version: '2'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: gc_ruboconfig
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 2.3.9
47
+ version: 3.6.0
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 2.3.9
54
+ version: 3.6.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: mysql2
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -81,7 +81,7 @@ dependencies:
81
81
  version: '0.18'
82
82
  - - "<="
83
83
  - !ruby/object:Gem::Version
84
- version: '1.3'
84
+ version: '1.5'
85
85
  type: :development
86
86
  prerelease: false
87
87
  version_requirements: !ruby/object:Gem::Requirement
@@ -91,21 +91,7 @@ dependencies:
91
91
  version: '0.18'
92
92
  - - "<="
93
93
  - !ruby/object:Gem::Version
94
- version: '1.3'
95
- - !ruby/object:Gem::Dependency
96
- name: pry
97
- requirement: !ruby/object:Gem::Requirement
98
- requirements:
99
- - - ">="
100
- - !ruby/object:Gem::Version
101
- version: '0'
102
- type: :development
103
- prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
105
- requirements:
106
- - - ">="
107
- - !ruby/object:Gem::Version
108
- version: '0'
94
+ version: '1.5'
109
95
  - !ruby/object:Gem::Dependency
110
96
  name: rails
111
97
  requirement: !ruby/object:Gem::Requirement
@@ -149,61 +135,61 @@ dependencies:
149
135
  - !ruby/object:Gem::Version
150
136
  version: '3.1'
151
137
  - !ruby/object:Gem::Dependency
152
- name: rspec-its
138
+ name: rspec-github
153
139
  requirement: !ruby/object:Gem::Requirement
154
140
  requirements:
155
141
  - - "~>"
156
142
  - !ruby/object:Gem::Version
157
- version: '1.1'
143
+ version: 2.4.0
158
144
  type: :development
159
145
  prerelease: false
160
146
  version_requirements: !ruby/object:Gem::Requirement
161
147
  requirements:
162
148
  - - "~>"
163
149
  - !ruby/object:Gem::Version
164
- version: '1.1'
150
+ version: 2.4.0
165
151
  - !ruby/object:Gem::Dependency
166
- name: rspec-rails
152
+ name: rspec-its
167
153
  requirement: !ruby/object:Gem::Requirement
168
154
  requirements:
169
155
  - - "~>"
170
156
  - !ruby/object:Gem::Version
171
- version: '3.1'
157
+ version: '1.1'
172
158
  type: :development
173
159
  prerelease: false
174
160
  version_requirements: !ruby/object:Gem::Requirement
175
161
  requirements:
176
162
  - - "~>"
177
163
  - !ruby/object:Gem::Version
178
- version: '3.1'
164
+ version: '1.1'
179
165
  - !ruby/object:Gem::Dependency
180
- name: rspec_junit_formatter
166
+ name: rspec-rails
181
167
  requirement: !ruby/object:Gem::Requirement
182
168
  requirements:
183
169
  - - "~>"
184
170
  - !ruby/object:Gem::Version
185
- version: 0.4.0
171
+ version: '6.0'
186
172
  type: :development
187
173
  prerelease: false
188
174
  version_requirements: !ruby/object:Gem::Requirement
189
175
  requirements:
190
176
  - - "~>"
191
177
  - !ruby/object:Gem::Version
192
- version: 0.4.0
178
+ version: '6.0'
193
179
  - !ruby/object:Gem::Dependency
194
180
  name: sqlite3
195
181
  requirement: !ruby/object:Gem::Requirement
196
182
  requirements:
197
183
  - - "~>"
198
184
  - !ruby/object:Gem::Version
199
- version: 1.4.2
185
+ version: 1.6.1
200
186
  type: :development
201
187
  prerelease: false
202
188
  version_requirements: !ruby/object:Gem::Requirement
203
189
  requirements:
204
190
  - - "~>"
205
191
  - !ruby/object:Gem::Version
206
- version: 1.4.2
192
+ version: 1.6.1
207
193
  - !ruby/object:Gem::Dependency
208
194
  name: timecop
209
195
  requirement: !ruby/object:Gem::Requirement
@@ -225,10 +211,12 @@ executables: []
225
211
  extensions: []
226
212
  extra_rdoc_files: []
227
213
  files:
228
- - ".circleci/config.yml"
214
+ - ".github/dependabot.yml"
215
+ - ".github/workflows/tests.yml"
229
216
  - ".gitignore"
230
217
  - ".rubocop.yml"
231
218
  - ".rubocop_todo.yml"
219
+ - ".ruby-version"
232
220
  - CHANGELOG.md
233
221
  - CONTRIBUTING.md
234
222
  - Gemfile
@@ -249,6 +237,7 @@ files:
249
237
  - lib/statesman/adapters/active_record_transition.rb
250
238
  - lib/statesman/adapters/memory.rb
251
239
  - lib/statesman/adapters/memory_transition.rb
240
+ - lib/statesman/adapters/type_safe_active_record_queries.rb
252
241
  - lib/statesman/callback.rb
253
242
  - lib/statesman/config.rb
254
243
  - lib/statesman/exceptions.rb
@@ -270,6 +259,7 @@ files:
270
259
  - spec/statesman/adapters/memory_spec.rb
271
260
  - spec/statesman/adapters/memory_transition_spec.rb
272
261
  - spec/statesman/adapters/shared_examples.rb
262
+ - spec/statesman/adapters/type_safe_active_record_queries_spec.rb
273
263
  - spec/statesman/callback_spec.rb
274
264
  - spec/statesman/config_spec.rb
275
265
  - spec/statesman/exceptions_spec.rb
@@ -288,6 +278,7 @@ metadata:
288
278
  documentation_uri: https://github.com/gocardless/statesman/blob/master/README.md
289
279
  homepage_uri: https://github.com/gocardless/statesman
290
280
  source_code_uri: https://github.com/gocardless/statesman
281
+ rubygems_mfa_required: 'true'
291
282
  post_install_message:
292
283
  rdoc_options: []
293
284
  require_paths:
@@ -296,35 +287,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
296
287
  requirements:
297
288
  - - ">="
298
289
  - !ruby/object:Gem::Version
299
- version: '2.2'
290
+ version: '2.7'
300
291
  required_rubygems_version: !ruby/object:Gem::Requirement
301
292
  requirements:
302
293
  - - ">="
303
294
  - !ruby/object:Gem::Version
304
295
  version: '0'
305
296
  requirements: []
306
- rubygems_version: 3.1.1
297
+ rubygems_version: 3.4.1
307
298
  signing_key:
308
299
  specification_version: 4
309
300
  summary: A statesman-like state machine library
310
- test_files:
311
- - spec/fixtures/add_constraints_to_most_recent_for_bacon_transitions_with_partial_index.rb
312
- - spec/fixtures/add_constraints_to_most_recent_for_bacon_transitions_without_partial_index.rb
313
- - spec/fixtures/add_most_recent_to_bacon_transitions.rb
314
- - spec/generators/statesman/active_record_transition_generator_spec.rb
315
- - spec/generators/statesman/migration_generator_spec.rb
316
- - spec/spec_helper.rb
317
- - spec/statesman/adapters/active_record_queries_spec.rb
318
- - spec/statesman/adapters/active_record_spec.rb
319
- - spec/statesman/adapters/active_record_transition_spec.rb
320
- - spec/statesman/adapters/memory_spec.rb
321
- - spec/statesman/adapters/memory_transition_spec.rb
322
- - spec/statesman/adapters/shared_examples.rb
323
- - spec/statesman/callback_spec.rb
324
- - spec/statesman/config_spec.rb
325
- - spec/statesman/exceptions_spec.rb
326
- - spec/statesman/guard_spec.rb
327
- - spec/statesman/machine_spec.rb
328
- - spec/statesman/utils_spec.rb
329
- - spec/support/active_record.rb
330
- - spec/support/generators_shared_examples.rb
301
+ test_files: []