diff --git a/.ruby-version b/.ruby-version index f6ab44e9..14dbd377 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -ruby-2.6.6 +ruby-3.0.6 diff --git a/Dockerfile b/Dockerfile index fe0e5018..ec4ca1cf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ ### ### Build stage ### ### -FROM ruby:2.6.6 AS builder +FROM ruby:3.0.6 AS builder RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - RUN apt-get update -qq && apt-get install -y nodejs postgresql-client @@ -56,7 +56,7 @@ EXPOSE 3000 ### ### Prod stage ### ### -FROM ruby:2.6.6-slim AS prod +FROM ruby:3.0.6-slim AS prod RUN apt-get update -qq && \ apt-get install -yq \ diff --git a/Gemfile b/Gemfile index 5af317d9..caeb0df9 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,8 @@ source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } -ruby '2.6.6' +ruby '3.0.6' + gem 'rake', '12.3.3' gem 'rails', '6.0.5' @@ -45,8 +46,8 @@ end group :development do gem 'web-console', '>= 3.3.0' - gem 'spring' - gem 'spring-watcher-listen', '~> 2.0.0' + gem 'spring', '2.1.1' + gem 'spring-watcher-listen', '2.0.1' end group :test do @@ -58,7 +59,7 @@ group :test do end # If not bundled, webpack compilation in production fails -gem 'listen', '>= 3.0.5', '< 3.2' +gem 'listen', '3.5.1' # Windows does not include zoneinfo files, so bundle the tzinfo-data gem -gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] +gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index 23190fbc..dcf7f278 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -120,10 +120,9 @@ GEM activerecord kaminari-core (= 1.2.2) kaminari-core (1.2.2) - listen (3.1.5) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - ruby_dep (~> 1.2) + listen (3.5.1) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) loofah (2.19.1) crass (~> 1.0.2) nokogiri (>= 1.5.9) @@ -181,7 +180,7 @@ GEM rake (>= 0.8.7) thor (>= 0.20.3, < 2.0) rake (12.3.3) - rb-fsevent (0.11.1) + rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) react-rails (2.6.2) @@ -212,7 +211,6 @@ GEM rspec-mocks (~> 3.8.0) rspec-support (~> 3.8.0) rspec-support (3.8.3) - ruby_dep (1.5.0) rubyzip (2.3.2) selenium-webdriver (4.1.0) childprocess (>= 0.5, < 5.0) @@ -267,12 +265,12 @@ DEPENDENCIES byebug capybara (= 3.36.0) devise (= 4.7.3) - httparty (= 0.21.0) factory_bot_rails (= 5.0.2) + httparty (= 0.21.0) i18n-js (= 3.9.2) jbuilder (= 2.11.5) kaminari (= 1.2.2) - listen (>= 3.0.5, < 3.2) + listen (= 3.5.1) pg (= 1.3.5) puma (= 4.3.12) pundit (= 2.2.0) @@ -281,8 +279,8 @@ DEPENDENCIES react-rails (= 2.6.2) rspec-rails (= 3.8.3) selenium-webdriver (= 4.1.0) - spring - spring-watcher-listen (~> 2.0.0) + spring (= 2.1.1) + spring-watcher-listen (= 2.0.1) turbolinks (= 5.2.1) tzinfo-data web-console (>= 3.3.0) @@ -290,7 +288,7 @@ DEPENDENCIES webpacker (= 4.3.0) RUBY VERSION - ruby 2.6.6p146 + ruby 3.0.6p216 BUNDLED WITH 2.3.0 diff --git a/app/controllers/o_auths_controller.rb b/app/controllers/o_auths_controller.rb index 55e0c408..115a44c3 100644 --- a/app/controllers/o_auths_controller.rb +++ b/app/controllers/o_auths_controller.rb @@ -46,7 +46,7 @@ class OAuthsController < ApplicationController flash[:notice] = I18n.t('devise.sessions.signed_in') redirect_to root_path else - flash[:alert] = I18n.t('errors.o_auth_login_error', { name: @o_auth.name }) + flash[:alert] = I18n.t('errors.o_auth_login_error', name: @o_auth.name) redirect_to new_user_session_path end elsif reason == 'test' diff --git a/app/views/devise/mailer/confirmation_instructions.html.erb b/app/views/devise/mailer/confirmation_instructions.html.erb index 9162ac16..bc93448a 100644 --- a/app/views/devise/mailer/confirmation_instructions.html.erb +++ b/app/views/devise/mailer/confirmation_instructions.html.erb @@ -1,4 +1,4 @@ -
<%= t('mailers.devise.welcome_greeting', { email: @email, site_name: Current.tenant_or_raise!.site_name }) %>
+<%= t('mailers.devise.welcome_greeting', email: @email, site_name: Current.tenant_or_raise!.site_name) %>
<%= t('mailers.devise.confirmation_instructions.body') %>
diff --git a/app/views/devise/mailer/email_changed.html.erb b/app/views/devise/mailer/email_changed.html.erb index aa19638b..674542e1 100644 --- a/app/views/devise/mailer/email_changed.html.erb +++ b/app/views/devise/mailer/email_changed.html.erb @@ -1,7 +1,7 @@ -<%= t('mailers.devise.opening_greeting', { email: @email }) %>
+<%= t('mailers.devise.opening_greeting', email: @email) %>
<% if @resource.try(:unconfirmed_email?) %> -<%= t('mailers.devise.email_changed.body', { email: @resource.unconfirmed_email }) %>
+<%= t('mailers.devise.email_changed.body', email: @resource.unconfirmed_email) %>
<% else %> -<%= t('mailers.devise.email_changed.body', { email: @resource.email }) %>
+<%= t('mailers.devise.email_changed.body', email: @resource.email) %>
<% end %> diff --git a/app/views/devise/mailer/password_change.html.erb b/app/views/devise/mailer/password_change.html.erb index 1209c695..1b57e8e7 100644 --- a/app/views/devise/mailer/password_change.html.erb +++ b/app/views/devise/mailer/password_change.html.erb @@ -1,3 +1,3 @@ -<%= t('mailers.devise.opening_greeting', { email: @resource.email }) %>
+<%= t('mailers.devise.opening_greeting', email: @resource.email) %>
<%= t('mailers.devise.password_change.body') %>
diff --git a/app/views/devise/mailer/reset_password_instructions.html.erb b/app/views/devise/mailer/reset_password_instructions.html.erb index e61dd388..8cfed221 100644 --- a/app/views/devise/mailer/reset_password_instructions.html.erb +++ b/app/views/devise/mailer/reset_password_instructions.html.erb @@ -1,4 +1,4 @@ -<%= t('mailers.devise.opening_greeting', { email: @resource.email }) %>
+<%= t('mailers.devise.opening_greeting', email: @resource.email) %>
<%= t('mailers.devise.reset_password.body') %>
diff --git a/app/views/devise/passwords/edit.html.erb b/app/views/devise/passwords/edit.html.erb index 45c03055..aacfd182 100644 --- a/app/views/devise/passwords/edit.html.erb +++ b/app/views/devise/passwords/edit.html.erb @@ -15,7 +15,7 @@ <% if @minimum_password_length %> - (<%= t('common.forms.auth.password_help', { count: @minimum_password_length }) %>) + (<%= t('common.forms.auth.password_help', count: @minimum_password_length) %>) <% end %> diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb index 90a869df..e311e8a6 100644 --- a/app/views/devise/registrations/new.html.erb +++ b/app/views/devise/registrations/new.html.erb @@ -45,7 +45,7 @@- <%= link_to t('common.forms.auth.sign_up_with', { o_auth: o_auth.name }), + <%= link_to t('common.forms.auth.sign_up_with', o_auth: o_auth.name), o_auth_start_path(o_auth, reason: 'user') %>
<% end %> diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb index 7cf80ce2..d345aac4 100644 --- a/app/views/devise/sessions/new.html.erb +++ b/app/views/devise/sessions/new.html.erb @@ -34,7 +34,7 @@- <%= link_to t('common.forms.auth.log_in_with', { o_auth: o_auth.name }), + <%= link_to t('common.forms.auth.log_in_with', o_auth: o_auth.name), o_auth_start_path(o_auth, reason: 'user') %>
<% end %> diff --git a/app/views/o_auths/test.html.erb b/app/views/o_auths/test.html.erb index 6af168aa..02d0aa94 100644 --- a/app/views/o_auths/test.html.erb +++ b/app/views/o_auths/test.html.erb @@ -1,10 +1,10 @@ -<%= t('site_settings.authentication.test_page.warning_configuration', { name: t('defaults.user_full_name') }) %>
+<%= t('site_settings.authentication.test_page.warning_configuration', name: t('defaults.user_full_name')) %>
<% end %> <% if not @email_valid %> diff --git a/app/views/user_mailer/notify_comment_owner.html.erb b/app/views/user_mailer/notify_comment_owner.html.erb index 81318d5a..aeab0fc2 100644 --- a/app/views/user_mailer/notify_comment_owner.html.erb +++ b/app/views/user_mailer/notify_comment_owner.html.erb @@ -1,5 +1,5 @@- <%= t('mailers.user.notify_comment_owner.body', { user: @comment.user.full_name, post: @comment.post.title }) %> + <%= t('mailers.user.notify_comment_owner.body', user: @comment.user.full_name, post: @comment.post.title) %>
diff --git a/app/views/user_mailer/notify_followers_of_post_status_change.html.erb b/app/views/user_mailer/notify_followers_of_post_status_change.html.erb index a77fd710..eab74476 100644 --- a/app/views/user_mailer/notify_followers_of_post_status_change.html.erb +++ b/app/views/user_mailer/notify_followers_of_post_status_change.html.erb @@ -1,5 +1,5 @@
- <%= t('mailers.user.notify_followers_of_post_status_change.body', { post: @post }) %> + <%= t('mailers.user.notify_followers_of_post_status_change.body', post: @post) %> > <%= @post.post_status.name %> diff --git a/app/views/user_mailer/notify_followers_of_post_update.html.erb b/app/views/user_mailer/notify_followers_of_post_update.html.erb index 92ad5f96..ae883870 100644 --- a/app/views/user_mailer/notify_followers_of_post_update.html.erb +++ b/app/views/user_mailer/notify_followers_of_post_update.html.erb @@ -1,5 +1,5 @@
- <%= t('mailers.user.notify_followers_of_post_update.body', { user: @comment.user.full_name, post: @comment.post.title }) %> + <%= t('mailers.user.notify_followers_of_post_update.body', user: @comment.user.full_name, post: @comment.post.title) %>
diff --git a/app/views/user_mailer/notify_post_owner.html.erb b/app/views/user_mailer/notify_post_owner.html.erb index 0873f98f..03f26b26 100644 --- a/app/views/user_mailer/notify_post_owner.html.erb +++ b/app/views/user_mailer/notify_post_owner.html.erb @@ -1,5 +1,5 @@
- <%= t('mailers.user.notify_post_owner.body', { user: @comment.user.full_name, post: @comment.post.title }) %> + <%= t('mailers.user.notify_post_owner.body', user: @comment.user.full_name, post: @comment.post.title) %>