rails_state_machine 3.0.0 → 3.1.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
  SHA256:
3
- metadata.gz: d2a7ac60ccf566caaed843939ff8b81566eaf273dfbed9a6f8aa4ebc6f78b523
4
- data.tar.gz: e625ae5c03f382a45fe8011c09d831cefbe0b9c44b1806e2b7f9dd265f3c3df8
3
+ metadata.gz: 5461e8b6079aa65b23429567e03e5bcabb68ccb1887899d68de7102ac86ff120
4
+ data.tar.gz: 610999ac7316bbdd129614387e92a0898e8845406a40d72859f702e9addf24dd
5
5
  SHA512:
6
- metadata.gz: 07652ff7ef7916a95c1a57bab7ba4b21b8b64df6cebd28b2848f79d85d7bb8a2413180fa765d02c071985a36bb0d1ef706cba3d9af18d8834edb6fa642807f98
7
- data.tar.gz: c3cecdfa2ad2fafe1f96e6435a28692f43dc08e1b63fbbcfd30678804072274c763fa3cc11cf934615f67149805d355431645514b71eebc7e7bab00ce0363d4c
6
+ metadata.gz: b165ba8d60b65d476d1319e4572bdddc236a0f02fe6c6ea9c9565de3fbd48ea1d6fe36562aa10002949d22ba7805b9d7ca83c433135ab57fc231e87dacd4235f
7
+ data.tar.gz: 56f440e86a4c264b831ad37e4e33196eaf739a3f262dfb68d9bb2a0907aef09943085e2355129526352aa02da0f623e2559591ddddcc6e23b42693b7019893aa
@@ -9,10 +9,10 @@ name: Tests
9
9
  - master
10
10
  jobs:
11
11
  test_pg:
12
- runs-on: ubuntu-20.04
12
+ runs-on: ubuntu-22.04
13
13
  services:
14
14
  postgres:
15
- image: postgres:9.3
15
+ image: postgres:14.15
16
16
  env:
17
17
  POSTGRES_PASSWORD: postgres
18
18
  options: "--health-cmd pg_isready --health-interval 10s --health-timeout 5s
@@ -25,25 +25,47 @@ jobs:
25
25
  include:
26
26
  - ruby: 2.5.6
27
27
  gemfile: Gemfile.5.2.pg
28
+ bundler: 2.3.0
28
29
  - ruby: 2.5.6
29
30
  gemfile: Gemfile.6.0.pg
31
+ bundler: 2.3.11
30
32
 
31
33
  - ruby: 2.6.6
32
34
  gemfile: Gemfile.5.2.pg
35
+ bundler: 2.3.0
33
36
  - ruby: 2.6.6
34
37
  gemfile: Gemfile.6.0.pg
38
+ bundler: 2.3.11
35
39
 
36
40
  - ruby: 2.7.2
37
41
  gemfile: Gemfile.6.0.pg
42
+ bundler: 2.3.11
38
43
  - ruby: 2.7.2
39
44
  gemfile: Gemfile.6.1.pg
45
+ bundler: 2.2.25
40
46
  - ruby: 2.7.2
41
47
  gemfile: Gemfile.7.0.pg
48
+ bundler: 2.3.0
42
49
 
43
50
  - ruby: 3.2.0
44
51
  gemfile: Gemfile.6.1.pg
52
+ bundler: 2.2.25
45
53
  - ruby: 3.2.0
46
54
  gemfile: Gemfile.7.0.pg
55
+ bundler: 2.3.0
56
+ - ruby: 3.2.0
57
+ gemfile: Gemfile.8.0.pg
58
+ bundler: 2.5.23
59
+
60
+ - ruby: 3.4.1
61
+ gemfile: Gemfile.6.1.pg
62
+ bundler: 2.5.23
63
+ - ruby: 3.4.1
64
+ gemfile: Gemfile.7.0.pg
65
+ bundler: 2.5.23
66
+ - ruby: 3.4.1
67
+ gemfile: Gemfile.8.0.pg
68
+ bundler: 2.5.23
47
69
  env:
48
70
  BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
49
71
  steps:
@@ -58,7 +80,7 @@ jobs:
58
80
  PGPASSWORD=postgres psql -c 'create database rails_state_machine_test;' -U postgres -p 5432 -h localhost
59
81
  - name: Bundle
60
82
  run: |
61
- gem install bundler:2.1.4
62
- bundle install --no-deployment
83
+ gem install bundler:${{ matrix.bundler }}
84
+ bundle _${{ matrix.bundler }}_ install --no-deployment
63
85
  - name: Run tests
64
- run: bundle exec rspec
86
+ run: bundle _${{ matrix.bundler }}_ exec rspec
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.2.0
1
+ 3.4.1
data/CHANGELOG.md CHANGED
@@ -9,6 +9,12 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
9
9
 
10
10
  ### Breaking changes
11
11
 
12
+ ## 3.1.0 2025-01-21
13
+
14
+ ### Compatible changes
15
+
16
+ - Added support for Ruby 3.4
17
+
12
18
  ## 3.0.0 2024-06-21
13
19
 
14
20
  ### Breaking changes
@@ -50,7 +56,7 @@ def update
50
56
  render(:edit, status: :unprocessable_entity)
51
57
  end
52
58
  rescue RailsStateMachine::Event::TransitionNotFoundError
53
- flash.now[:error] = 'User could not be saved!'
59
+ flash.now[:error] = 'State event not valid anymore, maybe reload the page?'
54
60
  render(:edit, status: :unprocessable_entity)
55
61
  end
56
62
 
data/Gemfile CHANGED
@@ -1 +1 @@
1
- Gemfile.7.0.pg
1
+ Gemfile.8.0.pg
data/Gemfile.5.2.pg.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rails_state_machine (3.0.0)
4
+ rails_state_machine (3.1.0)
5
5
  activerecord
6
6
 
7
7
  GEM
data/Gemfile.6.0.pg.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rails_state_machine (3.0.0)
4
+ rails_state_machine (3.1.0)
5
5
  activerecord
6
6
 
7
7
  GEM
data/Gemfile.6.1.pg CHANGED
@@ -1,5 +1,13 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
+ # Former standard gems, see https://stdgems.org/
4
+ gem 'bigdecimal' # Bundled gem since Ruby 3.4
5
+ gem 'mutex_m' # Bundled gem since Ruby 3.4
6
+ gem 'base64' # Bundled gem since Ruby 3.4
7
+ gem 'ostruct' # Bundled gem since Ruby 3.4
8
+ gem 'benchmark' # Bundled gem since Ruby 3.4
9
+ gem 'logger' # Default gem since Ruby 3.4
10
+
3
11
  # Runtime dependencies
4
12
  gem 'rails', '~>6.1.0'
5
13
  gem 'pg', '> 1.2.3'
data/Gemfile.6.1.pg.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rails_state_machine (3.0.0)
4
+ rails_state_machine (3.1.0)
5
5
  activerecord
6
6
 
7
7
  GEM
data/Gemfile.7.0.pg CHANGED
@@ -1,9 +1,17 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
+ # Former standard gems, see https://stdgems.org/
4
+ gem 'bigdecimal' # Bundled gem since Ruby 3.4
5
+ gem 'mutex_m' # Bundled gem since Ruby 3.4
6
+ gem 'base64' # Bundled gem since Ruby 3.4
7
+ gem 'ostruct' # Bundled gem since Ruby 3.4
8
+ gem 'benchmark' # Bundled gem since Ruby 3.4
9
+ gem 'logger' # Default gem since Ruby 3.4
10
+
3
11
  # Runtime dependencies
4
- gem 'rails', '=7.0.1'
12
+ gem 'rails', '~>7.0.1'
5
13
  gem 'pg', '> 1.2.3'
6
- gem 'activerecord', '=7.0.1'
14
+ gem 'activerecord', '~>7.0.1'
7
15
 
8
16
  # Development dependencies
9
17
  gem 'rspec', '~>3.5'
@@ -11,6 +19,7 @@ gem 'rake', '> 10.0'
11
19
  gem 'pry'
12
20
  gem 'gemika', '>= 0.8.1'
13
21
  gem 'database_cleaner'
22
+ gem 'nokogiri', '= 1.15'
14
23
 
15
24
  # Gem under test
16
25
  gem 'rails_state_machine', :path => '.'
data/Gemfile.7.0.pg.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rails_state_machine (3.0.0)
4
+ rails_state_machine (3.1.0)
5
5
  activerecord
6
6
 
7
7
  GEM
@@ -76,9 +76,9 @@ GEM
76
76
  coderay (1.1.3)
77
77
  concurrent-ruby (1.2.2)
78
78
  crass (1.0.6)
79
- database_cleaner (2.0.1)
80
- database_cleaner-active_record (~> 2.0.0)
81
- database_cleaner-active_record (2.0.1)
79
+ database_cleaner (2.1.0)
80
+ database_cleaner-active_record (>= 2, < 3)
81
+ database_cleaner-active_record (2.2.0)
82
82
  activerecord (>= 5.a)
83
83
  database_cleaner-core (~> 2.0.0)
84
84
  database_cleaner-core (2.0.1)
@@ -101,7 +101,7 @@ GEM
101
101
  marcel (1.0.2)
102
102
  method_source (1.0.0)
103
103
  mini_mime (1.1.5)
104
- mini_portile2 (2.8.5)
104
+ mini_portile2 (2.8.8)
105
105
  minitest (5.20.0)
106
106
  net-imap (0.3.7)
107
107
  date
@@ -113,16 +113,14 @@ GEM
113
113
  net-smtp (0.4.0)
114
114
  net-protocol
115
115
  nio4r (2.7.0)
116
- nokogiri (1.15.5)
116
+ nokogiri (1.15.0)
117
117
  mini_portile2 (~> 2.8.2)
118
118
  racc (~> 1.4)
119
- nokogiri (1.15.5-x86_64-linux)
120
- racc (~> 1.4)
121
119
  pg (1.5.4)
122
120
  pry (0.14.2)
123
121
  coderay (~> 1.1)
124
122
  method_source (~> 1.0)
125
- racc (1.7.3)
123
+ racc (1.8.1)
126
124
  rack (2.2.8)
127
125
  rack-test (2.1.0)
128
126
  rack (>= 1.3)
@@ -182,12 +180,13 @@ PLATFORMS
182
180
  x86_64-linux
183
181
 
184
182
  DEPENDENCIES
185
- activerecord (= 7.0.1)
183
+ activerecord (~> 7.0.1)
186
184
  database_cleaner
187
185
  gemika (>= 0.8.1)
186
+ nokogiri (= 1.15)
188
187
  pg (> 1.2.3)
189
188
  pry
190
- rails (= 7.0.1)
189
+ rails (~> 7.0.1)
191
190
  rails_state_machine!
192
191
  rake (> 10.0)
193
192
  rspec (~> 3.5)
data/Gemfile.8.0.pg ADDED
@@ -0,0 +1,16 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Runtime dependencies
4
+ gem 'rails', '~>8.0.0'
5
+ gem 'pg', '> 1.2.3'
6
+ gem 'activerecord', '~>8.0.0'
7
+
8
+ # Development dependencies
9
+ gem 'rspec', '~>3.5'
10
+ gem 'rake', '> 10.0'
11
+ gem 'pry'
12
+ gem 'gemika', '>= 0.8.1'
13
+ gem 'database_cleaner'
14
+
15
+ # Gem under test
16
+ gem 'rails_state_machine', :path => '.'
@@ -0,0 +1,223 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ rails_state_machine (3.1.0)
5
+ activerecord
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ actioncable (8.0.0.1)
11
+ actionpack (= 8.0.0.1)
12
+ activesupport (= 8.0.0.1)
13
+ nio4r (~> 2.0)
14
+ websocket-driver (>= 0.6.1)
15
+ zeitwerk (~> 2.6)
16
+ actionmailbox (8.0.0.1)
17
+ actionpack (= 8.0.0.1)
18
+ activejob (= 8.0.0.1)
19
+ activerecord (= 8.0.0.1)
20
+ activestorage (= 8.0.0.1)
21
+ activesupport (= 8.0.0.1)
22
+ mail (>= 2.8.0)
23
+ actionmailer (8.0.0.1)
24
+ actionpack (= 8.0.0.1)
25
+ actionview (= 8.0.0.1)
26
+ activejob (= 8.0.0.1)
27
+ activesupport (= 8.0.0.1)
28
+ mail (>= 2.8.0)
29
+ rails-dom-testing (~> 2.2)
30
+ actionpack (8.0.0.1)
31
+ actionview (= 8.0.0.1)
32
+ activesupport (= 8.0.0.1)
33
+ nokogiri (>= 1.8.5)
34
+ rack (>= 2.2.4)
35
+ rack-session (>= 1.0.1)
36
+ rack-test (>= 0.6.3)
37
+ rails-dom-testing (~> 2.2)
38
+ rails-html-sanitizer (~> 1.6)
39
+ useragent (~> 0.16)
40
+ actiontext (8.0.0.1)
41
+ actionpack (= 8.0.0.1)
42
+ activerecord (= 8.0.0.1)
43
+ activestorage (= 8.0.0.1)
44
+ activesupport (= 8.0.0.1)
45
+ globalid (>= 0.6.0)
46
+ nokogiri (>= 1.8.5)
47
+ actionview (8.0.0.1)
48
+ activesupport (= 8.0.0.1)
49
+ builder (~> 3.1)
50
+ erubi (~> 1.11)
51
+ rails-dom-testing (~> 2.2)
52
+ rails-html-sanitizer (~> 1.6)
53
+ activejob (8.0.0.1)
54
+ activesupport (= 8.0.0.1)
55
+ globalid (>= 0.3.6)
56
+ activemodel (8.0.0.1)
57
+ activesupport (= 8.0.0.1)
58
+ activerecord (8.0.0.1)
59
+ activemodel (= 8.0.0.1)
60
+ activesupport (= 8.0.0.1)
61
+ timeout (>= 0.4.0)
62
+ activestorage (8.0.0.1)
63
+ actionpack (= 8.0.0.1)
64
+ activejob (= 8.0.0.1)
65
+ activerecord (= 8.0.0.1)
66
+ activesupport (= 8.0.0.1)
67
+ marcel (~> 1.0)
68
+ activesupport (8.0.0.1)
69
+ base64
70
+ benchmark (>= 0.3)
71
+ bigdecimal
72
+ concurrent-ruby (~> 1.0, >= 1.3.1)
73
+ connection_pool (>= 2.2.5)
74
+ drb
75
+ i18n (>= 1.6, < 2)
76
+ logger (>= 1.4.2)
77
+ minitest (>= 5.1)
78
+ securerandom (>= 0.3)
79
+ tzinfo (~> 2.0, >= 2.0.5)
80
+ uri (>= 0.13.1)
81
+ base64 (0.2.0)
82
+ benchmark (0.4.0)
83
+ bigdecimal (3.1.8)
84
+ builder (3.3.0)
85
+ coderay (1.1.3)
86
+ concurrent-ruby (1.3.4)
87
+ connection_pool (2.4.1)
88
+ crass (1.0.6)
89
+ database_cleaner (2.1.0)
90
+ database_cleaner-active_record (>= 2, < 3)
91
+ database_cleaner-active_record (2.2.0)
92
+ activerecord (>= 5.a)
93
+ database_cleaner-core (~> 2.0.0)
94
+ database_cleaner-core (2.0.1)
95
+ date (3.4.1)
96
+ diff-lcs (1.5.1)
97
+ drb (2.2.1)
98
+ erubi (1.13.0)
99
+ gemika (0.8.3)
100
+ globalid (1.2.1)
101
+ activesupport (>= 6.1)
102
+ i18n (1.14.6)
103
+ concurrent-ruby (~> 1.0)
104
+ io-console (0.8.0)
105
+ irb (1.14.1)
106
+ rdoc (>= 4.0.0)
107
+ reline (>= 0.4.2)
108
+ logger (1.6.2)
109
+ loofah (2.23.1)
110
+ crass (~> 1.0.2)
111
+ nokogiri (>= 1.12.0)
112
+ mail (2.8.1)
113
+ mini_mime (>= 0.1.1)
114
+ net-imap
115
+ net-pop
116
+ net-smtp
117
+ marcel (1.0.4)
118
+ method_source (1.1.0)
119
+ mini_mime (1.1.5)
120
+ minitest (5.25.4)
121
+ net-imap (0.5.1)
122
+ date
123
+ net-protocol
124
+ net-pop (0.1.2)
125
+ net-protocol
126
+ net-protocol (0.2.2)
127
+ timeout
128
+ net-smtp (0.5.0)
129
+ net-protocol
130
+ nio4r (2.7.4)
131
+ nokogiri (1.18.1-x86_64-linux-gnu)
132
+ racc (~> 1.4)
133
+ pg (1.5.9)
134
+ pry (0.15.0)
135
+ coderay (~> 1.1)
136
+ method_source (~> 1.0)
137
+ psych (5.2.1)
138
+ date
139
+ stringio
140
+ racc (1.8.1)
141
+ rack (3.1.8)
142
+ rack-session (2.0.0)
143
+ rack (>= 3.0.0)
144
+ rack-test (2.1.0)
145
+ rack (>= 1.3)
146
+ rackup (2.2.1)
147
+ rack (>= 3)
148
+ rails (8.0.0.1)
149
+ actioncable (= 8.0.0.1)
150
+ actionmailbox (= 8.0.0.1)
151
+ actionmailer (= 8.0.0.1)
152
+ actionpack (= 8.0.0.1)
153
+ actiontext (= 8.0.0.1)
154
+ actionview (= 8.0.0.1)
155
+ activejob (= 8.0.0.1)
156
+ activemodel (= 8.0.0.1)
157
+ activerecord (= 8.0.0.1)
158
+ activestorage (= 8.0.0.1)
159
+ activesupport (= 8.0.0.1)
160
+ bundler (>= 1.15.0)
161
+ railties (= 8.0.0.1)
162
+ rails-dom-testing (2.2.0)
163
+ activesupport (>= 5.0.0)
164
+ minitest
165
+ nokogiri (>= 1.6)
166
+ rails-html-sanitizer (1.6.1)
167
+ loofah (~> 2.21)
168
+ nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
169
+ railties (8.0.0.1)
170
+ actionpack (= 8.0.0.1)
171
+ activesupport (= 8.0.0.1)
172
+ irb (~> 1.13)
173
+ rackup (>= 1.0.0)
174
+ rake (>= 12.2)
175
+ thor (~> 1.0, >= 1.2.2)
176
+ zeitwerk (~> 2.6)
177
+ rake (13.2.1)
178
+ rdoc (6.8.1)
179
+ psych (>= 4.0.0)
180
+ reline (0.5.12)
181
+ io-console (~> 0.5)
182
+ rspec (3.13.0)
183
+ rspec-core (~> 3.13.0)
184
+ rspec-expectations (~> 3.13.0)
185
+ rspec-mocks (~> 3.13.0)
186
+ rspec-core (3.13.2)
187
+ rspec-support (~> 3.13.0)
188
+ rspec-expectations (3.13.3)
189
+ diff-lcs (>= 1.2.0, < 2.0)
190
+ rspec-support (~> 3.13.0)
191
+ rspec-mocks (3.13.2)
192
+ diff-lcs (>= 1.2.0, < 2.0)
193
+ rspec-support (~> 3.13.0)
194
+ rspec-support (3.13.2)
195
+ securerandom (0.4.0)
196
+ stringio (3.1.2)
197
+ thor (1.3.2)
198
+ timeout (0.4.2)
199
+ tzinfo (2.0.6)
200
+ concurrent-ruby (~> 1.0)
201
+ uri (1.0.2)
202
+ useragent (0.16.11)
203
+ websocket-driver (0.7.6)
204
+ websocket-extensions (>= 0.1.0)
205
+ websocket-extensions (0.1.5)
206
+ zeitwerk (2.7.1)
207
+
208
+ PLATFORMS
209
+ x86_64-linux
210
+
211
+ DEPENDENCIES
212
+ activerecord (~> 8.0.0)
213
+ database_cleaner
214
+ gemika (>= 0.8.1)
215
+ pg (> 1.2.3)
216
+ pry
217
+ rails (~> 8.0.0)
218
+ rails_state_machine!
219
+ rake (> 10.0)
220
+ rspec (~> 3.5)
221
+
222
+ BUNDLED WITH
223
+ 2.5.23
data/Gemfile.lock CHANGED
@@ -1 +1 @@
1
- Gemfile.7.0.pg.lock
1
+ Gemfile.8.0.pg.lock
data/README.md CHANGED
@@ -1,4 +1,20 @@
1
- # Rails State Machine [![Tests](https://github.com/makandra/rails_state_machine/workflows/Tests/badge.svg)](https://github.com/makandra/rails_state_machine/actions?query=branch:master)
1
+ <p>
2
+ <a href="https://makandra.de/">
3
+ <picture>
4
+ <source media="(prefers-color-scheme: light)" srcset="media/makandra-with-bottom-margin.light.svg">
5
+ <source media="(prefers-color-scheme: dark)" srcset="media/makandra-with-bottom-margin.dark.svg">
6
+ <img align="right" width="25%" alt="makandra" src="media/makandra-with-bottom-margin.light.svg">
7
+ </picture>
8
+ </a>
9
+
10
+ <picture>
11
+ <source media="(prefers-color-scheme: light)" srcset="media/logo.light.shapes.svg">
12
+ <source media="(prefers-color-scheme: dark)" srcset="media/logo.dark.shapes.svg">
13
+ <img width="412" alt="Rails State Machine" role="heading" aria-level="1" src="media/logo.light.shapes.svg">
14
+ </picture>
15
+ </p>
16
+
17
+ [![Tests](https://github.com/makandra/rails_state_machine/workflows/Tests/badge.svg)](https://github.com/makandra/rails_state_machine/actions?query=branch:master)
2
18
 
3
19
  Rails State Machine is a ActiveRecord-bound state machine.
4
20
 
@@ -174,6 +190,10 @@ We recommend to test large changes against multiple versions of Ruby and multipl
174
190
  - Install development dependencies using `rake matrix:install`
175
191
  - Run tests using `rake matrix:spec`
176
192
 
193
+ ```sh
194
+ for version in "2.5.6" "2.6.6" "2.7.2" "3.2.0" "3.4.1"; do rbenv shell $version && bundle install && bundle exec rake matrix:install && bundle exec rake matrix:spec; done
195
+ ```
196
+
177
197
  You can also run `bin/console` for an interactive prompt that will allow you to experiment.
178
198
 
179
199
  To install this gem onto your local machine, run `bundle exec rake install`.
@@ -1,3 +1,3 @@
1
1
  module RailsStateMachine
2
- VERSION = '3.0.0'
2
+ VERSION = '3.1.0'
3
3
  end