Skip to content

Commit 4b271e8

Browse files
authored
Merge pull request #1920 from denny/upgrade/rails-7.0-ruby-3.2
Ruby 3.2, Rails 7.0, etc
2 parents 8be61ca + 0ece03a commit 4b271e8

30 files changed

+555
-502
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ version: 2
1212

1313
references:
1414
app: &app
15-
image: cimg/ruby:3.1.6-node
15+
image: cimg/ruby:3.2.7-node
1616
environment:
1717
BUNDLE_JOBS: 3
1818
BUNDLE_RETRY: 3

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.1.6
1+
3.2.7

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ ruby "~> #{helper.ruby_version}" # get version from .ruby-version file (DRY)
1313

1414
source 'https://rubygems.org'
1515
source 'https://rubygems.org' do
16-
# Rails 6.1
17-
gem 'rails', '~> 6.1.7'
16+
# Rails 7.0
17+
gem 'rails', '~> 7.0.8'
1818

1919
# Load ENV from .env(.*) files
2020
gem 'dotenv-rails', require: 'dotenv/load'

Gemfile.lock

Lines changed: 76 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ PATH
88
pagy (>= 5.10, < 8.0)
99
pg (>= 1.2.3, < 1.6.0)
1010
pundit
11-
rails (>= 6.1.2.1, < 7)
11+
rails (>= 7.0.8.7, < 7.1)
1212

1313
PATH
1414
remote: plugins/ShinyBlog
@@ -21,7 +21,7 @@ PATH
2121
pagy (>= 5.10, < 8.0)
2222
pg (>= 1.2.3, < 1.6.0)
2323
pundit
24-
rails (>= 6.1.2.1, < 7)
24+
rails (>= 7.0.8.7, < 7.1)
2525

2626
PATH
2727
remote: plugins/ShinyCMS
@@ -53,7 +53,7 @@ PATH
5353
pg (>= 1.2.3, < 1.6.0)
5454
pry-rails
5555
pundit
56-
rails (>= 6.1.2.1, < 7)
56+
rails (>= 7.0.8.7, < 7.1)
5757
rails-i18n
5858
recaptcha
5959
rss
@@ -76,7 +76,7 @@ PATH
7676
pagy (>= 5.10, < 8.0)
7777
pg (>= 1.2.3, < 1.6.0)
7878
pundit
79-
rails (>= 6.1.2.1, < 7)
79+
rails (>= 7.0.8.7, < 7.1)
8080

8181
PATH
8282
remote: plugins/ShinyInserts
@@ -88,7 +88,7 @@ PATH
8888
pagy (>= 5.10, < 8.0)
8989
pg (>= 1.2.3, < 1.6.0)
9090
pundit
91-
rails (>= 6.1.2.1, < 7)
91+
rails (>= 7.0.8.7, < 7.1)
9292

9393
PATH
9494
remote: plugins/ShinyLists
@@ -99,7 +99,7 @@ PATH
9999
pagy (>= 5.10, < 8.0)
100100
pg (>= 1.2.3, < 1.6.0)
101101
pundit
102-
rails (>= 6.1.2.1, < 7)
102+
rails (>= 7.0.8.7, < 7.1)
103103

104104
PATH
105105
remote: plugins/ShinyNews
@@ -112,7 +112,7 @@ PATH
112112
pagy (>= 5.10, < 8.0)
113113
pg (>= 1.2.3, < 1.6.0)
114114
pundit
115-
rails (>= 6.1.2.1, < 7)
115+
rails (>= 7.0.8.7, < 7.1)
116116

117117
PATH
118118
remote: plugins/ShinyNewsletters
@@ -124,7 +124,7 @@ PATH
124124
pagy (>= 5.10, < 8.0)
125125
pg (>= 1.2.3, < 1.6.0)
126126
pundit
127-
rails (>= 6.1.2.1, < 7)
127+
rails (>= 7.0.8.7, < 7.1)
128128

129129
PATH
130130
remote: plugins/ShinyPages
@@ -136,7 +136,7 @@ PATH
136136
pagy (>= 5.10, < 8.0)
137137
pg (>= 1.2.3, < 1.6.0)
138138
pundit
139-
rails (>= 6.1.2.1, < 7)
139+
rails (>= 7.0.8.7, < 7.1)
140140

141141
PATH
142142
remote: plugins/ShinyProfiles
@@ -147,14 +147,14 @@ PATH
147147
pagy (>= 5.10, < 8.0)
148148
pg (>= 1.2.3, < 1.6.0)
149149
pundit
150-
rails (>= 6.1.2.1, < 7)
150+
rails (>= 7.0.8.7, < 7.1)
151151

152152
PATH
153153
remote: plugins/ShinySEO
154154
specs:
155155
shiny_seo (21.06)
156156
pg (>= 0.18, < 2.0)
157-
rails (~> 6.1.2, >= 6.1.2.1)
157+
rails (>= 7.0.8.7, < 7.1)
158158
sitemap_generator
159159

160160
PATH
@@ -170,7 +170,7 @@ PATH
170170
pg (>= 1.2.3, < 1.6.0)
171171
pg_search
172172
pundit
173-
rails (>= 6.1.2.1, < 7)
173+
rails (>= 7.0.8.7, < 7.1)
174174

175175
GEM
176176
remote: https://oss:TavsFP4Rxs7vhBGX0Li5ksWM53EcWLyd@gem.mutant.dev/
@@ -180,72 +180,78 @@ GEM
180180
GEM
181181
remote: https://rubygems.org/
182182
specs:
183-
actioncable (6.1.7.10)
184-
actionpack (= 6.1.7.10)
185-
activesupport (= 6.1.7.10)
183+
actioncable (7.0.8.7)
184+
actionpack (= 7.0.8.7)
185+
activesupport (= 7.0.8.7)
186186
nio4r (~> 2.0)
187187
websocket-driver (>= 0.6.1)
188-
actionmailbox (6.1.7.10)
189-
actionpack (= 6.1.7.10)
190-
activejob (= 6.1.7.10)
191-
activerecord (= 6.1.7.10)
192-
activestorage (= 6.1.7.10)
193-
activesupport (= 6.1.7.10)
188+
actionmailbox (7.0.8.7)
189+
actionpack (= 7.0.8.7)
190+
activejob (= 7.0.8.7)
191+
activerecord (= 7.0.8.7)
192+
activestorage (= 7.0.8.7)
193+
activesupport (= 7.0.8.7)
194194
mail (>= 2.7.1)
195-
actionmailer (6.1.7.10)
196-
actionpack (= 6.1.7.10)
197-
actionview (= 6.1.7.10)
198-
activejob (= 6.1.7.10)
199-
activesupport (= 6.1.7.10)
195+
net-imap
196+
net-pop
197+
net-smtp
198+
actionmailer (7.0.8.7)
199+
actionpack (= 7.0.8.7)
200+
actionview (= 7.0.8.7)
201+
activejob (= 7.0.8.7)
202+
activesupport (= 7.0.8.7)
200203
mail (~> 2.5, >= 2.5.4)
204+
net-imap
205+
net-pop
206+
net-smtp
201207
rails-dom-testing (~> 2.0)
202-
actionpack (6.1.7.10)
203-
actionview (= 6.1.7.10)
204-
activesupport (= 6.1.7.10)
205-
rack (~> 2.0, >= 2.0.9)
208+
actionpack (7.0.8.7)
209+
actionview (= 7.0.8.7)
210+
activesupport (= 7.0.8.7)
211+
rack (~> 2.0, >= 2.2.4)
206212
rack-test (>= 0.6.3)
207213
rails-dom-testing (~> 2.0)
208214
rails-html-sanitizer (~> 1.0, >= 1.2.0)
209-
actiontext (6.1.7.10)
210-
actionpack (= 6.1.7.10)
211-
activerecord (= 6.1.7.10)
212-
activestorage (= 6.1.7.10)
213-
activesupport (= 6.1.7.10)
215+
actiontext (7.0.8.7)
216+
actionpack (= 7.0.8.7)
217+
activerecord (= 7.0.8.7)
218+
activestorage (= 7.0.8.7)
219+
activesupport (= 7.0.8.7)
220+
globalid (>= 0.6.0)
214221
nokogiri (>= 1.8.5)
215-
actionview (6.1.7.10)
216-
activesupport (= 6.1.7.10)
222+
actionview (7.0.8.7)
223+
activesupport (= 7.0.8.7)
217224
builder (~> 3.1)
218225
erubi (~> 1.4)
219226
rails-dom-testing (~> 2.0)
220227
rails-html-sanitizer (~> 1.1, >= 1.2.0)
221-
activejob (6.1.7.10)
222-
activesupport (= 6.1.7.10)
228+
activejob (7.0.8.7)
229+
activesupport (= 7.0.8.7)
223230
globalid (>= 0.3.6)
224-
activemodel (6.1.7.10)
225-
activesupport (= 6.1.7.10)
226-
activerecord (6.1.7.10)
227-
activemodel (= 6.1.7.10)
228-
activesupport (= 6.1.7.10)
231+
activemodel (7.0.8.7)
232+
activesupport (= 7.0.8.7)
233+
activerecord (7.0.8.7)
234+
activemodel (= 7.0.8.7)
235+
activesupport (= 7.0.8.7)
229236
activerecord-session_store (2.1.0)
230237
actionpack (>= 6.1)
231238
activerecord (>= 6.1)
232239
cgi (>= 0.3.6)
233240
multi_json (~> 1.11, >= 1.11.2)
234241
rack (>= 2.0.8, < 4)
235242
railties (>= 6.1)
236-
activestorage (6.1.7.10)
237-
actionpack (= 6.1.7.10)
238-
activejob (= 6.1.7.10)
239-
activerecord (= 6.1.7.10)
240-
activesupport (= 6.1.7.10)
243+
activestorage (7.0.8.7)
244+
actionpack (= 7.0.8.7)
245+
activejob (= 7.0.8.7)
246+
activerecord (= 7.0.8.7)
247+
activesupport (= 7.0.8.7)
241248
marcel (~> 1.0)
242249
mini_mime (>= 1.1.0)
243-
activesupport (6.1.7.10)
250+
activesupport (7.0.8.7)
244251
concurrent-ruby (~> 1.0, >= 1.0.2)
245252
i18n (>= 1.6, < 2)
246253
minitest (>= 5.1)
247254
tzinfo (~> 2.0)
248-
zeitwerk (~> 2.3)
249255
acts-as-taggable-on (10.0.0)
250256
activerecord (>= 6.1, < 7.2)
251257
acts_as_list (1.2.4)
@@ -573,21 +579,20 @@ GEM
573579
rack (2.2.11)
574580
rack-test (2.2.0)
575581
rack (>= 1.3)
576-
rails (6.1.7.10)
577-
actioncable (= 6.1.7.10)
578-
actionmailbox (= 6.1.7.10)
579-
actionmailer (= 6.1.7.10)
580-
actionpack (= 6.1.7.10)
581-
actiontext (= 6.1.7.10)
582-
actionview (= 6.1.7.10)
583-
activejob (= 6.1.7.10)
584-
activemodel (= 6.1.7.10)
585-
activerecord (= 6.1.7.10)
586-
activestorage (= 6.1.7.10)
587-
activesupport (= 6.1.7.10)
582+
rails (7.0.8.7)
583+
actioncable (= 7.0.8.7)
584+
actionmailbox (= 7.0.8.7)
585+
actionmailer (= 7.0.8.7)
586+
actionpack (= 7.0.8.7)
587+
actiontext (= 7.0.8.7)
588+
actionview (= 7.0.8.7)
589+
activejob (= 7.0.8.7)
590+
activemodel (= 7.0.8.7)
591+
activerecord (= 7.0.8.7)
592+
activestorage (= 7.0.8.7)
593+
activesupport (= 7.0.8.7)
588594
bundler (>= 1.15.0)
589-
railties (= 6.1.7.10)
590-
sprockets-rails (>= 2.0.0)
595+
railties (= 7.0.8.7)
591596
rails-dom-testing (2.2.0)
592597
activesupport (>= 5.0.0)
593598
minitest
@@ -606,12 +611,13 @@ GEM
606611
request_store
607612
sassc-rails (>= 2.0.0)
608613
turbolinks
609-
railties (6.1.7.10)
610-
actionpack (= 6.1.7.10)
611-
activesupport (= 6.1.7.10)
614+
railties (7.0.8.7)
615+
actionpack (= 7.0.8.7)
616+
activesupport (= 7.0.8.7)
612617
method_source
613618
rake (>= 12.2)
614619
thor (~> 1.0)
620+
zeitwerk (~> 2.5)
615621
rainbow (3.1.1)
616622
rake (13.2.1)
617623
rb-fsevent (0.11.2)
@@ -845,7 +851,7 @@ DEPENDENCIES
845851
pg (~> 1.5.9)!
846852
puma (~> 6.6)!
847853
rack (>= 2.2.11)!
848-
rails (~> 6.1.7)!
854+
rails (~> 7.0.8)!
849855
rails-pg-extras!
850856
rails_email_preview!
851857
rspec-instafail!
@@ -877,7 +883,7 @@ DEPENDENCIES
877883
webmock!
878884

879885
RUBY VERSION
880-
ruby 3.1.6p260
886+
ruby 3.2.7p253
881887

882888
BUNDLED WITH
883889
2.5.23

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ShinyCMS is primarily intended for use by professional web developers, as a plat
66

77
Web developers can also add custom functionality by writing their own plugins. A number of helpers and concerns are provided to help you build new features quickly, and with a consistent look-and-feel to the rest of the system.
88

9-
The current version of ShinyCMS runs on Ruby 3.0 and Rails 6.1
9+
The current version of ShinyCMS runs on Ruby 3.2 and Rails 7.0
1010

1111
## Features
1212

@@ -100,7 +100,7 @@ All other supported [external services](docs/Services.md) are optional. If you a
100100

101101
### Ruby and Rails versions
102102

103-
ShinyCMS requires Rails 6.1 and Ruby 2.7 or later. The project generally uses the most recent stable release of both Ruby and Rails (currently Ruby 3.0.1 and Rails 6.1.3).
103+
ShinyCMS requires Rails 7.0 and Ruby 3.2 or later. The project generally uses the most recent stable release of both Ruby and Rails (currently Ruby 3.2.7 and Rails 7.0.8.7).
104104

105105

106106
## Contributing

config/application.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,15 @@ module ShinyHostApp
3333
# Rails application class for the ShinyHostApp
3434
class Application < Rails::Application
3535
# Initialize configuration defaults for originally generated Rails version.
36-
config.load_defaults 6.1
36+
config.load_defaults 7.0
3737

3838
# Configuration for the application, engines, and railties goes here.
3939
#
4040
# These settings can be overridden in specific environments using the files
4141
# in config/environments, which are processed later.
42+
#
43+
# config.time_zone = "Central Time (US & Canada)"
44+
# config.eager_load_paths << Rails.root.join("extras")
4245

4346
# Don't generate system test files.
4447
config.generators.system_tests = nil

config/initializers/assets.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# frozen_string_literal: true
2+
3+
# Be sure to restart your server when you modify this file.
4+
5+
# Version of your assets, change this if you want to expire all your assets.
6+
Rails.application.config.assets.version = '1.0'
7+
8+
# Add additional assets to the asset load path.
9+
# Rails.application.config.assets.paths << Emoji.images_path
10+
11+
# Precompile additional assets.
12+
# application.js, application.css, and all non-JS/CSS in the app/assets
13+
# folder are already added.
14+
# Rails.application.config.assets.precompile += %w( admin.js admin.css )
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# frozen_string_literal: true
2+
3+
# Be sure to restart your server when you modify this file.
4+
5+
# Define an application-wide content security policy.
6+
# See the Securing Rails Applications Guide for more information:
7+
# https://guides.rubyonrails.org/security.html#content-security-policy-header
8+
9+
# Rails.application.configure do
10+
# config.content_security_policy do |policy|
11+
# policy.default_src :self, :https
12+
# policy.font_src :self, :https, :data
13+
# policy.img_src :self, :https, :data
14+
# policy.object_src :none
15+
# policy.script_src :self, :https
16+
# policy.style_src :self, :https
17+
# # Specify URI for violation reports
18+
# # policy.report_uri "/csp-violation-report-endpoint"
19+
# end
20+
#
21+
# # Generate session nonces for permitted importmap and inline scripts
22+
# config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s }
23+
# config.content_security_policy_nonce_directives = %w(script-src)
24+
#
25+
# # Report violations without enforcing the policy.
26+
# # config.content_security_policy_report_only = true
27+
# end

0 commit comments

Comments
 (0)