diff --git a/Gemfile b/Gemfile index ca2cec9..82753cd 100644 --- a/Gemfile +++ b/Gemfile @@ -1,11 +1,7 @@ source "https://rubygems.org" -# The requirement for the Ruby version comes from Rails -# NOTE: after updating Rails make sure that schema dump is not sorted: -# v8.1.3/activerecord/lib/active_record/schema_dumper.rb#L195 -# Waiting for this change to be reverted/configuration setting added: -# https://github.com/rails/rails/pull/56842, https://github.com/rails/rails/pull/55414 -gem "rails", "~> 8.1.3" +# The requirement for the Ruby version comes from Rails. +gem "rails", "~> 8.1.4" gem "sprockets-rails" gem "puma", "~> 6.0" gem "sassc-rails" @@ -25,7 +21,7 @@ group :sqlite, optional: true do gem "sqlite3", "~> 2.7" end -gem "devise" +gem "devise", "~> 5.0.4" gem "importmap-rails" gem "turbo-rails", "~> 2.0" @@ -47,3 +43,7 @@ group :test do gem "capybara" gem "selenium-webdriver" end + +# TODO: remove after upgrade to next version containing PR: +# https://github.com/ruby-i18n/i18n/pull/755 +gem "i18n", git: "https://github.com/ruby-i18n/i18n", branch: "delegate-missing-interpolation-handler" diff --git a/Gemfile.lock b/Gemfile.lock index f1805ef..1b473a8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,31 +1,39 @@ +GIT + remote: https://github.com/ruby-i18n/i18n + revision: 8850d979a3a32453123ed744b943ead8751ba73b + branch: delegate-missing-interpolation-handler + specs: + i18n (1.15.2) + concurrent-ruby (~> 1.0) + GEM remote: https://rubygems.org/ specs: - action_text-trix (2.1.18) + action_text-trix (2.1.19) railties - actioncable (8.1.3) - actionpack (= 8.1.3) - activesupport (= 8.1.3) + actioncable (8.1.4) + actionpack (= 8.1.4) + activesupport (= 8.1.4) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (8.1.3) - actionpack (= 8.1.3) - activejob (= 8.1.3) - activerecord (= 8.1.3) - activestorage (= 8.1.3) - activesupport (= 8.1.3) + actionmailbox (8.1.4) + actionpack (= 8.1.4) + activejob (= 8.1.4) + activerecord (= 8.1.4) + activestorage (= 8.1.4) + activesupport (= 8.1.4) mail (>= 2.8.0) - actionmailer (8.1.3) - actionpack (= 8.1.3) - actionview (= 8.1.3) - activejob (= 8.1.3) - activesupport (= 8.1.3) + actionmailer (8.1.4) + actionpack (= 8.1.4) + actionview (= 8.1.4) + activejob (= 8.1.4) + activesupport (= 8.1.4) mail (>= 2.8.0) rails-dom-testing (~> 2.2) - actionpack (8.1.3) - actionview (= 8.1.3) - activesupport (= 8.1.3) + actionpack (8.1.4) + actionview (= 8.1.4) + activesupport (= 8.1.4) nokogiri (>= 1.8.5) rack (>= 2.2.4) rack-session (>= 1.0.1) @@ -33,36 +41,36 @@ GEM rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) useragent (~> 0.16) - actiontext (8.1.3) + actiontext (8.1.4) action_text-trix (~> 2.1.15) - actionpack (= 8.1.3) - activerecord (= 8.1.3) - activestorage (= 8.1.3) - activesupport (= 8.1.3) + actionpack (= 8.1.4) + activerecord (= 8.1.4) + activestorage (= 8.1.4) + activesupport (= 8.1.4) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (8.1.3) - activesupport (= 8.1.3) + actionview (8.1.4) + activesupport (= 8.1.4) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activejob (8.1.3) - activesupport (= 8.1.3) + activejob (8.1.4) + activesupport (= 8.1.4) globalid (>= 0.3.6) - activemodel (8.1.3) - activesupport (= 8.1.3) - activerecord (8.1.3) - activemodel (= 8.1.3) - activesupport (= 8.1.3) + activemodel (8.1.4) + activesupport (= 8.1.4) + activerecord (8.1.4) + activemodel (= 8.1.4) + activesupport (= 8.1.4) timeout (>= 0.4.0) - activestorage (8.1.3) - actionpack (= 8.1.3) - activejob (= 8.1.3) - activerecord (= 8.1.3) - activesupport (= 8.1.3) + activestorage (8.1.4) + actionpack (= 8.1.4) + activejob (= 8.1.4) + activerecord (= 8.1.4) + activesupport (= 8.1.4) marcel (~> 1.0) - activesupport (8.1.3) + activesupport (8.1.4) base64 bigdecimal concurrent-ruby (~> 1.0, >= 1.3.1) @@ -79,7 +87,7 @@ GEM public_suffix (>= 2.0.2, < 8.0) base64 (0.3.0) bcrypt (3.1.22) - bigdecimal (4.1.2) + bigdecimal (4.1.3) bindex (0.8.1) builder (3.3.0) byebug (13.0.0) @@ -93,18 +101,18 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - concurrent-ruby (1.3.6) + concurrent-ruby (1.3.8) connection_pool (3.0.2) - crass (1.0.6) + crass (1.0.7) date (3.5.1) - devise (5.0.3) + devise (5.0.4) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 7.0) responders warden (~> 1.2.3) drb (2.2.3) - erb (6.0.4) + erb (6.0.7) erubi (1.13.1) ffi (1.17.4-aarch64-linux-gnu) ffi (1.17.4-aarch64-linux-musl) @@ -114,32 +122,30 @@ GEM ffi (1.17.4-x86_64-darwin) ffi (1.17.4-x86_64-linux-gnu) ffi (1.17.4-x86_64-linux-musl) - globalid (1.3.0) + globalid (1.4.0) activesupport (>= 6.1) - i18n (1.14.8) - concurrent-ruby (~> 1.0) importmap-rails (2.2.3) actionpack (>= 6.0.0) activesupport (>= 6.0.0) railties (>= 6.0.0) - io-console (0.8.2) + io-console (0.9.4) irb (1.18.0) pp (>= 0.6.0) prism (>= 1.3.0) rdoc (>= 4.0.0) reline (>= 0.4.2) - json (2.19.4) + json (3.0.2) logger (1.7.0) - loofah (2.25.1) + loofah (2.25.2) crass (~> 1.0.2) nokogiri (>= 1.12.0) - mail (2.9.0) + mail (2.9.1) logger mini_mime (>= 0.1.1) net-imap net-pop net-smtp - marcel (1.1.0) + marcel (1.2.1) matrix (0.4.3) mini_mime (1.1.5) minitest (6.0.6) @@ -147,52 +153,49 @@ GEM prism (~> 1.5) mysql2 (0.5.7) bigdecimal - net-imap (0.6.4) + net-imap (0.6.7) date net-protocol net-pop (0.1.2) net-protocol - net-protocol (0.2.2) + net-protocol (0.4.0) timeout - net-smtp (0.5.1) + net-smtp (0.5.2) net-protocol nio4r (2.7.5) - nokogiri (1.19.3-aarch64-linux-gnu) + nokogiri (1.19.4-aarch64-linux-gnu) racc (~> 1.4) - nokogiri (1.19.3-aarch64-linux-musl) + nokogiri (1.19.4-aarch64-linux-musl) racc (~> 1.4) - nokogiri (1.19.3-arm-linux-gnu) + nokogiri (1.19.4-arm-linux-gnu) racc (~> 1.4) - nokogiri (1.19.3-arm-linux-musl) + nokogiri (1.19.4-arm-linux-musl) racc (~> 1.4) - nokogiri (1.19.3-arm64-darwin) + nokogiri (1.19.4-arm64-darwin) racc (~> 1.4) - nokogiri (1.19.3-x86_64-darwin) + nokogiri (1.19.4-x86_64-darwin) racc (~> 1.4) - nokogiri (1.19.3-x86_64-linux-gnu) + nokogiri (1.19.4-x86_64-linux-gnu) racc (~> 1.4) - nokogiri (1.19.3-x86_64-linux-musl) + nokogiri (1.19.4-x86_64-linux-musl) racc (~> 1.4) orm_adapter (0.5.0) - pg (1.6.3) - pg (1.6.3-aarch64-linux) - pg (1.6.3-aarch64-linux-musl) - pg (1.6.3-arm64-darwin) - pg (1.6.3-x86_64-darwin) - pg (1.6.3-x86_64-linux) - pg (1.6.3-x86_64-linux-musl) - pp (0.6.3) + pg (1.7.0) + pg (1.7.0-aarch64-linux) + pg (1.7.0-aarch64-linux-musl) + pg (1.7.0-arm64-darwin) + pg (1.7.0-x86_64-darwin) + pg (1.7.0-x86_64-linux) + pg (1.7.0-x86_64-linux-musl) + pp (0.6.4) prettyprint prettyprint (0.2.0) prism (1.9.0) - psych (5.3.1) - date - stringio public_suffix (7.0.5) puma (6.6.1) nio4r (~> 2.0) racc (1.8.1) - rack (3.2.6) + rack (3.2.7) rack-session (2.1.2) base64 (>= 0.1.0) rack (>= 3.0.0) @@ -200,30 +203,30 @@ GEM rack (>= 1.3) rackup (2.3.1) rack (>= 3) - rails (8.1.3) - actioncable (= 8.1.3) - actionmailbox (= 8.1.3) - actionmailer (= 8.1.3) - actionpack (= 8.1.3) - actiontext (= 8.1.3) - actionview (= 8.1.3) - activejob (= 8.1.3) - activemodel (= 8.1.3) - activerecord (= 8.1.3) - activestorage (= 8.1.3) - activesupport (= 8.1.3) + rails (8.1.4) + actioncable (= 8.1.4) + actionmailbox (= 8.1.4) + actionmailer (= 8.1.4) + actionpack (= 8.1.4) + actiontext (= 8.1.4) + actionview (= 8.1.4) + activejob (= 8.1.4) + activemodel (= 8.1.4) + activerecord (= 8.1.4) + activestorage (= 8.1.4) + activesupport (= 8.1.4) bundler (>= 1.15.0) - railties (= 8.1.3) + railties (= 8.1.4) rails-dom-testing (2.3.0) activesupport (>= 5.0.0) minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.7.0) - loofah (~> 2.25) + rails-html-sanitizer (1.7.1) + loofah (~> 2.25, >= 2.25.2) 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) - railties (8.1.3) - actionpack (= 8.1.3) - activesupport (= 8.1.3) + railties (8.1.4) + actionpack (= 8.1.4) + activesupport (= 8.1.4) irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) @@ -231,18 +234,22 @@ GEM tsort (>= 0.2) zeitwerk (~> 2.6) rake (13.4.2) - rdoc (7.2.0) - erb - psych (>= 4.0.0) + rbs (4.2.0) + logger + prism (>= 1.6.0) tsort - regexp_parser (2.12.0) - reline (0.6.3) + rdoc (8.1.0) + erb + prism (>= 1.6.0) + rbs (>= 4.0.0) + tsort + regexp_parser (2.13.1) + reline (0.7.0) io-console (~> 0.5) - responders (3.2.0) + responders (3.2.1) actionpack (>= 7.0) railties (>= 7.0) - rexml (3.4.4) - rubyzip (3.3.0) + rubyzip (3.7.0) sassc (2.4.0) ffi (~> 1.9) sassc-rails (2.1.2) @@ -252,31 +259,29 @@ GEM sprockets-rails tilt securerandom (0.4.1) - selenium-webdriver (4.43.0) + selenium-webdriver (4.50.0) base64 (~> 0.2) logger (~> 1.4) - rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 4.0) websocket (~> 1.0) - sprockets (4.2.2) - concurrent-ruby (~> 1.0) + sprockets (4.4.1) + concurrent-ruby (~> 1.1) logger rack (>= 2.2.4, < 4) sprockets-rails (3.5.2) actionpack (>= 6.1) activesupport (>= 6.1) sprockets (>= 3.0.0) - sqlite3 (2.9.3-aarch64-linux-gnu) - sqlite3 (2.9.3-aarch64-linux-musl) - sqlite3 (2.9.3-arm-linux-gnu) - sqlite3 (2.9.3-arm-linux-musl) - sqlite3 (2.9.3-arm64-darwin) - sqlite3 (2.9.3-x86_64-darwin) - sqlite3 (2.9.3-x86_64-linux-gnu) - sqlite3 (2.9.3-x86_64-linux-musl) - stringio (3.2.0) + sqlite3 (2.9.6-aarch64-linux-gnu) + sqlite3 (2.9.6-aarch64-linux-musl) + sqlite3 (2.9.6-arm-linux-gnu) + sqlite3 (2.9.6-arm-linux-musl) + sqlite3 (2.9.6-arm64-darwin) + sqlite3 (2.9.6-x86_64-darwin) + sqlite3 (2.9.6-x86_64-linux-gnu) + sqlite3 (2.9.6-x86_64-linux-musl) thor (1.5.0) - tilt (2.7.0) + tilt (2.9.0) timeout (0.6.1) tsort (0.2.0) turbo-rails (2.0.23) @@ -293,13 +298,13 @@ GEM bindex (>= 0.4.0) railties (>= 8.0.0) websocket (1.2.11) - websocket-driver (0.8.0) + websocket-driver (0.8.2) base64 websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.7.5) + zeitwerk (2.8.3) PLATFORMS aarch64-linux-gnu @@ -314,12 +319,13 @@ PLATFORMS DEPENDENCIES byebug capybara - devise + devise (~> 5.0.4) + i18n! importmap-rails mysql2 (~> 0.5) pg (~> 1.5) puma (~> 6.0) - rails (~> 8.1.3) + rails (~> 8.1.4) sassc-rails selenium-webdriver sprockets-rails diff --git a/README.md b/README.md index b97bbea..f17f3ef 100644 --- a/README.md +++ b/README.md @@ -120,6 +120,22 @@ database adapters: bundle config --local with development test mysql sqlite +#### Using gems from local git repos + +When working on gem PRs, it may be useful to work with proposed changes locally +until PRs get accepted upstream. To add gem hosted in local git repository: + + bundle config set local.capybara /var/www/tmp/capybara + +Add gem to `Gemfile`: + + gem "capybara", git: "https://github.com/teamcapybara/capybara", branch: "branch-name" + +and install: + + bundle install + bundle show capybara + ### Configuration If you have previously precomiled assets for production environment, you should diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index f997d0b..848b2e4 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -40,7 +40,7 @@ module ApplicationHelper # controller.action.* => helpers.label.model.* => activerecord.attributes.model.* # First 2 levels are translated recursively. label(method, class: classes) do |builder| - translation = I18n.config.with(**handler) { deep_translate(method, **options) } + translation = I18n.with(**handler) { deep_translate(method, **options) } translation.presence || "#{builder.translation}:" end end diff --git a/bin/nokogiri b/bin/nokogiri new file mode 100755 index 0000000..b451223 --- /dev/null +++ b/bin/nokogiri @@ -0,0 +1,29 @@ +#!/usr/bin/ruby33 +# +# This file was generated by RubyGems. +# +# The application 'nokogiri' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require 'rubygems' + +Gem.use_gemdeps + +version = ">= 0.a" + +str = ARGV.first +if str + str = str.b[/\A_(.*)_\z/, 1] + if str and Gem::Version.correct?(str) + version = str + ARGV.shift + end +end + +if Gem.respond_to?(:activate_bin_path) +load Gem.activate_bin_path('nokogiri', 'nokogiri', version) +else +gem "nokogiri", version +load Gem.bin_path("nokogiri", "nokogiri", version) +end