Compare commits
No commits in common. "057929874dcdbcd71b6f49bbc9b58159e8debd07" and "482ab7c8779cf984570615ed16c94f309ee87f1f" have entirely different histories.
057929874d
...
482ab7c877
22 changed files with 244 additions and 397 deletions
|
@ -1,5 +0,0 @@
|
||||||
# Omakase Ruby styling for Rails
|
|
||||||
inherit_gem:
|
|
||||||
rubocop-rails-omakase: rubocop.yml
|
|
||||||
|
|
||||||
# Your own specialized rules go here
|
|
40
Dockerfile
40
Dockerfile
|
@ -1,36 +1,25 @@
|
||||||
# syntax = docker/dockerfile:1
|
# syntax = docker/dockerfile:1
|
||||||
|
|
||||||
# This Dockerfile is designed for production, not development. Use with Kamal or build'n'run by hand:
|
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile
|
||||||
# docker build -t my-app .
|
ARG RUBY_VERSION=3.2.2
|
||||||
# docker run -d -p 80:80 -p 443:443 --name my-app -e RAILS_MASTER_KEY=<value from config/master.key> my-app
|
FROM registry.docker.com/library/ruby:$RUBY_VERSION-slim as base
|
||||||
|
|
||||||
# For a containerized dev environment, see Dev Containers: https://guides.rubyonrails.org/getting_started_with_devcontainer.html
|
|
||||||
|
|
||||||
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version
|
|
||||||
ARG RUBY_VERSION=3.3.1
|
|
||||||
FROM docker.io/library/ruby:$RUBY_VERSION-slim AS base
|
|
||||||
|
|
||||||
# Rails app lives here
|
# Rails app lives here
|
||||||
WORKDIR /rails
|
WORKDIR /rails
|
||||||
|
|
||||||
# Install base packages
|
|
||||||
RUN apt-get update -qq && \
|
|
||||||
apt-get install --no-install-recommends -y curl libjemalloc2 libsqlite3-0 libvips && \
|
|
||||||
rm -rf /var/lib/apt/lists /var/cache/apt/archives
|
|
||||||
|
|
||||||
# Set production environment
|
# Set production environment
|
||||||
ENV RAILS_ENV="production" \
|
ENV RAILS_ENV="production" \
|
||||||
BUNDLE_DEPLOYMENT="1" \
|
BUNDLE_DEPLOYMENT="1" \
|
||||||
BUNDLE_PATH="/usr/local/bundle" \
|
BUNDLE_PATH="/usr/local/bundle" \
|
||||||
BUNDLE_WITHOUT="development"
|
BUNDLE_WITHOUT="development"
|
||||||
|
|
||||||
|
|
||||||
# Throw-away build stage to reduce size of final image
|
# Throw-away build stage to reduce size of final image
|
||||||
FROM base AS build
|
FROM base as build
|
||||||
|
|
||||||
# Install packages needed to build gems
|
# Install packages needed to build gems
|
||||||
RUN apt-get update -qq && \
|
RUN apt-get update -qq && \
|
||||||
apt-get install --no-install-recommends -y build-essential git pkg-config && \
|
apt-get install --no-install-recommends -y build-essential git libvips pkg-config
|
||||||
rm -rf /var/lib/apt/lists /var/cache/apt/archives
|
|
||||||
|
|
||||||
# Install application gems
|
# Install application gems
|
||||||
COPY Gemfile Gemfile.lock ./
|
COPY Gemfile Gemfile.lock ./
|
||||||
|
@ -38,6 +27,7 @@ RUN bundle install && \
|
||||||
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \
|
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \
|
||||||
bundle exec bootsnap precompile --gemfile
|
bundle exec bootsnap precompile --gemfile
|
||||||
|
|
||||||
|
|
||||||
# Copy application code
|
# Copy application code
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
@ -48,20 +38,24 @@ RUN bundle exec bootsnap precompile app/ lib/
|
||||||
RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile
|
RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Final stage for app image
|
# Final stage for app image
|
||||||
FROM base
|
FROM base
|
||||||
|
|
||||||
|
# Install packages needed for deployment
|
||||||
|
RUN apt-get update -qq && \
|
||||||
|
apt-get install --no-install-recommends -y curl libsqlite3-0 libvips libjemalloc2 && \
|
||||||
|
rm -rf /var/lib/apt/lists /var/cache/apt/archives
|
||||||
|
|
||||||
# Copy built artifacts: gems, application
|
# Copy built artifacts: gems, application
|
||||||
COPY --from=build "${BUNDLE_PATH}" "${BUNDLE_PATH}"
|
COPY --from=build /usr/local/bundle /usr/local/bundle
|
||||||
COPY --from=build /rails /rails
|
COPY --from=build /rails /rails
|
||||||
|
|
||||||
# Run and own only the runtime files as a non-root user for security
|
# Run and own only the runtime files as a non-root user for security
|
||||||
RUN groupadd --system --gid 1000 rails && \
|
RUN useradd rails --create-home --shell /bin/bash && \
|
||||||
useradd rails --uid 1000 --gid 1000 --create-home --shell /bin/bash && \
|
|
||||||
chown -R rails:rails db log storage tmp
|
chown -R rails:rails db log storage tmp
|
||||||
USER 1000:1000
|
USER rails:rails
|
||||||
|
|
||||||
|
ENV LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2
|
||||||
|
|
||||||
# Entrypoint prepares the database.
|
# Entrypoint prepares the database.
|
||||||
ENTRYPOINT ["/rails/bin/docker-entrypoint"]
|
ENTRYPOINT ["/rails/bin/docker-entrypoint"]
|
||||||
|
|
45
Gemfile
45
Gemfile
|
@ -1,61 +1,32 @@
|
||||||
source "https://rubygems.org"
|
source "https://rubygems.org"
|
||||||
|
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
||||||
|
|
||||||
gem "rails", github: "rails/rails", branch: "main"
|
gem "rails", "7.1.3.2"
|
||||||
# The modern asset pipeline for Rails [https://github.com/rails/propshaft]
|
gem "sprockets-rails"
|
||||||
gem "propshaft"
|
gem "sqlite3", "< 2"
|
||||||
# Use sqlite3 as the database for Active Record
|
gem "puma"
|
||||||
gem "sqlite3", ">= 1.4"
|
|
||||||
# Use the Puma web server [https://github.com/puma/puma]
|
|
||||||
gem "puma", ">= 5.0"
|
|
||||||
# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
|
|
||||||
gem "importmap-rails"
|
gem "importmap-rails"
|
||||||
# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
|
|
||||||
gem "turbo-rails"
|
gem "turbo-rails"
|
||||||
# Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev]
|
|
||||||
gem "stimulus-rails"
|
gem "stimulus-rails"
|
||||||
# Build JSON APIs with ease [https://github.com/rails/jbuilder]
|
|
||||||
gem "jbuilder"
|
gem "jbuilder"
|
||||||
# Use Redis adapter to run Action Cable in production
|
|
||||||
# gem "redis", ">= 4.0.1"
|
|
||||||
|
|
||||||
# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
|
|
||||||
# gem "kredis"
|
|
||||||
|
|
||||||
# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
|
|
||||||
# gem "bcrypt", "~> 3.1.7"
|
|
||||||
|
|
||||||
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
|
||||||
gem "tzinfo-data", platforms: %i[ windows jruby ]
|
|
||||||
|
|
||||||
# Reduces boot times through caching; required in config/boot.rb
|
|
||||||
gem "bootsnap", require: false
|
gem "bootsnap", require: false
|
||||||
|
|
||||||
# Deploy this application anywhere as a Docker container [https://kamal-deploy.org]
|
|
||||||
# gem "kamal", require: false
|
|
||||||
|
|
||||||
# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
|
|
||||||
# gem "image_processing", "~> 1.2"
|
# gem "image_processing", "~> 1.2"
|
||||||
|
|
||||||
group :development, :test do
|
group :development, :test do
|
||||||
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
|
gem "debug", platforms: %i[mri mingw x64_mingw]
|
||||||
gem "debug", platforms: %i[ mri windows ], require: "debug/prelude"
|
|
||||||
|
|
||||||
# Static analysis for security vulnerabilities [https://brakemanscanner.org/]
|
|
||||||
gem "brakeman", require: false
|
|
||||||
|
|
||||||
# Omakase Ruby styling [https://github.com/rails/rubocop-rails-omakase/]
|
|
||||||
gem "rubocop-rails-omakase", require: false
|
|
||||||
end
|
end
|
||||||
|
|
||||||
group :development do
|
group :development do
|
||||||
# Use console on exceptions pages [https://github.com/rails/web-console]
|
gem "standard"
|
||||||
gem "web-console"
|
gem "web-console"
|
||||||
end
|
end
|
||||||
|
|
||||||
group :test do
|
group :test do
|
||||||
# Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
|
|
||||||
gem "capybara"
|
gem "capybara"
|
||||||
gem "selenium-webdriver"
|
gem "selenium-webdriver"
|
||||||
|
gem "webdrivers"
|
||||||
end
|
end
|
||||||
|
|
||||||
gem "tailwindcss-rails", "~> 2.0"
|
gem "tailwindcss-rails", "~> 2.0"
|
||||||
|
|
291
Gemfile.lock
291
Gemfile.lock
|
@ -1,31 +1,35 @@
|
||||||
GIT
|
GEM
|
||||||
remote: https://github.com/rails/rails.git
|
remote: https://rubygems.org/
|
||||||
revision: 5bec50bc70380bb1e70e8fb0a1654130042b1f16
|
|
||||||
branch: main
|
|
||||||
specs:
|
specs:
|
||||||
actioncable (8.0.0.alpha)
|
actioncable (7.1.3.2)
|
||||||
actionpack (= 8.0.0.alpha)
|
actionpack (= 7.1.3.2)
|
||||||
activesupport (= 8.0.0.alpha)
|
activesupport (= 7.1.3.2)
|
||||||
nio4r (~> 2.0)
|
nio4r (~> 2.0)
|
||||||
websocket-driver (>= 0.6.1)
|
websocket-driver (>= 0.6.1)
|
||||||
zeitwerk (~> 2.6)
|
zeitwerk (~> 2.6)
|
||||||
actionmailbox (8.0.0.alpha)
|
actionmailbox (7.1.3.2)
|
||||||
actionpack (= 8.0.0.alpha)
|
actionpack (= 7.1.3.2)
|
||||||
activejob (= 8.0.0.alpha)
|
activejob (= 7.1.3.2)
|
||||||
activerecord (= 8.0.0.alpha)
|
activerecord (= 7.1.3.2)
|
||||||
activestorage (= 8.0.0.alpha)
|
activestorage (= 7.1.3.2)
|
||||||
activesupport (= 8.0.0.alpha)
|
activesupport (= 7.1.3.2)
|
||||||
mail (>= 2.8.0)
|
mail (>= 2.7.1)
|
||||||
actionmailer (8.0.0.alpha)
|
net-imap
|
||||||
actionpack (= 8.0.0.alpha)
|
net-pop
|
||||||
actionview (= 8.0.0.alpha)
|
net-smtp
|
||||||
activejob (= 8.0.0.alpha)
|
actionmailer (7.1.3.2)
|
||||||
activesupport (= 8.0.0.alpha)
|
actionpack (= 7.1.3.2)
|
||||||
mail (>= 2.8.0)
|
actionview (= 7.1.3.2)
|
||||||
|
activejob (= 7.1.3.2)
|
||||||
|
activesupport (= 7.1.3.2)
|
||||||
|
mail (~> 2.5, >= 2.5.4)
|
||||||
|
net-imap
|
||||||
|
net-pop
|
||||||
|
net-smtp
|
||||||
rails-dom-testing (~> 2.2)
|
rails-dom-testing (~> 2.2)
|
||||||
actionpack (8.0.0.alpha)
|
actionpack (7.1.3.2)
|
||||||
actionview (= 8.0.0.alpha)
|
actionview (= 7.1.3.2)
|
||||||
activesupport (= 8.0.0.alpha)
|
activesupport (= 7.1.3.2)
|
||||||
nokogiri (>= 1.8.5)
|
nokogiri (>= 1.8.5)
|
||||||
racc
|
racc
|
||||||
rack (>= 2.2.4)
|
rack (>= 2.2.4)
|
||||||
|
@ -33,82 +37,53 @@ GIT
|
||||||
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)
|
actiontext (7.1.3.2)
|
||||||
actiontext (8.0.0.alpha)
|
actionpack (= 7.1.3.2)
|
||||||
actionpack (= 8.0.0.alpha)
|
activerecord (= 7.1.3.2)
|
||||||
activerecord (= 8.0.0.alpha)
|
activestorage (= 7.1.3.2)
|
||||||
activestorage (= 8.0.0.alpha)
|
activesupport (= 7.1.3.2)
|
||||||
activesupport (= 8.0.0.alpha)
|
|
||||||
globalid (>= 0.6.0)
|
globalid (>= 0.6.0)
|
||||||
nokogiri (>= 1.8.5)
|
nokogiri (>= 1.8.5)
|
||||||
actionview (8.0.0.alpha)
|
actionview (7.1.3.2)
|
||||||
activesupport (= 8.0.0.alpha)
|
activesupport (= 7.1.3.2)
|
||||||
builder (~> 3.1)
|
builder (~> 3.1)
|
||||||
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 (8.0.0.alpha)
|
activejob (7.1.3.2)
|
||||||
activesupport (= 8.0.0.alpha)
|
activesupport (= 7.1.3.2)
|
||||||
globalid (>= 0.3.6)
|
globalid (>= 0.3.6)
|
||||||
activemodel (8.0.0.alpha)
|
activemodel (7.1.3.2)
|
||||||
activesupport (= 8.0.0.alpha)
|
activesupport (= 7.1.3.2)
|
||||||
activerecord (8.0.0.alpha)
|
activerecord (7.1.3.2)
|
||||||
activemodel (= 8.0.0.alpha)
|
activemodel (= 7.1.3.2)
|
||||||
activesupport (= 8.0.0.alpha)
|
activesupport (= 7.1.3.2)
|
||||||
timeout (>= 0.4.0)
|
timeout (>= 0.4.0)
|
||||||
activestorage (8.0.0.alpha)
|
activestorage (7.1.3.2)
|
||||||
actionpack (= 8.0.0.alpha)
|
actionpack (= 7.1.3.2)
|
||||||
activejob (= 8.0.0.alpha)
|
activejob (= 7.1.3.2)
|
||||||
activerecord (= 8.0.0.alpha)
|
activerecord (= 7.1.3.2)
|
||||||
activesupport (= 8.0.0.alpha)
|
activesupport (= 7.1.3.2)
|
||||||
marcel (~> 1.0)
|
marcel (~> 1.0)
|
||||||
activesupport (8.0.0.alpha)
|
activesupport (7.1.3.2)
|
||||||
base64
|
base64
|
||||||
bigdecimal
|
bigdecimal
|
||||||
concurrent-ruby (~> 1.0, >= 1.3.1)
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||||
connection_pool (>= 2.2.5)
|
connection_pool (>= 2.2.5)
|
||||||
drb
|
drb
|
||||||
i18n (>= 1.6, < 2)
|
i18n (>= 1.6, < 2)
|
||||||
logger
|
|
||||||
minitest (>= 5.1)
|
minitest (>= 5.1)
|
||||||
tzinfo (~> 2.0, >= 2.0.5)
|
mutex_m
|
||||||
rails (8.0.0.alpha)
|
tzinfo (~> 2.0)
|
||||||
actioncable (= 8.0.0.alpha)
|
addressable (2.8.6)
|
||||||
actionmailbox (= 8.0.0.alpha)
|
public_suffix (>= 2.0.2, < 6.0)
|
||||||
actionmailer (= 8.0.0.alpha)
|
|
||||||
actionpack (= 8.0.0.alpha)
|
|
||||||
actiontext (= 8.0.0.alpha)
|
|
||||||
actionview (= 8.0.0.alpha)
|
|
||||||
activejob (= 8.0.0.alpha)
|
|
||||||
activemodel (= 8.0.0.alpha)
|
|
||||||
activerecord (= 8.0.0.alpha)
|
|
||||||
activestorage (= 8.0.0.alpha)
|
|
||||||
activesupport (= 8.0.0.alpha)
|
|
||||||
bundler (>= 1.15.0)
|
|
||||||
railties (= 8.0.0.alpha)
|
|
||||||
railties (8.0.0.alpha)
|
|
||||||
actionpack (= 8.0.0.alpha)
|
|
||||||
activesupport (= 8.0.0.alpha)
|
|
||||||
irb (~> 1.13)
|
|
||||||
rackup (>= 1.0.0)
|
|
||||||
rake (>= 12.2)
|
|
||||||
thor (~> 1.0, >= 1.2.2)
|
|
||||||
zeitwerk (~> 2.6)
|
|
||||||
|
|
||||||
GEM
|
|
||||||
remote: https://rubygems.org/
|
|
||||||
specs:
|
|
||||||
addressable (2.8.7)
|
|
||||||
public_suffix (>= 2.0.2, < 7.0)
|
|
||||||
ast (2.4.2)
|
ast (2.4.2)
|
||||||
base64 (0.2.0)
|
base64 (0.2.0)
|
||||||
bigdecimal (3.1.8)
|
bigdecimal (3.1.7)
|
||||||
bindex (0.8.1)
|
bindex (0.8.1)
|
||||||
bootsnap (1.18.3)
|
bootsnap (1.18.3)
|
||||||
msgpack (~> 1.2)
|
msgpack (~> 1.2)
|
||||||
brakeman (6.1.2)
|
builder (3.2.4)
|
||||||
racc
|
|
||||||
builder (3.3.0)
|
|
||||||
capybara (3.40.0)
|
capybara (3.40.0)
|
||||||
addressable
|
addressable
|
||||||
matrix
|
matrix
|
||||||
|
@ -118,7 +93,7 @@ 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)
|
||||||
concurrent-ruby (1.3.3)
|
concurrent-ruby (1.2.3)
|
||||||
connection_pool (2.4.1)
|
connection_pool (2.4.1)
|
||||||
crass (1.0.6)
|
crass (1.0.6)
|
||||||
date (3.3.4)
|
date (3.3.4)
|
||||||
|
@ -126,25 +101,25 @@ GEM
|
||||||
irb (~> 1.10)
|
irb (~> 1.10)
|
||||||
reline (>= 0.3.8)
|
reline (>= 0.3.8)
|
||||||
drb (2.2.1)
|
drb (2.2.1)
|
||||||
erubi (1.13.0)
|
erubi (1.12.0)
|
||||||
globalid (1.2.1)
|
globalid (1.2.1)
|
||||||
activesupport (>= 6.1)
|
activesupport (>= 6.1)
|
||||||
i18n (1.14.5)
|
i18n (1.14.4)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
importmap-rails (2.0.1)
|
importmap-rails (2.0.1)
|
||||||
actionpack (>= 6.0.0)
|
actionpack (>= 6.0.0)
|
||||||
activesupport (>= 6.0.0)
|
activesupport (>= 6.0.0)
|
||||||
railties (>= 6.0.0)
|
railties (>= 6.0.0)
|
||||||
io-console (0.7.2)
|
io-console (0.7.2)
|
||||||
irb (1.13.2)
|
irb (1.12.0)
|
||||||
rdoc (>= 4.0.0)
|
rdoc
|
||||||
reline (>= 0.4.2)
|
reline (>= 0.4.2)
|
||||||
jbuilder (2.12.0)
|
jbuilder (2.11.5)
|
||||||
actionview (>= 5.0.0)
|
actionview (>= 5.0.0)
|
||||||
activesupport (>= 5.0.0)
|
activesupport (>= 5.0.0)
|
||||||
json (2.7.2)
|
json (2.7.2)
|
||||||
language_server-protocol (3.17.0.3)
|
language_server-protocol (3.17.0.3)
|
||||||
logger (1.6.0)
|
lint_roller (1.1.0)
|
||||||
loofah (2.22.0)
|
loofah (2.22.0)
|
||||||
crass (~> 1.0.2)
|
crass (~> 1.0.2)
|
||||||
nokogiri (>= 1.12.0)
|
nokogiri (>= 1.12.0)
|
||||||
|
@ -156,9 +131,10 @@ GEM
|
||||||
marcel (1.0.4)
|
marcel (1.0.4)
|
||||||
matrix (0.4.2)
|
matrix (0.4.2)
|
||||||
mini_mime (1.1.5)
|
mini_mime (1.1.5)
|
||||||
minitest (5.24.0)
|
minitest (5.22.3)
|
||||||
msgpack (1.7.2)
|
msgpack (1.7.2)
|
||||||
net-imap (0.4.13)
|
mutex_m (0.2.0)
|
||||||
|
net-imap (0.4.10)
|
||||||
date
|
date
|
||||||
net-protocol
|
net-protocol
|
||||||
net-pop (0.1.2)
|
net-pop (0.1.2)
|
||||||
|
@ -167,29 +143,22 @@ GEM
|
||||||
timeout
|
timeout
|
||||||
net-smtp (0.5.0)
|
net-smtp (0.5.0)
|
||||||
net-protocol
|
net-protocol
|
||||||
nio4r (2.7.3)
|
nio4r (2.7.1)
|
||||||
nokogiri (1.16.6-aarch64-linux)
|
nokogiri (1.16.4-arm64-darwin)
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
nokogiri (1.16.6-arm64-darwin)
|
nokogiri (1.16.4-x86_64-linux)
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
nokogiri (1.16.6-x86_64-linux)
|
parallel (1.24.0)
|
||||||
racc (~> 1.4)
|
parser (3.3.0.5)
|
||||||
parallel (1.25.1)
|
|
||||||
parser (3.3.3.0)
|
|
||||||
ast (~> 2.4.1)
|
ast (~> 2.4.1)
|
||||||
racc
|
racc
|
||||||
propshaft (0.9.0)
|
|
||||||
actionpack (>= 7.0.0)
|
|
||||||
activesupport (>= 7.0.0)
|
|
||||||
rack
|
|
||||||
railties (>= 7.0.0)
|
|
||||||
psych (5.1.2)
|
psych (5.1.2)
|
||||||
stringio
|
stringio
|
||||||
public_suffix (6.0.0)
|
public_suffix (5.0.5)
|
||||||
puma (6.4.2)
|
puma (6.4.2)
|
||||||
nio4r (~> 2.0)
|
nio4r (~> 2.0)
|
||||||
racc (1.8.0)
|
racc (1.7.3)
|
||||||
rack (3.1.3)
|
rack (3.0.10)
|
||||||
rack-session (2.0.0)
|
rack-session (2.0.0)
|
||||||
rack (>= 3.0.0)
|
rack (>= 3.0.0)
|
||||||
rack-test (2.1.0)
|
rack-test (2.1.0)
|
||||||
|
@ -197,6 +166,20 @@ GEM
|
||||||
rackup (2.1.0)
|
rackup (2.1.0)
|
||||||
rack (>= 3)
|
rack (>= 3)
|
||||||
webrick (~> 1.8)
|
webrick (~> 1.8)
|
||||||
|
rails (7.1.3.2)
|
||||||
|
actioncable (= 7.1.3.2)
|
||||||
|
actionmailbox (= 7.1.3.2)
|
||||||
|
actionmailer (= 7.1.3.2)
|
||||||
|
actionpack (= 7.1.3.2)
|
||||||
|
actiontext (= 7.1.3.2)
|
||||||
|
actionview (= 7.1.3.2)
|
||||||
|
activejob (= 7.1.3.2)
|
||||||
|
activemodel (= 7.1.3.2)
|
||||||
|
activerecord (= 7.1.3.2)
|
||||||
|
activestorage (= 7.1.3.2)
|
||||||
|
activesupport (= 7.1.3.2)
|
||||||
|
bundler (>= 1.15.0)
|
||||||
|
railties (= 7.1.3.2)
|
||||||
rails-dom-testing (2.2.0)
|
rails-dom-testing (2.2.0)
|
||||||
activesupport (>= 5.0.0)
|
activesupport (>= 5.0.0)
|
||||||
minitest
|
minitest
|
||||||
|
@ -204,16 +187,23 @@ 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)
|
||||||
|
railties (7.1.3.2)
|
||||||
|
actionpack (= 7.1.3.2)
|
||||||
|
activesupport (= 7.1.3.2)
|
||||||
|
irb
|
||||||
|
rackup (>= 1.0.0)
|
||||||
|
rake (>= 12.2)
|
||||||
|
thor (~> 1.0, >= 1.2.2)
|
||||||
|
zeitwerk (~> 2.6)
|
||||||
rainbow (3.1.1)
|
rainbow (3.1.1)
|
||||||
rake (13.2.1)
|
rake (13.2.1)
|
||||||
rdoc (6.7.0)
|
rdoc (6.6.3.1)
|
||||||
psych (>= 4.0.0)
|
psych (>= 4.0.0)
|
||||||
regexp_parser (2.9.2)
|
regexp_parser (2.9.0)
|
||||||
reline (0.5.9)
|
reline (0.5.2)
|
||||||
io-console (~> 0.5)
|
io-console (~> 0.5)
|
||||||
rexml (3.3.0)
|
rexml (3.2.6)
|
||||||
strscan
|
rubocop (1.62.1)
|
||||||
rubocop (1.64.1)
|
|
||||||
json (~> 2.3)
|
json (~> 2.3)
|
||||||
language_server-protocol (>= 3.17.0)
|
language_server-protocol (>= 3.17.0)
|
||||||
parallel (~> 1.10)
|
parallel (~> 1.10)
|
||||||
|
@ -224,45 +214,45 @@ GEM
|
||||||
rubocop-ast (>= 1.31.1, < 2.0)
|
rubocop-ast (>= 1.31.1, < 2.0)
|
||||||
ruby-progressbar (~> 1.7)
|
ruby-progressbar (~> 1.7)
|
||||||
unicode-display_width (>= 2.4.0, < 3.0)
|
unicode-display_width (>= 2.4.0, < 3.0)
|
||||||
rubocop-ast (1.31.3)
|
rubocop-ast (1.31.2)
|
||||||
parser (>= 3.3.1.0)
|
parser (>= 3.3.0.4)
|
||||||
rubocop-minitest (0.35.0)
|
rubocop-performance (1.20.2)
|
||||||
rubocop (>= 1.61, < 2.0)
|
|
||||||
rubocop-ast (>= 1.31.1, < 2.0)
|
|
||||||
rubocop-performance (1.21.1)
|
|
||||||
rubocop (>= 1.48.1, < 2.0)
|
rubocop (>= 1.48.1, < 2.0)
|
||||||
rubocop-ast (>= 1.31.1, < 2.0)
|
rubocop-ast (>= 1.30.0, < 2.0)
|
||||||
rubocop-rails (2.25.0)
|
|
||||||
activesupport (>= 4.2.0)
|
|
||||||
rack (>= 1.1)
|
|
||||||
rubocop (>= 1.33.0, < 2.0)
|
|
||||||
rubocop-ast (>= 1.31.1, < 2.0)
|
|
||||||
rubocop-rails-omakase (1.0.0)
|
|
||||||
rubocop
|
|
||||||
rubocop-minitest
|
|
||||||
rubocop-performance
|
|
||||||
rubocop-rails
|
|
||||||
ruby-progressbar (1.13.0)
|
ruby-progressbar (1.13.0)
|
||||||
rubyzip (2.3.2)
|
rubyzip (2.3.2)
|
||||||
selenium-webdriver (4.22.0)
|
selenium-webdriver (4.10.0)
|
||||||
base64 (~> 0.2)
|
|
||||||
logger (~> 1.4)
|
|
||||||
rexml (~> 3.2, >= 3.2.5)
|
rexml (~> 3.2, >= 3.2.5)
|
||||||
rubyzip (>= 1.2.2, < 3.0)
|
rubyzip (>= 1.2.2, < 3.0)
|
||||||
websocket (~> 1.0)
|
websocket (~> 1.0)
|
||||||
sqlite3 (2.0.2-aarch64-linux-gnu)
|
sprockets (4.2.1)
|
||||||
sqlite3 (2.0.2-arm64-darwin)
|
concurrent-ruby (~> 1.0)
|
||||||
sqlite3 (2.0.2-x86_64-linux-gnu)
|
rack (>= 2.2.4, < 4)
|
||||||
|
sprockets-rails (3.4.2)
|
||||||
|
actionpack (>= 5.2)
|
||||||
|
activesupport (>= 5.2)
|
||||||
|
sprockets (>= 3.0.0)
|
||||||
|
sqlite3 (1.7.3-arm64-darwin)
|
||||||
|
sqlite3 (1.7.3-x86_64-linux)
|
||||||
|
standard (1.35.1)
|
||||||
|
language_server-protocol (~> 3.17.0.2)
|
||||||
|
lint_roller (~> 1.0)
|
||||||
|
rubocop (~> 1.62.0)
|
||||||
|
standard-custom (~> 1.0.0)
|
||||||
|
standard-performance (~> 1.3)
|
||||||
|
standard-custom (1.0.2)
|
||||||
|
lint_roller (~> 1.0)
|
||||||
|
rubocop (~> 1.50)
|
||||||
|
standard-performance (1.3.1)
|
||||||
|
lint_roller (~> 1.1)
|
||||||
|
rubocop-performance (~> 1.20.2)
|
||||||
stimulus-rails (1.3.3)
|
stimulus-rails (1.3.3)
|
||||||
railties (>= 6.0.0)
|
railties (>= 6.0.0)
|
||||||
stringio (3.1.1)
|
stringio (3.1.0)
|
||||||
strscan (3.1.0)
|
tailwindcss-rails (2.4.0-arm64-darwin)
|
||||||
tailwindcss-rails (2.6.1-aarch64-linux)
|
railties (>= 6.0.0)
|
||||||
railties (>= 7.0.0)
|
tailwindcss-rails (2.4.0-x86_64-linux)
|
||||||
tailwindcss-rails (2.6.1-arm64-darwin)
|
railties (>= 6.0.0)
|
||||||
railties (>= 7.0.0)
|
|
||||||
tailwindcss-rails (2.6.1-x86_64-linux)
|
|
||||||
railties (>= 7.0.0)
|
|
||||||
thor (1.3.1)
|
thor (1.3.1)
|
||||||
timeout (0.4.1)
|
timeout (0.4.1)
|
||||||
turbo-rails (2.0.5)
|
turbo-rails (2.0.5)
|
||||||
|
@ -272,12 +262,15 @@ GEM
|
||||||
tzinfo (2.0.6)
|
tzinfo (2.0.6)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
unicode-display_width (2.5.0)
|
unicode-display_width (2.5.0)
|
||||||
useragent (0.16.10)
|
|
||||||
web-console (4.2.1)
|
web-console (4.2.1)
|
||||||
actionview (>= 6.0.0)
|
actionview (>= 6.0.0)
|
||||||
activemodel (>= 6.0.0)
|
activemodel (>= 6.0.0)
|
||||||
bindex (>= 0.4.0)
|
bindex (>= 0.4.0)
|
||||||
railties (>= 6.0.0)
|
railties (>= 6.0.0)
|
||||||
|
webdrivers (5.3.1)
|
||||||
|
nokogiri (~> 1.6)
|
||||||
|
rubyzip (>= 1.3.0)
|
||||||
|
selenium-webdriver (~> 4.0, < 4.11)
|
||||||
webrick (1.8.1)
|
webrick (1.8.1)
|
||||||
websocket (1.2.10)
|
websocket (1.2.10)
|
||||||
websocket-driver (0.7.6)
|
websocket-driver (0.7.6)
|
||||||
|
@ -285,31 +278,29 @@ GEM
|
||||||
websocket-extensions (0.1.5)
|
websocket-extensions (0.1.5)
|
||||||
xpath (3.2.0)
|
xpath (3.2.0)
|
||||||
nokogiri (~> 1.8)
|
nokogiri (~> 1.8)
|
||||||
zeitwerk (2.6.16)
|
zeitwerk (2.6.13)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
aarch64-linux
|
|
||||||
arm64-darwin-23
|
arm64-darwin-23
|
||||||
x86_64-linux
|
x86_64-linux
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
bootsnap
|
bootsnap
|
||||||
brakeman
|
|
||||||
capybara
|
capybara
|
||||||
debug
|
debug
|
||||||
importmap-rails
|
importmap-rails
|
||||||
jbuilder
|
jbuilder
|
||||||
propshaft
|
puma
|
||||||
puma (>= 5.0)
|
rails (= 7.1.3.2)
|
||||||
rails!
|
|
||||||
rubocop-rails-omakase
|
|
||||||
selenium-webdriver
|
selenium-webdriver
|
||||||
sqlite3 (>= 1.4)
|
sprockets-rails
|
||||||
|
sqlite3 (< 2)
|
||||||
|
standard
|
||||||
stimulus-rails
|
stimulus-rails
|
||||||
tailwindcss-rails (~> 2.0)
|
tailwindcss-rails (~> 2.0)
|
||||||
turbo-rails
|
turbo-rails
|
||||||
tzinfo-data
|
|
||||||
web-console
|
web-console
|
||||||
|
webdrivers
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
2.5.9
|
2.5.9
|
||||||
|
|
5
app/assets/config/manifest.js
Normal file
5
app/assets/config/manifest.js
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
//= link_tree ../images
|
||||||
|
//= link_directory ../stylesheets .css
|
||||||
|
//= link_tree ../../javascript .js
|
||||||
|
//= link_tree ../../../vendor/javascript .js
|
||||||
|
//= link_tree ../builds
|
|
@ -1,7 +0,0 @@
|
||||||
#!/usr/bin/env ruby
|
|
||||||
require "rubygems"
|
|
||||||
require "bundler/setup"
|
|
||||||
|
|
||||||
ARGV.unshift("--ensure-latest")
|
|
||||||
|
|
||||||
load Gem.bin_path("brakeman", "brakeman")
|
|
|
@ -1,12 +1,7 @@
|
||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
# Enable jemalloc for reduced memory usage and latency.
|
|
||||||
if [ -z "${LD_PRELOAD+x}" ] && [ -f /usr/lib/*/libjemalloc.so.2 ]; then
|
|
||||||
export LD_PRELOAD="$(echo /usr/lib/*/libjemalloc.so.2)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If running the rails server then create or migrate existing database
|
# If running the rails server then create or migrate existing database
|
||||||
if [ "${1}" == "./bin/rails" ] && [ "${2}" == "server" ]; then
|
if [ "${*}" == "./bin/rails server" ]; then
|
||||||
./bin/rails db:prepare
|
./bin/rails db:prepare
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
#!/usr/bin/env ruby
|
|
||||||
require "rubygems"
|
|
||||||
require "bundler/setup"
|
|
||||||
|
|
||||||
# explicit rubocop config increases performance slightly while avoiding config confusion.
|
|
||||||
ARGV.unshift("--config", File.expand_path("../.rubocop.yml", __dir__))
|
|
||||||
|
|
||||||
load Gem.bin_path("rubocop", "rubocop")
|
|
|
@ -1,8 +1,8 @@
|
||||||
#!/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__)
|
||||||
APP_NAME = "family_budget"
|
|
||||||
|
|
||||||
def system!(*args)
|
def system!(*args)
|
||||||
system(*args, exception: true)
|
system(*args, exception: true)
|
||||||
|
@ -30,8 +30,4 @@ FileUtils.chdir APP_ROOT do
|
||||||
|
|
||||||
puts "\n== Restarting application server =="
|
puts "\n== Restarting application server =="
|
||||||
system! "bin/rails restart"
|
system! "bin/rails restart"
|
||||||
|
|
||||||
# puts "\n== Configuring puma-dev =="
|
|
||||||
# system "ln -nfs #{APP_ROOT} ~/.puma-dev/#{APP_NAME}"
|
|
||||||
# system "curl -Is https://#{APP_NAME}.test/up | head -n 1"
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -9,7 +9,7 @@ Bundler.require(*Rails.groups)
|
||||||
module FamilyBudget
|
module FamilyBudget
|
||||||
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 8.0
|
config.load_defaults 7.1
|
||||||
|
|
||||||
# Please, add to the `ignore` list any other `lib` subdirectories that do
|
# Please, add to the `ignore` list any other `lib` subdirectories that do
|
||||||
# not contain `.rb` files, or that should not be reloaded or eager loaded.
|
# not contain `.rb` files, or that should not be reloaded or eager loaded.
|
||||||
|
|
|
@ -14,7 +14,7 @@ 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 caching. By default caching is disabled.
|
||||||
|
@ -24,7 +24,9 @@ Rails.application.configure do
|
||||||
config.action_controller.enable_fragment_cache_logging = true
|
config.action_controller.enable_fragment_cache_logging = true
|
||||||
|
|
||||||
config.cache_store = :memory_store
|
config.cache_store = :memory_store
|
||||||
config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{2.days.to_i}" }
|
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
|
||||||
|
|
||||||
|
@ -39,11 +41,15 @@ Rails.application.configure do
|
||||||
|
|
||||||
config.action_mailer.perform_caching = false
|
config.action_mailer.perform_caching = false
|
||||||
|
|
||||||
config.action_mailer.default_url_options = { host: "localhost", port: 3000 }
|
|
||||||
|
|
||||||
# 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
|
||||||
|
|
||||||
|
@ -60,14 +66,11 @@ Rails.application.configure do
|
||||||
# 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.
|
# Uncomment if you wish to allow Action Cable access from any origin.
|
||||||
# config.action_cable.disable_request_forgery_protection = true
|
# config.action_cable.disable_request_forgery_protection = true
|
||||||
|
|
||||||
# Raise error when a before_action's only/except options reference missing actions.
|
# Raise error when a before_action's only/except options reference missing actions
|
||||||
config.action_controller.raise_on_missing_callback_actions = true
|
config.action_controller.raise_on_missing_callback_actions = true
|
||||||
|
|
||||||
# Apply autocorrection by RuboCop to files generated by `bin/rails generate`.
|
|
||||||
# config.generators.apply_rubocop_autocorrect_after_generate!
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -20,8 +20,8 @@ Rails.application.configure do
|
||||||
# key such as config/credentials/production.key. This key is used to decrypt credentials (and other encrypted files).
|
# key such as config/credentials/production.key. This key is used to decrypt credentials (and other encrypted files).
|
||||||
# config.require_master_key = true
|
# config.require_master_key = true
|
||||||
|
|
||||||
# Disable serving static files from `public/`, relying on NGINX/Apache to do so instead.
|
# Enable static file serving from the `/public` folder (turn off if using NGINX/Apache for it).
|
||||||
# config.public_file_server.enabled = false
|
config.public_file_server.enabled = true
|
||||||
|
|
||||||
# Compress CSS using a preprocessor.
|
# Compress CSS using a preprocessor.
|
||||||
# config.assets.css_compressor = :sass
|
# config.assets.css_compressor = :sass
|
||||||
|
@ -51,18 +51,15 @@ Rails.application.configure do
|
||||||
# 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 = false
|
config.force_ssl = false
|
||||||
|
|
||||||
# Skip http-to-https redirect for the default health check endpoint.
|
|
||||||
# config.ssl_options = { redirect: { exclude: ->(request) { request.path == "/up" } } }
|
|
||||||
|
|
||||||
# Log to STDOUT by default
|
# Log to STDOUT by default
|
||||||
config.logger = ActiveSupport::Logger.new(STDOUT)
|
config.logger = ActiveSupport::Logger.new($stdout)
|
||||||
.tap { |logger| logger.formatter = ::Logger::Formatter.new }
|
.tap { |logger| logger.formatter = ::Logger::Formatter.new }
|
||||||
.then { |logger| ActiveSupport::TaggedLogging.new(logger) }
|
.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]
|
||||||
|
|
||||||
# "info" includes generic and useful information about system operation, but avoids logging too much
|
# 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
|
# information to avoid inadvertent exposure of personally identifiable information (PII). If you
|
||||||
# want to log everything, set the level to "debug".
|
# want to log everything, set the level to "debug".
|
||||||
config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info")
|
config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info")
|
||||||
|
|
|
@ -18,14 +18,17 @@ Rails.application.configure do
|
||||||
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.headers = { "Cache-Control" => "public, max-age=#{1.hour.to_i}" }
|
config.public_file_server.enabled = true
|
||||||
|
config.public_file_server.headers = {
|
||||||
|
"Cache-Control" => "public, max-age=#{1.hour.to_i}"
|
||||||
|
}
|
||||||
|
|
||||||
# Show full error reports and disable caching.
|
# Show full error reports and disable caching.
|
||||||
config.consider_all_requests_local = true
|
config.consider_all_requests_local = true
|
||||||
config.action_controller.perform_caching = false
|
config.action_controller.perform_caching = false
|
||||||
config.cache_store = :null_store
|
config.cache_store = :null_store
|
||||||
|
|
||||||
# Render exception templates for rescuable exceptions and raise for other exceptions.
|
# Raise exceptions instead of rendering exception templates.
|
||||||
config.action_dispatch.show_exceptions = :rescuable
|
config.action_dispatch.show_exceptions = :rescuable
|
||||||
|
|
||||||
# Disable request forgery protection in test environment.
|
# Disable request forgery protection in test environment.
|
||||||
|
@ -41,19 +44,21 @@ Rails.application.configure do
|
||||||
# ActionMailer::Base.deliveries array.
|
# ActionMailer::Base.deliveries array.
|
||||||
config.action_mailer.delivery_method = :test
|
config.action_mailer.delivery_method = :test
|
||||||
|
|
||||||
# Unlike controllers, the mailer instance doesn't have any context about the
|
|
||||||
# incoming request so you'll need to provide the :host parameter yourself.
|
|
||||||
config.action_mailer.default_url_options = { host: "www.example.com" }
|
|
||||||
|
|
||||||
# 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.
|
# Raise error when a before_action's only/except options reference missing actions
|
||||||
config.action_controller.raise_on_missing_callback_actions = true
|
config.action_controller.raise_on_missing_callback_actions = true
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,5 +4,5 @@
|
||||||
# Use this to limit dissemination of sensitive information.
|
# Use this to limit dissemination of sensitive information.
|
||||||
# See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors.
|
# See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors.
|
||||||
Rails.application.config.filter_parameters += [
|
Rails.application.config.filter_parameters += [
|
||||||
:passw, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
|
:passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
# Be sure to restart your server when you modify this file.
|
|
||||||
#
|
|
||||||
# This file eases your Rails 8.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 `8.0`.
|
|
||||||
#
|
|
||||||
# Read the Guide for Upgrading Ruby on Rails for more info on each option.
|
|
||||||
# https://guides.rubyonrails.org/upgrading_ruby_on_rails.html
|
|
|
@ -1,54 +1,43 @@
|
||||||
# This configuration file will be evaluated by Puma. The top-level methods that
|
# Puma can serve each request in a thread from an internal thread pool.
|
||||||
# are invoked here are part of Puma's configuration DSL. For more information
|
# The `threads` method setting takes two numbers: a minimum and maximum.
|
||||||
# about methods provided by the DSL, see https://puma.io/puma/Puma/DSL.html.
|
# Any libraries that use thread pools should be configured to match
|
||||||
|
# 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)
|
||||||
|
min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count }
|
||||||
|
threads min_threads_count, max_threads_count
|
||||||
|
|
||||||
# Puma starts a configurable number of processes (workers) and each process
|
# Specifies the `worker_timeout` threshold that Puma will use to wait before
|
||||||
# serves each request in a thread from an internal thread pool.
|
# terminating a worker in development environments.
|
||||||
#
|
#
|
||||||
# The ideal number of threads per worker depends both on how much time the
|
worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development"
|
||||||
# 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 `environment` that Puma will run in.
|
|
||||||
rails_env = ENV.fetch("RAILS_ENV", "development")
|
|
||||||
environment rails_env
|
|
||||||
|
|
||||||
case rails_env
|
|
||||||
when "production"
|
|
||||||
# If you are running more than 1 thread per process, the workers count
|
|
||||||
# should be equal to the number of processors (CPU cores) in production.
|
|
||||||
#
|
|
||||||
# Automatically detect the number of available processors in production.
|
|
||||||
require "concurrent-ruby"
|
|
||||||
workers_count = Integer(ENV.fetch("WEB_CONCURRENCY") { Concurrent.available_processor_count })
|
|
||||||
workers workers_count if workers_count > 1
|
|
||||||
|
|
||||||
preload_app!
|
|
||||||
when "development"
|
|
||||||
# Specifies a very generous `worker_timeout` so that the worker
|
|
||||||
# isn't killed by Puma when suspended by a debugger.
|
|
||||||
worker_timeout 3600
|
|
||||||
end
|
|
||||||
|
|
||||||
# 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)
|
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
|
||||||
|
|
||||||
# Only use a pidfile when requested
|
|
||||||
pidfile ENV["PIDFILE"] if ENV["PIDFILE"]
|
|
||||||
|
|
|
@ -1,66 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>Your browser is not supported (406)</title>
|
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
||||||
<style>
|
|
||||||
.rails-default-error-page {
|
|
||||||
background-color: #EFEFEF;
|
|
||||||
color: #2E2F30;
|
|
||||||
text-align: center;
|
|
||||||
font-family: arial, sans-serif;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rails-default-error-page div.dialog {
|
|
||||||
width: 95%;
|
|
||||||
max-width: 33em;
|
|
||||||
margin: 4em auto 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rails-default-error-page div.dialog > div {
|
|
||||||
border: 1px solid #CCC;
|
|
||||||
border-right-color: #999;
|
|
||||||
border-left-color: #999;
|
|
||||||
border-bottom-color: #BBB;
|
|
||||||
border-top: #B00100 solid 4px;
|
|
||||||
border-top-left-radius: 9px;
|
|
||||||
border-top-right-radius: 9px;
|
|
||||||
background-color: white;
|
|
||||||
padding: 7px 12% 0;
|
|
||||||
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
|
||||||
}
|
|
||||||
|
|
||||||
.rails-default-error-page h1 {
|
|
||||||
font-size: 100%;
|
|
||||||
color: #730E15;
|
|
||||||
line-height: 1.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rails-default-error-page div.dialog > p {
|
|
||||||
margin: 0 0 1em;
|
|
||||||
padding: 1em;
|
|
||||||
background-color: #F7F7F7;
|
|
||||||
border: 1px solid #CCC;
|
|
||||||
border-right-color: #999;
|
|
||||||
border-left-color: #999;
|
|
||||||
border-bottom-color: #999;
|
|
||||||
border-bottom-left-radius: 4px;
|
|
||||||
border-bottom-right-radius: 4px;
|
|
||||||
border-top-color: #DADADA;
|
|
||||||
color: #666;
|
|
||||||
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body class="rails-default-error-page">
|
|
||||||
<!-- This file lives in public/406-unsupported-browser.html -->
|
|
||||||
<div class="dialog">
|
|
||||||
<div>
|
|
||||||
<h1>Your browser is not supported.</h1>
|
|
||||||
<p>Please upgrade your browser to continue.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
BIN
public/icon.png
BIN
public/icon.png
Binary file not shown.
Before Width: | Height: | Size: 5.5 KiB |
|
@ -1,3 +0,0 @@
|
||||||
<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<rect width="100%" height="100%" fill="red"/>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 121 B |
Loading…
Add table
Reference in a new issue