forked from fixin.me/fixin.me
Upgrade Rails to 8.0.5
Install sqlite3 Migrate Rails default settings from 7.2 to 8.0
This commit is contained in:
11
Gemfile
11
Gemfile
@@ -1,14 +1,14 @@
|
|||||||
source "https://rubygems.org"
|
source "https://rubygems.org"
|
||||||
|
|
||||||
# The requirement for the Ruby version comes from Rails
|
# The requirement for the Ruby version comes from Rails
|
||||||
gem "rails", "~> 7.2.3"
|
gem "rails", "~> 8.0.5"
|
||||||
gem "sprockets-rails"
|
gem "sprockets-rails"
|
||||||
gem "puma", "~> 6.0"
|
gem "puma", "~> 6.0"
|
||||||
gem "sassc-rails"
|
gem "sassc-rails"
|
||||||
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
||||||
gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ]
|
gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ]
|
||||||
|
|
||||||
# TODO: select db gems automatically
|
# TODO: select db gems automatically?
|
||||||
# database_config = ERB.new(File.read("config/database.yml")).result
|
# database_config = ERB.new(File.read("config/database.yml")).result
|
||||||
# YAML.load(database_config, aliases: true).values.map { |env| env["adapter"] }.uniq
|
# YAML.load(database_config, aliases: true).values.map { |env| env["adapter"] }.uniq
|
||||||
group :mysql, optional: true do
|
group :mysql, optional: true do
|
||||||
@@ -42,11 +42,4 @@ group :test do
|
|||||||
# Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
|
# Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
|
||||||
gem "capybara"
|
gem "capybara"
|
||||||
gem "selenium-webdriver"
|
gem "selenium-webdriver"
|
||||||
|
|
||||||
# Remove minitest version restriction after error fixed:
|
|
||||||
# railties-7.2.3/lib/rails/test_unit/line_filtering.rb:7:in `run':
|
|
||||||
# wrong number of arguments (given 3, expected 1..2) (ArgumentError)
|
|
||||||
# from /var/www/.gem/ruby/3.3.0/gems/minitest-6.0.2/lib/minitest.rb:473:in
|
|
||||||
# `block (2 levels) in run_suite'
|
|
||||||
gem "minitest", "< 6"
|
|
||||||
end
|
end
|
||||||
|
|||||||
205
Gemfile.lock
205
Gemfile.lock
@@ -1,68 +1,65 @@
|
|||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
actioncable (7.2.3)
|
actioncable (8.0.5)
|
||||||
actionpack (= 7.2.3)
|
actionpack (= 8.0.5)
|
||||||
activesupport (= 7.2.3)
|
activesupport (= 8.0.5)
|
||||||
nio4r (~> 2.0)
|
nio4r (~> 2.0)
|
||||||
websocket-driver (>= 0.6.1)
|
websocket-driver (>= 0.6.1)
|
||||||
zeitwerk (~> 2.6)
|
zeitwerk (~> 2.6)
|
||||||
actionmailbox (7.2.3)
|
actionmailbox (8.0.5)
|
||||||
actionpack (= 7.2.3)
|
actionpack (= 8.0.5)
|
||||||
activejob (= 7.2.3)
|
activejob (= 8.0.5)
|
||||||
activerecord (= 7.2.3)
|
activerecord (= 8.0.5)
|
||||||
activestorage (= 7.2.3)
|
activestorage (= 8.0.5)
|
||||||
activesupport (= 7.2.3)
|
activesupport (= 8.0.5)
|
||||||
mail (>= 2.8.0)
|
mail (>= 2.8.0)
|
||||||
actionmailer (7.2.3)
|
actionmailer (8.0.5)
|
||||||
actionpack (= 7.2.3)
|
actionpack (= 8.0.5)
|
||||||
actionview (= 7.2.3)
|
actionview (= 8.0.5)
|
||||||
activejob (= 7.2.3)
|
activejob (= 8.0.5)
|
||||||
activesupport (= 7.2.3)
|
activesupport (= 8.0.5)
|
||||||
mail (>= 2.8.0)
|
mail (>= 2.8.0)
|
||||||
rails-dom-testing (~> 2.2)
|
rails-dom-testing (~> 2.2)
|
||||||
actionpack (7.2.3)
|
actionpack (8.0.5)
|
||||||
actionview (= 7.2.3)
|
actionview (= 8.0.5)
|
||||||
activesupport (= 7.2.3)
|
activesupport (= 8.0.5)
|
||||||
cgi
|
|
||||||
nokogiri (>= 1.8.5)
|
nokogiri (>= 1.8.5)
|
||||||
racc
|
rack (>= 2.2.4)
|
||||||
rack (>= 2.2.4, < 3.3)
|
|
||||||
rack-session (>= 1.0.1)
|
rack-session (>= 1.0.1)
|
||||||
rack-test (>= 0.6.3)
|
rack-test (>= 0.6.3)
|
||||||
rails-dom-testing (~> 2.2)
|
rails-dom-testing (~> 2.2)
|
||||||
rails-html-sanitizer (~> 1.6)
|
rails-html-sanitizer (~> 1.6)
|
||||||
useragent (~> 0.16)
|
useragent (~> 0.16)
|
||||||
actiontext (7.2.3)
|
actiontext (8.0.5)
|
||||||
actionpack (= 7.2.3)
|
actionpack (= 8.0.5)
|
||||||
activerecord (= 7.2.3)
|
activerecord (= 8.0.5)
|
||||||
activestorage (= 7.2.3)
|
activestorage (= 8.0.5)
|
||||||
activesupport (= 7.2.3)
|
activesupport (= 8.0.5)
|
||||||
globalid (>= 0.6.0)
|
globalid (>= 0.6.0)
|
||||||
nokogiri (>= 1.8.5)
|
nokogiri (>= 1.8.5)
|
||||||
actionview (7.2.3)
|
actionview (8.0.5)
|
||||||
activesupport (= 7.2.3)
|
activesupport (= 8.0.5)
|
||||||
builder (~> 3.1)
|
builder (~> 3.1)
|
||||||
cgi
|
|
||||||
erubi (~> 1.11)
|
erubi (~> 1.11)
|
||||||
rails-dom-testing (~> 2.2)
|
rails-dom-testing (~> 2.2)
|
||||||
rails-html-sanitizer (~> 1.6)
|
rails-html-sanitizer (~> 1.6)
|
||||||
activejob (7.2.3)
|
activejob (8.0.5)
|
||||||
activesupport (= 7.2.3)
|
activesupport (= 8.0.5)
|
||||||
globalid (>= 0.3.6)
|
globalid (>= 0.3.6)
|
||||||
activemodel (7.2.3)
|
activemodel (8.0.5)
|
||||||
activesupport (= 7.2.3)
|
activesupport (= 8.0.5)
|
||||||
activerecord (7.2.3)
|
activerecord (8.0.5)
|
||||||
activemodel (= 7.2.3)
|
activemodel (= 8.0.5)
|
||||||
activesupport (= 7.2.3)
|
activesupport (= 8.0.5)
|
||||||
timeout (>= 0.4.0)
|
timeout (>= 0.4.0)
|
||||||
activestorage (7.2.3)
|
activestorage (8.0.5)
|
||||||
actionpack (= 7.2.3)
|
actionpack (= 8.0.5)
|
||||||
activejob (= 7.2.3)
|
activejob (= 8.0.5)
|
||||||
activerecord (= 7.2.3)
|
activerecord (= 8.0.5)
|
||||||
activesupport (= 7.2.3)
|
activesupport (= 8.0.5)
|
||||||
marcel (~> 1.0)
|
marcel (~> 1.0)
|
||||||
activesupport (7.2.3)
|
activesupport (8.0.5)
|
||||||
base64
|
base64
|
||||||
benchmark (>= 0.3)
|
benchmark (>= 0.3)
|
||||||
bigdecimal
|
bigdecimal
|
||||||
@@ -74,12 +71,13 @@ GEM
|
|||||||
minitest (>= 5.1)
|
minitest (>= 5.1)
|
||||||
securerandom (>= 0.3)
|
securerandom (>= 0.3)
|
||||||
tzinfo (~> 2.0, >= 2.0.5)
|
tzinfo (~> 2.0, >= 2.0.5)
|
||||||
addressable (2.8.8)
|
uri (>= 0.13.1)
|
||||||
|
addressable (2.9.0)
|
||||||
public_suffix (>= 2.0.2, < 8.0)
|
public_suffix (>= 2.0.2, < 8.0)
|
||||||
base64 (0.3.0)
|
base64 (0.3.0)
|
||||||
bcrypt (3.1.21)
|
bcrypt (3.1.22)
|
||||||
benchmark (0.5.0)
|
benchmark (0.5.0)
|
||||||
bigdecimal (4.0.1)
|
bigdecimal (4.1.2)
|
||||||
bindex (0.8.1)
|
bindex (0.8.1)
|
||||||
builder (3.3.0)
|
builder (3.3.0)
|
||||||
byebug (13.0.0)
|
byebug (13.0.0)
|
||||||
@@ -93,28 +91,27 @@ GEM
|
|||||||
rack-test (>= 0.6.3)
|
rack-test (>= 0.6.3)
|
||||||
regexp_parser (>= 1.5, < 3.0)
|
regexp_parser (>= 1.5, < 3.0)
|
||||||
xpath (~> 3.2)
|
xpath (~> 3.2)
|
||||||
cgi (0.5.1)
|
|
||||||
concurrent-ruby (1.3.6)
|
concurrent-ruby (1.3.6)
|
||||||
connection_pool (3.0.2)
|
connection_pool (3.0.2)
|
||||||
crass (1.0.6)
|
crass (1.0.6)
|
||||||
date (3.5.1)
|
date (3.5.1)
|
||||||
devise (5.0.2)
|
devise (5.0.3)
|
||||||
bcrypt (~> 3.0)
|
bcrypt (~> 3.0)
|
||||||
orm_adapter (~> 0.1)
|
orm_adapter (~> 0.1)
|
||||||
railties (>= 7.0)
|
railties (>= 7.0)
|
||||||
responders
|
responders
|
||||||
warden (~> 1.2.3)
|
warden (~> 1.2.3)
|
||||||
drb (2.2.3)
|
drb (2.2.3)
|
||||||
erb (6.0.2)
|
erb (6.0.4)
|
||||||
erubi (1.13.1)
|
erubi (1.13.1)
|
||||||
ffi (1.17.3-aarch64-linux-gnu)
|
ffi (1.17.4-aarch64-linux-gnu)
|
||||||
ffi (1.17.3-aarch64-linux-musl)
|
ffi (1.17.4-aarch64-linux-musl)
|
||||||
ffi (1.17.3-arm-linux-gnu)
|
ffi (1.17.4-arm-linux-gnu)
|
||||||
ffi (1.17.3-arm-linux-musl)
|
ffi (1.17.4-arm-linux-musl)
|
||||||
ffi (1.17.3-arm64-darwin)
|
ffi (1.17.4-arm64-darwin)
|
||||||
ffi (1.17.3-x86_64-darwin)
|
ffi (1.17.4-x86_64-darwin)
|
||||||
ffi (1.17.3-x86_64-linux-gnu)
|
ffi (1.17.4-x86_64-linux-gnu)
|
||||||
ffi (1.17.3-x86_64-linux-musl)
|
ffi (1.17.4-x86_64-linux-musl)
|
||||||
globalid (1.3.0)
|
globalid (1.3.0)
|
||||||
activesupport (>= 6.1)
|
activesupport (>= 6.1)
|
||||||
i18n (1.14.8)
|
i18n (1.14.8)
|
||||||
@@ -124,13 +121,13 @@ GEM
|
|||||||
activesupport (>= 6.0.0)
|
activesupport (>= 6.0.0)
|
||||||
railties (>= 6.0.0)
|
railties (>= 6.0.0)
|
||||||
io-console (0.8.2)
|
io-console (0.8.2)
|
||||||
irb (1.17.0)
|
irb (1.18.0)
|
||||||
pp (>= 0.6.0)
|
pp (>= 0.6.0)
|
||||||
prism (>= 1.3.0)
|
prism (>= 1.3.0)
|
||||||
rdoc (>= 4.0.0)
|
rdoc (>= 4.0.0)
|
||||||
reline (>= 0.4.2)
|
reline (>= 0.4.2)
|
||||||
logger (1.7.0)
|
logger (1.7.0)
|
||||||
loofah (2.25.0)
|
loofah (2.25.1)
|
||||||
crass (~> 1.0.2)
|
crass (~> 1.0.2)
|
||||||
nokogiri (>= 1.12.0)
|
nokogiri (>= 1.12.0)
|
||||||
mail (2.9.0)
|
mail (2.9.0)
|
||||||
@@ -142,7 +139,9 @@ GEM
|
|||||||
marcel (1.1.0)
|
marcel (1.1.0)
|
||||||
matrix (0.4.3)
|
matrix (0.4.3)
|
||||||
mini_mime (1.1.5)
|
mini_mime (1.1.5)
|
||||||
minitest (5.27.0)
|
minitest (6.0.5)
|
||||||
|
drb (~> 2.0)
|
||||||
|
prism (~> 1.5)
|
||||||
mysql2 (0.5.7)
|
mysql2 (0.5.7)
|
||||||
bigdecimal
|
bigdecimal
|
||||||
net-imap (0.6.3)
|
net-imap (0.6.3)
|
||||||
@@ -155,21 +154,21 @@ GEM
|
|||||||
net-smtp (0.5.1)
|
net-smtp (0.5.1)
|
||||||
net-protocol
|
net-protocol
|
||||||
nio4r (2.7.5)
|
nio4r (2.7.5)
|
||||||
nokogiri (1.19.1-aarch64-linux-gnu)
|
nokogiri (1.19.2-aarch64-linux-gnu)
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
nokogiri (1.19.1-aarch64-linux-musl)
|
nokogiri (1.19.2-aarch64-linux-musl)
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
nokogiri (1.19.1-arm-linux-gnu)
|
nokogiri (1.19.2-arm-linux-gnu)
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
nokogiri (1.19.1-arm-linux-musl)
|
nokogiri (1.19.2-arm-linux-musl)
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
nokogiri (1.19.1-arm64-darwin)
|
nokogiri (1.19.2-arm64-darwin)
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
nokogiri (1.19.1-x86_64-darwin)
|
nokogiri (1.19.2-x86_64-darwin)
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
nokogiri (1.19.1-x86_64-linux-gnu)
|
nokogiri (1.19.2-x86_64-linux-gnu)
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
nokogiri (1.19.1-x86_64-linux-musl)
|
nokogiri (1.19.2-x86_64-linux-musl)
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
orm_adapter (0.5.0)
|
orm_adapter (0.5.0)
|
||||||
pg (1.6.3)
|
pg (1.6.3)
|
||||||
@@ -186,32 +185,32 @@ GEM
|
|||||||
psych (5.3.1)
|
psych (5.3.1)
|
||||||
date
|
date
|
||||||
stringio
|
stringio
|
||||||
public_suffix (7.0.2)
|
public_suffix (7.0.5)
|
||||||
puma (6.6.1)
|
puma (6.6.1)
|
||||||
nio4r (~> 2.0)
|
nio4r (~> 2.0)
|
||||||
racc (1.8.1)
|
racc (1.8.1)
|
||||||
rack (3.2.5)
|
rack (3.2.6)
|
||||||
rack-session (2.1.1)
|
rack-session (2.1.2)
|
||||||
base64 (>= 0.1.0)
|
base64 (>= 0.1.0)
|
||||||
rack (>= 3.0.0)
|
rack (>= 3.0.0)
|
||||||
rack-test (2.2.0)
|
rack-test (2.2.0)
|
||||||
rack (>= 1.3)
|
rack (>= 1.3)
|
||||||
rackup (2.3.1)
|
rackup (2.3.1)
|
||||||
rack (>= 3)
|
rack (>= 3)
|
||||||
rails (7.2.3)
|
rails (8.0.5)
|
||||||
actioncable (= 7.2.3)
|
actioncable (= 8.0.5)
|
||||||
actionmailbox (= 7.2.3)
|
actionmailbox (= 8.0.5)
|
||||||
actionmailer (= 7.2.3)
|
actionmailer (= 8.0.5)
|
||||||
actionpack (= 7.2.3)
|
actionpack (= 8.0.5)
|
||||||
actiontext (= 7.2.3)
|
actiontext (= 8.0.5)
|
||||||
actionview (= 7.2.3)
|
actionview (= 8.0.5)
|
||||||
activejob (= 7.2.3)
|
activejob (= 8.0.5)
|
||||||
activemodel (= 7.2.3)
|
activemodel (= 8.0.5)
|
||||||
activerecord (= 7.2.3)
|
activerecord (= 8.0.5)
|
||||||
activestorage (= 7.2.3)
|
activestorage (= 8.0.5)
|
||||||
activesupport (= 7.2.3)
|
activesupport (= 8.0.5)
|
||||||
bundler (>= 1.15.0)
|
bundler (>= 1.15.0)
|
||||||
railties (= 7.2.3)
|
railties (= 8.0.5)
|
||||||
rails-dom-testing (2.3.0)
|
rails-dom-testing (2.3.0)
|
||||||
activesupport (>= 5.0.0)
|
activesupport (>= 5.0.0)
|
||||||
minitest
|
minitest
|
||||||
@@ -219,22 +218,21 @@ GEM
|
|||||||
rails-html-sanitizer (1.7.0)
|
rails-html-sanitizer (1.7.0)
|
||||||
loofah (~> 2.25)
|
loofah (~> 2.25)
|
||||||
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)
|
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 (7.2.3)
|
railties (8.0.5)
|
||||||
actionpack (= 7.2.3)
|
actionpack (= 8.0.5)
|
||||||
activesupport (= 7.2.3)
|
activesupport (= 8.0.5)
|
||||||
cgi
|
|
||||||
irb (~> 1.13)
|
irb (~> 1.13)
|
||||||
rackup (>= 1.0.0)
|
rackup (>= 1.0.0)
|
||||||
rake (>= 12.2)
|
rake (>= 12.2)
|
||||||
thor (~> 1.0, >= 1.2.2)
|
thor (~> 1.0, >= 1.2.2)
|
||||||
tsort (>= 0.2)
|
tsort (>= 0.2)
|
||||||
zeitwerk (~> 2.6)
|
zeitwerk (~> 2.6)
|
||||||
rake (13.3.1)
|
rake (13.4.2)
|
||||||
rdoc (7.2.0)
|
rdoc (7.2.0)
|
||||||
erb
|
erb
|
||||||
psych (>= 4.0.0)
|
psych (>= 4.0.0)
|
||||||
tsort
|
tsort
|
||||||
regexp_parser (2.11.3)
|
regexp_parser (2.12.0)
|
||||||
reline (0.6.3)
|
reline (0.6.3)
|
||||||
io-console (~> 0.5)
|
io-console (~> 0.5)
|
||||||
responders (3.2.0)
|
responders (3.2.0)
|
||||||
@@ -251,7 +249,7 @@ GEM
|
|||||||
sprockets-rails
|
sprockets-rails
|
||||||
tilt
|
tilt
|
||||||
securerandom (0.4.1)
|
securerandom (0.4.1)
|
||||||
selenium-webdriver (4.41.0)
|
selenium-webdriver (4.43.0)
|
||||||
base64 (~> 0.2)
|
base64 (~> 0.2)
|
||||||
logger (~> 1.4)
|
logger (~> 1.4)
|
||||||
rexml (~> 3.2, >= 3.2.5)
|
rexml (~> 3.2, >= 3.2.5)
|
||||||
@@ -265,32 +263,32 @@ GEM
|
|||||||
actionpack (>= 6.1)
|
actionpack (>= 6.1)
|
||||||
activesupport (>= 6.1)
|
activesupport (>= 6.1)
|
||||||
sprockets (>= 3.0.0)
|
sprockets (>= 3.0.0)
|
||||||
sqlite3 (2.9.0-aarch64-linux-gnu)
|
sqlite3 (2.9.3-aarch64-linux-gnu)
|
||||||
sqlite3 (2.9.0-aarch64-linux-musl)
|
sqlite3 (2.9.3-aarch64-linux-musl)
|
||||||
sqlite3 (2.9.0-arm-linux-gnu)
|
sqlite3 (2.9.3-arm-linux-gnu)
|
||||||
sqlite3 (2.9.0-arm-linux-musl)
|
sqlite3 (2.9.3-arm-linux-musl)
|
||||||
sqlite3 (2.9.0-arm64-darwin)
|
sqlite3 (2.9.3-arm64-darwin)
|
||||||
sqlite3 (2.9.0-x86_64-darwin)
|
sqlite3 (2.9.3-x86_64-darwin)
|
||||||
sqlite3 (2.9.0-x86_64-linux-gnu)
|
sqlite3 (2.9.3-x86_64-linux-gnu)
|
||||||
sqlite3 (2.9.0-x86_64-linux-musl)
|
sqlite3 (2.9.3-x86_64-linux-musl)
|
||||||
stringio (3.2.0)
|
stringio (3.2.0)
|
||||||
thor (1.5.0)
|
thor (1.5.0)
|
||||||
tilt (2.7.0)
|
tilt (2.7.0)
|
||||||
timeout (0.6.0)
|
timeout (0.6.1)
|
||||||
tsort (0.2.0)
|
tsort (0.2.0)
|
||||||
turbo-rails (2.0.23)
|
turbo-rails (2.0.23)
|
||||||
actionpack (>= 7.1.0)
|
actionpack (>= 7.1.0)
|
||||||
railties (>= 7.1.0)
|
railties (>= 7.1.0)
|
||||||
tzinfo (2.0.6)
|
tzinfo (2.0.6)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
|
uri (1.1.1)
|
||||||
useragent (0.16.11)
|
useragent (0.16.11)
|
||||||
warden (1.2.9)
|
warden (1.2.9)
|
||||||
rack (>= 2.0.9)
|
rack (>= 2.0.9)
|
||||||
web-console (4.2.1)
|
web-console (4.3.0)
|
||||||
actionview (>= 6.0.0)
|
actionview (>= 8.0.0)
|
||||||
activemodel (>= 6.0.0)
|
|
||||||
bindex (>= 0.4.0)
|
bindex (>= 0.4.0)
|
||||||
railties (>= 6.0.0)
|
railties (>= 8.0.0)
|
||||||
websocket (1.2.11)
|
websocket (1.2.11)
|
||||||
websocket-driver (0.8.0)
|
websocket-driver (0.8.0)
|
||||||
base64
|
base64
|
||||||
@@ -315,11 +313,10 @@ DEPENDENCIES
|
|||||||
capybara
|
capybara
|
||||||
devise
|
devise
|
||||||
importmap-rails
|
importmap-rails
|
||||||
minitest (< 6)
|
|
||||||
mysql2 (~> 0.5)
|
mysql2 (~> 0.5)
|
||||||
pg (~> 1.5)
|
pg (~> 1.5)
|
||||||
puma (~> 6.0)
|
puma (~> 6.0)
|
||||||
rails (~> 7.2.3)
|
rails (~> 8.0.5)
|
||||||
sassc-rails
|
sassc-rails
|
||||||
selenium-webdriver
|
selenium-webdriver
|
||||||
sprockets-rails
|
sprockets-rails
|
||||||
|
|||||||
@@ -89,14 +89,10 @@ Running
|
|||||||
|
|
||||||
### Standalone Rails server + Apache proxy
|
### Standalone Rails server + Apache proxy
|
||||||
|
|
||||||
Customize Puma config template:
|
Copy and customize Puma config template if required:
|
||||||
|
|
||||||
cp -a config/puma.rb.dist config/puma.rb
|
cp -a config/puma.rb.dist config/puma.rb
|
||||||
|
|
||||||
and specify server IP/port, either with `port` or `bind`, e.g.:
|
|
||||||
|
|
||||||
bind 'tcp://0.0.0.0:3000'
|
|
||||||
|
|
||||||
#### (option 1) Start server manually
|
#### (option 1) Start server manually
|
||||||
|
|
||||||
bundle exec rails s -e production
|
bundle exec rails s -e production
|
||||||
|
|||||||
2
bin/dev
Executable file
2
bin/dev
Executable file
@@ -0,0 +1,2 @@
|
|||||||
|
#!/usr/bin/env ruby
|
||||||
|
exec "./bin/rails", "server", *ARGV
|
||||||
11
bin/setup
11
bin/setup
@@ -1,11 +1,10 @@
|
|||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
require "fileutils"
|
require "fileutils"
|
||||||
|
|
||||||
# path to your application root.
|
|
||||||
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
|
||||||
@@ -14,7 +13,6 @@ FileUtils.chdir APP_ROOT do
|
|||||||
# Add necessary setup steps to this file.
|
# Add necessary setup steps to this file.
|
||||||
|
|
||||||
puts "== Installing dependencies =="
|
puts "== Installing dependencies =="
|
||||||
system! "gem install bundler --conservative"
|
|
||||||
system("bundle check") || system!("bundle install")
|
system("bundle check") || system!("bundle install")
|
||||||
|
|
||||||
# puts "\n== Copying sample files =="
|
# puts "\n== Copying sample files =="
|
||||||
@@ -28,6 +26,9 @@ FileUtils.chdir APP_ROOT do
|
|||||||
puts "\n== Removing old logs and tempfiles =="
|
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 =="
|
unless ARGV.include?("--skip-server")
|
||||||
system! "bin/rails restart"
|
puts "\n== Starting development server =="
|
||||||
|
STDOUT.flush # flush the output before exec(2) so that it displays
|
||||||
|
exec "bin/dev"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -21,11 +21,12 @@ Bundler.require(*Rails.groups)
|
|||||||
module FixinMe
|
module FixinMe
|
||||||
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 8.0
|
||||||
|
|
||||||
# Autoload lib/, required e.g. for core library extensions.
|
# Please, add to the `ignore` list any other `lib` subdirectories that do
|
||||||
# https://guides.rubyonrails.org/autoloading_and_reloading_constants.html#config-autoload-lib-ignore.
|
# not contain `.rb` files, or that should not be reloaded or eager loaded.
|
||||||
config.autoload_lib(ignore: %w(assets tasks))
|
# Common ones are `templates`, `generators`, or `middleware`, for example.
|
||||||
|
config.autoload_lib(ignore: %w[assets tasks])
|
||||||
|
|
||||||
# Configuration for the application, engines, and railties goes here.
|
# Configuration for the application, engines, and railties goes here.
|
||||||
#
|
#
|
||||||
@@ -40,14 +41,14 @@ module FixinMe
|
|||||||
|
|
||||||
# SETUP: Below settings need to be updated on a per-installation basis.
|
# SETUP: Below settings need to be updated on a per-installation basis.
|
||||||
#
|
#
|
||||||
# URL to use in sent e-mails.
|
# Set host to be used by links generated in mailer templates.
|
||||||
config.action_mailer.default_url_options = {host: 'localhost', :protocol => 'https'}
|
config.action_mailer.default_url_options = {host: 'localhost', :protocol => 'https'}
|
||||||
# https://guides.rubyonrails.org/configuring.html#config-action-mailer-delivery-method
|
# https://guides.rubyonrails.org/configuring.html#config-action-mailer-delivery-method
|
||||||
config.action_mailer.delivery_method = :sendmail
|
config.action_mailer.delivery_method = :sendmail
|
||||||
|
|
||||||
# List of hosts this app is available at.
|
# List of hosts this app is available at.
|
||||||
# https://guides.rubyonrails.org/configuring.html#actiondispatch-hostauthorization
|
# https://guides.rubyonrails.org/configuring.html#actiondispatch-hostauthorization
|
||||||
config.hosts += ['localhost', 'example.com', IPAddr.new('1.2.3.4/32')]
|
config.hosts += ['localhost', IPAddr.new('1.2.3.4/32'), 'example.com']
|
||||||
|
|
||||||
# Email address of admin account
|
# Email address of admin account
|
||||||
config.admin = 'admin@localhost'
|
config.admin = 'admin@localhost'
|
||||||
|
|||||||
@@ -3,10 +3,8 @@ 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 any time
|
# Make code changes take effect immediately without server restart.
|
||||||
# it changes. This slows down response time but is perfect for development
|
config.enable_reloading = true
|
||||||
# since you don't have to restart the web server when you make code changes.
|
|
||||||
config.cache_classes = false
|
|
||||||
|
|
||||||
# Do not eager load code on boot.
|
# Do not eager load code on boot.
|
||||||
config.eager_load = false
|
config.eager_load = false
|
||||||
@@ -14,54 +12,49 @@ Rails.application.configure do
|
|||||||
# Show full error reports.
|
# Show full error reports.
|
||||||
config.consider_all_requests_local = true
|
config.consider_all_requests_local = true
|
||||||
|
|
||||||
# Enable server timing
|
# Enable server timing.
|
||||||
config.server_timing = true
|
config.server_timing = true
|
||||||
|
|
||||||
# Enable/disable caching. By default caching is disabled.
|
# Enable/disable Action Controller caching. By default Action Controller caching is disabled.
|
||||||
# Run rails dev:cache to toggle caching.
|
# Run rails dev:cache to toggle Action Controller 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.perform_caching = true
|
||||||
config.action_controller.enable_fragment_cache_logging = true
|
config.action_controller.enable_fragment_cache_logging = true
|
||||||
|
config.public_file_server.headers = { "cache-control" => "public, max-age=#{2.days.to_i}" }
|
||||||
config.cache_store = :memory_store
|
|
||||||
config.public_file_server.headers = {
|
|
||||||
"Cache-Control" => "public, max-age=#{2.days.to_i}"
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
config.action_controller.perform_caching = false
|
config.action_controller.perform_caching = false
|
||||||
|
|
||||||
config.cache_store = :null_store
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Change to :null_store to avoid any caching.
|
||||||
|
config.cache_store = :memory_store
|
||||||
|
|
||||||
# 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
|
||||||
|
|
||||||
|
# Make template changes take effect immediately.
|
||||||
config.action_mailer.perform_caching = false
|
config.action_mailer.perform_caching = false
|
||||||
|
|
||||||
# Print deprecation notices to the Rails logger.
|
# Print deprecation notices to the Rails logger.
|
||||||
config.active_support.deprecation = :log
|
config.active_support.deprecation = :log
|
||||||
|
|
||||||
# Raise exceptions for disallowed deprecations.
|
|
||||||
config.active_support.disallowed_deprecation = :raise
|
|
||||||
|
|
||||||
# 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.
|
# 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
|
||||||
|
|
||||||
# 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
|
||||||
|
|
||||||
# Suppress logger output for asset requests.
|
# Append comments with runtime information tags to SQL queries in logs.
|
||||||
config.assets.quiet = true
|
config.active_record.query_log_tags_enabled = true
|
||||||
|
|
||||||
|
# Highlight code that enqueued background job in logs.
|
||||||
|
config.active_job.verbose_enqueue_logs = true
|
||||||
|
|
||||||
# Raises error for missing translations.
|
# Raises error for missing translations.
|
||||||
# config.i18n.raise_on_missing_translations = true
|
# config.i18n.raise_on_missing_translations = true
|
||||||
|
|
||||||
# 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
|
||||||
|
|
||||||
# Uncomment if you wish to allow Action Cable access from any origin.
|
# Raise error when a before_action's only/except options reference missing actions.
|
||||||
# config.action_cable.disable_request_forgery_protection = true
|
config.action_controller.raise_on_missing_callback_actions = true
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -4,78 +4,80 @@ 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 for better performance and memory savings (ignored by Rake tasks).
|
||||||
# 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 = true
|
config.eager_load = true
|
||||||
|
|
||||||
# Full error reports are disabled and caching is turned on.
|
# Full error reports are disabled.
|
||||||
config.consider_all_requests_local = false
|
config.consider_all_requests_local = false
|
||||||
|
|
||||||
|
# Turn on fragment caching in view templates.
|
||||||
config.action_controller.perform_caching = true
|
config.action_controller.perform_caching = true
|
||||||
|
|
||||||
# Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
|
# Cache assets for far-future expiry since they are all digest stamped.
|
||||||
# or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
|
config.public_file_server.headers = { "cache-control" => "public, max-age=#{1.year.to_i}" }
|
||||||
# config.require_master_key = true
|
|
||||||
|
|
||||||
# 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?
|
|
||||||
|
|
||||||
# Compress CSS using a preprocessor.
|
|
||||||
# config.assets.css_compressor = :sass
|
|
||||||
|
|
||||||
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
|
||||||
config.assets.compile = false
|
|
||||||
|
|
||||||
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
# 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.
|
# Assume all access to the app is happening through a SSL-terminating reverse proxy.
|
||||||
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache
|
config.assume_ssl = true
|
||||||
# config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX
|
|
||||||
|
|
||||||
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
||||||
# config.force_ssl = true
|
config.force_ssl = true
|
||||||
|
|
||||||
# Include generic and useful information about system operation, but avoid logging too much
|
# Skip http-to-https redirect for the default health check endpoint.
|
||||||
# information to avoid inadvertent exposure of personally identifiable information (PII).
|
# config.ssl_options = { redirect: { exclude: ->(request) { request.path == "/up" } } }
|
||||||
config.log_level = :info
|
|
||||||
|
|
||||||
# Prepend all log lines with the following tags.
|
# Log to STDOUT with the current request id as a default log tag.
|
||||||
config.log_tags = [ :request_id ]
|
config.log_tags = [ :request_id ]
|
||||||
|
config.logger = ActiveSupport::TaggedLogging.logger(STDOUT)
|
||||||
|
|
||||||
# Use a different cache store in production.
|
# Change to "debug" to log everything (including potentially personally-identifiable information!)
|
||||||
|
config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info")
|
||||||
|
|
||||||
|
# Prevent health checks from clogging up the logs.
|
||||||
|
config.silence_healthcheck_path = "/up"
|
||||||
|
|
||||||
|
# Don't log any deprecations.
|
||||||
|
config.active_support.report_deprecations = false
|
||||||
|
|
||||||
|
# Replace the default in-process memory cache store with a durable alternative.
|
||||||
# config.cache_store = :mem_cache_store
|
# config.cache_store = :mem_cache_store
|
||||||
|
|
||||||
config.action_mailer.perform_caching = false
|
# Replace the default in-process and non-durable queuing backend for Active Job.
|
||||||
|
# config.active_job.queue_adapter = :resque
|
||||||
|
|
||||||
# Ignore bad email addresses and do not raise email delivery errors.
|
# 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.
|
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
||||||
# config.action_mailer.raise_delivery_errors = false
|
# config.action_mailer.raise_delivery_errors = false
|
||||||
|
|
||||||
|
# Specify outgoing SMTP server. Remember to add smtp/* credentials via rails credentials:edit.
|
||||||
|
# config.action_mailer.smtp_settings = {
|
||||||
|
# user_name: Rails.application.credentials.dig(:smtp, :user_name),
|
||||||
|
# password: Rails.application.credentials.dig(:smtp, :password),
|
||||||
|
# address: "smtp.example.com",
|
||||||
|
# port: 587,
|
||||||
|
# authentication: :plain
|
||||||
|
# }
|
||||||
|
|
||||||
# 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
|
||||||
|
|
||||||
# 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")
|
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
|
# Only use :id for inspections in production.
|
||||||
|
config.active_record.attributes_for_inspect = [ :id ]
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
require "active_support/core_ext/integer/time"
|
|
||||||
|
|
||||||
# The test environment is used exclusively to run your application's
|
# The test environment is used exclusively to run your application's
|
||||||
# test suite. You never need to work with it otherwise. Remember that
|
# test suite. You never need to work with it otherwise. Remember that
|
||||||
# your test database is "scratch space" for the test suite and is wiped
|
# your test database is "scratch space" for the test suite and is wiped
|
||||||
@@ -8,54 +6,45 @@ 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.
|
||||||
config.public_file_server.enabled = true
|
config.public_file_server.headers = { "cache-control" => "public, max-age=3600" }
|
||||||
config.public_file_server.headers = {
|
|
||||||
"Cache-Control" => "public, max-age=#{1.hour.to_i}"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Hide full error reports.
|
# Behave as in `production`.
|
||||||
config.consider_all_requests_local = false
|
config.consider_all_requests_local = false
|
||||||
# Render exception templates instead of raising exceptions.
|
|
||||||
config.action_dispatch.show_exceptions = :all
|
|
||||||
|
|
||||||
# Disable caching.
|
|
||||||
config.action_controller.perform_caching = false
|
|
||||||
config.cache_store = :null_store
|
config.cache_store = :null_store
|
||||||
|
|
||||||
# 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
|
||||||
|
|
||||||
config.action_mailer.perform_caching = false
|
|
||||||
|
|
||||||
# Tell Action Mailer not to deliver emails to the real world.
|
# Tell Action Mailer not to deliver emails to the real world.
|
||||||
# The :test delivery method accumulates sent emails in the
|
# The :test delivery method accumulates sent emails in the
|
||||||
# ActionMailer::Base.deliveries array.
|
# ActionMailer::Base.deliveries array.
|
||||||
config.action_mailer.delivery_method = :test
|
config.action_mailer.delivery_method = :test
|
||||||
config.action_mailer.default_url_options = {host: '127.0.0.1', :protocol => 'http'}
|
|
||||||
|
# Set host to be used by links generated in mailer templates.
|
||||||
|
config.action_mailer.default_url_options = { host: 'localhost', protocol: 'http' }
|
||||||
|
|
||||||
# Print deprecation notices to the stderr.
|
# Print deprecation notices to the stderr.
|
||||||
config.active_support.deprecation = :stderr
|
config.active_support.deprecation = :stderr
|
||||||
|
|
||||||
# Raise exceptions for disallowed deprecations.
|
|
||||||
config.active_support.disallowed_deprecation = :raise
|
|
||||||
|
|
||||||
# Tell Active Support which deprecation messages to disallow.
|
|
||||||
config.active_support.disallowed_deprecation_warnings = []
|
|
||||||
|
|
||||||
# Raises error for missing translations.
|
# Raises error for missing translations.
|
||||||
config.i18n.raise_on_missing_translations = true
|
config.i18n.raise_on_missing_translations = true
|
||||||
|
|
||||||
# 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
|
||||||
|
|
||||||
config.log_level = :info
|
config.log_level = :info
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -5,8 +5,3 @@ Rails.application.config.assets.version = "1.0"
|
|||||||
|
|
||||||
# Add additional assets to the asset load path.
|
# Add additional assets to the asset load path.
|
||||||
# Rails.application.config.assets.paths << Emoji.images_path
|
# Rails.application.config.assets.paths << Emoji.images_path
|
||||||
|
|
||||||
# Precompile additional assets.
|
|
||||||
# application.js, application.css, and all non-JS/CSS in the app/assets
|
|
||||||
# folder are already added.
|
|
||||||
Rails.application.config.assets.precompile += %w( '*.svg' )
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn, :cvv, :cvc
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,43 +1,41 @@
|
|||||||
# Puma can serve each request in a thread from an internal thread pool.
|
# This configuration file will be evaluated by Puma. The top-level methods that
|
||||||
# The `threads` method setting takes two numbers: a minimum and maximum.
|
# are invoked here are part of Puma's configuration DSL. For more information
|
||||||
# Any libraries that use thread pools should be configured to match
|
# about methods provided by the DSL, see https://puma.io/puma/Puma/DSL.html.
|
||||||
# the maximum value specified for Puma. Default is set to 5 threads for minimum
|
|
||||||
# and maximum; this matches the default thread size of Active Record.
|
|
||||||
#
|
#
|
||||||
max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
|
# Puma starts a configurable number of processes (workers) and each process
|
||||||
min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count }
|
# serves each request in a thread from an internal thread pool.
|
||||||
threads min_threads_count, max_threads_count
|
|
||||||
|
|
||||||
# Specifies the `worker_timeout` threshold that Puma will use to wait before
|
|
||||||
# terminating a worker in development environments.
|
|
||||||
#
|
#
|
||||||
worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development"
|
# You can control the number of workers using ENV["WEB_CONCURRENCY"]. You
|
||||||
|
# should only set this value when you want to run 2 or more workers. The
|
||||||
|
# default is already 1.
|
||||||
|
#
|
||||||
|
# The ideal number of threads per worker depends both on how much time the
|
||||||
|
# application spends waiting for IO operations and on how much you wish to
|
||||||
|
# prioritize throughput over latency.
|
||||||
|
#
|
||||||
|
# As a rule of thumb, increasing the number of threads will increase how much
|
||||||
|
# traffic a given process can handle (throughput), but due to CRuby's
|
||||||
|
# Global VM Lock (GVL) it has diminishing returns and will degrade the
|
||||||
|
# response time (latency) of the application.
|
||||||
|
#
|
||||||
|
# The default is set to 3 threads as it's deemed a decent compromise between
|
||||||
|
# throughput and latency for the average Rails application.
|
||||||
|
#
|
||||||
|
# Any libraries that use a connection pool or another resource pool should
|
||||||
|
# be configured to provide at least as many connections as the number of
|
||||||
|
# threads. This includes Active Record's `pool` parameter in `database.yml`.
|
||||||
|
threads_count = ENV.fetch("RAILS_MAX_THREADS", 3)
|
||||||
|
threads threads_count, threads_count
|
||||||
|
|
||||||
# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
|
# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
|
||||||
#
|
port ENV.fetch("PORT", 3000), '127.0.0.1'
|
||||||
port ENV.fetch("PORT") { 3000 }
|
|
||||||
|
|
||||||
# Specifies the `environment` that Puma will run in.
|
|
||||||
#
|
|
||||||
environment ENV.fetch("RAILS_ENV") { "development" }
|
|
||||||
|
|
||||||
# Specifies the `pidfile` that Puma will use.
|
|
||||||
pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" }
|
|
||||||
|
|
||||||
# Specifies the number of `workers` to boot in clustered mode.
|
|
||||||
# Workers are forked web server processes. If using threads and workers together
|
|
||||||
# the concurrency of the application would be max `threads` * `workers`.
|
|
||||||
# Workers do not work on JRuby or Windows (both of which do not support
|
|
||||||
# processes).
|
|
||||||
#
|
|
||||||
# workers ENV.fetch("WEB_CONCURRENCY") { 2 }
|
|
||||||
|
|
||||||
# Use the `preload_app!` method when specifying a `workers` number.
|
|
||||||
# This directive tells Puma to first boot the application and load code
|
|
||||||
# before forking the application. This takes advantage of Copy On Write
|
|
||||||
# process behavior so workers use less memory.
|
|
||||||
#
|
|
||||||
# preload_app!
|
|
||||||
|
|
||||||
# Allow puma to be restarted by `bin/rails restart` command.
|
# Allow puma to be restarted by `bin/rails restart` command.
|
||||||
plugin :tmp_restart
|
plugin :tmp_restart
|
||||||
|
|
||||||
|
# Run the Solid Queue supervisor inside of Puma for single-server deployments
|
||||||
|
plugin :solid_queue if ENV["SOLID_QUEUE_IN_PUMA"]
|
||||||
|
|
||||||
|
# Specify the PID file. Defaults to tmp/pids/server.pid in development.
|
||||||
|
# In other environments, only set the PID file if requested.
|
||||||
|
pidfile ENV["PIDFILE"] if ENV["PIDFILE"]
|
||||||
|
|||||||
@@ -15,7 +15,10 @@ Rails.application.routes.draw do
|
|||||||
|
|
||||||
namespace :default do
|
namespace :default do
|
||||||
resources :units, only: [:index, :destroy] do
|
resources :units, only: [:index, :destroy] do
|
||||||
member { post :import, :export }
|
member {
|
||||||
|
post :import
|
||||||
|
post :export
|
||||||
|
}
|
||||||
#collection { post :import_all }
|
#collection { post :import_all }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
BIN
public/icon.png
Normal file
BIN
public/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.1 KiB |
3
public/icon.svg
Normal file
3
public/icon.svg
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<svg width="512" height="512" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<circle cx="256" cy="256" r="256" fill="red"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 122 B |
Reference in New Issue
Block a user