statesman 2.0.1 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e4180ca332c6a592c0e0816d6b4f718aaf4fa423
4
- data.tar.gz: a61d0a4cd39ed4712092855d61a8ec06bf2e0cbb
3
+ metadata.gz: 776828e7a0c09b55f59d7b9efe5709f1ab3b95e8
4
+ data.tar.gz: 8c95a4d4af92bf1a64f3f02fd3715b4a6816358b
5
5
  SHA512:
6
- metadata.gz: 2105f8a7709db6abdb666ea0a8f3ba8778170fa59bf8f6f2f845d2f8456896ee4088f2a44e1be83e90b758bd4b0f49b1eee78048a8230b6581011dae10b7ca3b
7
- data.tar.gz: f8395d6ce314a2ff1411ede761211029f95f9c32cc0c54948f534f334f98df64bea193472464ab1187099f1b9064551c4d05add078619fdec653099ad5470cd8
6
+ metadata.gz: 0fe311fde00f43e4dfe1ebe1ba0eb74262e2d6b916ec0eb4560ca54f268c58534e2384af7a0164921b4270f4c19816e4bda34e4cfac8b7fbac5e8d5a689286a5
7
+ data.tar.gz: c5c6ae72993e773438e3e620c2b8c4439fabb172bd0af19566cfb822f7d3c56da9f1652d48f929420cc7b5dd681779c107457d8087ceec9889d6a15fc4940e56
data/.travis.yml CHANGED
@@ -1,15 +1,24 @@
1
1
  language: ruby
2
2
 
3
+ cache: bundler
4
+
3
5
  rvm:
4
- - 2.3.0
5
- - 2.2.4
6
- - 2.1
7
- - 2.0.0
6
+ - 2.4.1
7
+ - 2.3.3
8
+ - 2.2.6
8
9
 
9
10
  sudo: false
10
11
 
11
12
  services: mongodb
12
13
 
14
+ before_install:
15
+ - gem update --system
16
+ - gem install bundler
17
+
18
+ branches:
19
+ only:
20
+ - "master"
21
+
13
22
  before_script:
14
23
  - mysql -e 'CREATE DATABASE statesman_test;'
15
24
  - psql -c 'CREATE DATABASE statesman_test;' -U postgres
@@ -19,17 +28,10 @@ script:
19
28
  - bundle exec rake
20
29
 
21
30
  env:
22
- - "RAILS_VERSION=3.2.21"
23
- - "RAILS_VERSION=4.0.13"
24
- - "RAILS_VERSION=4.1.14"
25
- - "RAILS_VERSION=4.2.5"
26
- - "RAILS_VERSION=4.2.5 DATABASE_URL=mysql2://root@localhost/statesman_test"
27
- - "RAILS_VERSION=4.2.5 DATABASE_URL=postgres://postgres@localhost/statesman_test"
28
- - "RAILS_VERSION=5.0.0.beta3 EXCLUDE_MONGOID=true"
31
+ - "RAILS_VERSION=4.2.8"
32
+ - "RAILS_VERSION=4.2.8 DATABASE_URL=mysql2://root@localhost/statesman_test"
33
+ - "RAILS_VERSION=4.2.8 DATABASE_URL=postgres://postgres@localhost/statesman_test"
34
+ - "RAILS_VERSION=5.0.0 EXCLUDE_MONGOID=true"
29
35
 
30
36
  matrix:
31
- exclude:
32
- - rvm: 2.1
33
- env: "RAILS_VERSION=5.0.0.beta3 EXCLUDE_MONGOID=true"
34
- - rvm: 2.0.0
35
- env: "RAILS_VERSION=5.0.0.beta3 EXCLUDE_MONGOID=true"
37
+ exclude: []
data/CHANGELOG.md CHANGED
@@ -1,8 +1,22 @@
1
+ ## v3.0.0, 3 July 2017
2
+
3
+ *Breaking changes*
4
+
5
+ - Drop support for Rails < 4.2
6
+ - Drop support for Ruby < 2.2
7
+
8
+ For details on our compatibility policy, see `docs/COMPATIBILITY.md`.
9
+
10
+ *Changes*
11
+
12
+ - Better handling of custom transition association names (patch by [@greysteil](https://github.com/greysteil))
13
+ - Add foreign keys to transition table generator (patch by [@greysteil](https://github.com/greysteil))
14
+ - Support partial indexes in transition table update generator (patch by [@kenchan0130](https://github.com/kenchan0130))
15
+
1
16
  ## v2.0.1, 29 March 2016
2
17
 
3
18
  - Add support for Rails 5 (excluding Mongoid adapter)
4
19
 
5
-
6
20
  ## v2.0.0, 5 January 2016
7
21
 
8
22
  - No changes from v2.0.0.rc1
data/README.md CHANGED
@@ -1,11 +1,13 @@
1
1
  ![Statesman](http://f.cl.ly/items/410n2A0S3l1W0i3i0o2K/statesman.png)
2
2
 
3
- A statesmanlike state machine library for Ruby 2.0.0 and up.
3
+ A statesmanlike state machine library.
4
4
 
5
- [![Gem Version](https://badge.fury.io/rb/statesman.png)](http://badge.fury.io/rb/statesman)
6
- [![Build Status](https://travis-ci.org/gocardless/statesman.png?branch=master)](https://travis-ci.org/gocardless/statesman)
7
- [![Code Climate](https://codeclimate.com/github/gocardless/statesman.png)](https://codeclimate.com/github/gocardless/statesman)
8
- [![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/gocardless/statesman?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
5
+ For our policy on compatibility with Ruby and Rails versions, see [COMPATIBILITY.md](docs/COMPATIBILITY.md).
6
+
7
+ [![Gem Version](https://badge.fury.io/rb/statesman.svg)](http://badge.fury.io/rb/statesman)
8
+ [![Build Status](https://travis-ci.org/gocardless/statesman.svg?branch=master)](https://travis-ci.org/gocardless/statesman)
9
+ [![Code Climate](https://codeclimate.com/github/gocardless/statesman.svg)](https://codeclimate.com/github/gocardless/statesman)
10
+ [![Gitter](https://badges.gitter.im/join.svg)](https://gitter.im/gocardless/statesman?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
9
11
 
10
12
  Statesman is an opinionated state machine library designed to provide a robust
11
13
  audit trail and data integrity. It decouples the state machine logic from the
@@ -77,7 +79,6 @@ class Order < ActiveRecord::Base
77
79
  def self.transition_class
78
80
  OrderTransition
79
81
  end
80
- private_class_method :transition_class
81
82
 
82
83
  def self.initial_state
83
84
  :pending
@@ -150,15 +151,18 @@ end
150
151
  #### Using PostgreSQL JSON column
151
152
 
152
153
  By default, Statesman uses `serialize` to store the metadata in JSON format.
153
- It is also possible to use the PostgreSQL JSON column if you are using Rails 4. To do that
154
+ It is also possible to use the PostgreSQL JSON column if you are using Rails 4
155
+ or 5. To do that
154
156
 
155
- * Change `metadata` column type in the transition model migration to `json`
157
+ * Change `metadata` column type in the transition model migration to `json` or `jsonb`
156
158
 
157
159
  ```ruby
158
160
  # Before
159
161
  t.text :metadata, default: "{}"
160
- # After
162
+ # After (Rails 4)
161
163
  t.json :metadata, default: "{}"
164
+ # After (Rails 5)
165
+ t.json :metadata, default: {}
162
166
  ```
163
167
 
164
168
  * Remove `include Statesman::Adapters::ActiveRecordTransition` statement from your
@@ -316,7 +320,6 @@ class Order < ActiveRecord::Base
316
320
  def self.transition_class
317
321
  OrderTransition
318
322
  end
319
- private_class_method :transition_class
320
323
 
321
324
  def self.initial_state
322
325
  OrderStateMachine.initial_state
@@ -409,6 +412,10 @@ describe "some callback" do
409
412
  end
410
413
  ```
411
414
 
415
+ # Third-party extensions
416
+
417
+ [statesman-sequel](https://github.com/badosu/statesman-sequel) - An adapter to make Statesman work with [Sequel](https://github.com/jeremyevans/sequel)
418
+
412
419
  ---
413
420
 
414
- GoCardless ♥ open source. If you do too, come [join us](https://gocardless.com/jobs#software-engineer).
421
+ GoCardless ♥ open source. If you do too, come [join us](https://gocardless.com/about/jobs/software-engineer).
@@ -0,0 +1,17 @@
1
+ # Compatibility
2
+
3
+ Our goal as Statesman maintainers is for the library to be compatible with all supported versions of Ruby and Rails.
4
+
5
+ Specifically, any CRuby/MRI version that has not received an End of Life notice ([e.g. this notice for Ruby 2.1](https://www.ruby-lang.org/en/news/2017/04/01/support-of-ruby-2-1-has-ended/)) is supported. Similarly, any version of Rails listed as currently supported on [this page](http://guides.rubyonrails.org/maintenance_policy.html) is one we aim to support in Statesman.
6
+
7
+ To that end, [our build matrix](../.travis.yml) includes all these versions.
8
+
9
+ Any time Statesman doesn't work on a supported combination of Ruby and Rails, it's a bug, and can be reported [here](https://github.com/gocardless/statesman/issues).
10
+
11
+ # Deprecation
12
+
13
+ Whenever a version of Ruby or Rails falls out of support, we will mirror that change in Statesman by updating the build matrix and releasing a new major version.
14
+
15
+ At that point, we will close any issues that only affect the unsupported version, and may choose to remove any workarounds from the code that are only necessary for the unsupported version.
16
+
17
+ We will then bump the major version of Statesman, to indicate the break in compatibility. Even if the new version of Statesman happens to work on the unsupported version of Ruby or Rails, we consider compatibility to be broken at this point.
@@ -24,7 +24,7 @@ module Statesman
24
24
  "db/migrate/#{next_migration_number}_create_#{table_name}.rb"
25
25
  end
26
26
 
27
- def rails_4?
27
+ def rails_4_or_higher?
28
28
  Rails.version.split(".").map(&:to_i).first >= 4
29
29
  end
30
30
  end
@@ -20,6 +20,10 @@ module Statesman
20
20
  parent.demodulize.underscore
21
21
  end
22
22
 
23
+ def parent_table_name
24
+ parent.demodulize.underscore.pluralize
25
+ end
26
+
23
27
  def parent_id
24
28
  parent_name + "_id"
25
29
  end
@@ -1,9 +1,10 @@
1
1
  class <%= klass %> < ActiveRecord::Base
2
2
  include Statesman::Adapters::ActiveRecordTransition
3
3
 
4
- <% unless rails_4? %>
4
+ <%- unless rails_4_or_higher? -%>
5
5
  attr_accessible :to_state, :metadata, :sort_key
6
- <% end %>
6
+
7
+ <%- end -%>
7
8
  belongs_to :<%= parent_name %><%= class_name_option %>, inverse_of: :<%= table_name %>
8
9
 
9
10
  after_destroy :update_most_recent, if: :most_recent?
@@ -9,6 +9,9 @@ class Create<%= migration_class_name %> < ActiveRecord::Migration
9
9
  t.timestamps null: false
10
10
  end
11
11
 
12
+ # Foreign keys are optional, but highly recommended
13
+ add_foreign_key :<%= table_name %>, :<%= parent_table_name %>
14
+
12
15
  add_index(:<%= table_name %>,
13
16
  [:<%= parent_id %>, :sort_key],
14
17
  unique: true,
@@ -9,6 +9,6 @@ class AddStatesmanTo<%= migration_class_name %> < ActiveRecord::Migration
9
9
  add_column :<%= table_name %>, :updated_at, :datetime, null: false
10
10
 
11
11
  add_index :<%= table_name %>, [:<%= parent_id %>, :sort_key], unique: true, name: "<%= index_name :parent_sort %>"
12
- add_index :<%= table_name %>, [:<%= parent_id %>, :most_recent], unique: true, where: "most_recent", name: "<%= index_name :parent_most_recent %>"
12
+ add_index :<%= table_name %>, [:<%= parent_id %>, :most_recent], unique: true, <%= "where: 'most_recent', " if database_supports_partial_indexes? %>name: "<%= index_name :parent_most_recent %>"
13
13
  end
14
14
  end
@@ -38,7 +38,13 @@ module Statesman
38
38
  end
39
39
 
40
40
  def transition_reflection
41
- reflect_on_association(transition_name)
41
+ reflect_on_all_associations(:has_many).each do |value|
42
+ return value if value.klass == transition_class
43
+ end
44
+
45
+ raise MissingTransitionAssociation,
46
+ "Could not find has_many association between #{self.class} " \
47
+ "and #{transition_class}."
42
48
  end
43
49
 
44
50
  def model_foreign_key
@@ -5,6 +5,7 @@ module Statesman
5
5
  class GuardFailedError < StandardError; end
6
6
  class TransitionFailedError < StandardError; end
7
7
  class TransitionConflictError < StandardError; end
8
+ class MissingTransitionAssociation < StandardError; end
8
9
 
9
10
  class UnserializedMetadataError < StandardError
10
11
  def initialize(transition_class_name)
@@ -1,3 +1,3 @@
1
1
  module Statesman
2
- VERSION = "2.0.1"
2
+ VERSION = "3.0.0"
3
3
  end
@@ -7,6 +7,20 @@ describe Statesman::ActiveRecordTransitionGenerator, type: :generator do
7
7
  let(:migration_name) { 'db/migrate/create_bacon_transitions.rb' }
8
8
  end
9
9
 
10
+ describe 'creates a migration' do
11
+ subject { file("db/migrate/#{time}_create_bacon_transitions.rb") }
12
+
13
+ before { allow(Time).to receive(:now).and_return(mock_time) }
14
+ before { run_generator %w(Yummy::Bacon Yummy::BaconTransition) }
15
+
16
+ let(:mock_time) { double('Time', utc: double('UTCTime', strftime: time)) }
17
+ let(:time) { '5678309' }
18
+
19
+ it "includes a foreign key" do
20
+ expect(subject).to contain("add_foreign_key :bacon_transitions, :bacons")
21
+ end
22
+ end
23
+
10
24
  describe 'properly adds class names' do
11
25
  before { run_generator %w(Yummy::Bacon Yummy::BaconTransition) }
12
26
  subject { file('app/models/yummy/bacon_transition.rb') }
@@ -23,4 +37,11 @@ describe Statesman::ActiveRecordTransitionGenerator, type: :generator do
23
37
  it { is_expected.not_to contain(/class_name:/) }
24
38
  it { is_expected.to contain(/class BaconTransition/) }
25
39
  end
40
+
41
+ describe "it doesn't create any double-spacing" do
42
+ before { run_generator %w(Yummy::Bacon Yummy::BaconTransition) }
43
+ subject { file('app/models/yummy/bacon_transition.rb') }
44
+
45
+ it { is_expected.to_not contain(/\n\n\n/) }
46
+ end
26
47
  end
@@ -125,14 +125,18 @@ describe Statesman::Adapters::ActiveRecordQueries, active_record: true do
125
125
  end
126
126
  end
127
127
 
128
- context "with a transition name" do
128
+ context "with a custom name for the transition association" do
129
129
  before do
130
+ # Switch to using OtherActiveRecordModelTransition, so the existing
131
+ # relation with MyActiveRecordModelTransition doesn't interfere with
132
+ # this spec.
130
133
  MyActiveRecordModel.send(:has_many,
131
134
  :custom_name,
132
- class_name: 'MyActiveRecordModelTransition')
135
+ class_name: 'OtherActiveRecordModelTransition')
136
+
133
137
  MyActiveRecordModel.class_eval do
134
- def self.transition_name
135
- :custom_name
138
+ def self.transition_class
139
+ OtherActiveRecordModelTransition
136
140
  end
137
141
  end
138
142
  end
@@ -142,4 +146,24 @@ describe Statesman::Adapters::ActiveRecordQueries, active_record: true do
142
146
  specify { expect { query }.to_not raise_error }
143
147
  end
144
148
  end
149
+
150
+ context "with no association with the transition class" do
151
+ before do
152
+ class UnknownModelTransition < OtherActiveRecordModelTransition; end
153
+
154
+ MyActiveRecordModel.class_eval do
155
+ def self.transition_class
156
+ UnknownModelTransition
157
+ end
158
+ end
159
+ end
160
+
161
+ describe ".in_state" do
162
+ subject(:query) { MyActiveRecordModel.in_state(:succeeded) }
163
+
164
+ it "raises a helpful error" do
165
+ expect { query }.to raise_error(Statesman::MissingTransitionAssociation)
166
+ end
167
+ end
168
+ end
145
169
  end
@@ -187,7 +187,7 @@ module MyNamespace
187
187
 
188
188
  def state_machine
189
189
  @state_machine ||= MyStateMachine.new(
190
- self, transition_class: MyNameSpace::MyActiveRecordModelTransition,
190
+ self, transition_class: MyNamespace::MyActiveRecordModelTransition,
191
191
  association_name: :my_active_record_model_transitions)
192
192
  end
193
193
 
data/statesman.gemspec CHANGED
@@ -18,14 +18,13 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
+ spec.required_ruby_version = '>= 2.2'
21
22
  spec.add_development_dependency "bundler", "~> 1.3"
22
23
  spec.add_development_dependency "rake"
23
24
  spec.add_development_dependency "rspec", "~> 3.1"
24
25
  spec.add_development_dependency "rspec-rails", "~> 3.1"
25
26
  spec.add_development_dependency "rspec-its", "~> 1.1"
26
- spec.add_development_dependency "guard-rspec", "~> 4.3"
27
27
  spec.add_development_dependency "rubocop", "~> 0.30.0"
28
- spec.add_development_dependency "guard-rubocop", "~> 1.2"
29
28
  spec.add_development_dependency "sqlite3", "~> 1.3"
30
29
  spec.add_development_dependency "rails", ">= 3.2"
31
30
  spec.add_development_dependency "pg", "~> 0.18"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: statesman
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Harry Marr
@@ -9,188 +9,160 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-03-29 00:00:00.000000000 Z
12
+ date: 2017-07-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ~>
18
+ - - "~>"
19
19
  - !ruby/object:Gem::Version
20
20
  version: '1.3'
21
21
  type: :development
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ~>
25
+ - - "~>"
26
26
  - !ruby/object:Gem::Version
27
27
  version: '1.3'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rake
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - '>='
32
+ - - ">="
33
33
  - !ruby/object:Gem::Version
34
34
  version: '0'
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - '>='
39
+ - - ">="
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: rspec
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - ~>
46
+ - - "~>"
47
47
  - !ruby/object:Gem::Version
48
48
  version: '3.1'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - ~>
53
+ - - "~>"
54
54
  - !ruby/object:Gem::Version
55
55
  version: '3.1'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: rspec-rails
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - ~>
60
+ - - "~>"
61
61
  - !ruby/object:Gem::Version
62
62
  version: '3.1'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - ~>
67
+ - - "~>"
68
68
  - !ruby/object:Gem::Version
69
69
  version: '3.1'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: rspec-its
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - ~>
74
+ - - "~>"
75
75
  - !ruby/object:Gem::Version
76
76
  version: '1.1'
77
77
  type: :development
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - ~>
81
+ - - "~>"
82
82
  - !ruby/object:Gem::Version
83
83
  version: '1.1'
84
- - !ruby/object:Gem::Dependency
85
- name: guard-rspec
86
- requirement: !ruby/object:Gem::Requirement
87
- requirements:
88
- - - ~>
89
- - !ruby/object:Gem::Version
90
- version: '4.3'
91
- type: :development
92
- prerelease: false
93
- version_requirements: !ruby/object:Gem::Requirement
94
- requirements:
95
- - - ~>
96
- - !ruby/object:Gem::Version
97
- version: '4.3'
98
84
  - !ruby/object:Gem::Dependency
99
85
  name: rubocop
100
86
  requirement: !ruby/object:Gem::Requirement
101
87
  requirements:
102
- - - ~>
88
+ - - "~>"
103
89
  - !ruby/object:Gem::Version
104
90
  version: 0.30.0
105
91
  type: :development
106
92
  prerelease: false
107
93
  version_requirements: !ruby/object:Gem::Requirement
108
94
  requirements:
109
- - - ~>
95
+ - - "~>"
110
96
  - !ruby/object:Gem::Version
111
97
  version: 0.30.0
112
- - !ruby/object:Gem::Dependency
113
- name: guard-rubocop
114
- requirement: !ruby/object:Gem::Requirement
115
- requirements:
116
- - - ~>
117
- - !ruby/object:Gem::Version
118
- version: '1.2'
119
- type: :development
120
- prerelease: false
121
- version_requirements: !ruby/object:Gem::Requirement
122
- requirements:
123
- - - ~>
124
- - !ruby/object:Gem::Version
125
- version: '1.2'
126
98
  - !ruby/object:Gem::Dependency
127
99
  name: sqlite3
128
100
  requirement: !ruby/object:Gem::Requirement
129
101
  requirements:
130
- - - ~>
102
+ - - "~>"
131
103
  - !ruby/object:Gem::Version
132
104
  version: '1.3'
133
105
  type: :development
134
106
  prerelease: false
135
107
  version_requirements: !ruby/object:Gem::Requirement
136
108
  requirements:
137
- - - ~>
109
+ - - "~>"
138
110
  - !ruby/object:Gem::Version
139
111
  version: '1.3'
140
112
  - !ruby/object:Gem::Dependency
141
113
  name: rails
142
114
  requirement: !ruby/object:Gem::Requirement
143
115
  requirements:
144
- - - '>='
116
+ - - ">="
145
117
  - !ruby/object:Gem::Version
146
118
  version: '3.2'
147
119
  type: :development
148
120
  prerelease: false
149
121
  version_requirements: !ruby/object:Gem::Requirement
150
122
  requirements:
151
- - - '>='
123
+ - - ">="
152
124
  - !ruby/object:Gem::Version
153
125
  version: '3.2'
154
126
  - !ruby/object:Gem::Dependency
155
127
  name: pg
156
128
  requirement: !ruby/object:Gem::Requirement
157
129
  requirements:
158
- - - ~>
130
+ - - "~>"
159
131
  - !ruby/object:Gem::Version
160
132
  version: '0.18'
161
133
  type: :development
162
134
  prerelease: false
163
135
  version_requirements: !ruby/object:Gem::Requirement
164
136
  requirements:
165
- - - ~>
137
+ - - "~>"
166
138
  - !ruby/object:Gem::Version
167
139
  version: '0.18'
168
140
  - !ruby/object:Gem::Dependency
169
141
  name: mysql2
170
142
  requirement: !ruby/object:Gem::Requirement
171
143
  requirements:
172
- - - ~>
144
+ - - "~>"
173
145
  - !ruby/object:Gem::Version
174
146
  version: '0.4'
175
147
  type: :development
176
148
  prerelease: false
177
149
  version_requirements: !ruby/object:Gem::Requirement
178
150
  requirements:
179
- - - ~>
151
+ - - "~>"
180
152
  - !ruby/object:Gem::Version
181
153
  version: '0.4'
182
154
  - !ruby/object:Gem::Dependency
183
155
  name: ammeter
184
156
  requirement: !ruby/object:Gem::Requirement
185
157
  requirements:
186
- - - ~>
158
+ - - "~>"
187
159
  - !ruby/object:Gem::Version
188
160
  version: '1.1'
189
161
  type: :development
190
162
  prerelease: false
191
163
  version_requirements: !ruby/object:Gem::Requirement
192
164
  requirements:
193
- - - ~>
165
+ - - "~>"
194
166
  - !ruby/object:Gem::Version
195
167
  version: '1.1'
196
168
  description: A statesmanlike state machine library
@@ -200,9 +172,9 @@ executables: []
200
172
  extensions: []
201
173
  extra_rdoc_files: []
202
174
  files:
203
- - .gitignore
204
- - .rubocop.yml
205
- - .travis.yml
175
+ - ".gitignore"
176
+ - ".rubocop.yml"
177
+ - ".travis.yml"
206
178
  - CHANGELOG.md
207
179
  - CONTRIBUTING.md
208
180
  - Gemfile
@@ -210,6 +182,7 @@ files:
210
182
  - LICENSE.txt
211
183
  - README.md
212
184
  - Rakefile
185
+ - docs/COMPATIBILITY.md
213
186
  - lib/generators/statesman/active_record_transition_generator.rb
214
187
  - lib/generators/statesman/generator_helpers.rb
215
188
  - lib/generators/statesman/migration_generator.rb
@@ -266,17 +239,17 @@ require_paths:
266
239
  - lib
267
240
  required_ruby_version: !ruby/object:Gem::Requirement
268
241
  requirements:
269
- - - '>='
242
+ - - ">="
270
243
  - !ruby/object:Gem::Version
271
- version: '0'
244
+ version: '2.2'
272
245
  required_rubygems_version: !ruby/object:Gem::Requirement
273
246
  requirements:
274
- - - '>='
247
+ - - ">="
275
248
  - !ruby/object:Gem::Version
276
249
  version: '0'
277
250
  requirements: []
278
251
  rubyforge_project:
279
- rubygems_version: 2.2.2
252
+ rubygems_version: 2.6.11
280
253
  signing_key:
281
254
  specification_version: 4
282
255
  summary: A statesmanlike state machine library