From 1fee3c0722ba1023206fc07b30a888a13cee07aa Mon Sep 17 00:00:00 2001 From: "Restarone Solutions Inc. Software Engineering" Date: Sat, 13 Dec 2025 13:09:52 -0500 Subject: [PATCH] opencode upgrade to ruby 3/rails 7 --- Gemfile | 50 +- Gemfile.lock | 610 ---------------- Gemfile.next | 1 + Gemfile.next.lock | 673 ++++++++++++++++++ bin/ci-pre-deploy | 0 bin/rails | 3 +- bin/rake | 1 - bin/setup | 21 +- config/application.rb | 13 +- config/boot.rb | 2 +- config/environments/development.rb | 36 +- config/environments/production.rb | 66 +- config/environments/test.rb | 25 +- config/initializers/assets.rb | 4 +- .../initializers/content_security_policy.rb | 47 +- config/initializers/cors.rb | 22 +- .../initializers/filter_parameter_logging.rb | 4 +- config/initializers/inflections.rb | 8 +- .../new_framework_defaults_7_0.rb | 143 ++++ db/schema.rb | 2 +- 20 files changed, 941 insertions(+), 790 deletions(-) delete mode 100644 Gemfile.lock create mode 120000 Gemfile.next create mode 100644 Gemfile.next.lock mode change 100644 => 100755 bin/ci-pre-deploy create mode 100644 config/initializers/new_framework_defaults_7_0.rb diff --git a/Gemfile b/Gemfile index 198630a46..b3cf1f5e5 100644 --- a/Gemfile +++ b/Gemfile @@ -1,9 +1,12 @@ +def next? + File.basename(__FILE__) == "Gemfile.next" +end source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } -if ENV['RUBY_BUILD'] == '3.0.0' +if ENV['RUBY_BUILD'] == '3.1.0' # production/bleeding-edge ruby version - ruby '3.0.0' + ruby '3.1.7' elsif ENV['RUBY_BUILD'] == '2.7.8' # development/develop ruby version ruby '2.7.8' @@ -13,15 +16,32 @@ else end # Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main' -gem 'rails', '~> 6.1.5' +if next? + gem 'rails', '~> 7.0.0' +else + gem 'rails', '~> 6.1.5' +end # Use postgresql as the database for Active Record gem 'pg', '~> 1.1' # Use Puma as the app server -gem 'puma', '~> 5.6' +if next? + gem 'puma', '~> 5.6' +else + gem 'puma', '~> 5.6' +end # Use SCSS for stylesheets -gem 'sass-rails', '>= 6' +if next? + gem 'sassc-rails', '>= 2.1.1' +else + gem 'sass-rails', '>= 6' +end # Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker -gem 'webpacker', '~> 5.0' +if next? + # Use jsbundling-rails for Rails 7 + gem 'jsbundling-rails' +else + gem 'webpacker', '~> 5.0' +end # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder gem 'jbuilder', '~> 2.7' # Use Redis adapter to run Action Cable in production @@ -32,7 +52,11 @@ gem 'jbuilder', '~> 2.7' # Use Active Storage variant gem 'image_processing', '~> 1.12' -gem 'ros-apartment', require: 'apartment' +if next? + gem 'ros-apartment', '~> 3.0', require: 'apartment' +else + gem 'ros-apartment', require: 'apartment' +end gem 'ros-apartment-sidekiq', require: 'apartment-sidekiq' gem 'apartment-activejob' gem 'devise' @@ -43,7 +67,11 @@ gem 'gravatar_image_tag' gem 'wicked' # for multi-step forms gem 'devise_invitable' gem "aws-sdk-s3", require: false -gem 'meta-tags' +if next? + gem 'meta-tags', '~> 2.20' +else + gem 'meta-tags' +end gem 'sitemap_generator' gem 'ahoy_matey' gem 'ransack' @@ -119,7 +147,11 @@ gem "exception_notification", "~> 4.5" gem "turnout", "~> 2.5" -gem "turbo-rails", "~> 1.1" +if next? + gem "turbo-rails", "~> 2.0" +else + gem "turbo-rails", "~> 1.1" +end gem "redis-namespace", "~> 1.8" diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index d8b404ba1..000000000 --- a/Gemfile.lock +++ /dev/null @@ -1,610 +0,0 @@ -GIT - remote: https://github.com/restarone/comfortable-mexican-sofa - revision: ccf9415ae220453a199759b8ecbb8e9436c75c85 - tag: 3.5 - specs: - comfortable_mexican_sofa (2.0.19) - active_link_to (>= 1.0.0) - comfy_bootstrap_form (>= 4.0.0) - haml-rails (>= 1.0.0) - image_processing (>= 1.2) - jquery-rails (>= 4.3.1) - kramdown (>= 1.0.0) - mimemagic (>= 0.3.2) - mini_magick (>= 4.8.0) - rails (>= 5.2.0) - rails-i18n (>= 5.0.0) - sassc-rails (>= 2.0.0) - -GIT - remote: https://github.com/restarone/comfy-blog - revision: 767f3848165a3799db76c26ebe2901d5a9c3b93f - branch: master - specs: - comfy_blog (2.0.7) - comfortable_mexican_sofa (>= 2.0.14) - -GIT - remote: https://github.com/restarone/simple_discussion - revision: ccc76a4852210e0bb6195a93e1eb382f6f004c44 - branch: master - specs: - simple_discussion (1.3.0) - font-awesome-sass (>= 5.13.0) - friendly_id (>= 5.2.0) - rails (>= 4.2) - will_paginate (>= 3.1.0) - -GEM - remote: https://rubygems.org/ - specs: - actioncable (6.1.5) - actionpack (= 6.1.5) - activesupport (= 6.1.5) - nio4r (~> 2.0) - websocket-driver (>= 0.6.1) - actionmailbox (6.1.5) - actionpack (= 6.1.5) - activejob (= 6.1.5) - activerecord (= 6.1.5) - activestorage (= 6.1.5) - activesupport (= 6.1.5) - mail (>= 2.7.1) - actionmailer (6.1.5) - actionpack (= 6.1.5) - actionview (= 6.1.5) - activejob (= 6.1.5) - activesupport (= 6.1.5) - mail (~> 2.5, >= 2.5.4) - rails-dom-testing (~> 2.0) - actionpack (6.1.5) - actionview (= 6.1.5) - activesupport (= 6.1.5) - rack (~> 2.0, >= 2.0.9) - rack-test (>= 0.6.3) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.5) - actionpack (= 6.1.5) - activerecord (= 6.1.5) - activestorage (= 6.1.5) - activesupport (= 6.1.5) - nokogiri (>= 1.8.5) - actionview (6.1.5) - activesupport (= 6.1.5) - builder (~> 3.1) - erubi (~> 1.4) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.1, >= 1.2.0) - active_link_to (1.0.5) - actionpack - addressable - activejob (6.1.5) - activesupport (= 6.1.5) - globalid (>= 0.3.6) - activemodel (6.1.5) - activesupport (= 6.1.5) - activerecord (6.1.5) - activemodel (= 6.1.5) - activesupport (= 6.1.5) - activestorage (6.1.5) - actionpack (= 6.1.5) - activejob (= 6.1.5) - activerecord (= 6.1.5) - activesupport (= 6.1.5) - marcel (~> 1.0) - mini_mime (>= 1.1.0) - activesupport (6.1.5) - concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 1.6, < 2) - minitest (>= 5.1) - tzinfo (~> 2.0) - zeitwerk (~> 2.3) - addressable (2.8.0) - public_suffix (>= 2.0.2, < 5.0) - ahoy_matey (3.2.0) - activesupport (>= 5) - device_detector - geocoder (>= 1.4.5) - safely_block (>= 0.2.1) - airbrussh (1.4.0) - sshkit (>= 1.6.1, != 1.7.0) - apartment (0.24.3) - activerecord (>= 3.1.2) - rack (>= 1.3.6) - apartment-activejob (0.0.1) - activesupport - apartment - attr_encrypted (3.1.0) - encryptor (~> 3.0.0) - aws-eventstream (1.1.1) - aws-partitions (1.445.0) - aws-sdk-core (3.114.0) - aws-eventstream (~> 1, >= 1.0.2) - aws-partitions (~> 1, >= 1.239.0) - aws-sigv4 (~> 1.1) - jmespath (~> 1.0) - aws-sdk-kms (1.43.0) - aws-sdk-core (~> 3, >= 3.112.0) - aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.93.1) - aws-sdk-core (~> 3, >= 3.112.0) - aws-sdk-kms (~> 1) - aws-sigv4 (~> 1.1) - aws-sigv4 (1.2.3) - aws-eventstream (~> 1, >= 1.0.2) - bcrypt (3.1.16) - bcrypt_pbkdf (1.1.0) - bindex (0.8.1) - blazer (2.6.5) - activerecord (>= 5) - chartkick (>= 3.2) - railties (>= 5) - safely_block (>= 0.1.1) - bootsnap (1.7.3) - msgpack (~> 1.0) - builder (3.2.4) - byebug (11.1.3) - capistrano (3.16.0) - airbrussh (>= 1.0.0) - i18n - rake (>= 10.0.0) - sshkit (>= 1.9.0) - capistrano-bundler (2.0.1) - capistrano (~> 3.1) - capistrano-local-precompile (1.2.0) - capistrano (>= 3.8) - capistrano-rails (1.6.1) - capistrano (~> 3.1) - capistrano-bundler (>= 1.1, < 3) - capistrano-rbenv (2.2.0) - capistrano (~> 3.1) - sshkit (~> 1.3) - capistrano3-puma (5.0.4) - capistrano (~> 3.7) - capistrano-bundler - puma (>= 4.0, < 6.0) - capybara (3.35.3) - addressable - mini_mime (>= 0.1.3) - nokogiri (~> 1.8) - rack (>= 1.6.0) - rack-test (>= 0.6.3) - regexp_parser (>= 1.5, < 3.0) - xpath (~> 3.2) - chartkick (4.0.4) - childprocess (3.0.0) - chronic (0.10.2) - chunky_png (1.4.0) - climate_control (0.2.0) - cocaine (0.5.8) - climate_control (>= 0.0.3, < 1.0) - coderay (1.1.3) - comfy_bootstrap_form (4.0.9) - rails (>= 5.0.0) - concurrent-ruby (1.1.10) - connection_pool (2.2.5) - crack (0.4.5) - rexml - crass (1.0.6) - device_detector (1.0.5) - devise (4.7.3) - bcrypt (~> 3.0) - orm_adapter (~> 0.1) - railties (>= 4.1.0) - responders - warden (~> 1.2.3) - devise-two-factor (4.0.2) - activesupport (< 7.1) - attr_encrypted (>= 1.3, < 4, != 2) - devise (~> 4.0) - railties (< 7.1) - rotp (~> 6.0) - devise_invitable (2.0.3) - actionmailer (>= 5.0) - devise (>= 4.6) - docile (1.3.5) - domain_name (0.5.20190701) - unf (>= 0.0.5, < 1.0.0) - ed25519 (1.3.0) - ember-cli-rails (0.10.0) - cocaine (~> 0.5.8) - ember-cli-rails-assets (~> 0.6.2) - html_page (~> 0.1.0) - railties (>= 3.2) - ember-cli-rails-assets (0.6.2) - encryptor (3.0.0) - errbase (0.2.1) - erubi (1.10.0) - exception_notification (4.5.0) - actionmailer (>= 5.2, < 8) - activesupport (>= 5.2, < 8) - faker (2.21.0) - i18n (>= 1.8.11, < 2) - ffi (1.15.5) - flamegraph (0.9.5) - font-awesome-sass (5.15.1) - sassc (>= 1.11) - friendly_id (5.4.2) - activerecord (>= 4.0.0) - geocoder (1.6.6) - globalid (1.0.0) - activesupport (>= 5.0) - graphiql-rails (1.8.0) - railties - sprockets-rails - graphql (2.0.5) - gravatar_image_tag (1.2.0) - groupdate (5.2.2) - activesupport (>= 5) - haml (6.1.1) - temple (>= 0.8.2) - thor - tilt - haml-rails (2.1.0) - actionpack (>= 5.1) - activesupport (>= 5.1) - haml (>= 4.0.6) - railties (>= 5.1) - hashdiff (1.0.1) - html_page (0.1.0) - http-accept (1.7.0) - http-cookie (1.0.3) - domain_name (~> 0.5) - httparty (0.20.0) - mime-types (~> 3.0) - multi_xml (>= 0.5.2) - i18n (1.10.0) - concurrent-ruby (~> 1.0) - icalendar (2.9.0) - ice_cube (~> 0.16) - ice_cube (0.16.4) - image_processing (1.12.2) - mini_magick (>= 4.9.5, < 5) - ruby-vips (>= 2.0.17, < 3) - jbuilder (2.11.2) - activesupport (>= 5.0.0) - jmespath (1.6.1) - jquery-rails (4.5.1) - rails-dom-testing (>= 1, < 3) - railties (>= 4.2.0) - thor (>= 0.14, < 2.0) - json (2.5.1) - jsonapi-serializer (2.2.0) - activesupport (>= 4.2) - kramdown (2.4.0) - rexml - listen (3.5.1) - rb-fsevent (~> 0.10, >= 0.10.3) - rb-inotify (~> 0.9, >= 0.9.10) - local_time (2.1.0) - loofah (2.9.0) - crass (~> 1.0.2) - nokogiri (>= 1.5.9) - mail (2.7.1) - mini_mime (>= 0.1.1) - mailgun-ruby (1.2.4) - rest-client (>= 2.0.2) - marcel (1.0.2) - memory_profiler (1.0.1) - meta-tags (2.14.0) - actionpack (>= 3.2.0, < 6.2) - method_source (1.0.0) - mime-types (3.3.1) - mime-types-data (~> 3.2015) - mime-types-data (3.2021.0225) - mimemagic (0.4.3) - nokogiri (~> 1) - rake - mini_magick (4.11.0) - mini_mime (1.1.2) - mini_portile2 (2.8.0) - minitest (5.15.0) - mocha (1.12.0) - msgpack (1.4.2) - multi_xml (0.6.0) - mustermann (1.1.1) - ruby2_keywords (~> 0.0.1) - net-scp (3.0.0) - net-ssh (>= 2.6.5, < 7.0.0) - net-ssh (6.1.0) - netrc (0.11.0) - nio4r (2.5.8) - nokogiri (1.13.6) - mini_portile2 (~> 2.8.0) - racc (~> 1.4) - orm_adapter (0.5.0) - parallel (1.20.1) - pg (1.2.3) - pry (0.14.1) - coderay (~> 1.1) - method_source (~> 1.0) - public_suffix (4.0.6) - puma (5.6.4) - nio4r (~> 2.0) - puppeteer-ruby (0.45.6) - concurrent-ruby (>= 1.1, < 1.4) - mime-types (>= 3.0) - websocket-driver (>= 0.6.0) - racc (1.6.0) - rack (2.2.3.1) - rack-accept (0.4.5) - rack (>= 0.4) - rack-cors (1.1.1) - rack (>= 2.0.0) - rack-mini-profiler (3.0.0) - rack (>= 1.2.0) - rack-protection (2.2.0) - rack - rack-proxy (0.6.5) - rack - rack-test (1.1.0) - rack (>= 1.0, < 3) - rack-timeout (0.6.3) - rails (6.1.5) - actioncable (= 6.1.5) - actionmailbox (= 6.1.5) - actionmailer (= 6.1.5) - actionpack (= 6.1.5) - actiontext (= 6.1.5) - actionview (= 6.1.5) - activejob (= 6.1.5) - activemodel (= 6.1.5) - activerecord (= 6.1.5) - activestorage (= 6.1.5) - activesupport (= 6.1.5) - bundler (>= 1.15.0) - railties (= 6.1.5) - sprockets-rails (>= 2.0.0) - rails-controller-testing (1.0.5) - actionpack (>= 5.0.1.rc1) - actionview (>= 5.0.1.rc1) - activesupport (>= 5.0.1.rc1) - rails-dom-testing (2.0.3) - activesupport (>= 4.2.0) - nokogiri (>= 1.6) - rails-html-sanitizer (1.4.2) - loofah (~> 2.3) - rails-i18n (7.0.6) - i18n (>= 0.7, < 2) - railties (>= 6.0.0, < 8) - railties (6.1.5) - actionpack (= 6.1.5) - activesupport (= 6.1.5) - method_source - rake (>= 12.2) - thor (~> 1.0) - rake (13.0.6) - ransack (2.4.2) - activerecord (>= 5.2.4) - activesupport (>= 5.2.4) - i18n - rb-fsevent (0.10.4) - rb-inotify (0.10.1) - ffi (~> 1.0) - recaptcha (5.8.0) - json - redis (4.6.0) - redis-namespace (1.8.2) - redis (>= 3.0.4) - regexp_parser (2.1.1) - responders (3.0.1) - actionpack (>= 5.0) - railties (>= 5.0) - rest-client (2.1.0) - http-accept (>= 1.7.0, < 2.0) - http-cookie (>= 1.0.2, < 2.0) - mime-types (>= 1.16, < 4.0) - netrc (~> 0.8) - rexml (3.2.5) - ros-apartment (2.9.0) - activerecord (>= 5.0.0, < 6.2) - parallel (< 2.0) - public_suffix (>= 2.0.5, < 5.0) - rack (>= 1.3.6, < 3.0) - ros-apartment-sidekiq (1.2.0) - ros-apartment (>= 1.0) - sidekiq (>= 2.11) - rotp (6.2.0) - rqrcode (2.2.0) - chunky_png (~> 1.0) - rqrcode_core (~> 1.0) - rqrcode_core (1.2.0) - ruby-vips (2.1.4) - ffi (~> 1.12) - ruby2_keywords (0.0.5) - rubyzip (2.3.0) - safely_block (0.3.0) - errbase (>= 0.1.1) - sass-rails (6.0.0) - sassc-rails (~> 2.1, >= 2.1.1) - sassc (2.4.0) - ffi (~> 1.9) - sassc-rails (2.1.2) - railties (>= 4.0.0) - sassc (>= 2.0) - sprockets (> 3.0) - sprockets-rails - tilt - selenium-webdriver (3.142.7) - childprocess (>= 0.5, < 4.0) - rubyzip (>= 1.2.2) - semantic_range (3.0.0) - sidekiq (6.4.1) - connection_pool (>= 2.2.2) - rack (~> 2.0) - redis (>= 4.2.0) - simple_calendar (3.0.2) - rails (>= 6.1) - simplecov (0.21.2) - docile (~> 1.1) - simplecov-html (~> 0.11) - simplecov_json_formatter (~> 0.1) - simplecov-html (0.12.3) - simplecov_json_formatter (0.1.2) - sinatra (2.2.0) - mustermann (~> 1.0) - rack (~> 2.2) - rack-protection (= 2.2.0) - tilt (~> 2.0) - sitemap_generator (6.1.2) - builder (~> 3.0) - slowpoke (0.4.0) - actionpack - rack-timeout (>= 0.4) - railties (>= 5.2) - spring (2.1.1) - sprockets (4.0.3) - concurrent-ruby (~> 1.0) - rack (> 1, < 3) - sprockets-rails (3.4.2) - actionpack (>= 5.2) - activesupport (>= 5.2) - sprockets (>= 3.0.0) - sshkit (1.21.2) - net-scp (>= 1.1.2) - net-ssh (>= 2.8.0) - stackprof (0.2.23) - stripe (7.1.0) - stripe-rails (2.3.5) - rails (>= 5.1) - responders - stripe (>= 3.15.0) - strong_migrations (1.4.4) - activerecord (>= 5.2) - temple (0.10.0) - thor (1.2.1) - tilt (2.0.10) - turbo-rails (1.1.1) - actionpack (>= 6.0.0) - activejob (>= 6.0.0) - railties (>= 6.0.0) - turnout (2.5.0) - i18n (>= 0.7, < 2) - rack (>= 1.3, < 3) - rack-accept (~> 0.4) - tilt (>= 1.4, < 3) - tzinfo (2.0.4) - concurrent-ruby (~> 1.0) - unf (0.1.4) - unf_ext - unf_ext (0.0.7.7) - warden (1.2.9) - rack (>= 2.0.9) - web-console (4.1.0) - actionview (>= 6.0.0) - activemodel (>= 6.0.0) - bindex (>= 0.4.0) - railties (>= 6.0.0) - webdrivers (4.6.0) - nokogiri (~> 1.6) - rubyzip (>= 1.3.0) - selenium-webdriver (>= 3.0, < 4.0) - webmock (3.13.0) - addressable (>= 2.3.6) - crack (>= 0.3.2) - hashdiff (>= 0.4.0, < 2.0.0) - webpacker (5.2.1) - activesupport (>= 5.2) - rack-proxy (>= 0.6.1) - railties (>= 5.2) - semantic_range (>= 2.3.0) - websocket-driver (0.7.5) - websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.5) - whenever (1.0.0) - chronic (>= 0.6.3) - wicked (1.3.4) - railties (>= 3.0.7) - will_paginate (3.3.0) - xpath (3.2.0) - nokogiri (~> 1.8) - zeitwerk (2.5.4) - -PLATFORMS - ruby - -DEPENDENCIES - ahoy_matey - apartment-activejob - aws-sdk-s3 - bcrypt_pbkdf (>= 1.0, < 2.0) - blazer (~> 2.6) - bootsnap (>= 1.7.3) - byebug - capistrano - capistrano-local-precompile - capistrano-rails - capistrano-rbenv - capistrano3-puma - capybara (>= 3.26) - chartkick - comfortable_mexican_sofa! - comfy_blog! - devise - devise-two-factor (= 4.0.2) - devise_invitable - ed25519 (>= 1.2, < 2.0) - ember-cli-rails (= 0.10.0) - exception_notification (~> 4.5) - faker - flamegraph - friendly_id - graphiql-rails - graphql (~> 2.0) - gravatar_image_tag - groupdate - httparty - icalendar (~> 2.9) - image_processing (~> 1.12) - jbuilder (~> 2.7) - jsonapi-serializer - listen (~> 3.3) - local_time - mailgun-ruby - memory_profiler - meta-tags - mocha - net-ssh (>= 6.0.2) - pg (~> 1.1) - pry - puma (~> 5.6) - puppeteer-ruby (~> 0.45.6) - rack-cors - rack-mini-profiler (~> 3.0) - rails (~> 6.1.5) - rails-controller-testing - ransack - recaptcha - redis-namespace (~> 1.8) - ros-apartment - ros-apartment-sidekiq - rqrcode (~> 2.2) - sass-rails (>= 6) - selenium-webdriver - simple_calendar (~> 3.0) - simple_discussion! - simplecov - sinatra - sitemap_generator - slowpoke - spring - stackprof - stripe-rails - strong_migrations - turbo-rails (~> 1.1) - turnout (~> 2.5) - tzinfo-data - web-console (>= 4.1.0) - webdrivers - webmock - webpacker (~> 5.0) - whenever - wicked - will_paginate - -RUBY VERSION - ruby 3.0.0p0 - -BUNDLED WITH - 2.1.4 diff --git a/Gemfile.next b/Gemfile.next new file mode 120000 index 000000000..6ab79009c --- /dev/null +++ b/Gemfile.next @@ -0,0 +1 @@ +Gemfile \ No newline at end of file diff --git a/Gemfile.next.lock b/Gemfile.next.lock new file mode 100644 index 000000000..621d4f1e1 --- /dev/null +++ b/Gemfile.next.lock @@ -0,0 +1,673 @@ +GIT + remote: https://github.com/restarone/comfortable-mexican-sofa + revision: ccf9415ae220453a199759b8ecbb8e9436c75c85 + tag: 3.5 + specs: + comfortable_mexican_sofa (2.0.19) + active_link_to (>= 1.0.0) + comfy_bootstrap_form (>= 4.0.0) + haml-rails (>= 1.0.0) + image_processing (>= 1.2) + jquery-rails (>= 4.3.1) + kramdown (>= 1.0.0) + mimemagic (>= 0.3.2) + mini_magick (>= 4.8.0) + rails (>= 5.2.0) + rails-i18n (>= 5.0.0) + sassc-rails (>= 2.0.0) + +GIT + remote: https://github.com/restarone/comfy-blog + revision: 767f3848165a3799db76c26ebe2901d5a9c3b93f + branch: master + specs: + comfy_blog (2.0.7) + comfortable_mexican_sofa (>= 2.0.14) + +GIT + remote: https://github.com/restarone/simple_discussion + revision: ccc76a4852210e0bb6195a93e1eb382f6f004c44 + branch: master + specs: + simple_discussion (1.3.0) + font-awesome-sass (>= 5.13.0) + friendly_id (>= 5.2.0) + rails (>= 4.2) + will_paginate (>= 3.1.0) + +GEM + remote: https://rubygems.org/ + specs: + actioncable (7.0.10) + actionpack (= 7.0.10) + activesupport (= 7.0.10) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + actionmailbox (7.0.10) + actionpack (= 7.0.10) + activejob (= 7.0.10) + activerecord (= 7.0.10) + activestorage (= 7.0.10) + activesupport (= 7.0.10) + mail (>= 2.7.1) + net-imap + net-pop + net-smtp + actionmailer (7.0.10) + actionpack (= 7.0.10) + actionview (= 7.0.10) + activejob (= 7.0.10) + activesupport (= 7.0.10) + mail (~> 2.5, >= 2.5.4) + net-imap + net-pop + net-smtp + rails-dom-testing (~> 2.0) + actionpack (7.0.10) + actionview (= 7.0.10) + activesupport (= 7.0.10) + racc + rack (~> 2.0, >= 2.2.4) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.2.0) + actiontext (7.0.10) + actionpack (= 7.0.10) + activerecord (= 7.0.10) + activestorage (= 7.0.10) + activesupport (= 7.0.10) + globalid (>= 0.6.0) + nokogiri (>= 1.8.5) + actionview (7.0.10) + activesupport (= 7.0.10) + builder (~> 3.1) + erubi (~> 1.4) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.1, >= 1.2.0) + active_link_to (1.0.5) + actionpack + addressable + activejob (7.0.10) + activesupport (= 7.0.10) + globalid (>= 0.3.6) + activemodel (7.0.10) + activesupport (= 7.0.10) + activerecord (7.0.10) + activemodel (= 7.0.10) + activesupport (= 7.0.10) + activestorage (7.0.10) + actionpack (= 7.0.10) + activejob (= 7.0.10) + activerecord (= 7.0.10) + activesupport (= 7.0.10) + marcel (~> 1.0) + mini_mime (>= 1.1.0) + activesupport (7.0.10) + base64 + benchmark (>= 0.3) + bigdecimal + concurrent-ruby (~> 1.0, >= 1.0.2) + drb + i18n (>= 1.6, < 2) + logger (>= 1.4.2) + minitest (>= 5.1) + mutex_m + securerandom (>= 0.3) + tzinfo (~> 2.0) + addressable (2.8.8) + public_suffix (>= 2.0.2, < 8.0) + ahoy_matey (5.3.0) + activesupport (>= 7) + device_detector (>= 1) + safely_block (>= 0.4) + airbrussh (1.6.0) + sshkit (>= 1.6.1, != 1.7.0) + apartment (0.24.3) + activerecord (>= 3.1.2) + rack (>= 1.3.6) + apartment-activejob (0.0.1) + activesupport + apartment + attr_encrypted (3.1.0) + encryptor (~> 3.0.0) + aws-eventstream (1.4.0) + aws-partitions (1.1194.0) + aws-sdk-core (3.239.2) + aws-eventstream (~> 1, >= 1.3.0) + aws-partitions (~> 1, >= 1.992.0) + aws-sigv4 (~> 1.9) + base64 + bigdecimal + jmespath (~> 1, >= 1.6.1) + logger + aws-sdk-kms (1.118.0) + aws-sdk-core (~> 3, >= 3.239.1) + aws-sigv4 (~> 1.5) + aws-sdk-s3 (1.206.0) + aws-sdk-core (~> 3, >= 3.234.0) + aws-sdk-kms (~> 1) + aws-sigv4 (~> 1.5) + aws-sigv4 (1.12.1) + aws-eventstream (~> 1, >= 1.0.2) + base64 (0.3.0) + bcrypt (3.1.20) + bcrypt_pbkdf (1.1.2) + benchmark (0.5.0) + bigdecimal (3.3.1) + bindex (0.8.1) + blazer (2.6.5) + activerecord (>= 5) + chartkick (>= 3.2) + railties (>= 5) + safely_block (>= 0.1.1) + bootsnap (1.19.0) + msgpack (~> 1.2) + builder (3.3.0) + byebug (12.0.0) + capistrano (3.20.0) + airbrussh (>= 1.0.0) + i18n + rake (>= 10.0.0) + sshkit (>= 1.9.0) + capistrano-bundler (2.2.0) + capistrano (~> 3.1) + capistrano-local-precompile (1.2.0) + capistrano (>= 3.8) + capistrano-rails (1.7.0) + capistrano (~> 3.1) + capistrano-bundler (>= 1.1, < 3) + capistrano-rbenv (2.2.0) + capistrano (~> 3.1) + sshkit (~> 1.3) + capistrano3-puma (6.2.0) + capistrano (~> 3.7) + capistrano-bundler + puma (>= 5.1, < 7.0) + capybara (3.40.0) + addressable + matrix + mini_mime (>= 0.1.3) + nokogiri (~> 1.11) + rack (>= 1.6.0) + rack-test (>= 0.6.3) + regexp_parser (>= 1.5, < 3.0) + xpath (~> 3.2) + chartkick (5.1.5) + chronic (0.10.2) + chunky_png (1.4.0) + climate_control (0.2.0) + cocaine (0.5.8) + climate_control (>= 0.0.3, < 1.0) + coderay (1.1.3) + comfy_bootstrap_form (4.0.9) + rails (>= 5.0.0) + concurrent-ruby (1.3.6) + connection_pool (2.5.5) + crack (1.0.1) + bigdecimal + rexml + crass (1.0.6) + csv (3.3.5) + date (3.5.1) + device_detector (1.1.3) + devise (4.9.4) + bcrypt (~> 3.0) + orm_adapter (~> 0.1) + railties (>= 4.1.0) + responders + warden (~> 1.2.3) + devise-two-factor (4.0.2) + activesupport (< 7.1) + attr_encrypted (>= 1.3, < 4, != 2) + devise (~> 4.0) + railties (< 7.1) + rotp (~> 6.0) + devise_invitable (2.0.11) + actionmailer (>= 5.0) + devise (>= 4.6) + docile (1.4.1) + drb (2.2.3) + ed25519 (1.4.0) + ember-cli-rails (0.10.0) + cocaine (~> 0.5.8) + ember-cli-rails-assets (~> 0.6.2) + html_page (~> 0.1.0) + railties (>= 3.2) + ember-cli-rails-assets (0.6.2) + encryptor (3.0.0) + erubi (1.13.1) + exception_notification (4.6.0) + actionmailer (>= 5.2, < 9) + activesupport (>= 5.2, < 9) + faker (3.5.3) + i18n (>= 1.8.11, < 2) + faraday (2.14.0) + faraday-net_http (>= 2.0, < 3.5) + json + logger + faraday-multipart (1.1.1) + multipart-post (~> 2.0) + faraday-net_http (3.4.2) + net-http (~> 0.5) + ffi (1.17.2) + fiber-storage (1.0.1) + flamegraph (0.9.5) + font-awesome-sass (6.7.2) + sassc (~> 2.0) + friendly_id (5.6.0) + activerecord (>= 4.0.0) + globalid (1.3.0) + activesupport (>= 6.1) + graphiql-rails (1.10.5) + railties + graphql (2.5.16) + base64 + fiber-storage + logger + gravatar_image_tag (1.2.0) + groupdate (6.5.1) + activesupport (>= 7) + haml (6.4.0) + temple (>= 0.8.2) + thor + tilt + haml-rails (3.0.0) + actionpack (>= 5.1) + activesupport (>= 5.1) + haml (>= 4.0.6) + railties (>= 5.1) + hashdiff (1.2.1) + html_page (0.1.0) + httparty (0.23.2) + csv + mini_mime (>= 1.0.0) + multi_xml (>= 0.5.2) + i18n (1.14.7) + concurrent-ruby (~> 1.0) + icalendar (2.12.1) + base64 + ice_cube (~> 0.16) + logger + ostruct + ice_cube (0.17.0) + image_processing (1.14.0) + mini_magick (>= 4.9.5, < 6) + ruby-vips (>= 2.0.17, < 3) + jbuilder (2.14.1) + actionview (>= 7.0.0) + activesupport (>= 7.0.0) + jmespath (1.6.2) + jquery-rails (4.6.1) + rails-dom-testing (>= 1, < 3) + railties (>= 4.2.0) + thor (>= 0.14, < 2.0) + jsbundling-rails (1.3.1) + railties (>= 6.0.0) + json (2.18.0) + jsonapi-serializer (2.2.0) + activesupport (>= 4.2) + kramdown (2.5.1) + rexml (>= 3.3.9) + listen (3.9.0) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) + local_time (3.0.3) + logger (1.7.0) + loofah (2.24.1) + crass (~> 1.0.2) + nokogiri (>= 1.12.0) + mail (2.9.0) + logger + mini_mime (>= 0.1.1) + net-imap + net-pop + net-smtp + mailgun-ruby (1.4.0) + faraday (~> 2.1) + faraday-multipart (~> 1.1.0) + mini_mime + marcel (1.1.0) + matrix (0.4.3) + memory_profiler (1.1.0) + meta-tags (2.22.2) + actionpack (>= 6.0.0, < 8.2) + method_source (1.1.0) + mime-types (3.7.0) + logger + mime-types-data (~> 3.2025, >= 3.2025.0507) + mime-types-data (3.2025.0924) + mimemagic (0.4.3) + nokogiri (~> 1) + rake + mini_magick (5.3.1) + logger + mini_mime (1.1.5) + mini_portile2 (2.8.9) + minitest (5.27.0) + mocha (2.8.2) + ruby2_keywords (>= 0.0.5) + msgpack (1.8.0) + multi_xml (0.7.1) + bigdecimal (~> 3.1) + multipart-post (2.4.1) + mustermann (3.0.4) + ruby2_keywords (~> 0.0.1) + mutex_m (0.3.0) + net-http (0.8.0) + uri (>= 0.11.1) + net-imap (0.5.12) + date + net-protocol + net-pop (0.1.2) + net-protocol + net-protocol (0.2.2) + timeout + net-scp (4.1.0) + net-ssh (>= 2.6.5, < 8.0.0) + net-sftp (4.0.0) + net-ssh (>= 5.0.0, < 8.0.0) + net-smtp (0.5.1) + net-protocol + net-ssh (7.3.0) + nio4r (2.7.5) + nokogiri (1.18.10) + mini_portile2 (~> 2.8.2) + racc (~> 1.4) + orm_adapter (0.5.0) + ostruct (0.6.3) + parallel (1.27.0) + pg (1.6.2) + pry (0.15.2) + coderay (~> 1.1) + method_source (~> 1.0) + public_suffix (6.0.2) + puma (5.6.9) + nio4r (~> 2.0) + puppeteer-ruby (0.45.6) + concurrent-ruby (>= 1.1, < 1.4) + mime-types (>= 3.0) + websocket-driver (>= 0.6.0) + racc (1.8.1) + rack (2.2.21) + rack-accept (0.4.5) + rack (>= 0.4) + rack-cors (2.0.2) + rack (>= 2.0.0) + rack-mini-profiler (3.3.1) + rack (>= 1.2.0) + rack-protection (3.2.0) + base64 (>= 0.1.0) + rack (~> 2.2, >= 2.2.4) + rack-test (2.2.0) + rack (>= 1.3) + rack-timeout (0.7.0) + rails (7.0.10) + actioncable (= 7.0.10) + actionmailbox (= 7.0.10) + actionmailer (= 7.0.10) + actionpack (= 7.0.10) + actiontext (= 7.0.10) + actionview (= 7.0.10) + activejob (= 7.0.10) + activemodel (= 7.0.10) + activerecord (= 7.0.10) + activestorage (= 7.0.10) + activesupport (= 7.0.10) + bundler (>= 1.15.0) + railties (= 7.0.10) + rails-controller-testing (1.0.5) + actionpack (>= 5.0.1.rc1) + actionview (>= 5.0.1.rc1) + activesupport (>= 5.0.1.rc1) + rails-dom-testing (2.3.0) + activesupport (>= 5.0.0) + minitest + nokogiri (>= 1.6) + rails-html-sanitizer (1.6.2) + loofah (~> 2.21) + 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) + rails-i18n (7.0.10) + i18n (>= 0.7, < 2) + railties (>= 6.0.0, < 8) + railties (7.0.10) + actionpack (= 7.0.10) + activesupport (= 7.0.10) + method_source + rake (>= 12.2) + thor (~> 1.0) + zeitwerk (~> 2.5) + rake (13.3.1) + ransack (4.3.0) + activerecord (>= 6.1.5) + activesupport (>= 6.1.5) + i18n + rb-fsevent (0.11.2) + rb-inotify (0.11.1) + ffi (~> 1.0) + recaptcha (5.21.1) + redis (5.4.1) + redis-client (>= 0.22.0) + redis-client (0.26.2) + connection_pool + redis-namespace (1.11.0) + redis (>= 4) + regexp_parser (2.11.3) + responders (3.2.0) + actionpack (>= 7.0) + railties (>= 7.0) + rexml (3.4.4) + ros-apartment (3.3.0) + activerecord (>= 6.1.0, < 8.2) + activesupport (>= 6.1.0, < 8.2) + parallel (< 2.0) + public_suffix (>= 2.0.5, < 7) + rack (>= 1.3.6, < 4.0) + ros-apartment-sidekiq (1.2.0) + ros-apartment (>= 1.0) + sidekiq (>= 2.11) + rotp (6.3.0) + rqrcode (2.2.0) + chunky_png (~> 1.0) + rqrcode_core (~> 1.0) + rqrcode_core (1.2.0) + ruby-vips (2.3.0) + ffi (~> 1.12) + logger + ruby2_keywords (0.0.5) + rubyzip (2.4.1) + safely_block (0.4.1) + sassc (2.4.0) + ffi (~> 1.9) + sassc-rails (2.1.2) + railties (>= 4.0.0) + sassc (>= 2.0) + sprockets (> 3.0) + sprockets-rails + tilt + securerandom (0.4.1) + selenium-webdriver (4.32.0) + base64 (~> 0.2) + logger (~> 1.4) + rexml (~> 3.2, >= 3.2.5) + rubyzip (>= 1.2.2, < 3.0) + websocket (~> 1.0) + sidekiq (7.3.10) + base64 + connection_pool (>= 2.3.0, < 3) + logger + rack (>= 2.2.4, < 3.3) + redis-client (>= 0.23.0, < 1) + simple_calendar (3.1.0) + rails (>= 6.1) + simplecov (0.22.0) + docile (~> 1.1) + simplecov-html (~> 0.11) + simplecov_json_formatter (~> 0.1) + simplecov-html (0.13.2) + simplecov_json_formatter (0.1.4) + sinatra (3.2.0) + mustermann (~> 3.0) + rack (~> 2.2, >= 2.2.4) + rack-protection (= 3.2.0) + tilt (~> 2.0) + sitemap_generator (6.3.0) + builder (~> 3.0) + slowpoke (0.6.0) + actionpack + rack-timeout (>= 0.6) + railties (>= 7) + spring (4.4.0) + sprockets (4.2.2) + concurrent-ruby (~> 1.0) + logger + rack (>= 2.2.4, < 4) + sprockets-rails (3.5.2) + actionpack (>= 6.1) + activesupport (>= 6.1) + sprockets (>= 3.0.0) + sshkit (1.25.0) + base64 + logger + net-scp (>= 1.1.2) + net-sftp (>= 2.1.2) + net-ssh (>= 2.8.0) + ostruct + stackprof (0.2.27) + stripe (18.0.1) + stripe-rails (2.6.0) + rails (>= 5.1) + responders + stripe (>= 3.15.0) + strong_migrations (2.3.0) + activerecord (>= 7) + temple (0.10.4) + thor (1.4.0) + tilt (2.6.1) + timeout (0.5.0) + turbo-rails (2.0.12) + actionpack (>= 6.0.0) + railties (>= 6.0.0) + turnout (2.5.0) + i18n (>= 0.7, < 2) + rack (>= 1.3, < 3) + rack-accept (~> 0.4) + tilt (>= 1.4, < 3) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + uri (1.1.1) + warden (1.2.9) + rack (>= 2.0.9) + web-console (4.2.1) + actionview (>= 6.0.0) + activemodel (>= 6.0.0) + bindex (>= 0.4.0) + railties (>= 6.0.0) + webdrivers (5.2.0) + nokogiri (~> 1.6) + rubyzip (>= 1.3.0) + selenium-webdriver (~> 4.0) + webmock (3.26.1) + addressable (>= 2.8.0) + crack (>= 0.3.2) + hashdiff (>= 0.4.0, < 2.0.0) + websocket (1.2.11) + websocket-driver (0.8.0) + base64 + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.5) + whenever (1.1.1) + chronic (>= 0.6.3) + wicked (2.0.0) + railties (>= 3.0.7) + will_paginate (4.0.1) + xpath (3.2.0) + nokogiri (~> 1.8) + zeitwerk (2.6.18) + +PLATFORMS + ruby + +DEPENDENCIES + ahoy_matey + apartment-activejob + aws-sdk-s3 + bcrypt_pbkdf (>= 1.0, < 2.0) + blazer (~> 2.6) + bootsnap (>= 1.7.3) + byebug + capistrano + capistrano-local-precompile + capistrano-rails + capistrano-rbenv + capistrano3-puma + capybara (>= 3.26) + chartkick + comfortable_mexican_sofa! + comfy_blog! + devise + devise-two-factor (= 4.0.2) + devise_invitable + ed25519 (>= 1.2, < 2.0) + ember-cli-rails (= 0.10.0) + exception_notification (~> 4.5) + faker + flamegraph + friendly_id + graphiql-rails + graphql (~> 2.0) + gravatar_image_tag + groupdate + httparty + icalendar (~> 2.9) + image_processing (~> 1.12) + jbuilder (~> 2.7) + jsbundling-rails + jsonapi-serializer + listen (~> 3.3) + local_time + mailgun-ruby + memory_profiler + meta-tags (~> 2.20) + mocha + net-ssh (>= 6.0.2) + pg (~> 1.1) + pry + puma (~> 5.6) + puppeteer-ruby (~> 0.45.6) + rack-cors + rack-mini-profiler (~> 3.0) + rails (~> 7.0.0) + rails-controller-testing + ransack + recaptcha + redis-namespace (~> 1.8) + ros-apartment (~> 3.0) + ros-apartment-sidekiq + rqrcode (~> 2.2) + sassc-rails (>= 2.1.1) + selenium-webdriver + simple_calendar (~> 3.0) + simple_discussion! + simplecov + sinatra + sitemap_generator + slowpoke + spring + stackprof + stripe-rails + strong_migrations + turbo-rails (~> 2.0) + turnout (~> 2.5) + tzinfo-data + web-console (>= 4.1.0) + webdrivers + webmock + whenever + wicked + will_paginate + +RUBY VERSION + ruby 3.1.7p261 + +BUNDLED WITH + 2.1.4 diff --git a/bin/ci-pre-deploy b/bin/ci-pre-deploy old mode 100644 new mode 100755 diff --git a/bin/rails b/bin/rails index 21d3e02d8..efc037749 100755 --- a/bin/rails +++ b/bin/rails @@ -1,5 +1,4 @@ #!/usr/bin/env ruby -load File.expand_path("spring", __dir__) -APP_PATH = File.expand_path('../config/application', __dir__) +APP_PATH = File.expand_path("../config/application", __dir__) require_relative "../config/boot" require "rails/commands" diff --git a/bin/rake b/bin/rake index 7327f471e..4fbf10b96 100755 --- a/bin/rake +++ b/bin/rake @@ -1,5 +1,4 @@ #!/usr/bin/env ruby -load File.expand_path("spring", __dir__) require_relative "../config/boot" require "rake" Rake.application.run diff --git a/bin/setup b/bin/setup index 90700ac4f..ec47b79b3 100755 --- a/bin/setup +++ b/bin/setup @@ -2,7 +2,7 @@ require "fileutils" # path to your application root. -APP_ROOT = File.expand_path('..', __dir__) +APP_ROOT = File.expand_path("..", __dir__) def system!(*args) system(*args) || abort("\n== Command #{args} failed ==") @@ -13,24 +13,21 @@ FileUtils.chdir APP_ROOT do # This script is idempotent, so that you can run it at any time and get an expectable outcome. # Add necessary setup steps to this file. - puts '== Installing dependencies ==' - system! 'gem install bundler --conservative' - system('bundle check') || system!('bundle install') - - # Install JavaScript dependencies - system! 'bin/yarn' + puts "== Installing dependencies ==" + system! "gem install bundler --conservative" + system("bundle check") || system!("bundle install") # puts "\n== Copying sample files ==" - # unless File.exist?('config/database.yml') - # FileUtils.cp 'config/database.yml.sample', 'config/database.yml' + # unless File.exist?("config/database.yml") + # FileUtils.cp "config/database.yml.sample", "config/database.yml" # end puts "\n== Preparing database ==" - system! 'bin/rails db:prepare' + system! "bin/rails db:prepare" puts "\n== Removing old logs and tempfiles ==" - system! 'bin/rails log:clear tmp:clear' + system! "bin/rails log:clear tmp:clear" puts "\n== Restarting application server ==" - system! 'bin/rails restart' + system! "bin/rails restart" end diff --git a/config/application.rb b/config/application.rb index 38e6bb7cf..a284dd398 100644 --- a/config/application.rb +++ b/config/application.rb @@ -8,11 +8,9 @@ module RSolutions class Application < Rails::Application - # Ensuring that ActiveStorage routes are loaded before Comfy's globbing - # route. Without this file serving routes are inaccessible. - config.railties_order = [ActiveStorage::Engine, :main_app, :all] # Initialize configuration defaults for originally generated Rails version. config.load_defaults 6.1 + # Configuration for the application, engines, and railties goes here. # # These settings can be overridden in specific environments using the files @@ -20,14 +18,5 @@ class Application < Rails::Application # # config.time_zone = "Central Time (US & Canada)" # config.eager_load_paths << Rails.root.join("extras") - - # The default locale is :en (english) and all translations from config/locales/*.rb,yml are auto loaded. - config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}')] - config.i18n.default_locale = :en - config.i18n.available_locales = [:en] - config.i18n.fallbacks = [:en] - - # since web console usage depends on subdomain rules - config.web_console.development_only = false end end diff --git a/config/boot.rb b/config/boot.rb index 3cda23b4d..988a5ddc4 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,4 +1,4 @@ -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) require "bundler/setup" # Set up gems listed in the Gemfile. require "bootsnap/setup" # Speed up boot time by caching expensive operations. diff --git a/config/environments/development.rb b/config/environments/development.rb index bf85f74a9..8500f459a 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -14,15 +14,18 @@ # Show full error reports. config.consider_all_requests_local = true + # Enable server timing + config.server_timing = true + # Enable/disable caching. By default caching is disabled. # Run rails dev:cache to toggle caching. - if Rails.root.join('tmp', 'caching-dev.txt').exist? + if Rails.root.join("tmp/caching-dev.txt").exist? config.action_controller.perform_caching = true config.action_controller.enable_fragment_cache_logging = true config.cache_store = :memory_store config.public_file_server.headers = { - 'Cache-Control' => "public, max-age=#{2.days.to_i}" + "Cache-Control" => "public, max-age=#{2.days.to_i}" } else config.action_controller.perform_caching = false @@ -53,22 +56,6 @@ # Highlight code that triggered database queries in logs. config.active_record.verbose_query_logs = true - # Debug mode disables concatenation and preprocessing of assets. - # This option may cause significant delays in view rendering with a large - # number of complex assets. - config.assets.debug = true - - - config.hosts = nil - - - config.action_mailer.default_url_options = { host: ENV['APP_HOST'] } - config.action_mailer.perform_deliveries = true - config.action_mailer.delivery_method = :smtp - config.action_mailer.smtp_settings = { :address => 'mailcatcher', :port => 1025 } - config.action_mailer.raise_delivery_errors = true - config.active_job.queue_adapter = :sidekiq - # Suppress logger output for asset requests. config.assets.quiet = true @@ -78,17 +65,6 @@ # Annotate rendered view with file names. # config.action_view.annotate_rendered_view_with_filenames = true - # Use an evented file watcher to asynchronously detect changes in source code, - # routes, locales, etc. This feature depends on the listen gem. - config.file_watcher = ActiveSupport::EventedFileUpdateChecker - # Uncomment if you wish to allow Action Cable access from any origin. # config.action_cable.disable_request_forgery_protection = true - - # Timeout long running requests - config.slowpoke.timeout = lambda do |env| - request = Rack::Request.new(env) - # disable timeout for ember routes - request.path.start_with?("/app") ? 0 : ENV['VIOLET_SERVICE_TIMEOUT'].to_i.nonzero? || 15 - end -end \ No newline at end of file +end diff --git a/config/environments/production.rb b/config/environments/production.rb index bffbea134..9f560ca46 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -1,9 +1,6 @@ require "active_support/core_ext/integer/time" Rails.application.configure do - # Prepare the ingress controller used to receive mail - config.action_mailbox.ingress = :mailgun - # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. @@ -13,7 +10,7 @@ # your application in memory, allowing both threaded web servers # and those relying on copy on write to perform better. # Rake tasks automatically ignore this option for performance. - config.eager_load = false + config.eager_load = true # Full error reports are disabled and caching is turned on. config.consider_all_requests_local = false @@ -25,7 +22,7 @@ # Disable serving static files from the `/public` folder by default since # Apache or NGINX already handles this. - config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? + config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present? # Compress CSS using a preprocessor. # config.assets.css_compressor = :sass @@ -34,19 +31,19 @@ config.assets.compile = false # Enable serving of images, stylesheets, and JavaScripts from an asset server. - # config.asset_host = 'http://assets.example.com' + # config.asset_host = "http://assets.example.com" # Specifies the header that your server uses for sending files. - # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache - # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX + # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache + # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX # Store uploaded files on the local file system (see config/storage.yml for options). - config.active_storage.service = :amazon + config.active_storage.service = :local # Mount Action Cable outside main process or domain. # config.action_cable.mount_path = nil - # config.action_cable.url = 'wss://example.com/cable' - # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ] + # config.action_cable.url = "wss://example.com/cable" + # config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ] # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. # config.force_ssl = true @@ -62,20 +59,11 @@ # config.cache_store = :mem_cache_store # Use a real queuing backend for Active Job (and separate queues per environment). - config.active_job.queue_adapter = :sidekiq + # config.active_job.queue_adapter = :resque # config.active_job.queue_name_prefix = "r_solutions_production" config.action_mailer.perform_caching = false - config.action_mailer.default_url_options = { host: ENV['APP_HOST'] } - - config.action_mailer.perform_deliveries = true - config.action_mailer.delivery_method = :mailgun - config.action_mailer.mailgun_settings = { - api_key: ENV["MAILGUN_API_KEY"], - domain: "#{ENV["APP_HOST"]}", - } - # Ignore bad email addresses and do not raise email delivery errors. # Set this to true and configure the email server for immediate delivery to raise delivery errors. # config.action_mailer.raise_delivery_errors = false @@ -84,21 +72,15 @@ # the I18n.default_locale when a translation cannot be found). config.i18n.fallbacks = true - # Send deprecation notices to registered listeners. - config.active_support.deprecation = :notify - - # Log disallowed deprecations. - config.active_support.disallowed_deprecation = :log - - # Tell Active Support which deprecation messages to disallow. - config.active_support.disallowed_deprecation_warnings = [] + # Don't log any deprecations. + config.active_support.report_deprecations = false # Use default logging formatter so that PID and timestamp are not suppressed. config.log_formatter = ::Logger::Formatter.new # Use a different logger for distributed setups. # require "syslog/logger" - # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') + # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name") if ENV["RAILS_LOG_TO_STDOUT"].present? logger = ActiveSupport::Logger.new(STDOUT) @@ -108,28 +90,4 @@ # Do not dump schema after migrations. config.active_record.dump_schema_after_migration = false - - # Inserts middleware to perform automatic connection switching. - # The `database_selector` hash is used to pass options to the DatabaseSelector - # middleware. The `delay` is used to determine how long to wait after a write - # to send a subsequent read to the primary. - # - # The `database_resolver` class is used by the middleware to determine which - # database is appropriate to use based on the time delay. - # - # The `database_resolver_context` class is used by the middleware to set - # timestamps for the last write to the primary. The resolver uses the context - # class timestamps to determine how long to wait before reading from the - # replica. - # - # By default Rails will store a last write timestamp in the session. The - # DatabaseSelector middleware is designed as such you can define your own - # strategy for connection switching and pass that into the middleware through - # these configuration options. - # config.active_record.database_selector = { delay: 2.seconds } - # config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver - # config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session - - # Timeout long running requests - config.slowpoke.timeout = ENV['VIOLET_SERVICE_TIMEOUT'].to_i.nonzero? || 15 end diff --git a/config/environments/test.rb b/config/environments/test.rb index 92306bbb8..6ea4d1e70 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -8,18 +8,18 @@ Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. - config.cache_classes = false - config.action_view.cache_template_loading = true + # Turn false under Spring and add config.action_view.cache_template_loading = true. + config.cache_classes = true - # Do not eager load code on boot. This avoids loading your whole application - # just for the purpose of running a single test. If you are using a tool that - # preloads Rails for running tests, you may have to set it to true. - config.eager_load = false + # Eager loading loads your whole application. When running a single test locally, + # this probably isn't necessary. It's a good idea to do in a continuous integration + # system, or in some way before deploying your code. + config.eager_load = ENV["CI"].present? # Configure public file server for tests with Cache-Control for performance. config.public_file_server.enabled = true config.public_file_server.headers = { - 'Cache-Control' => "public, max-age=#{1.hour.to_i}" + "Cache-Control" => "public, max-age=#{1.hour.to_i}" } # Show full error reports and disable caching. @@ -38,14 +38,11 @@ config.action_mailer.perform_caching = false - config.action_mailer.default_url_options = { :host => 'localhost' } - # Tell Action Mailer not to deliver emails to the real world. # The :test delivery method accumulates sent emails in the # ActionMailer::Base.deliveries array. config.action_mailer.delivery_method = :test - # Print deprecation notices to the stderr. config.active_support.deprecation = :stderr @@ -60,12 +57,4 @@ # Annotate rendered view with file names. # config.action_view.annotate_rendered_view_with_filenames = true - config.action_view.raise_on_missing_translations = true - - # Timeout long running requests - config.slowpoke.timeout = lambda do |env| - request = Rack::Request.new(env) - # disable timeout for ember routes - request.path.start_with?("/app") ? 0 : ENV['VIOLET_SERVICE_TIMEOUT'].to_i.nonzero? || 15 - end end diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index 4b828e80c..2eeef966f 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -1,12 +1,10 @@ # Be sure to restart your server when you modify this file. # Version of your assets, change this if you want to expire all your assets. -Rails.application.config.assets.version = '1.0' +Rails.application.config.assets.version = "1.0" # Add additional assets to the asset load path. # Rails.application.config.assets.paths << Emoji.images_path -# Add Yarn node_modules folder to the asset load path. -Rails.application.config.assets.paths << Rails.root.join('node_modules') # Precompile additional assets. # application.js, application.css, and all non-JS/CSS in the app/assets diff --git a/config/initializers/content_security_policy.rb b/config/initializers/content_security_policy.rb index 35d0f26fc..54f47cf15 100644 --- a/config/initializers/content_security_policy.rb +++ b/config/initializers/content_security_policy.rb @@ -1,30 +1,25 @@ # Be sure to restart your server when you modify this file. -# Define an application-wide content security policy -# For further information see the following documentation -# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy +# Define an application-wide content security policy. +# See the Securing Rails Applications Guide for more information: +# https://guides.rubyonrails.org/security.html#content-security-policy-header -# Rails.application.config.content_security_policy do |policy| -# policy.default_src :self, :https -# policy.font_src :self, :https, :data -# policy.img_src :self, :https, :data -# policy.object_src :none -# policy.script_src :self, :https -# policy.style_src :self, :https -# # If you are using webpack-dev-server then specify webpack-dev-server host -# policy.connect_src :self, :https, "http://localhost:3035", "ws://localhost:3035" if Rails.env.development? - -# # Specify URI for violation reports -# # policy.report_uri "/csp-violation-report-endpoint" +# Rails.application.configure do +# config.content_security_policy do |policy| +# policy.default_src :self, :https +# policy.font_src :self, :https, :data +# policy.img_src :self, :https, :data +# policy.object_src :none +# policy.script_src :self, :https +# policy.style_src :self, :https +# # Specify URI for violation reports +# # policy.report_uri "/csp-violation-report-endpoint" +# end +# +# # Generate session nonces for permitted importmap and inline scripts +# config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s } +# config.content_security_policy_nonce_directives = %w(script-src) +# +# # Report violations without enforcing the policy. +# # config.content_security_policy_report_only = true # end - -# If you are using UJS then enable automatic nonce generation -# Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) } - -# Set the nonce only to specific directives -# Rails.application.config.content_security_policy_nonce_directives = %w(script-src) - -# Report CSP violations to a specified URI -# For further information see the following documentation: -# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only -# Rails.application.config.content_security_policy_report_only = true diff --git a/config/initializers/cors.rb b/config/initializers/cors.rb index c0546e62b..e5a82f162 100644 --- a/config/initializers/cors.rb +++ b/config/initializers/cors.rb @@ -1,6 +1,16 @@ -Rails.application.config.middleware.insert_before 0, Rack::Cors do - allow do - origins '*' - resource '/api/*', headers: :any, methods: [:get, :post, :patch, :put] - end -end \ No newline at end of file +# Be sure to restart your server when you modify this file. + +# Avoid CORS issues when API is called from the frontend app. +# Handle Cross-Origin Resource Sharing (CORS) in order to accept cross-origin AJAX requests. + +# Read more: https://github.com/cyu/rack-cors + +# Rails.application.config.middleware.insert_before 0, Rack::Cors do +# allow do +# origins "example.com" +# +# resource "*", +# headers: :any, +# methods: [:get, :post, :put, :patch, :delete, :options, :head] +# end +# end diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb index 4b34a0366..adc6568ce 100644 --- a/config/initializers/filter_parameter_logging.rb +++ b/config/initializers/filter_parameter_logging.rb @@ -1,6 +1,8 @@ # Be sure to restart your server when you modify this file. -# Configure sensitive parameters which will be filtered from the log file. +# Configure parameters to be filtered from the log file. Use this to limit dissemination of +# sensitive information. See the ActiveSupport::ParameterFilter documentation for supported +# notations and behaviors. Rails.application.config.filter_parameters += [ :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn ] diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb index ac033bf9d..3860f659e 100644 --- a/config/initializers/inflections.rb +++ b/config/initializers/inflections.rb @@ -4,13 +4,13 @@ # are locale specific, and you may define rules for as many different # locales as you wish. All of these examples are active by default: # ActiveSupport::Inflector.inflections(:en) do |inflect| -# inflect.plural /^(ox)$/i, '\1en' -# inflect.singular /^(ox)en/i, '\1' -# inflect.irregular 'person', 'people' +# inflect.plural /^(ox)$/i, "\\1en" +# inflect.singular /^(ox)en/i, "\\1" +# inflect.irregular "person", "people" # inflect.uncountable %w( fish sheep ) # end # These inflection rules are supported but not enabled by default: # ActiveSupport::Inflector.inflections(:en) do |inflect| -# inflect.acronym 'RESTful' +# inflect.acronym "RESTful" # end diff --git a/config/initializers/new_framework_defaults_7_0.rb b/config/initializers/new_framework_defaults_7_0.rb new file mode 100644 index 000000000..b13ef5ed1 --- /dev/null +++ b/config/initializers/new_framework_defaults_7_0.rb @@ -0,0 +1,143 @@ +# Be sure to restart your server when you modify this file. +# +# This file eases your Rails 7.0 framework defaults upgrade. +# +# Uncomment each configuration one by one to switch to the new default. +# Once your application is ready to run with all new defaults, you can remove +# this file and set the `config.load_defaults` to `7.0`. +# +# Read the Guide for Upgrading Ruby on Rails for more info on each option. +# https://guides.rubyonrails.org/upgrading_ruby_on_rails.html + +# `button_to` view helper will render `