1
0
Fork 0
forked from OpenNeo/impress

Upgrade to Rails 7.1.1

The usual stuff! Installed the new gem and its new deps, ran
`bin/rails app:update` and did my best to manually merge the dev/prod
config files with the new canonical defaults, deleted some migrations I
don't think are relevant to us, and yeah!

Also, Rails 7.1 seems to need `libyaml-dev` installed, so I added that
to the `deploy/setup.yml` playbook!

One thing to note is that, while I was here, I turned on some settings
relating to our use of SSL that technically weren't on before. This
should be fine and helpful? But if stuff breaks, well, check those!
This commit is contained in:
Emi Matchu 2023-10-25 15:05:31 -07:00
parent ee3ffe8afe
commit 56ce32b6cb
63 changed files with 242 additions and 162 deletions

View file

@ -1,7 +1,7 @@
source 'http://rubygems.org' source 'http://rubygems.org'
ruby '3.1.4' ruby '3.1.4'
gem 'rails', '= 7.0.7.1' gem 'rails', '~> 7.1', '>= 7.1.1'
# The HTTP server running the Rails instance. # The HTTP server running the Rails instance.
gem 'puma', '~> 6.3', '>= 6.3.1' gem 'puma', '~> 6.3', '>= 6.3.1'
@ -54,6 +54,9 @@ gem 'letter_opener', '~> 1.8', '>= 1.8.1', group: :development
# For parallel API calls. # For parallel API calls.
gem 'parallel', '~> 1.23' gem 'parallel', '~> 1.23'
# For miscellaneous HTTP requests.
gem "httparty", "~> 0.21.0"
# For debugging. # For debugging.
gem 'web-console', '~> 4.2', group: :development gem 'web-console', '~> 4.2', group: :development

View file

@ -7,70 +7,78 @@ GIT
GEM GEM
remote: http://rubygems.org/ remote: http://rubygems.org/
specs: specs:
actioncable (7.0.7.1) actioncable (7.1.1)
actionpack (= 7.0.7.1) actionpack (= 7.1.1)
activesupport (= 7.0.7.1) activesupport (= 7.1.1)
nio4r (~> 2.0) nio4r (~> 2.0)
websocket-driver (>= 0.6.1) websocket-driver (>= 0.6.1)
actionmailbox (7.0.7.1) zeitwerk (~> 2.6)
actionpack (= 7.0.7.1) actionmailbox (7.1.1)
activejob (= 7.0.7.1) actionpack (= 7.1.1)
activerecord (= 7.0.7.1) activejob (= 7.1.1)
activestorage (= 7.0.7.1) activerecord (= 7.1.1)
activesupport (= 7.0.7.1) activestorage (= 7.1.1)
activesupport (= 7.1.1)
mail (>= 2.7.1) mail (>= 2.7.1)
net-imap net-imap
net-pop net-pop
net-smtp net-smtp
actionmailer (7.0.7.1) actionmailer (7.1.1)
actionpack (= 7.0.7.1) actionpack (= 7.1.1)
actionview (= 7.0.7.1) actionview (= 7.1.1)
activejob (= 7.0.7.1) activejob (= 7.1.1)
activesupport (= 7.0.7.1) activesupport (= 7.1.1)
mail (~> 2.5, >= 2.5.4) mail (~> 2.5, >= 2.5.4)
net-imap net-imap
net-pop net-pop
net-smtp net-smtp
rails-dom-testing (~> 2.0) rails-dom-testing (~> 2.2)
actionpack (7.0.7.1) actionpack (7.1.1)
actionview (= 7.0.7.1) actionview (= 7.1.1)
activesupport (= 7.0.7.1) activesupport (= 7.1.1)
rack (~> 2.0, >= 2.2.4) nokogiri (>= 1.8.5)
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3) rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0) rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.0, >= 1.2.0) rails-html-sanitizer (~> 1.6)
actiontext (7.0.7.1) actiontext (7.1.1)
actionpack (= 7.0.7.1) actionpack (= 7.1.1)
activerecord (= 7.0.7.1) activerecord (= 7.1.1)
activestorage (= 7.0.7.1) activestorage (= 7.1.1)
activesupport (= 7.0.7.1) activesupport (= 7.1.1)
globalid (>= 0.6.0) globalid (>= 0.6.0)
nokogiri (>= 1.8.5) nokogiri (>= 1.8.5)
actionview (7.0.7.1) actionview (7.1.1)
activesupport (= 7.0.7.1) activesupport (= 7.1.1)
builder (~> 3.1) builder (~> 3.1)
erubi (~> 1.4) erubi (~> 1.11)
rails-dom-testing (~> 2.0) rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.1, >= 1.2.0) rails-html-sanitizer (~> 1.6)
activejob (7.0.7.1) activejob (7.1.1)
activesupport (= 7.0.7.1) activesupport (= 7.1.1)
globalid (>= 0.3.6) globalid (>= 0.3.6)
activemodel (7.0.7.1) activemodel (7.1.1)
activesupport (= 7.0.7.1) activesupport (= 7.1.1)
activerecord (7.0.7.1) activerecord (7.1.1)
activemodel (= 7.0.7.1) activemodel (= 7.1.1)
activesupport (= 7.0.7.1) activesupport (= 7.1.1)
activestorage (7.0.7.1) timeout (>= 0.4.0)
actionpack (= 7.0.7.1) activestorage (7.1.1)
activejob (= 7.0.7.1) actionpack (= 7.1.1)
activerecord (= 7.0.7.1) activejob (= 7.1.1)
activesupport (= 7.0.7.1) activerecord (= 7.1.1)
activesupport (= 7.1.1)
marcel (~> 1.0) marcel (~> 1.0)
mini_mime (>= 1.1.0) activesupport (7.1.1)
activesupport (7.0.7.1) base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2) concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2) i18n (>= 1.6, < 2)
minitest (>= 5.1) minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0) tzinfo (~> 2.0)
addressable (2.8.4) addressable (2.8.4)
public_suffix (>= 2.0.2, < 6.0) public_suffix (>= 2.0.2, < 6.0)
@ -78,7 +86,9 @@ GEM
babel-transpiler (0.7.0) babel-transpiler (0.7.0)
babel-source (>= 4.0, < 6) babel-source (>= 4.0, < 6)
execjs (~> 2.0) execjs (~> 2.0)
base64 (0.1.1)
bcrypt (3.1.19) bcrypt (3.1.19)
bigdecimal (3.1.4)
bindex (0.8.1) bindex (0.8.1)
bootsnap (1.16.0) bootsnap (1.16.0)
msgpack (~> 1.2) msgpack (~> 1.2)
@ -87,7 +97,7 @@ GEM
connection_pool (2.2.5) connection_pool (2.2.5)
crass (1.0.6) crass (1.0.6)
date (3.3.3) date (3.3.3)
devise (4.9.2) devise (4.9.3)
bcrypt (~> 3.0) bcrypt (~> 3.0)
orm_adapter (~> 0.1) orm_adapter (~> 0.1)
railties (>= 4.1.0) railties (>= 4.1.0)
@ -102,6 +112,8 @@ GEM
dotenv-rails (2.8.1) dotenv-rails (2.8.1)
dotenv (= 2.8.1) dotenv (= 2.8.1)
railties (>= 3.2) railties (>= 3.2)
drb (2.1.1)
ruby2_keywords
erubi (1.12.0) erubi (1.12.0)
execjs (2.5.2) execjs (2.5.2)
factory_girl (4.9.0) factory_girl (4.9.0)
@ -124,9 +136,16 @@ GEM
http-cookie (1.0.5) http-cookie (1.0.5)
domain_name (~> 0.5) domain_name (~> 0.5)
http_accept_language (2.1.1) http_accept_language (2.1.1)
httparty (0.21.0)
mini_mime (>= 1.0.0)
multi_xml (>= 0.5.2)
i18n (1.14.1) i18n (1.14.1)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
jsbundling-rails (1.1.2) io-console (0.6.0)
irb (1.8.3)
rdoc
reline (>= 0.3.8)
jsbundling-rails (1.2.1)
railties (>= 6.0.0) railties (>= 6.0.0)
launchy (2.5.2) launchy (2.5.2)
addressable (~> 2.8) addressable (~> 2.8)
@ -141,7 +160,6 @@ GEM
net-pop net-pop
net-smtp net-smtp
marcel (1.0.2) marcel (1.0.2)
method_source (1.0.0)
mime-types (3.4.1) mime-types (3.4.1)
mime-types-data (~> 3.2015) mime-types-data (~> 3.2015)
mime-types-data (3.2023.0218.1) mime-types-data (3.2023.0218.1)
@ -149,6 +167,8 @@ GEM
mini_portile2 (2.8.4) mini_portile2 (2.8.4)
minitest (5.19.0) minitest (5.19.0)
msgpack (1.7.2) msgpack (1.7.2)
multi_xml (0.6.0)
mutex_m (0.1.2)
mysql2 (0.5.5) mysql2 (0.5.5)
net-imap (0.4.2) net-imap (0.4.2)
date date
@ -166,6 +186,8 @@ GEM
racc (~> 1.4) racc (~> 1.4)
orm_adapter (0.5.0) orm_adapter (0.5.0)
parallel (1.23.0) parallel (1.23.0)
psych (5.1.1.1)
stringio
public_suffix (5.0.3) public_suffix (5.0.3)
puma (6.4.0) puma (6.4.0)
nio4r (~> 2.0) nio4r (~> 2.0)
@ -173,22 +195,27 @@ GEM
rack (2.2.8) rack (2.2.8)
rack-attack (6.7.0) rack-attack (6.7.0)
rack (>= 1.0, < 4) rack (>= 1.0, < 4)
rack-session (1.0.1)
rack (< 3)
rack-test (2.1.0) rack-test (2.1.0)
rack (>= 1.3) rack (>= 1.3)
rails (7.0.7.1) rackup (1.0.0)
actioncable (= 7.0.7.1) rack (< 3)
actionmailbox (= 7.0.7.1) webrick
actionmailer (= 7.0.7.1) rails (7.1.1)
actionpack (= 7.0.7.1) actioncable (= 7.1.1)
actiontext (= 7.0.7.1) actionmailbox (= 7.1.1)
actionview (= 7.0.7.1) actionmailer (= 7.1.1)
activejob (= 7.0.7.1) actionpack (= 7.1.1)
activemodel (= 7.0.7.1) actiontext (= 7.1.1)
activerecord (= 7.0.7.1) actionview (= 7.1.1)
activestorage (= 7.0.7.1) activejob (= 7.1.1)
activesupport (= 7.0.7.1) activemodel (= 7.1.1)
activerecord (= 7.1.1)
activestorage (= 7.1.1)
activesupport (= 7.1.1)
bundler (>= 1.15.0) bundler (>= 1.15.0)
railties (= 7.0.7.1) railties (= 7.1.1)
rails-dom-testing (2.2.0) rails-dom-testing (2.2.0)
activesupport (>= 5.0.0) activesupport (>= 5.0.0)
minitest minitest
@ -196,18 +223,21 @@ GEM
rails-html-sanitizer (1.6.0) rails-html-sanitizer (1.6.0)
loofah (~> 2.21) loofah (~> 2.21)
nokogiri (~> 1.14) nokogiri (~> 1.14)
rails-i18n (7.0.7) rails-i18n (7.0.8)
i18n (>= 0.7, < 2) i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 8) railties (>= 6.0.0, < 8)
railties (7.0.7.1) railties (7.1.1)
actionpack (= 7.0.7.1) actionpack (= 7.1.1)
activesupport (= 7.0.7.1) activesupport (= 7.1.1)
method_source irb
rackup (>= 1.0.0)
rake (>= 12.2) rake (>= 12.2)
thor (~> 1.0) thor (~> 1.0, >= 1.2.2)
zeitwerk (~> 2.5) zeitwerk (~> 2.6)
rake (13.0.6) rake (13.0.6)
rdiscount (2.2.7.1) rdiscount (2.2.7.1)
rdoc (6.5.0)
psych (>= 4.0.0)
react-rails (2.7.1) react-rails (2.7.1)
babel-transpiler (>= 0.7.0) babel-transpiler (>= 0.7.0)
connection_pool connection_pool
@ -216,9 +246,11 @@ GEM
tilt tilt
record_tag_helper (1.0.1) record_tag_helper (1.0.1)
actionview (>= 5) actionview (>= 5)
reline (0.3.9)
io-console (~> 0.5)
request_store (1.5.1) request_store (1.5.1)
rack (>= 1.4) rack (>= 1.4)
responders (3.1.0) responders (3.1.1)
actionpack (>= 5.2) actionpack (>= 5.2)
railties (>= 5.2) railties (>= 5.2)
rest-client (2.1.0) rest-client (2.1.0)
@ -238,6 +270,7 @@ GEM
rspec-expectations (~> 2.0.1) rspec-expectations (~> 2.0.1)
rspec-rails (2.0.1) rspec-rails (2.0.1)
rspec (~> 2.0.0) rspec (~> 2.0.0)
ruby2_keywords (0.0.5)
sanitize (6.0.2) sanitize (6.0.2)
crass (~> 1.0.2) crass (~> 1.0.2)
nokogiri (>= 1.12.0) nokogiri (>= 1.12.0)
@ -258,6 +291,7 @@ GEM
actionpack (>= 5.2) actionpack (>= 5.2)
activesupport (>= 5.2) activesupport (>= 5.2)
sprockets (>= 3.0.0) sprockets (>= 3.0.0)
stringio (3.0.8)
temple (0.8.2) temple (0.8.2)
terser (1.1.17) terser (1.1.17)
execjs (>= 0.3.0, < 3) execjs (>= 0.3.0, < 3)
@ -276,6 +310,7 @@ GEM
activemodel (>= 6.0.0) activemodel (>= 6.0.0)
bindex (>= 0.4.0) bindex (>= 0.4.0)
railties (>= 6.0.0) railties (>= 6.0.0)
webrick (1.8.1)
websocket-driver (0.7.6) websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0) websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5) websocket-extensions (0.1.5)
@ -295,6 +330,7 @@ DEPENDENCIES
globalize (~> 6.2, >= 6.2.1) globalize (~> 6.2, >= 6.2.1)
haml (~> 6.1, >= 6.1.1) haml (~> 6.1, >= 6.1.1)
http_accept_language (~> 2.1, >= 2.1.1) http_accept_language (~> 2.1, >= 2.1.1)
httparty (~> 0.21.0)
jsbundling-rails (~> 1.1) jsbundling-rails (~> 1.1)
letter_opener (~> 1.8, >= 1.8.1) letter_opener (~> 1.8, >= 1.8.1)
mysql2 (~> 0.5.5) mysql2 (~> 0.5.5)
@ -302,7 +338,7 @@ DEPENDENCIES
parallel (~> 1.23) parallel (~> 1.23)
puma (~> 6.3, >= 6.3.1) puma (~> 6.3, >= 6.3.1)
rack-attack (~> 6.7) rack-attack (~> 6.7)
rails (= 7.0.7.1) rails (~> 7.1, >= 7.1.1)
rails-i18n (~> 7.0, >= 7.0.7) rails-i18n (~> 7.0, >= 7.0.7)
rdiscount (~> 2.2, >= 2.2.7.1) rdiscount (~> 2.2, >= 2.2.7.1)
react-rails (~> 2.7, >= 2.7.1) react-rails (~> 2.7, >= 2.7.1)

View file

@ -5,7 +5,7 @@ require "fileutils"
APP_ROOT = File.expand_path("..", __dir__) APP_ROOT = File.expand_path("..", __dir__)
def system!(*args) def system!(*args)
system(*args) || abort("\n== Command #{args} failed ==") system(*args, exception: true)
end end
FileUtils.chdir APP_ROOT do FileUtils.chdir APP_ROOT do

View file

@ -9,19 +9,21 @@ Bundler.require(*Rails.groups)
module OpenneoImpressItems module OpenneoImpressItems
class Application < Rails::Application class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version. # Initialize configuration defaults for originally generated Rails version.
config.load_defaults 7.0 config.load_defaults 7.1
# Settings in config/environments/* take precedence over those specified here. # Please, add to the `ignore` list any other `lib` subdirectories that do
# Application configuration should go into files in config/initializers # not contain `.rb` files, or that should not be reloaded or eager loaded.
# -- all .rb files in that directory are automatically loaded. # Common ones are `templates`, `generators`, or `middleware`, for example.
config.autoload_lib(ignore: %w(assets tasks))
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. # Configuration for the application, engines, and railties goes here.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. #
# config.time_zone = 'Central Time (US & Canada)' # These settings can be overridden in specific environments using the files
# in config/environments, which are processed later.
#
# config.time_zone = "Central Time (US & Canada)"
# config.eager_load_paths << Rails.root.join("extras")
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
config.i18n.fallbacks = true config.i18n.fallbacks = true
Mime::Type.register "image/gif", :gif Mime::Type.register "image/gif", :gif

View file

@ -3,10 +3,10 @@ require "active_support/core_ext/integer/time"
Rails.application.configure do Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb. # Settings specified here will take precedence over those in config/application.rb.
# In the development environment your application's code is reloaded on # In the development environment your application's code is reloaded any time
# every request. This slows down response time but is perfect for development # it changes. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes. # since you don't have to restart the web server when you make code changes.
config.cache_classes = false config.enable_reloading = true
# Do not eager load code on boot. # Do not eager load code on boot.
config.eager_load = false config.eager_load = false
@ -16,7 +16,7 @@ Rails.application.configure do
# Enable server timing # Enable server timing
config.server_timing = true config.server_timing = true
# Enable/disable caching. By default caching is disabled. # Enable/disable caching. By default caching is disabled.
# Run rails dev:cache to toggle caching. # 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?
@ -25,7 +25,7 @@ Rails.application.configure do
config.cache_store = :memory_store config.cache_store = :memory_store
config.public_file_server.headers = { config.public_file_server.headers = {
'Cache-Control' => "public, max-age=#{2.days.to_i}" "Cache-Control" => "public, max-age=#{2.days.to_i}"
} }
else else
config.action_controller.perform_caching = false config.action_controller.perform_caching = false
@ -33,16 +33,22 @@ Rails.application.configure do
config.cache_store = :null_store config.cache_store = :null_store
end end
# Store uploaded files on the local file system (see config/storage.yml for options).
config.active_storage.service = :local
# Don't care if the mailer can't send. # Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false config.action_mailer.raise_delivery_errors = false
config.action_mailer.default_url_options = {host: "localhost", port: 3000} config.action_mailer.default_url_options = {host: "localhost", port: 3000}
config.action_mailer.delivery_method = :letter_opener config.action_mailer.delivery_method = :letter_opener
config.action_mailer.perform_caching = false config.action_mailer.perform_caching = false
# Print deprecation notices to the Rails logger. # Raise exceptions for disallowed deprecations.
config.active_support.deprecation = :log config.active_support.disallowed_deprecation = :raise
# Raise an error on page load if there are pending migrations # Tell Active Support which deprecation messages to disallow.
config.active_support.disallowed_deprecation_warnings = []
# Raise an error on page load if there are pending migrations.
config.active_record.migration_error = :page_load config.active_record.migration_error = :page_load
# Debug mode disables concatenation and preprocessing of assets. # Debug mode disables concatenation and preprocessing of assets.
@ -53,11 +59,26 @@ Rails.application.configure do
# Highlight code that triggered database queries in logs. # Highlight code that triggered database queries in logs.
config.active_record.verbose_query_logs = true config.active_record.verbose_query_logs = true
# Highlight code that enqueued background job in logs.
config.active_job.verbose_enqueue_logs = true
# Suppress logger output for asset requests. # Suppress logger output for asset requests.
config.assets.quiet = true config.assets.quiet = true
config.react.variant = :development config.react.variant = :development
# Raises error for missing translations.
# config.i18n.raise_on_missing_translations = true
# Annotate rendered view with file names.
# config.action_view.annotate_rendered_view_with_filenames = true
# Uncomment if you wish to allow Action Cable access from any origin.
# config.action_cable.disable_request_forgery_protection = true
# Raise error when a before_action's only/except options reference missing actions
config.action_controller.raise_on_missing_callback_actions = true
# Don't use the assets precompiled for production; recompile live instead. # Don't use the assets precompiled for production; recompile live instead.
# HACK: We do this by just telling it that dev assets belong in a special # HACK: We do this by just telling it that dev assets belong in a special
# folder, so if you run precompile in development it'll look there instead, # folder, so if you run precompile in development it'll look there instead,

View file

@ -4,7 +4,7 @@ Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb. # Settings specified here will take precedence over those in config/application.rb.
# Code is not reloaded between requests. # Code is not reloaded between requests.
config.cache_classes = true config.enable_reloading = false
# Eager load code on boot. This eager loads most of Rails and # Eager load code on boot. This eager loads most of Rails and
# your application in memory, allowing both threaded web servers # your application in memory, allowing both threaded web servers
@ -16,68 +16,66 @@ Rails.application.configure do
config.consider_all_requests_local = false config.consider_all_requests_local = false
config.action_controller.perform_caching = true config.action_controller.perform_caching = true
# Specifies the header that your server uses for sending files # Ensures that a master key has been made available in ENV["RAILS_MASTER_KEY"], config/master.key, or an environment
config.action_dispatch.x_sendfile_header = "X-Sendfile" # key such as config/credentials/production.key. This key is used to decrypt credentials (and other encrypted files).
# config.require_master_key = true
# For nginx: # Enable static file serving from the `/public` folder (turn off if using NGINX/Apache for it).
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' config.public_file_server.enabled = false
# If you have no front-end server that supports something like X-Sendfile, # Compress CSS using a preprocessor.
# just comment this out and Rails will serve the files # config.assets.css_compressor = :sass
# See everything in the log (default is :info) # Do not fallback to assets pipeline if a precompiled asset is missed.
# config.log_level = :debug config.assets.compile = false
# Use a different logger for distributed setups # Enable serving of images, stylesheets, and JavaScripts from an asset server.
# config.logger = SyslogLogger.new # config.asset_host = "http://assets.example.com"
# Use a different cache store in production # Specifies the header that your server uses for sending files.
# config.cache_store = :mem_cache_store, { namespace: "openneo-impress-rails" } # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache
# config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX
# Disable Rails's static asset server # Store uploaded files on the local file system (see config/storage.yml for options).
# In production, Apache or nginx will already do this config.active_storage.service = :local
# config.serve_static_assets = true
# Enable serving of images, stylesheets, and javascripts from an asset server # Mount Action Cable outside main process or domain.
# config.action_controller.asset_host = "http://assets.example.com" # 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.*/ ]
# Disable delivery errors, bad email addresses will be ignored # Assume all access to the app is happening through a SSL-terminating reverse proxy.
# config.action_mailer.raise_delivery_errors = false # Can be used together with config.force_ssl for Strict-Transport-Security and secure cookies.
config.assume_ssl = true
# Enable threaded mode
# config.threadsafe!
# Disable serving static files from the `/public` folder by default since # Disable serving static files from the `/public` folder by default since
# Apache or NGINX already handles this. # 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 JavaScripts and CSS.
config.assets.js_compressor = :terser
# Don't fallback to assets pipeline if a precompiled asset is missed # Don't fallback to assets pipeline if a precompiled asset is missed
config.assets.compile = false config.assets.compile = false
# Generate digests for assets URLs
config.assets.digest = true
# Defaults to Rails.root.join("public/assets")
# config.assets.manifest = YOUR_PATH
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
# config.assets.precompile += %w( search.js )
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
# config.force_ssl = true
# Include generic and useful information about system operation, but avoid logging too much # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
# information to avoid inadvertent exposure of personally identifiable information (PII). config.force_ssl = true
config.log_level = :info
# Log to STDOUT by default
config.logger = ActiveSupport::Logger.new(STDOUT)
.tap { |logger| logger.formatter = ::Logger::Formatter.new }
.then { |logger| ActiveSupport::TaggedLogging.new(logger) }
# Prepend all log lines with the following tags. # Prepend all log lines with the following tags.
config.log_tags = [ :request_id ] config.log_tags = [ :request_id ]
config.react.variant = :production config.react.variant = :production
# Info include generic and useful information about system operation, but avoids logging too much
# information to avoid inadvertent exposure of personally identifiable information (PII). If you
# want to log everything, set the level to "debug".
config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info")
# Use a different cache store in production.
# config.cache_store = :mem_cache_store
config.action_mailer.default_url_options = {host: "impress.openneo.net"} config.action_mailer.default_url_options = {host: "impress.openneo.net"}
config.action_mailer.delivery_method = :smtp config.action_mailer.delivery_method = :smtp
@ -93,25 +91,32 @@ Rails.application.configure do
config.action_mailer.raise_delivery_errors = true config.action_mailer.raise_delivery_errors = true
config.action_mailer.perform_deliveries = true config.action_mailer.perform_deliveries = true
config.action_mailer.perform_caching = false config.action_mailer.perform_caching = false
# Use a real queuing backend for Active Job (and separate queues per environment).
# config.active_job.queue_adapter = :resque
# config.active_job.queue_name_prefix = "openneo_impress_items_production"
# 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
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation cannot be found). # the I18n.default_locale when a translation cannot be found).
config.i18n.fallbacks = true config.i18n.fallbacks = true
# Send deprecation notices to registered listeners. # Don't log any deprecations.
config.active_support.report_deprecations = false config.active_support.report_deprecations = false
# Use default logging formatter so that PID and timestamp are not suppressed.
config.log_formatter = ::Logger::Formatter.new
if ENV["RAILS_LOG_TO_STDOUT"].present?
logger = ActiveSupport::Logger.new(STDOUT)
logger.formatter = config.log_formatter
config.logger = ActiveSupport::TaggedLogging.new(logger)
end
# Do not dump schema after migrations. # Do not dump schema after migrations.
config.active_record.dump_schema_after_migration = false config.active_record.dump_schema_after_migration = false
# Enable DNS rebinding protection and other `Host` header attacks.
# config.hosts = [
# "example.com", # Allow requests from example.com
# /.*\.example\.com/ # Allow requests from subdomains like `www.example.com`
# ]
# Skip DNS rebinding protection for the default health check endpoint.
# config.host_authorization = { exclude: ->(request) { request.path == "/up" } }
end end
LocalImpressHost = 'newimpress.openneo.net' LocalImpressHost = 'newimpress.openneo.net'

View file

@ -8,12 +8,13 @@ require "active_support/core_ext/integer/time"
Rails.application.configure do Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb. # Settings specified here will take precedence over those in config/application.rb.
# Turn false under Spring and add config.action_view.cache_template_loading = true. # While tests run files are not watched, reloading is not necessary.
config.cache_classes = true config.enable_reloading = false
# Eager loading loads your whole application. When running a single test locally, # Eager loading loads your entire application. When running a single test locally,
# this probably isn't necessary. It's a good idea to do in a continuous integration # this is usually not necessary, and can slow down your test suite. However, it's
# system, or in some way before deploying your code. # recommended that you enable it in continuous integration systems to ensure eager
# loading is working properly before deploying your code.
config.eager_load = ENV["CI"].present? config.eager_load = ENV["CI"].present?
# Configure public file server for tests with Cache-Control for performance. # Configure public file server for tests with Cache-Control for performance.
@ -28,7 +29,7 @@ Rails.application.configure do
config.cache_store = :null_store config.cache_store = :null_store
# Raise exceptions instead of rendering exception templates. # Raise exceptions instead of rendering exception templates.
config.action_dispatch.show_exceptions = false config.action_dispatch.show_exceptions = :rescuable
# Disable request forgery protection in test environment. # Disable request forgery protection in test environment.
config.action_controller.allow_forgery_protection = false config.action_controller.allow_forgery_protection = false
@ -57,4 +58,7 @@ Rails.application.configure do
# Annotate rendered view with file names. # Annotate rendered view with file names.
# config.action_view.annotate_rendered_view_with_filenames = true # config.action_view.annotate_rendered_view_with_filenames = true
# Raise error when a before_action's only/except options reference missing actions
config.action_controller.raise_on_missing_callback_actions = true
end end

View file

@ -16,9 +16,9 @@
# # policy.report_uri "/csp-violation-report-endpoint" # # policy.report_uri "/csp-violation-report-endpoint"
# end # end
# #
# # Generate session nonces for permitted importmap and inline scripts # # Generate session nonces for permitted importmap, inline scripts, and inline styles.
# config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s } # config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s }
# config.content_security_policy_nonce_directives = %w(script-src) # config.content_security_policy_nonce_directives = %w(script-src style-src)
# #
# # Report violations without enforcing the policy. # # Report violations without enforcing the policy.
# # config.content_security_policy_report_only = true # # config.content_security_policy_report_only = true

View file

@ -1,8 +1,8 @@
# Be sure to restart your server when you modify this file. # Be sure to restart your server when you modify this file.
# Configure parameters to be filtered from the log file. Use this to limit dissemination of # Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file.
# sensitive information. See the ActiveSupport::ParameterFilter documentation for supported # Use this to limit dissemination of sensitive information.
# notations and behaviors. # See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors.
Rails.application.config.filter_parameters += [ Rails.application.config.filter_parameters += [
:passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
] ]

View file

@ -14,3 +14,8 @@
# ActiveSupport::Inflector.inflections(:en) do |inflect| # ActiveSupport::Inflector.inflections(:en) do |inflect|
# inflect.acronym "RESTful" # inflect.acronym "RESTful"
# end # end
# Teach Zeitwerk that `RocketAMF` is what to expect in `lib/rocketamf`.
ActiveSupport::Inflector.inflections(:en) do |inflect|
inflect.acronym "RocketAMF"
end

View file

@ -1,11 +1,13 @@
# Be sure to restart your server when you modify this file.
# Define an application-wide HTTP permissions policy. For further # Define an application-wide HTTP permissions policy. For further
# information see https://developers.google.com/web/updates/2018/06/feature-policy # information see: https://developers.google.com/web/updates/2018/06/feature-policy
#
# Rails.application.config.permissions_policy do |f| # Rails.application.config.permissions_policy do |policy|
# f.camera :none # policy.camera :none
# f.gyroscope :none # policy.gyroscope :none
# f.microphone :none # policy.microphone :none
# f.usb :none # policy.usb :none
# f.fullscreen :self # policy.fullscreen :self
# f.payment :self, "https://secure.example.com" # policy.payment :self, "https://secure.example.com"
# end # end

View file

@ -164,7 +164,9 @@
- name: Install system dependencies for impress's Ruby gems - name: Install system dependencies for impress's Ruby gems
apt: apt:
name: libmysqlclient-dev name:
- libmysqlclient-dev
- libyaml-dev
- name: Create the app folder - name: Create the app folder
file: file:

Binary file not shown.

BIN
vendor/cache/actioncable-7.1.1.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/actionmailbox-7.1.1.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/actionmailer-7.1.1.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/actionpack-7.1.1.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/actiontext-7.1.1.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/actionview-7.1.1.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/activejob-7.1.1.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/activemodel-7.1.1.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/activerecord-7.1.1.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/activestorage-7.1.1.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/activesupport-7.1.1.gem vendored Normal file

Binary file not shown.

BIN
vendor/cache/base64-0.1.1.gem vendored Normal file

Binary file not shown.

BIN
vendor/cache/bigdecimal-3.1.4.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/devise-4.9.3.gem vendored Normal file

Binary file not shown.

BIN
vendor/cache/drb-2.1.1.gem vendored Normal file

Binary file not shown.

BIN
vendor/cache/httparty-0.21.0.gem vendored Normal file

Binary file not shown.

BIN
vendor/cache/io-console-0.6.0.gem vendored Normal file

Binary file not shown.

BIN
vendor/cache/irb-1.8.3.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/jsbundling-rails-1.2.1.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/multi_xml-0.6.0.gem vendored Normal file

Binary file not shown.

BIN
vendor/cache/mutex_m-0.1.2.gem vendored Normal file

Binary file not shown.

BIN
vendor/cache/psych-5.1.1.1.gem vendored Normal file

Binary file not shown.

BIN
vendor/cache/rack-session-1.0.1.gem vendored Normal file

Binary file not shown.

BIN
vendor/cache/rackup-1.0.0.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/rails-7.1.1.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/rails-i18n-7.0.8.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/railties-7.1.1.gem vendored Normal file

Binary file not shown.

BIN
vendor/cache/rdoc-6.5.0.gem vendored Normal file

Binary file not shown.

BIN
vendor/cache/reline-0.3.9.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/responders-3.1.1.gem vendored Normal file

Binary file not shown.

BIN
vendor/cache/ruby2_keywords-0.0.5.gem vendored Normal file

Binary file not shown.

BIN
vendor/cache/stringio-3.0.8.gem vendored Normal file

Binary file not shown.

BIN
vendor/cache/webrick-1.8.1.gem vendored Normal file

Binary file not shown.