Skip to content

Commit f98e29b

Browse files
authored
Rails 7.1 (#708)
* Add 7.1 and ruby-head to matrix Fix bad git usage 7.1.0 released Docker get newer node and docs * Fix yarn install in Dockerfile * Upgrade demo app to 7.1 * Test pass except for demo * RuboCop fixes * Schema without version for older Rails * Remove unneeded migrations. * Add action_mailbox_inbound_emails to schema * Did I need headless_chrome? * CR feedback
1 parent e838d4e commit f98e29b

25 files changed

+4782
-317
lines changed

.github/workflows/ruby.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ jobs:
3131
strategy:
3232
fail-fast: false
3333
matrix:
34-
ruby-version: [ '3.2', '3.1', '3.0' ]
35-
gemfile: [ '7.0', '6.1', 'edge' ]
34+
ruby-version: [ '3.2', '3.1', '3.0', 'ruby-head' ]
35+
gemfile: [ '7.1', '7.0', '6.1', 'edge' ]
3636
env:
3737
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
3838
steps:

CONTRIBUTING.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,20 @@ Docker is _not_ required to work on this gem.
8585

8686
The `docker-compose` approach should link to enough of your networking configuration that you can release the gem.
8787
However, you have to do some of the configuration yourself, because it's dependent on your host operating system.
88+
89+
First, build the image for whatever version of Ruby you need (typically either the earliest supported version or the latest):
90+
91+
```bash
92+
RUBY_VERSION=3.2 docker-compose build
93+
```
94+
8895
You can run a shell in a Docker container that pretty much should behave like a Debian distribution with:
8996

9097
```bash
9198
docker-compose run --service-ports shell
9299
```
93100

94-
(`--service-ports` exposes port 3000 so you can browse to the demo app on `localhost:3000`. If you just want to run a on-off command, or run the test suite, leave off the `--service-ports`.)
101+
(`--service-ports` exposes port 3000 so you can browse to the demo app on `localhost:3000`. If you just want to run a one-off command, or run the test suite, leave off the `--service-ports`.)
95102

96103
The following instructions work for an Ubuntu host, and will probably work for other common Linux distributions.
97104

Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ ARG DISTRO=bullseye
33

44
FROM ruby:$RUBY_VERSION-$DISTRO
55

6+
ARG NODE_MAJOR=18
7+
68
RUN mkdir -p /app
79
ENV HOME /app
810
WORKDIR /app
@@ -12,10 +14,9 @@ ENV BUNDLE_APP_CONFIG="$GEM_HOME"
1214
ENV PATH ./bin:$GEM_HOME/bin:$PATH
1315
RUN (echo 'docker'; echo 'docker') | passwd root
1416

15-
# Yarn installs nodejs.
16-
# Rails wants a newer version of node that we get with the Debian distro.
17-
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && apt-get install -y nodejs
17+
# Rails wants a newer version of node than we get with the Debian distro.
18+
RUN curl -fsSL https://deb.nodesource.com/setup_$NODE_MAJOR.x | bash - && apt-get install -y nodejs
1819
RUN corepack enable && corepack prepare yarn@stable --activate
19-
RUN apt install -y -q yarn sqlite3
20+
RUN apt install -y -q sqlite3
2021

2122
EXPOSE 3000

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1693,7 +1693,7 @@ Generated HTML:
16931693
<form accept-charset="UTF-8" action="/address" class="new_address" id="new_address_1" method="post">
16941694
<div class="mb-3">
16951695
<label class="form-label required" for="address_user_id">User</label>
1696-
<select class="form-select" id="address_user_id" name="address[user_id]">
1696+
<select class="form-select" id="address_user_id" name="address[user_id]" required="required">
16971697
<option value="">Select a value</option>
16981698
<option value="">[email protected]</option>
16991699
</select>
@@ -1760,7 +1760,8 @@ Generated HTML:
17601760
<div class="col-auto">
17611761
<div class="mb-3">
17621762
<label class="form-label" for="user_comments">Comments</label>
1763-
<textarea class="form-control" cols="18" disabled id="user_comments" name="user[comments]" rows="2"> </textarea>
1763+
<textarea class="form-control" cols="18" disabled id="user_comments" name="user[comments]" rows="2">
1764+
</textarea>
17641765
</div>
17651766
</div>
17661767
<div class="col-auto">

demo/Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ source "https://rubygems.org"
22

33
gem "bootstrap_form", path: ".."
44

5-
gem "rails", "~> 7.0.0"
5+
gem "rails", "~> 7.1.1"
66

77
gem "bootsnap", require: false
88
gem "cssbundling-rails"

demo/Gemfile.lock

Lines changed: 97 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -8,73 +8,83 @@ PATH
88
GEM
99
remote: https://rubygems.org/
1010
specs:
11-
actioncable (7.0.8)
12-
actionpack (= 7.0.8)
13-
activesupport (= 7.0.8)
11+
actioncable (7.1.1)
12+
actionpack (= 7.1.1)
13+
activesupport (= 7.1.1)
1414
nio4r (~> 2.0)
1515
websocket-driver (>= 0.6.1)
16-
actionmailbox (7.0.8)
17-
actionpack (= 7.0.8)
18-
activejob (= 7.0.8)
19-
activerecord (= 7.0.8)
20-
activestorage (= 7.0.8)
21-
activesupport (= 7.0.8)
16+
zeitwerk (~> 2.6)
17+
actionmailbox (7.1.1)
18+
actionpack (= 7.1.1)
19+
activejob (= 7.1.1)
20+
activerecord (= 7.1.1)
21+
activestorage (= 7.1.1)
22+
activesupport (= 7.1.1)
2223
mail (>= 2.7.1)
2324
net-imap
2425
net-pop
2526
net-smtp
26-
actionmailer (7.0.8)
27-
actionpack (= 7.0.8)
28-
actionview (= 7.0.8)
29-
activejob (= 7.0.8)
30-
activesupport (= 7.0.8)
27+
actionmailer (7.1.1)
28+
actionpack (= 7.1.1)
29+
actionview (= 7.1.1)
30+
activejob (= 7.1.1)
31+
activesupport (= 7.1.1)
3132
mail (~> 2.5, >= 2.5.4)
3233
net-imap
3334
net-pop
3435
net-smtp
35-
rails-dom-testing (~> 2.0)
36-
actionpack (7.0.8)
37-
actionview (= 7.0.8)
38-
activesupport (= 7.0.8)
39-
rack (~> 2.0, >= 2.2.4)
36+
rails-dom-testing (~> 2.2)
37+
actionpack (7.1.1)
38+
actionview (= 7.1.1)
39+
activesupport (= 7.1.1)
40+
nokogiri (>= 1.8.5)
41+
rack (>= 2.2.4)
42+
rack-session (>= 1.0.1)
4043
rack-test (>= 0.6.3)
41-
rails-dom-testing (~> 2.0)
42-
rails-html-sanitizer (~> 1.0, >= 1.2.0)
43-
actiontext (7.0.8)
44-
actionpack (= 7.0.8)
45-
activerecord (= 7.0.8)
46-
activestorage (= 7.0.8)
47-
activesupport (= 7.0.8)
44+
rails-dom-testing (~> 2.2)
45+
rails-html-sanitizer (~> 1.6)
46+
actiontext (7.1.1)
47+
actionpack (= 7.1.1)
48+
activerecord (= 7.1.1)
49+
activestorage (= 7.1.1)
50+
activesupport (= 7.1.1)
4851
globalid (>= 0.6.0)
4952
nokogiri (>= 1.8.5)
50-
actionview (7.0.8)
51-
activesupport (= 7.0.8)
53+
actionview (7.1.1)
54+
activesupport (= 7.1.1)
5255
builder (~> 3.1)
53-
erubi (~> 1.4)
54-
rails-dom-testing (~> 2.0)
55-
rails-html-sanitizer (~> 1.1, >= 1.2.0)
56-
activejob (7.0.8)
57-
activesupport (= 7.0.8)
56+
erubi (~> 1.11)
57+
rails-dom-testing (~> 2.2)
58+
rails-html-sanitizer (~> 1.6)
59+
activejob (7.1.1)
60+
activesupport (= 7.1.1)
5861
globalid (>= 0.3.6)
59-
activemodel (7.0.8)
60-
activesupport (= 7.0.8)
61-
activerecord (7.0.8)
62-
activemodel (= 7.0.8)
63-
activesupport (= 7.0.8)
64-
activestorage (7.0.8)
65-
actionpack (= 7.0.8)
66-
activejob (= 7.0.8)
67-
activerecord (= 7.0.8)
68-
activesupport (= 7.0.8)
62+
activemodel (7.1.1)
63+
activesupport (= 7.1.1)
64+
activerecord (7.1.1)
65+
activemodel (= 7.1.1)
66+
activesupport (= 7.1.1)
67+
timeout (>= 0.4.0)
68+
activestorage (7.1.1)
69+
actionpack (= 7.1.1)
70+
activejob (= 7.1.1)
71+
activerecord (= 7.1.1)
72+
activesupport (= 7.1.1)
6973
marcel (~> 1.0)
70-
mini_mime (>= 1.1.0)
71-
activesupport (7.0.8)
74+
activesupport (7.1.1)
75+
base64
76+
bigdecimal
7277
concurrent-ruby (~> 1.0, >= 1.0.2)
78+
connection_pool (>= 2.2.5)
79+
drb
7380
i18n (>= 1.6, < 2)
7481
minitest (>= 5.1)
82+
mutex_m
7583
tzinfo (~> 2.0)
7684
addressable (2.8.5)
7785
public_suffix (>= 2.0.2, < 6.0)
86+
base64 (0.1.1)
87+
bigdecimal (3.1.4)
7888
bindex (0.8.1)
7989
bootsnap (1.16.0)
8090
msgpack (~> 1.2)
@@ -88,19 +98,22 @@ GEM
8898
rack-test (>= 0.6.3)
8999
regexp_parser (>= 1.5, < 3.0)
90100
xpath (~> 3.2)
91-
capybara-screenshot-diff (1.8.2)
101+
capybara-screenshot-diff (1.8.3)
92102
actionpack (>= 6.1, < 8)
93103
capybara (>= 2, < 4)
94104
chunky_png (~> 1.3)
95105
chunky_png (1.4.0)
96106
concurrent-ruby (1.2.2)
107+
connection_pool (2.4.1)
97108
crass (1.0.6)
98-
cssbundling-rails (1.3.2)
109+
cssbundling-rails (1.3.3)
99110
railties (>= 6.0.0)
100111
date (3.3.3)
101112
debug (1.8.0)
102113
irb (>= 1.5.0)
103114
reline (>= 0.3.1)
115+
drb (2.1.1)
116+
ruby2_keywords
104117
erubi (1.12.0)
105118
globalid (1.2.1)
106119
activesupport (>= 6.1)
@@ -126,19 +139,19 @@ GEM
126139
net-smtp
127140
marcel (1.0.2)
128141
matrix (0.4.2)
129-
method_source (1.0.0)
130142
mini_mime (1.1.5)
131143
mini_portile2 (2.8.4)
132144
minitest (5.20.0)
133145
msgpack (1.7.2)
134-
net-imap (0.3.7)
146+
mutex_m (0.1.2)
147+
net-imap (0.4.2)
135148
date
136149
net-protocol
137150
net-pop (0.1.2)
138151
net-protocol
139152
net-protocol (0.2.1)
140153
timeout
141-
net-smtp (0.3.3)
154+
net-smtp (0.4.0)
142155
net-protocol
143156
nio4r (2.5.9)
144157
nokogiri (1.15.4)
@@ -151,49 +164,56 @@ GEM
151164
psych (5.1.0)
152165
stringio
153166
public_suffix (5.0.3)
154-
puma (6.3.1)
167+
puma (6.4.0)
155168
nio4r (~> 2.0)
156169
racc (1.7.1)
157-
rack (2.2.8)
170+
rack (3.0.8)
171+
rack-session (2.0.0)
172+
rack (>= 3.0.0)
158173
rack-test (2.1.0)
159174
rack (>= 1.3)
160-
rails (7.0.8)
161-
actioncable (= 7.0.8)
162-
actionmailbox (= 7.0.8)
163-
actionmailer (= 7.0.8)
164-
actionpack (= 7.0.8)
165-
actiontext (= 7.0.8)
166-
actionview (= 7.0.8)
167-
activejob (= 7.0.8)
168-
activemodel (= 7.0.8)
169-
activerecord (= 7.0.8)
170-
activestorage (= 7.0.8)
171-
activesupport (= 7.0.8)
175+
rackup (2.1.0)
176+
rack (>= 3)
177+
webrick (~> 1.8)
178+
rails (7.1.1)
179+
actioncable (= 7.1.1)
180+
actionmailbox (= 7.1.1)
181+
actionmailer (= 7.1.1)
182+
actionpack (= 7.1.1)
183+
actiontext (= 7.1.1)
184+
actionview (= 7.1.1)
185+
activejob (= 7.1.1)
186+
activemodel (= 7.1.1)
187+
activerecord (= 7.1.1)
188+
activestorage (= 7.1.1)
189+
activesupport (= 7.1.1)
172190
bundler (>= 1.15.0)
173-
railties (= 7.0.8)
191+
railties (= 7.1.1)
174192
rails-dom-testing (2.2.0)
175193
activesupport (>= 5.0.0)
176194
minitest
177195
nokogiri (>= 1.6)
178196
rails-html-sanitizer (1.6.0)
179197
loofah (~> 2.21)
180198
nokogiri (~> 1.14)
181-
railties (7.0.8)
182-
actionpack (= 7.0.8)
183-
activesupport (= 7.0.8)
184-
method_source
199+
railties (7.1.1)
200+
actionpack (= 7.1.1)
201+
activesupport (= 7.1.1)
202+
irb
203+
rackup (>= 1.0.0)
185204
rake (>= 12.2)
186-
thor (~> 1.0)
187-
zeitwerk (~> 2.5)
205+
thor (~> 1.0, >= 1.2.2)
206+
zeitwerk (~> 2.6)
188207
rake (13.0.6)
189208
rdoc (6.5.0)
190209
psych (>= 4.0.0)
191210
regexp_parser (2.8.1)
192-
reline (0.3.8)
211+
reline (0.3.9)
193212
io-console (~> 0.5)
194213
rexml (3.2.6)
214+
ruby2_keywords (0.0.5)
195215
rubyzip (2.3.2)
196-
selenium-webdriver (4.12.0)
216+
selenium-webdriver (4.13.1)
197217
rexml (~> 3.2, >= 3.2.5)
198218
rubyzip (>= 1.2.2, < 3.0)
199219
websocket (~> 1.0)
@@ -218,13 +238,14 @@ GEM
218238
activemodel (>= 6.0.0)
219239
bindex (>= 0.4.0)
220240
railties (>= 6.0.0)
221-
websocket (1.2.9)
241+
webrick (1.8.1)
242+
websocket (1.2.10)
222243
websocket-driver (0.7.6)
223244
websocket-extensions (>= 0.1.0)
224245
websocket-extensions (0.1.5)
225246
xpath (3.2.0)
226247
nokogiri (~> 1.8)
227-
zeitwerk (2.6.11)
248+
zeitwerk (2.6.12)
228249

229250
PLATFORMS
230251
ruby
@@ -241,7 +262,7 @@ DEPENDENCIES
241262
jbuilder
242263
jsbundling-rails
243264
puma
244-
rails (~> 7.0.0)
265+
rails (~> 7.1.1)
245266
selenium-webdriver
246267
sprockets-rails
247268
sqlite3 (~> 1.4)

0 commit comments

Comments
 (0)