statesman 5.2.0 → 6.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +37 -204
  3. data/.rubocop.yml +1 -1
  4. data/.rubocop_todo.yml +3 -0
  5. data/CHANGELOG.md +8 -0
  6. data/Gemfile +2 -0
  7. data/Guardfile +2 -0
  8. data/Rakefile +2 -0
  9. data/lib/generators/statesman/active_record_transition_generator.rb +2 -0
  10. data/lib/generators/statesman/generator_helpers.rb +2 -0
  11. data/lib/generators/statesman/migration_generator.rb +2 -0
  12. data/lib/statesman.rb +2 -0
  13. data/lib/statesman/adapters/active_record.rb +2 -0
  14. data/lib/statesman/adapters/active_record_queries.rb +2 -0
  15. data/lib/statesman/adapters/active_record_transition.rb +2 -0
  16. data/lib/statesman/adapters/memory.rb +2 -0
  17. data/lib/statesman/adapters/memory_transition.rb +2 -0
  18. data/lib/statesman/callback.rb +2 -0
  19. data/lib/statesman/config.rb +2 -0
  20. data/lib/statesman/exceptions.rb +2 -0
  21. data/lib/statesman/guard.rb +2 -0
  22. data/lib/statesman/machine.rb +2 -0
  23. data/lib/statesman/railtie.rb +2 -0
  24. data/lib/statesman/utils.rb +2 -0
  25. data/lib/statesman/version.rb +3 -1
  26. data/lib/tasks/statesman.rake +2 -0
  27. data/spec/fixtures/add_constraints_to_most_recent_for_bacon_transitions_with_partial_index.rb +2 -0
  28. data/spec/fixtures/add_constraints_to_most_recent_for_bacon_transitions_without_partial_index.rb +2 -0
  29. data/spec/fixtures/add_most_recent_to_bacon_transitions.rb +2 -0
  30. data/spec/generators/statesman/active_record_transition_generator_spec.rb +2 -0
  31. data/spec/generators/statesman/migration_generator_spec.rb +2 -0
  32. data/spec/spec_helper.rb +2 -0
  33. data/spec/statesman/adapters/active_record_queries_spec.rb +2 -0
  34. data/spec/statesman/adapters/active_record_spec.rb +2 -0
  35. data/spec/statesman/adapters/active_record_transition_spec.rb +2 -0
  36. data/spec/statesman/adapters/memory_spec.rb +2 -0
  37. data/spec/statesman/adapters/memory_transition_spec.rb +2 -0
  38. data/spec/statesman/adapters/shared_examples.rb +2 -0
  39. data/spec/statesman/callback_spec.rb +2 -0
  40. data/spec/statesman/config_spec.rb +2 -0
  41. data/spec/statesman/guard_spec.rb +2 -0
  42. data/spec/statesman/machine_spec.rb +2 -0
  43. data/spec/statesman/utils_spec.rb +2 -0
  44. data/spec/support/active_record.rb +2 -0
  45. data/spec/support/generators_shared_examples.rb +2 -0
  46. data/statesman.gemspec +2 -0
  47. metadata +3 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 441e0ff074b2432e5f2b5cc45a3b1d1b0c315d6d65c436d79ad073dedb193008
4
- data.tar.gz: 77f8efd0a2e49cfd3348d33ee0608f535157e93dda45d5cc978ff4ca56b01fba
3
+ metadata.gz: 75560d08df4affec82126fce63627c30902c534e0e8fd11dd89fdd1c94f66b6b
4
+ data.tar.gz: 3308c1cdff0e0cc32c2e964fac6c7e641bd841384c50d94eb824cae785822c3a
5
5
  SHA512:
6
- metadata.gz: dd3202f129b6fc355feb700f86d5c90815904fbdf7021119dedeba067b2b6c3f982fa0fbdd2f0f44f4a3f51057bb3d04785c418acc4f362114f9a27bb1758b6d
7
- data.tar.gz: 3a56b08c06a6ec8d0bfbb1330350dc8a9ee596ceca717437400db342941362d5879dd8cc5df398b6eee9b3508cb478068e6961734f84dcb8d64e782c58a2f32d
6
+ metadata.gz: 7cb81b50c75c21841f729fa91635cc6470397bafdc683b0ccdee1809e99cc2961ab3084d3fcd256b1b062d1362b6a17e2c7d63ea63dad9d6bc7ae8143d982542
7
+ data.tar.gz: 3885a1f4459572a92f3c47c6544d5a6eab1e8c38d0adb4206dbde7ad331953090822e3c2930eef695139e96a88df47bf55f4b2eb9df084d5724edab0e97c36ea
@@ -31,9 +31,9 @@ references:
31
31
  path: /tmp/test-results
32
32
 
33
33
  jobs:
34
- build-ruby241-rails-429-mysql:
34
+ build-ruby249-rails-429-mysql:
35
35
  docker:
36
- - image: circleci/ruby:2.4.1-node
36
+ - image: circleci/ruby:2.4.9-node
37
37
  environment:
38
38
  - RAILS_VERSION=4.2.9
39
39
  - DATABASE_URL=mysql2://root@127.0.0.1/statesman_test
@@ -45,9 +45,9 @@ jobs:
45
45
  - MYSQL_PASSWORD=
46
46
  - MYSQL_DATABASE=statesman_test
47
47
  steps: *steps
48
- build-ruby241-rails-429-postgres:
48
+ build-ruby249-rails-429-postgres:
49
49
  docker:
50
- - image: circleci/ruby:2.4.1-node
50
+ - image: circleci/ruby:2.4.9-node
51
51
  environment:
52
52
  - RAILS_VERSION=4.2.9
53
53
  - DATABASE_URL=postgres://postgres@localhost/statesman_test
@@ -57,9 +57,9 @@ jobs:
57
57
  - POSTGRES_USER=postgres
58
58
  - POSTGRES_DB=statesman_test
59
59
  steps: *steps
60
- build-ruby241-rails-505-mysql:
60
+ build-ruby249-rails-505-mysql:
61
61
  docker:
62
- - image: circleci/ruby:2.4.1-node
62
+ - image: circleci/ruby:2.4.9-node
63
63
  environment:
64
64
  - RAILS_VERSION=5.0.5
65
65
  - DATABASE_URL=mysql2://root@127.0.0.1/statesman_test
@@ -71,9 +71,9 @@ jobs:
71
71
  - MYSQL_PASSWORD=
72
72
  - MYSQL_DATABASE=statesman_test
73
73
  steps: *steps
74
- build-ruby241-rails-505-postgres:
74
+ build-ruby249-rails-505-postgres:
75
75
  docker:
76
- - image: circleci/ruby:2.4.1-node
76
+ - image: circleci/ruby:2.4.9-node
77
77
  environment:
78
78
  - RAILS_VERSION=5.0.5
79
79
  - DATABASE_URL=postgres://postgres@localhost/statesman_test
@@ -83,9 +83,9 @@ jobs:
83
83
  - POSTGRES_USER=postgres
84
84
  - POSTGRES_DB=statesman_test
85
85
  steps: *steps
86
- build-ruby241-rails-513-mysql:
86
+ build-ruby249-rails-513-mysql:
87
87
  docker:
88
- - image: circleci/ruby:2.4.1-node
88
+ - image: circleci/ruby:2.4.9-node
89
89
  environment:
90
90
  - RAILS_VERSION=5.1.3
91
91
  - DATABASE_URL=mysql2://root@127.0.0.1/statesman_test
@@ -97,9 +97,9 @@ jobs:
97
97
  - MYSQL_PASSWORD=
98
98
  - MYSQL_DATABASE=statesman_test
99
99
  steps: *steps
100
- build-ruby241-rails-513-postgres:
100
+ build-ruby249-rails-513-postgres:
101
101
  docker:
102
- - image: circleci/ruby:2.4.1-node
102
+ - image: circleci/ruby:2.4.9-node
103
103
  environment:
104
104
  - RAILS_VERSION=5.1.3
105
105
  - DATABASE_URL=postgres://postgres@localhost/statesman_test
@@ -109,9 +109,9 @@ jobs:
109
109
  - POSTGRES_USER=postgres
110
110
  - POSTGRES_DB=statesman_test
111
111
  steps: *steps
112
- build-ruby262-rails-600-mysql:
112
+ build-ruby265-rails-600-mysql:
113
113
  docker:
114
- - image: circleci/ruby:2.6.2-node
114
+ - image: circleci/ruby:2.6.5-node
115
115
  environment:
116
116
  - RAILS_VERSION=6.0.0
117
117
  - DATABASE_URL=mysql2://root@127.0.0.1/statesman_test
@@ -123,9 +123,9 @@ jobs:
123
123
  - MYSQL_PASSWORD=
124
124
  - MYSQL_DATABASE=statesman_test
125
125
  steps: *steps
126
- build-ruby262-rails-600-postgres:
126
+ build-ruby265-rails-600-postgres:
127
127
  docker:
128
- - image: circleci/ruby:2.6.2-node
128
+ - image: circleci/ruby:2.6.5-node
129
129
  environment:
130
130
  - RAILS_VERSION=6.0.0
131
131
  - DATABASE_URL=postgres://postgres@localhost/statesman_test
@@ -135,9 +135,9 @@ jobs:
135
135
  - POSTGRES_USER=postgres
136
136
  - POSTGRES_DB=statesman_test
137
137
  steps: *steps
138
- build-ruby262-rails-master-mysql:
138
+ build-ruby265-rails-master-mysql:
139
139
  docker:
140
- - image: circleci/ruby:2.6.2-node
140
+ - image: circleci/ruby:2.6.5-node
141
141
  environment:
142
142
  - RAILS_VERSION=master
143
143
  - DATABASE_URL=mysql2://root@127.0.0.1/statesman_test
@@ -149,9 +149,9 @@ jobs:
149
149
  - MYSQL_PASSWORD=
150
150
  - MYSQL_DATABASE=statesman_test
151
151
  steps: *steps
152
- build-ruby262-rails-master-postgres:
152
+ build-ruby265-rails-master-postgres:
153
153
  docker:
154
- - image: circleci/ruby:2.6.2-node
154
+ - image: circleci/ruby:2.6.5-node
155
155
  environment:
156
156
  - RAILS_VERSION=master
157
157
  - DATABASE_URL=postgres://postgres@localhost/statesman_test
@@ -162,9 +162,9 @@ jobs:
162
162
  - POSTGRES_USER=postgres
163
163
  - POSTGRES_DB=statesman_test
164
164
  steps: *steps
165
- build-ruby241-rails-523-mysql:
165
+ build-ruby249-rails-523-mysql:
166
166
  docker:
167
- - image: circleci/ruby:2.4.1-node
167
+ - image: circleci/ruby:2.4.9-node
168
168
  environment:
169
169
  - RAILS_VERSION=5.2.3
170
170
  - DATABASE_URL=mysql2://root@127.0.0.1/statesman_test
@@ -176,9 +176,9 @@ jobs:
176
176
  - MYSQL_PASSWORD=
177
177
  - MYSQL_DATABASE=statesman_test
178
178
  steps: *steps
179
- build-ruby241-rails-523-postgres:
179
+ build-ruby249-rails-523-postgres:
180
180
  docker:
181
- - image: circleci/ruby:2.4.1-node
181
+ - image: circleci/ruby:2.4.9-node
182
182
  environment:
183
183
  - RAILS_VERSION=5.2.3
184
184
  - DATABASE_URL=postgres://postgres@localhost/statesman_test
@@ -188,188 +188,21 @@ jobs:
188
188
  - POSTGRES_USER=postgres
189
189
  - POSTGRES_DB=statesman_test
190
190
  steps: *steps
191
- build-ruby233-rails-429-mysql:
192
- docker:
193
- - image: circleci/ruby:2.3.3-node
194
- environment:
195
- - RAILS_VERSION=4.2.9
196
- - DATABASE_URL=mysql2://root@127.0.0.1/statesman_test
197
- - DATABASE_DEPENDENCY_PORT=3306
198
- - image: circleci/mysql:5.7.18
199
- environment:
200
- - MYSQL_ALLOW_EMPTY_PASSWORD=true
201
- - MYSQL_USER=root
202
- - MYSQL_PASSWORD=
203
- - MYSQL_DATABASE=statesman_test
204
- steps: *steps
205
- build-ruby233-rails-429-postgres:
206
- docker:
207
- - image: circleci/ruby:2.3.3-node
208
- environment:
209
- - RAILS_VERSION=4.2.9
210
- - DATABASE_URL=postgres://postgres@localhost/statesman_test
211
- - DATABASE_DEPENDENCY_PORT=5432
212
- - image: circleci/postgres:9.6
213
- environment:
214
- - POSTGRES_USER=postgres
215
- - POSTGRES_DB=statesman_test
216
- steps: *steps
217
- build-ruby233-rails-505-mysql:
218
- docker:
219
- - image: circleci/ruby:2.3.3-node
220
- environment:
221
- - RAILS_VERSION=5.0.5
222
- - DATABASE_URL=mysql2://root@127.0.0.1/statesman_test
223
- - DATABASE_DEPENDENCY_PORT=3306
224
- - image: circleci/mysql:5.7.18
225
- environment:
226
- - MYSQL_ALLOW_EMPTY_PASSWORD=true
227
- - MYSQL_USER=root
228
- - MYSQL_PASSWORD=
229
- - MYSQL_DATABASE=statesman_test
230
- steps: *steps
231
- build-ruby233-rails-505-postgres:
232
- docker:
233
- - image: circleci/ruby:2.3.3-node
234
- environment:
235
- - RAILS_VERSION=5.0.5
236
- - DATABASE_URL=postgres://postgres@localhost/statesman_test
237
- - DATABASE_DEPENDENCY_PORT=5432
238
- - image: circleci/postgres:9.6
239
- environment:
240
- - POSTGRES_USER=postgres
241
- - POSTGRES_DB=statesman_test
242
- steps: *steps
243
- build-ruby233-rails-513-mysql:
244
- docker:
245
- - image: circleci/ruby:2.3.3-node
246
- environment:
247
- - RAILS_VERSION=5.1.3
248
- - DATABASE_URL=mysql2://root@127.0.0.1/statesman_test
249
- - DATABASE_DEPENDENCY_PORT=3306
250
- - image: circleci/mysql:5.7.18
251
- environment:
252
- - MYSQL_ALLOW_EMPTY_PASSWORD=true
253
- - MYSQL_USER=root
254
- - MYSQL_PASSWORD=
255
- - MYSQL_DATABASE=statesman_test
256
- steps: *steps
257
- build-ruby233-rails-513-postgres:
258
- docker:
259
- - image: circleci/ruby:2.3.3-node
260
- environment:
261
- - RAILS_VERSION=5.1.3
262
- - DATABASE_URL=postgres://postgres@localhost/statesman_test
263
- - DATABASE_DEPENDENCY_PORT=5432
264
- - image: circleci/postgres:9.6
265
- environment:
266
- - POSTGRES_USER=postgres
267
- - POSTGRES_DB=statesman_test
268
- steps: *steps
269
- build-ruby227-rails-429-mysql:
270
- docker:
271
- - image: circleci/ruby:2.2.7-node
272
- environment:
273
- - RAILS_VERSION=4.2.9
274
- - DATABASE_URL=mysql2://root@127.0.0.1/statesman_test
275
- - DATABASE_DEPENDENCY_PORT=3306
276
- - image: circleci/mysql:5.7.18
277
- environment:
278
- - MYSQL_ALLOW_EMPTY_PASSWORD=true
279
- - MYSQL_USER=root
280
- - MYSQL_PASSWORD=
281
- - MYSQL_DATABASE=statesman_test
282
- steps: *steps
283
- build-ruby227-rails-429-postgres:
284
- docker:
285
- - image: circleci/ruby:2.2.7-node
286
- environment:
287
- - RAILS_VERSION=4.2.9
288
- - DATABASE_URL=postgres://postgres@localhost/statesman_test
289
- - DATABASE_DEPENDENCY_PORT=5432
290
- - image: circleci/postgres:9.6
291
- environment:
292
- - POSTGRES_USER=postgres
293
- - POSTGRES_DB=statesman_test
294
- steps: *steps
295
- build-ruby227-rails-505-mysql:
296
- docker:
297
- - image: circleci/ruby:2.2.7-node
298
- environment:
299
- - RAILS_VERSION=5.0.5
300
- - DATABASE_URL=mysql2://root@127.0.0.1/statesman_test
301
- - DATABASE_DEPENDENCY_PORT=3306
302
- - image: circleci/mysql:5.7.18
303
- environment:
304
- - MYSQL_ALLOW_EMPTY_PASSWORD=true
305
- - MYSQL_USER=root
306
- - MYSQL_PASSWORD=
307
- - MYSQL_DATABASE=statesman_test
308
- steps: *steps
309
- build-ruby227-rails-505-postgres:
310
- docker:
311
- - image: circleci/ruby:2.2.7-node
312
- environment:
313
- - RAILS_VERSION=5.0.5
314
- - DATABASE_URL=postgres://postgres@localhost/statesman_test
315
- - DATABASE_DEPENDENCY_PORT=5432
316
- - image: circleci/postgres:9.6
317
- environment:
318
- - POSTGRES_USER=postgres
319
- - POSTGRES_DB=statesman_test
320
- steps: *steps
321
- build-ruby227-rails-513-mysql:
322
- docker:
323
- - image: circleci/ruby:2.2.7-node
324
- environment:
325
- - RAILS_VERSION=5.1.3
326
- - DATABASE_URL=mysql2://root@127.0.0.1/statesman_test
327
- - DATABASE_DEPENDENCY_PORT=3306
328
- - image: circleci/mysql:5.7.18
329
- environment:
330
- - MYSQL_ALLOW_EMPTY_PASSWORD=true
331
- - MYSQL_USER=root
332
- - MYSQL_PASSWORD=
333
- - MYSQL_DATABASE=statesman_test
334
- steps: *steps
335
- build-ruby227-rails-513-postgres:
336
- docker:
337
- - image: circleci/ruby:2.2.7-node
338
- environment:
339
- - RAILS_VERSION=5.1.3
340
- - DATABASE_URL=postgres://postgres@localhost/statesman_test
341
- - DATABASE_DEPENDENCY_PORT=5432
342
- - image: circleci/postgres:9.6
343
- environment:
344
- - POSTGRES_USER=postgres
345
- - POSTGRES_DB=statesman_test
346
- steps: *steps
191
+
347
192
 
348
193
  workflows:
349
194
  version: 2
350
195
  tests:
351
196
  jobs:
352
- - build-ruby241-rails-429-mysql
353
- - build-ruby241-rails-429-postgres
354
- - build-ruby241-rails-505-mysql
355
- - build-ruby241-rails-505-postgres
356
- - build-ruby241-rails-513-mysql
357
- - build-ruby241-rails-513-postgres
358
- - build-ruby241-rails-523-mysql
359
- - build-ruby241-rails-523-postgres
360
- - build-ruby262-rails-600-mysql
361
- - build-ruby262-rails-600-postgres
362
- - build-ruby262-rails-master-mysql
363
- - build-ruby262-rails-master-postgres
364
- - build-ruby233-rails-429-mysql
365
- - build-ruby233-rails-429-postgres
366
- - build-ruby233-rails-505-mysql
367
- - build-ruby233-rails-505-postgres
368
- - build-ruby233-rails-513-mysql
369
- - build-ruby233-rails-513-postgres
370
- - build-ruby227-rails-429-mysql
371
- - build-ruby227-rails-429-postgres
372
- - build-ruby227-rails-505-mysql
373
- - build-ruby227-rails-505-postgres
374
- - build-ruby227-rails-513-mysql
375
- - build-ruby227-rails-513-postgres
197
+ - build-ruby249-rails-429-mysql
198
+ - build-ruby249-rails-429-postgres
199
+ - build-ruby249-rails-505-mysql
200
+ - build-ruby249-rails-505-postgres
201
+ - build-ruby249-rails-513-mysql
202
+ - build-ruby249-rails-513-postgres
203
+ - build-ruby249-rails-523-mysql
204
+ - build-ruby249-rails-523-postgres
205
+ - build-ruby265-rails-600-mysql
206
+ - build-ruby265-rails-600-postgres
207
+ - build-ruby265-rails-master-mysql
208
+ - build-ruby265-rails-master-postgres
@@ -4,4 +4,4 @@ inherit_gem:
4
4
  gc_ruboconfig: rubocop.yml
5
5
 
6
6
  AllCops:
7
- TargetRubyVersion: 2.2
7
+ TargetRubyVersion: 2.4
@@ -6,6 +6,9 @@
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
+ Gemspec/RequiredRubyVersion:
10
+ Enabled: false # We want to allow Ruby 2.2 even though we don't test on it
11
+
9
12
  # Offense count: 5
10
13
  Metrics/AbcSize:
11
14
  Max: 18
@@ -1,3 +1,11 @@
1
+ ## v6.0.0, 20th December 2019
2
+
3
+ **Breaking changes**
4
+
5
+ - Drop official support for Ruby 2.2 and 2.3 following our [compatibility
6
+ policy](https://github.com/gocardless/statesman/blob/master/docs/COMPATIBILITY.md).
7
+
8
+
1
9
  ## v5.2.0, 17th December 2019
2
10
 
3
11
  - Issue `most_recent_transition_join` query as a single-line string [#381](https://github.com/gocardless/statesman/pull/381)
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  gemspec
data/Guardfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # A sample Guardfile
2
4
  # More info at https://github.com/guard/guard#readme
3
5
 
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "bundler/gem_tasks"
2
4
  require "rspec/core/rake_task"
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "rails/generators"
2
4
  require "generators/statesman/generator_helpers"
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Statesman
2
4
  module GeneratorHelpers
3
5
  def class_name_option
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "rails/generators"
2
4
  require "generators/statesman/generator_helpers"
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Statesman
2
4
  autoload :Config, "statesman/config"
3
5
  autoload :Machine, "statesman/machine"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative "../exceptions"
2
4
 
3
5
  module Statesman
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Statesman
2
4
  module Adapters
3
5
  module ActiveRecordQueries
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "json"
2
4
 
3
5
  module Statesman
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "json"
2
4
 
3
5
  module Statesman
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Statesman
2
4
  module Adapters
3
5
  class MemoryTransition
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative "exceptions"
2
4
 
3
5
  module Statesman
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "json"
2
4
  require_relative "exceptions"
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Statesman
2
4
  class InvalidStateError < StandardError; end
3
5
  class InvalidTransitionError < StandardError; end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative "callback"
2
4
  require_relative "exceptions"
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative "version"
2
4
  require_relative "exceptions"
3
5
  require_relative "guard"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Statesman
2
4
  class Railtie < ::Rails::Railtie
3
5
  railtie_name :statesman
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Statesman
2
4
  module Utils
3
5
  def self.rails_major_version
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Statesman
2
- VERSION = "5.2.0".freeze
4
+ VERSION = "6.0.0"
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  namespace :statesman do
2
4
  desc "Set most_recent to false for old transitions and to true for the "\
3
5
  "latest one. Safe to re-run"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class AddConstraintsToMostRecentForBaconTransitions < ActiveRecord::Migration
2
4
  disable_ddl_transaction!
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class AddConstraintsToMostRecentForBaconTransitions < ActiveRecord::Migration
2
4
  disable_ddl_transaction!
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class AddMostRecentToBaconTransitions < ActiveRecord::Migration
2
4
  def up
3
5
  add_column :bacon_transitions, :most_recent, :boolean, null: true
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "spec_helper"
2
4
  require "support/generators_shared_examples"
3
5
  require "generators/statesman/active_record_transition_generator"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "spec_helper"
2
4
  require "support/generators_shared_examples"
3
5
  require "generators/statesman/migration_generator"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "statesman"
2
4
  require "sqlite3"
3
5
  require "mysql2"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "spec_helper"
2
4
 
3
5
  describe Statesman::Adapters::ActiveRecordQueries, active_record: true do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "spec_helper"
2
4
  require "timecop"
3
5
  require "statesman/adapters/shared_examples"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "spec_helper"
2
4
  require "json"
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "spec_helper"
2
4
  require "statesman/adapters/shared_examples"
3
5
  require "statesman/adapters/memory_transition"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "spec_helper"
2
4
  require "statesman/adapters/memory_transition"
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "spec_helper"
2
4
 
3
5
  # All adpators must define seven methods:
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "spec_helper"
2
4
 
3
5
  describe Statesman::Callback do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "spec_helper"
2
4
 
3
5
  describe Statesman::Config do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "spec_helper"
2
4
 
3
5
  describe Statesman::Guard do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "spec_helper"
2
4
 
3
5
  describe Statesman::Machine do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "spec_helper"
2
4
 
3
5
  describe Statesman::Utils do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "json"
2
4
 
3
5
  MIGRATION_CLASS = if Rails.version.split(".").map(&:to_i).first >= 5
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "rails/version"
2
4
  require "rspec/rails"
3
5
  require "ammeter/init"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  lib = File.expand_path("lib", __dir__)
2
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
5
  require "statesman/version"
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: 5.2.0
4
+ version: 6.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GoCardless
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-18 00:00:00.000000000 Z
11
+ date: 2019-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ammeter
@@ -291,8 +291,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
291
291
  - !ruby/object:Gem::Version
292
292
  version: '0'
293
293
  requirements: []
294
- rubyforge_project:
295
- rubygems_version: 2.7.6
294
+ rubygems_version: 3.1.1
296
295
  signing_key:
297
296
  specification_version: 4
298
297
  summary: A statesman-like state machine library