Compare commits
4 Commits
dependabot
...
master
Author | SHA1 | Date |
---|---|---|
Petko Bordjukov | d6d881190a | |
Petko Bordjukov | ac4bef2cac | |
Petko Bordjukov | 323a445967 | |
Petko Bordjukov | f5bd7b6d09 |
|
@ -0,0 +1,60 @@
|
||||||
|
# syntax = docker/dockerfile:1
|
||||||
|
|
||||||
|
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile
|
||||||
|
ARG RUBY_VERSION=3.3.5
|
||||||
|
FROM registry.docker.com/library/ruby:$RUBY_VERSION-slim as base
|
||||||
|
|
||||||
|
# Rails app lives here
|
||||||
|
WORKDIR /rails
|
||||||
|
|
||||||
|
# Set production environment
|
||||||
|
ENV RAILS_ENV="production" \
|
||||||
|
BUNDLE_DEPLOYMENT="1" \
|
||||||
|
BUNDLE_PATH="/usr/local/bundle" \
|
||||||
|
BUNDLE_WITHOUT="development"
|
||||||
|
|
||||||
|
# Throw-away build stage to reduce size of final image
|
||||||
|
FROM base as build
|
||||||
|
|
||||||
|
# Install packages needed to build gems
|
||||||
|
RUN apt-get update -qq && \
|
||||||
|
apt-get install --no-install-recommends -y build-essential git libvips pkg-config libpq-dev libsqlite3-dev nodejs yarn
|
||||||
|
|
||||||
|
# Install application gems
|
||||||
|
COPY Gemfile Gemfile.lock ./
|
||||||
|
RUN bundle install && \
|
||||||
|
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \
|
||||||
|
bundle exec bootsnap precompile --gemfile
|
||||||
|
|
||||||
|
# Copy application code
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Precompile bootsnap code for faster boot times
|
||||||
|
RUN bundle exec bootsnap precompile app/ lib/
|
||||||
|
|
||||||
|
# Precompiling assets for production without requiring secret RAILS_MASTER_KEY
|
||||||
|
RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile
|
||||||
|
|
||||||
|
# Final stage for app image
|
||||||
|
FROM base
|
||||||
|
|
||||||
|
# Install packages needed for deployment
|
||||||
|
RUN apt-get update -qq && \
|
||||||
|
apt-get install --no-install-recommends -y curl libsqlite3-0 nodejs libpq5 libvips && \
|
||||||
|
rm -rf /var/lib/apt/lists /var/cache/apt/archives
|
||||||
|
|
||||||
|
# Copy built artifacts: gems, application
|
||||||
|
COPY --from=build /usr/local/bundle /usr/local/bundle
|
||||||
|
COPY --from=build /rails /rails
|
||||||
|
|
||||||
|
# Run and own only the runtime files as a non-root user for security
|
||||||
|
RUN useradd rails --create-home --shell /bin/bash && \
|
||||||
|
chown -R rails:rails db log storage tmp
|
||||||
|
USER rails:rails
|
||||||
|
|
||||||
|
# Entrypoint prepares the database.
|
||||||
|
ENTRYPOINT ["/rails/bin/docker-entrypoint"]
|
||||||
|
|
||||||
|
# Start the server by default, this can be overwritten at runtime
|
||||||
|
EXPOSE 3000
|
||||||
|
CMD ["./bin/rails", "server", "--early-hints"]
|
18
Gemfile
18
Gemfile
|
@ -1,32 +1,30 @@
|
||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
|
|
||||||
gem 'rails', '~> 6.0.4'
|
gem 'rails', '~> 7.2.1'
|
||||||
|
|
||||||
gem 'sqlite3'
|
gem 'coffee-rails'
|
||||||
gem 'sass-rails'
|
gem 'sass-rails'
|
||||||
gem 'uglifier'
|
gem 'uglifier'
|
||||||
gem 'coffee-rails'
|
|
||||||
# gem 'therubyracer', platforms: :ruby
|
# gem 'therubyracer', platforms: :ruby
|
||||||
|
|
||||||
gem 'jquery-rails'
|
|
||||||
gem 'jbuilder'
|
gem 'jbuilder'
|
||||||
|
gem 'jquery-rails'
|
||||||
|
|
||||||
gem 'activeresource', github: 'rails/activeresource', require: 'active_resource'
|
gem 'activeresource', github: 'rails/activeresource', require: 'active_resource'
|
||||||
|
|
||||||
gem 'pry-rails'
|
gem 'pry-rails'
|
||||||
|
gem 'rack-attack'
|
||||||
|
|
||||||
|
gem 'bootsnap', require: false
|
||||||
|
|
||||||
# gem 'spreadsheet_architect'
|
# gem 'spreadsheet_architect'
|
||||||
|
|
||||||
group :development do
|
group :development do
|
||||||
gem 'spring'
|
gem 'spring'
|
||||||
gem 'capistrano-rails'
|
gem 'sqlite3'
|
||||||
gem 'capistrano-rvm'
|
|
||||||
gem 'capistrano3-puma'
|
|
||||||
gem 'ed25519'
|
|
||||||
gem 'listen'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
group :production do
|
group :production do
|
||||||
gem 'puma', '< 5'
|
|
||||||
gem 'pg'
|
gem 'pg'
|
||||||
|
gem 'puma'
|
||||||
end
|
end
|
||||||
|
|
346
Gemfile.lock
346
Gemfile.lock
|
@ -1,8 +1,8 @@
|
||||||
GIT
|
GIT
|
||||||
remote: https://github.com/rails/activeresource.git
|
remote: https://github.com/rails/activeresource.git
|
||||||
revision: 9dfc15e98007d0e546c404d7236a218bb04a8698
|
revision: a1f6a19652709f2da6aaa2559f7cd0a4f7d2cf3e
|
||||||
specs:
|
specs:
|
||||||
activeresource (6.0.0)
|
activeresource (6.1.1)
|
||||||
activemodel (>= 6.0)
|
activemodel (>= 6.0)
|
||||||
activemodel-serializers-xml (~> 1.0)
|
activemodel-serializers-xml (~> 1.0)
|
||||||
activesupport (>= 6.0)
|
activesupport (>= 6.0)
|
||||||
|
@ -10,85 +10,85 @@ GIT
|
||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
actioncable (6.0.5.1)
|
actioncable (7.2.1)
|
||||||
actionpack (= 6.0.5.1)
|
actionpack (= 7.2.1)
|
||||||
|
activesupport (= 7.2.1)
|
||||||
nio4r (~> 2.0)
|
nio4r (~> 2.0)
|
||||||
websocket-driver (>= 0.6.1)
|
websocket-driver (>= 0.6.1)
|
||||||
actionmailbox (6.0.5.1)
|
zeitwerk (~> 2.6)
|
||||||
actionpack (= 6.0.5.1)
|
actionmailbox (7.2.1)
|
||||||
activejob (= 6.0.5.1)
|
actionpack (= 7.2.1)
|
||||||
activerecord (= 6.0.5.1)
|
activejob (= 7.2.1)
|
||||||
activestorage (= 6.0.5.1)
|
activerecord (= 7.2.1)
|
||||||
activesupport (= 6.0.5.1)
|
activestorage (= 7.2.1)
|
||||||
mail (>= 2.7.1)
|
activesupport (= 7.2.1)
|
||||||
actionmailer (6.0.5.1)
|
mail (>= 2.8.0)
|
||||||
actionpack (= 6.0.5.1)
|
actionmailer (7.2.1)
|
||||||
actionview (= 6.0.5.1)
|
actionpack (= 7.2.1)
|
||||||
activejob (= 6.0.5.1)
|
actionview (= 7.2.1)
|
||||||
mail (~> 2.5, >= 2.5.4)
|
activejob (= 7.2.1)
|
||||||
rails-dom-testing (~> 2.0)
|
activesupport (= 7.2.1)
|
||||||
actionpack (6.0.5.1)
|
mail (>= 2.8.0)
|
||||||
actionview (= 6.0.5.1)
|
rails-dom-testing (~> 2.2)
|
||||||
activesupport (= 6.0.5.1)
|
actionpack (7.2.1)
|
||||||
rack (~> 2.0, >= 2.0.8)
|
actionview (= 7.2.1)
|
||||||
rack-test (>= 0.6.3)
|
activesupport (= 7.2.1)
|
||||||
rails-dom-testing (~> 2.0)
|
|
||||||
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
|
||||||
actiontext (6.0.5.1)
|
|
||||||
actionpack (= 6.0.5.1)
|
|
||||||
activerecord (= 6.0.5.1)
|
|
||||||
activestorage (= 6.0.5.1)
|
|
||||||
activesupport (= 6.0.5.1)
|
|
||||||
nokogiri (>= 1.8.5)
|
nokogiri (>= 1.8.5)
|
||||||
actionview (6.0.5.1)
|
racc
|
||||||
activesupport (= 6.0.5.1)
|
rack (>= 2.2.4, < 3.2)
|
||||||
|
rack-session (>= 1.0.1)
|
||||||
|
rack-test (>= 0.6.3)
|
||||||
|
rails-dom-testing (~> 2.2)
|
||||||
|
rails-html-sanitizer (~> 1.6)
|
||||||
|
useragent (~> 0.16)
|
||||||
|
actiontext (7.2.1)
|
||||||
|
actionpack (= 7.2.1)
|
||||||
|
activerecord (= 7.2.1)
|
||||||
|
activestorage (= 7.2.1)
|
||||||
|
activesupport (= 7.2.1)
|
||||||
|
globalid (>= 0.6.0)
|
||||||
|
nokogiri (>= 1.8.5)
|
||||||
|
actionview (7.2.1)
|
||||||
|
activesupport (= 7.2.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 (6.0.5.1)
|
activejob (7.2.1)
|
||||||
activesupport (= 6.0.5.1)
|
activesupport (= 7.2.1)
|
||||||
globalid (>= 0.3.6)
|
globalid (>= 0.3.6)
|
||||||
activemodel (6.0.5.1)
|
activemodel (7.2.1)
|
||||||
activesupport (= 6.0.5.1)
|
activesupport (= 7.2.1)
|
||||||
activemodel-serializers-xml (1.0.2)
|
activemodel-serializers-xml (1.0.2)
|
||||||
activemodel (> 5.x)
|
activemodel (> 5.x)
|
||||||
activesupport (> 5.x)
|
activesupport (> 5.x)
|
||||||
builder (~> 3.1)
|
builder (~> 3.1)
|
||||||
activerecord (6.0.5.1)
|
activerecord (7.2.1)
|
||||||
activemodel (= 6.0.5.1)
|
activemodel (= 7.2.1)
|
||||||
activesupport (= 6.0.5.1)
|
activesupport (= 7.2.1)
|
||||||
activestorage (6.0.5.1)
|
timeout (>= 0.4.0)
|
||||||
actionpack (= 6.0.5.1)
|
activestorage (7.2.1)
|
||||||
activejob (= 6.0.5.1)
|
actionpack (= 7.2.1)
|
||||||
activerecord (= 6.0.5.1)
|
activejob (= 7.2.1)
|
||||||
|
activerecord (= 7.2.1)
|
||||||
|
activesupport (= 7.2.1)
|
||||||
marcel (~> 1.0)
|
marcel (~> 1.0)
|
||||||
activesupport (6.0.5.1)
|
activesupport (7.2.1)
|
||||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
base64
|
||||||
i18n (>= 0.7, < 2)
|
bigdecimal
|
||||||
minitest (~> 5.1)
|
concurrent-ruby (~> 1.0, >= 1.3.1)
|
||||||
tzinfo (~> 1.1)
|
connection_pool (>= 2.2.5)
|
||||||
zeitwerk (~> 2.2, >= 2.2.2)
|
drb
|
||||||
airbrussh (1.4.1)
|
i18n (>= 1.6, < 2)
|
||||||
sshkit (>= 1.6.1, != 1.7.0)
|
logger (>= 1.4.2)
|
||||||
builder (3.2.4)
|
minitest (>= 5.1)
|
||||||
capistrano (3.17.1)
|
securerandom (>= 0.3)
|
||||||
airbrussh (>= 1.0.0)
|
tzinfo (~> 2.0, >= 2.0.5)
|
||||||
i18n
|
base64 (0.2.0)
|
||||||
rake (>= 10.0.0)
|
bigdecimal (3.1.8)
|
||||||
sshkit (>= 1.9.0)
|
bootsnap (1.18.4)
|
||||||
capistrano-bundler (2.1.0)
|
msgpack (~> 1.2)
|
||||||
capistrano (~> 3.1)
|
builder (3.3.0)
|
||||||
capistrano-rails (1.6.2)
|
|
||||||
capistrano (~> 3.1)
|
|
||||||
capistrano-bundler (>= 1.1, < 3)
|
|
||||||
capistrano-rvm (0.1.2)
|
|
||||||
capistrano (~> 3.0)
|
|
||||||
sshkit (~> 1.2)
|
|
||||||
capistrano3-puma (5.2.0)
|
|
||||||
capistrano (~> 3.7)
|
|
||||||
capistrano-bundler
|
|
||||||
puma (>= 4.0, < 6.0)
|
|
||||||
coderay (1.1.3)
|
coderay (1.1.3)
|
||||||
coffee-rails (5.0.0)
|
coffee-rails (5.0.0)
|
||||||
coffee-script (>= 2.2.0)
|
coffee-script (>= 2.2.0)
|
||||||
|
@ -97,85 +97,112 @@ GEM
|
||||||
coffee-script-source
|
coffee-script-source
|
||||||
execjs
|
execjs
|
||||||
coffee-script-source (1.12.2)
|
coffee-script-source (1.12.2)
|
||||||
concurrent-ruby (1.1.10)
|
concurrent-ruby (1.3.4)
|
||||||
|
connection_pool (2.4.1)
|
||||||
crass (1.0.6)
|
crass (1.0.6)
|
||||||
ed25519 (1.3.0)
|
date (3.3.4)
|
||||||
erubi (1.11.0)
|
drb (2.2.1)
|
||||||
execjs (2.8.1)
|
erubi (1.13.0)
|
||||||
ffi (1.15.5)
|
execjs (2.9.1)
|
||||||
globalid (1.0.0)
|
ffi (1.17.0)
|
||||||
activesupport (>= 5.0)
|
globalid (1.2.1)
|
||||||
i18n (1.12.0)
|
activesupport (>= 6.1)
|
||||||
|
i18n (1.14.5)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
jbuilder (2.11.5)
|
io-console (0.7.2)
|
||||||
|
irb (1.14.0)
|
||||||
|
rdoc (>= 4.0.0)
|
||||||
|
reline (>= 0.4.2)
|
||||||
|
jbuilder (2.12.0)
|
||||||
actionview (>= 5.0.0)
|
actionview (>= 5.0.0)
|
||||||
activesupport (>= 5.0.0)
|
activesupport (>= 5.0.0)
|
||||||
jquery-rails (4.5.0)
|
jquery-rails (4.6.0)
|
||||||
rails-dom-testing (>= 1, < 3)
|
rails-dom-testing (>= 1, < 3)
|
||||||
railties (>= 4.2.0)
|
railties (>= 4.2.0)
|
||||||
thor (>= 0.14, < 2.0)
|
thor (>= 0.14, < 2.0)
|
||||||
listen (3.7.1)
|
logger (1.6.1)
|
||||||
rb-fsevent (~> 0.10, >= 0.10.3)
|
loofah (2.22.0)
|
||||||
rb-inotify (~> 0.9, >= 0.9.10)
|
|
||||||
loofah (2.19.1)
|
|
||||||
crass (~> 1.0.2)
|
crass (~> 1.0.2)
|
||||||
nokogiri (>= 1.5.9)
|
nokogiri (>= 1.12.0)
|
||||||
mail (2.7.1)
|
mail (2.8.1)
|
||||||
mini_mime (>= 0.1.1)
|
mini_mime (>= 0.1.1)
|
||||||
marcel (1.0.2)
|
net-imap
|
||||||
method_source (1.0.0)
|
net-pop
|
||||||
mini_mime (1.1.2)
|
net-smtp
|
||||||
mini_portile2 (2.8.0)
|
marcel (1.0.4)
|
||||||
minitest (5.16.3)
|
method_source (1.1.0)
|
||||||
net-scp (4.0.0.rc1)
|
mini_mime (1.1.5)
|
||||||
net-ssh (>= 2.6.5, < 8.0.0)
|
mini_portile2 (2.8.7)
|
||||||
net-ssh (7.0.1)
|
minitest (5.25.1)
|
||||||
nio4r (2.5.8)
|
msgpack (1.7.2)
|
||||||
nokogiri (1.13.10)
|
net-imap (0.4.16)
|
||||||
mini_portile2 (~> 2.8.0)
|
date
|
||||||
|
net-protocol
|
||||||
|
net-pop (0.1.2)
|
||||||
|
net-protocol
|
||||||
|
net-protocol (0.2.2)
|
||||||
|
timeout
|
||||||
|
net-smtp (0.5.0)
|
||||||
|
net-protocol
|
||||||
|
nio4r (2.7.3)
|
||||||
|
nokogiri (1.16.7)
|
||||||
|
mini_portile2 (~> 2.8.2)
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
pg (1.4.3)
|
pg (1.5.8)
|
||||||
pry (0.14.1)
|
pry (0.14.2)
|
||||||
coderay (~> 1.1)
|
coderay (~> 1.1)
|
||||||
method_source (~> 1.0)
|
method_source (~> 1.0)
|
||||||
pry-rails (0.3.9)
|
pry-rails (0.3.11)
|
||||||
pry (>= 0.10.4)
|
pry (>= 0.13.0)
|
||||||
puma (4.3.12)
|
psych (5.1.2)
|
||||||
|
stringio
|
||||||
|
puma (6.4.2)
|
||||||
nio4r (~> 2.0)
|
nio4r (~> 2.0)
|
||||||
racc (1.6.1)
|
racc (1.8.1)
|
||||||
rack (2.2.4)
|
rack (3.1.7)
|
||||||
rack-test (2.0.2)
|
rack-attack (6.7.0)
|
||||||
|
rack (>= 1.0, < 4)
|
||||||
|
rack-session (2.0.0)
|
||||||
|
rack (>= 3.0.0)
|
||||||
|
rack-test (2.1.0)
|
||||||
rack (>= 1.3)
|
rack (>= 1.3)
|
||||||
rails (6.0.5.1)
|
rackup (2.1.0)
|
||||||
actioncable (= 6.0.5.1)
|
rack (>= 3)
|
||||||
actionmailbox (= 6.0.5.1)
|
webrick (~> 1.8)
|
||||||
actionmailer (= 6.0.5.1)
|
rails (7.2.1)
|
||||||
actionpack (= 6.0.5.1)
|
actioncable (= 7.2.1)
|
||||||
actiontext (= 6.0.5.1)
|
actionmailbox (= 7.2.1)
|
||||||
actionview (= 6.0.5.1)
|
actionmailer (= 7.2.1)
|
||||||
activejob (= 6.0.5.1)
|
actionpack (= 7.2.1)
|
||||||
activemodel (= 6.0.5.1)
|
actiontext (= 7.2.1)
|
||||||
activerecord (= 6.0.5.1)
|
actionview (= 7.2.1)
|
||||||
activestorage (= 6.0.5.1)
|
activejob (= 7.2.1)
|
||||||
activesupport (= 6.0.5.1)
|
activemodel (= 7.2.1)
|
||||||
bundler (>= 1.3.0)
|
activerecord (= 7.2.1)
|
||||||
railties (= 6.0.5.1)
|
activestorage (= 7.2.1)
|
||||||
sprockets-rails (>= 2.0.0)
|
activesupport (= 7.2.1)
|
||||||
rails-dom-testing (2.0.3)
|
bundler (>= 1.15.0)
|
||||||
activesupport (>= 4.2.0)
|
railties (= 7.2.1)
|
||||||
|
rails-dom-testing (2.2.0)
|
||||||
|
activesupport (>= 5.0.0)
|
||||||
|
minitest
|
||||||
nokogiri (>= 1.6)
|
nokogiri (>= 1.6)
|
||||||
rails-html-sanitizer (1.4.4)
|
rails-html-sanitizer (1.6.0)
|
||||||
loofah (~> 2.19, >= 2.19.1)
|
loofah (~> 2.21)
|
||||||
railties (6.0.5.1)
|
nokogiri (~> 1.14)
|
||||||
actionpack (= 6.0.5.1)
|
railties (7.2.1)
|
||||||
activesupport (= 6.0.5.1)
|
actionpack (= 7.2.1)
|
||||||
method_source
|
activesupport (= 7.2.1)
|
||||||
rake (>= 0.8.7)
|
irb (~> 1.13)
|
||||||
thor (>= 0.20.3, < 2.0)
|
rackup (>= 1.0.0)
|
||||||
rake (13.0.6)
|
rake (>= 12.2)
|
||||||
rb-fsevent (0.11.2)
|
thor (~> 1.0, >= 1.2.2)
|
||||||
rb-inotify (0.10.1)
|
zeitwerk (~> 2.6)
|
||||||
ffi (~> 1.0)
|
rake (13.2.1)
|
||||||
|
rdoc (6.7.0)
|
||||||
|
psych (>= 4.0.0)
|
||||||
|
reline (0.5.10)
|
||||||
|
io-console (~> 0.5)
|
||||||
sass-rails (6.0.0)
|
sass-rails (6.0.0)
|
||||||
sassc-rails (~> 2.1, >= 2.1.1)
|
sassc-rails (~> 2.1, >= 2.1.1)
|
||||||
sassc (2.4.0)
|
sassc (2.4.0)
|
||||||
|
@ -186,51 +213,50 @@ GEM
|
||||||
sprockets (> 3.0)
|
sprockets (> 3.0)
|
||||||
sprockets-rails
|
sprockets-rails
|
||||||
tilt
|
tilt
|
||||||
spring (4.0.0)
|
securerandom (0.3.1)
|
||||||
sprockets (4.1.1)
|
spring (4.2.1)
|
||||||
|
sprockets (4.2.1)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
rack (> 1, < 3)
|
rack (>= 2.2.4, < 4)
|
||||||
sprockets-rails (3.4.2)
|
sprockets-rails (3.5.2)
|
||||||
actionpack (>= 5.2)
|
actionpack (>= 6.1)
|
||||||
activesupport (>= 5.2)
|
activesupport (>= 6.1)
|
||||||
sprockets (>= 3.0.0)
|
sprockets (>= 3.0.0)
|
||||||
sqlite3 (1.4.4)
|
sqlite3 (2.0.4)
|
||||||
sshkit (1.21.2)
|
mini_portile2 (~> 2.8.0)
|
||||||
net-scp (>= 1.1.2)
|
stringio (3.1.1)
|
||||||
net-ssh (>= 2.8.0)
|
thor (1.3.2)
|
||||||
thor (1.2.1)
|
tilt (2.4.0)
|
||||||
thread_safe (0.3.6)
|
timeout (0.4.1)
|
||||||
tilt (2.0.11)
|
tzinfo (2.0.6)
|
||||||
tzinfo (1.2.10)
|
concurrent-ruby (~> 1.0)
|
||||||
thread_safe (~> 0.1)
|
|
||||||
uglifier (4.2.0)
|
uglifier (4.2.0)
|
||||||
execjs (>= 0.3.0, < 3)
|
execjs (>= 0.3.0, < 3)
|
||||||
websocket-driver (0.7.5)
|
useragent (0.16.10)
|
||||||
|
webrick (1.8.1)
|
||||||
|
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)
|
||||||
zeitwerk (2.6.0)
|
zeitwerk (2.6.18)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
activeresource!
|
activeresource!
|
||||||
capistrano-rails
|
bootsnap
|
||||||
capistrano-rvm
|
|
||||||
capistrano3-puma
|
|
||||||
coffee-rails
|
coffee-rails
|
||||||
ed25519
|
|
||||||
jbuilder
|
jbuilder
|
||||||
jquery-rails
|
jquery-rails
|
||||||
listen
|
|
||||||
pg
|
pg
|
||||||
pry-rails
|
pry-rails
|
||||||
puma (< 5)
|
puma
|
||||||
rails (~> 6.0.4)
|
rack-attack
|
||||||
|
rails (~> 7.2.1)
|
||||||
sass-rails
|
sass-rails
|
||||||
spring
|
spring
|
||||||
sqlite3
|
sqlite3
|
||||||
uglifier
|
uglifier
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
2.2.22
|
2.5.16
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 388 KiB |
Binary file not shown.
After Width: | Height: | Size: 35 KiB |
|
@ -1,8 +1,8 @@
|
||||||
class Talk < ActiveResource::Base
|
class Talk < ActiveResource::Base
|
||||||
has_many :selections, class_name: 'SelectedTalk'
|
has_many :selections, class_name: 'SelectedTalk'
|
||||||
|
|
||||||
self.site = "https://cfp.openfest.org/api/conferences/9"
|
self.site = ENV['GAUGE_TALKS_ENDPOINT'] || 'https://cfp.openfest.org/api/conferences/1'
|
||||||
self.element_name = "event"
|
self.element_name = 'event'
|
||||||
|
|
||||||
def self.ordered_by_id
|
def self.ordered_by_id
|
||||||
find(:all, from: :halfnarp_friendly).sort_by(&:id)
|
find(:all, from: :halfnarp_friendly).sort_by(&:id)
|
||||||
|
|
|
@ -72,9 +72,7 @@
|
||||||
<div class="wholeday room1 day_1 guide"></div>
|
<div class="wholeday room1 day_1 guide"></div>
|
||||||
<div class="wholeday room1 day_3 guide"></div>
|
<div class="wholeday room1 day_3 guide"></div>
|
||||||
|
|
||||||
<div class="track" id="72"><h2>Technical</h2><div id="qrcode" class="hidden"></div></div>
|
<div class="track" id="80"><h2>Technical</h2><div id="qrcode" class="hidden"></div></div>
|
||||||
<div class="track" id="69"><h2>Advanced Technical</h2></div>
|
<div class="track" id="79"><h2>Advanced Technical</h2></div>
|
||||||
<div class="track" id="70"><h2>OpenBiz</h2></div>
|
<div class="track" id="81"><h2>OpenArt</h2></div>
|
||||||
<div class="track" id="68"><h2>Civic Hacking</h2></div>
|
<div class="track" id="82"><h2>Community/Social</h2></div>
|
||||||
<div class="track" id="67"><h2>Social</h2></div>
|
|
||||||
<div class="track" id="71"><h2>Education</h2></div>
|
|
||||||
|
|
|
@ -10,11 +10,11 @@
|
||||||
<meta name="twitter:site" content="@openfestbg">
|
<meta name="twitter:site" content="@openfestbg">
|
||||||
<meta name="twitter:title" content="<%= t 'generic.title' %>">
|
<meta name="twitter:title" content="<%= t 'generic.title' %>">
|
||||||
<meta name="twitter:description" content="<%= t 'generic.help_us_reduce_the_conflicts' %>">
|
<meta name="twitter:description" content="<%= t 'generic.help_us_reduce_the_conflicts' %>">
|
||||||
<meta name="twitter:image" content="<%= image_url 'openfest-splash.png' %>">
|
<meta name="twitter:image" content="<%= image_url 'openfest-splash.webp' %>">
|
||||||
<meta property="og:type" content="website">
|
<meta property="og:type" content="website">
|
||||||
<meta property="og:url" content="https://vote.openfest.org/" />
|
<meta property="og:url" content="https://vote.openfest.org/" />
|
||||||
<meta property="og:title" content="<%= t 'generic.title' %>">
|
<meta property="og:title" content="<%= t 'generic.title' %>">
|
||||||
<meta property="og:image" content="<%= image_url 'openfest-splash.png' %>">
|
<meta property="og:image" content="<%= image_url 'openfest-splash.webp' %>">
|
||||||
<meta property="og:description" content="<%= t 'generic.help_us_reduce_the_conflicts' %>">
|
<meta property="og:description" content="<%= t 'generic.help_us_reduce_the_conflicts' %>">
|
||||||
</head>
|
</head>
|
||||||
<body class="size-small in-list halfnarp">
|
<body class="size-small in-list halfnarp">
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
# If running the rails server then create or migrate existing database
|
||||||
|
if [ "${1}" == "./bin/rails" ] && [ "${2}" == "server" ]; then
|
||||||
|
./bin/rails db:prepare
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "${@}"
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
APP_PATH = File.expand_path('../config/application', __dir__)
|
APP_PATH = File.expand_path("../config/application", __dir__)
|
||||||
require_relative '../config/boot'
|
require_relative "../config/boot"
|
||||||
require 'rails/commands'
|
require "rails/commands"
|
||||||
|
|
4
bin/rake
4
bin/rake
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
require_relative '../config/boot'
|
require_relative "../config/boot"
|
||||||
require 'rake'
|
require "rake"
|
||||||
Rake.application.run
|
Rake.application.run
|
||||||
|
|
35
bin/setup
35
bin/setup
|
@ -1,36 +1,37 @@
|
||||||
#!/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 = "gauge"
|
||||||
|
|
||||||
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
|
||||||
# This script is a way to setup or update your development environment automatically.
|
# This script is a way to set up or update your development environment automatically.
|
||||||
# This script is idempotent, so that you can run it at anytime and get an expectable outcome.
|
# This script is idempotent, so that you can run it at any time and get an expectable outcome.
|
||||||
# Add necessary setup steps to this file.
|
# Add necessary setup steps to this file.
|
||||||
|
|
||||||
puts '== Installing dependencies =='
|
puts "== Installing dependencies =="
|
||||||
system! 'gem install bundler --conservative'
|
system! "gem install bundler --conservative"
|
||||||
system('bundle check') || system!('bundle install')
|
system("bundle check") || system!("bundle install")
|
||||||
|
|
||||||
# Install JavaScript dependencies
|
|
||||||
# system('bin/yarn')
|
|
||||||
|
|
||||||
# puts "\n== Copying sample files =="
|
# puts "\n== Copying sample files =="
|
||||||
# unless File.exist?('config/database.yml')
|
# unless File.exist?("config/database.yml")
|
||||||
# FileUtils.cp 'config/database.yml.sample', 'config/database.yml'
|
# FileUtils.cp "config/database.yml.sample", "config/database.yml"
|
||||||
# end
|
# end
|
||||||
|
|
||||||
puts "\n== Preparing database =="
|
puts "\n== Preparing database =="
|
||||||
system! 'bin/rails db:prepare'
|
system! "bin/rails db:prepare"
|
||||||
|
|
||||||
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 =="
|
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,16 +9,24 @@ Bundler.require(*Rails.groups)
|
||||||
module Gauge
|
module Gauge
|
||||||
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 5.1
|
config.load_defaults 7.2
|
||||||
|
|
||||||
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
# 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.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
||||||
config.i18n.available_locales = [:bg, :en]
|
config.i18n.available_locales = %i[bg en]
|
||||||
config.i18n.default_locale = :bg
|
config.i18n.default_locale = :bg
|
||||||
|
|
||||||
# Settings in config/environments/* take precedence over those specified here.
|
# Please, add to the `ignore` list any other `lib` subdirectories that do
|
||||||
# Application configuration can 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 after loading
|
# Common ones are `templates`, `generators`, or `middleware`, for example.
|
||||||
# the framework and any gems in your application.
|
config.autoload_lib(ignore: %w[assets tasks])
|
||||||
|
|
||||||
|
# Configuration for the application, engines, and railties goes here.
|
||||||
|
#
|
||||||
|
# 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")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
|
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
|
||||||
|
|
||||||
require 'bundler/setup' # Set up gems listed in the Gemfile.
|
require 'bundler/setup' # Set up gems listed in the Gemfile.
|
||||||
|
require 'bootsnap/setup'
|
||||||
|
|
|
@ -21,5 +21,10 @@ test:
|
||||||
database: db/test.sqlite3
|
database: db/test.sqlite3
|
||||||
|
|
||||||
production:
|
production:
|
||||||
<<: *default
|
adapter: postgresql
|
||||||
database: db/production.sqlite3
|
encoding: unicode
|
||||||
|
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
||||||
|
host: <%= ENV.fetch("GAUGE_DATABASE_HOST") { "host.containers.internal" } %>
|
||||||
|
database: gauge
|
||||||
|
username: gauge
|
||||||
|
password: <%= ENV["GAUGE_DATABASE_PASSWORD"] %>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# config valid only for current version of Capistrano
|
# config valid only for current version of Capistrano
|
||||||
lock '3.14.1'
|
lock '3.17.1'
|
||||||
|
|
||||||
set :application, 'gauge'
|
set :application, 'gauge'
|
||||||
set :repo_url, 'https://github.com/OpenFest/gauge.git'
|
set :repo_url, 'https://github.com/OpenFest/gauge.git'
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Load the Rails application.
|
# Load the Rails application.
|
||||||
require_relative 'application'
|
require_relative "application"
|
||||||
|
|
||||||
# Initialize the Rails application.
|
# Initialize the Rails application.
|
||||||
Rails.application.initialize!
|
Rails.application.initialize!
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
|
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
|
||||||
|
@ -12,16 +14,17 @@ 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.
|
||||||
|
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?
|
||||||
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.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
|
||||||
|
|
||||||
|
@ -34,29 +37,42 @@ Rails.application.configure do
|
||||||
# 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
|
||||||
|
|
||||||
|
# Disable caching for Action Mailer templates even if Action Controller
|
||||||
|
# caching is enabled.
|
||||||
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
|
||||||
|
|
||||||
# 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
|
||||||
|
|
||||||
# Debug mode disables concatenation and preprocessing of assets.
|
# Highlight code that enqueued background job in logs.
|
||||||
# This option may cause significant delays in view rendering with a large
|
config.active_job.verbose_enqueue_logs = true
|
||||||
# number of complex assets.
|
|
||||||
config.assets.debug = true
|
|
||||||
|
|
||||||
# Suppress logger output for asset requests.
|
# Suppress logger output for asset requests.
|
||||||
config.assets.quiet = true
|
config.assets.quiet = true
|
||||||
|
|
||||||
# Raises error for missing translations.
|
# Raises error for missing translations.
|
||||||
# config.action_view.raise_on_missing_translations = true
|
# config.i18n.raise_on_missing_translations = true
|
||||||
|
|
||||||
# Use an evented file watcher to asynchronously detect changes in source code,
|
# Annotate rendered view with file names.
|
||||||
# routes, locales, etc. This feature depends on the listen gem.
|
config.action_view.annotate_rendered_view_with_filenames = true
|
||||||
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
|
|
||||||
|
# Uncomment if you wish to allow Action Cable access from any origin.
|
||||||
|
# config.action_cable.disable_request_forgery_protection = true
|
||||||
|
|
||||||
|
# Raise error when a before_action's only/except options reference missing actions.
|
||||||
|
config.action_controller.raise_on_missing_callback_actions = true
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,8 +1,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.
|
||||||
|
|
||||||
# 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
|
||||||
|
@ -11,56 +13,69 @@ Rails.application.configure do
|
||||||
config.eager_load = true
|
config.eager_load = true
|
||||||
|
|
||||||
# Full error reports are disabled and caching is turned on.
|
# Full error reports are disabled and caching is turned on.
|
||||||
config.consider_all_requests_local = false
|
config.consider_all_requests_local = false
|
||||||
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"]
|
# Ensures that a master key has been made available in ENV["RAILS_MASTER_KEY"], config/master.key, or an environment
|
||||||
# or in config/master.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 the `/public` folder by default since
|
# Disable serving static files from `public/`, relying on NGINX/Apache to do so instead.
|
||||||
# Apache or NGINX already handles this.
|
# config.public_file_server.enabled = false
|
||||||
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
|
||||||
|
|
||||||
# Compress JavaScripts and CSS.
|
# Compress CSS using a preprocessor.
|
||||||
config.assets.js_compressor = :uglifier
|
|
||||||
# config.assets.css_compressor = :sass
|
# config.assets.css_compressor = :sass
|
||||||
|
|
||||||
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
# Do not fall back to assets pipeline if a precompiled asset is missed.
|
||||||
config.assets.compile = false
|
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.action_controller.asset_host = 'http://assets.example.com'
|
# config.asset_host = "http://assets.example.com"
|
||||||
|
|
||||||
# Specifies the header that your server uses for sending files.
|
# Specifies the header that your server uses for sending files.
|
||||||
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
|
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache
|
||||||
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
|
# config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX
|
||||||
|
|
||||||
# Store uploaded files on the local file system (see config/storage.yml for options).
|
# Store uploaded files on the local file system (see config/storage.yml for options).
|
||||||
config.active_storage.service = :local
|
config.active_storage.service = :local
|
||||||
|
|
||||||
# Mount Action Cable outside main process or domain.
|
# Mount Action Cable outside main process or domain.
|
||||||
# config.action_cable.mount_path = nil
|
# config.action_cable.mount_path = nil
|
||||||
# config.action_cable.url = 'wss://example.com/cable'
|
# config.action_cable.url = "wss://example.com/cable"
|
||||||
# config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
|
# config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ]
|
||||||
|
|
||||||
|
# Assume all access to the app is happening through a SSL-terminating reverse proxy.
|
||||||
|
# Can be used together with config.force_ssl for Strict-Transport-Security and secure cookies.
|
||||||
|
# config.assume_ssl = true
|
||||||
|
|
||||||
# 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
|
||||||
|
|
||||||
# Use the lowest log level to ensure availability of diagnostic information
|
# Skip http-to-https redirect for the default health check endpoint.
|
||||||
# when problems arise.
|
# config.ssl_options = { redirect: { exclude: ->(request) { request.path == "/up" } } }
|
||||||
config.log_level = :debug
|
|
||||||
|
# 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 ]
|
||||||
|
|
||||||
|
# "info" includes 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.
|
# Use a different cache store in production.
|
||||||
# config.cache_store = :mem_cache_store
|
# config.cache_store = :mem_cache_store
|
||||||
|
|
||||||
# Use a real queuing backend for Active Job (and separate queues per environment).
|
# Use a real queuing backend for Active Job (and separate queues per environment).
|
||||||
# config.active_job.queue_adapter = :resque
|
# config.active_job.queue_adapter = :resque
|
||||||
# config.active_job.queue_name_prefix = "gauge_production"
|
# config.active_job.queue_name_prefix = "gauge_production"
|
||||||
|
|
||||||
|
# Disable caching for Action Mailer templates even if Action Controller
|
||||||
|
# caching is enabled.
|
||||||
config.action_mailer.perform_caching = false
|
config.action_mailer.perform_caching = false
|
||||||
|
|
||||||
# Ignore bad email addresses and do not raise email delivery errors.
|
# Ignore bad email addresses and do not raise email delivery errors.
|
||||||
|
@ -71,43 +86,17 @@ Rails.application.configure do
|
||||||
# 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.deprecation = :notify
|
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
|
||||||
|
|
||||||
# Inserts middleware to perform automatic connection switching.
|
# Enable DNS rebinding protection and other `Host` header attacks.
|
||||||
# The `database_selector` hash is used to pass options to the DatabaseSelector
|
# config.hosts = [
|
||||||
# middleware. The `delay` is used to determine how long to wait after a write
|
# "example.com", # Allow requests from example.com
|
||||||
# to send a subsequent read to the primary.
|
# /.*\.example\.com/ # Allow requests from subdomains like `www.example.com`
|
||||||
#
|
# ]
|
||||||
# The `database_resolver` class is used by the middleware to determine which
|
# Skip DNS rebinding protection for the default health check endpoint.
|
||||||
# database is appropriate to use based on the time delay.
|
# config.host_authorization = { exclude: ->(request) { request.path == "/up" } }
|
||||||
#
|
|
||||||
# The `database_resolver_context` class is used by the middleware to set
|
|
||||||
# timestamps for the last write to the primary. The resolver uses the context
|
|
||||||
# class timestamps to determine how long to wait before reading from the
|
|
||||||
# replica.
|
|
||||||
#
|
|
||||||
# By default Rails will store a last write timestamp in the session. The
|
|
||||||
# DatabaseSelector middleware is designed as such you can define your own
|
|
||||||
# strategy for connection switching and pass that into the middleware through
|
|
||||||
# these configuration options.
|
|
||||||
# config.active_record.database_selector = { delay: 2.seconds }
|
|
||||||
# config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver
|
|
||||||
# config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
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
|
||||||
|
@ -6,26 +8,25 @@
|
||||||
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.
|
||||||
|
|
||||||
config.cache_classes = true
|
# While tests run files are not watched, reloading is not necessary.
|
||||||
|
config.enable_reloading = false
|
||||||
|
|
||||||
# Do not eager load code on boot. This avoids loading your whole application
|
# Eager loading loads your entire application. When running a single test locally,
|
||||||
# just for the purpose of running a single test. If you are using a tool that
|
# this is usually not necessary, and can slow down your test suite. However, it's
|
||||||
# preloads Rails for running tests, you may have to set it to true.
|
# recommended that you enable it in continuous integration systems to ensure eager
|
||||||
config.eager_load = false
|
# loading is working properly before deploying your code.
|
||||||
|
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=#{1.hour.to_i}" }
|
||||||
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
|
||||||
|
|
||||||
# Raise exceptions instead of rendering exception templates.
|
# Render exception templates for rescuable exceptions and raise for other exceptions.
|
||||||
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
|
||||||
|
@ -33,6 +34,8 @@ Rails.application.configure do
|
||||||
# Store uploaded files on the local file system in a temporary directory.
|
# Store uploaded files on the local file system in a temporary directory.
|
||||||
config.active_storage.service = :test
|
config.active_storage.service = :test
|
||||||
|
|
||||||
|
# Disable caching for Action Mailer templates even if Action Controller
|
||||||
|
# caching is enabled.
|
||||||
config.action_mailer.perform_caching = 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.
|
||||||
|
@ -40,9 +43,25 @@ 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.action_view.raise_on_missing_translations = true
|
# config.i18n.raise_on_missing_translations = true
|
||||||
|
|
||||||
|
# Annotate rendered view with file names.
|
||||||
|
# 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
|
||||||
|
|
|
@ -1,14 +1,12 @@
|
||||||
# Be sure to restart your server when you modify this file.
|
# Be sure to restart your server when you modify this file.
|
||||||
|
|
||||||
# Version of your assets, change this if you want to expire all your assets.
|
# Version of your assets, change this if you want to expire all your assets.
|
||||||
Rails.application.config.assets.version = '1.0'
|
Rails.application.config.assets.version = "1.0"
|
||||||
|
|
||||||
# Add additional assets to the asset load path.
|
# Add additional assets to the asset load path.
|
||||||
# Rails.application.config.assets.paths << Emoji.images_path
|
# Rails.application.config.assets.paths << Emoji.images_path
|
||||||
# Add Yarn node_modules folder to the asset load path.
|
|
||||||
Rails.application.config.assets.paths << Rails.root.join('node_modules')
|
|
||||||
|
|
||||||
# Precompile additional assets.
|
# Precompile additional assets.
|
||||||
# application.js, application.css, and all non-JS/CSS in the app/assets
|
# application.js, application.css, and all non-JS/CSS in the app/assets
|
||||||
# folder are already added.
|
# folder are already added.
|
||||||
# Rails.application.config.assets.precompile += %w( admin.js admin.css )
|
# Rails.application.config.assets.precompile += %w[ admin.js admin.css ]
|
||||||
|
|
|
@ -1,30 +1,25 @@
|
||||||
# Be sure to restart your server when you modify this file.
|
# Be sure to restart your server when you modify this file.
|
||||||
|
|
||||||
# Define an application-wide content security policy
|
# Define an application-wide content security policy.
|
||||||
# For further information see the following documentation
|
# See the Securing Rails Applications Guide for more information:
|
||||||
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
|
# https://guides.rubyonrails.org/security.html#content-security-policy-header
|
||||||
|
|
||||||
# Rails.application.config.content_security_policy do |policy|
|
# Rails.application.configure do
|
||||||
# policy.default_src :self, :https
|
# config.content_security_policy do |policy|
|
||||||
# policy.font_src :self, :https, :data
|
# policy.default_src :self, :https
|
||||||
# policy.img_src :self, :https, :data
|
# policy.font_src :self, :https, :data
|
||||||
# policy.object_src :none
|
# policy.img_src :self, :https, :data
|
||||||
# policy.script_src :self, :https
|
# policy.object_src :none
|
||||||
# policy.style_src :self, :https
|
# policy.script_src :self, :https
|
||||||
# # If you are using webpack-dev-server then specify webpack-dev-server host
|
# policy.style_src :self, :https
|
||||||
# policy.connect_src :self, :https, "http://localhost:3035", "ws://localhost:3035" if Rails.env.development?
|
# # Specify URI for violation reports
|
||||||
|
# # policy.report_uri "/csp-violation-report-endpoint"
|
||||||
# # Specify URI for violation reports
|
# end
|
||||||
# # policy.report_uri "/csp-violation-report-endpoint"
|
#
|
||||||
|
# # 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_directives = %w(script-src style-src)
|
||||||
|
#
|
||||||
|
# # Report violations without enforcing the policy.
|
||||||
|
# # config.content_security_policy_report_only = true
|
||||||
# end
|
# end
|
||||||
|
|
||||||
# If you are using UJS then enable automatic nonce generation
|
|
||||||
# Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) }
|
|
||||||
|
|
||||||
# Set the nonce only to specific directives
|
|
||||||
# Rails.application.config.content_security_policy_nonce_directives = %w(script-src)
|
|
||||||
|
|
||||||
# Report CSP violations to a specified URI
|
|
||||||
# For further information see the following documentation:
|
|
||||||
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
|
|
||||||
# Rails.application.config.content_security_policy_report_only = true
|
|
||||||
|
|
|
@ -1,4 +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 sensitive parameters which will be filtered from the log file.
|
# Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file.
|
||||||
Rails.application.config.filter_parameters += [:password]
|
# Use this to limit dissemination of sensitive information.
|
||||||
|
# See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors.
|
||||||
|
Rails.application.config.filter_parameters += [
|
||||||
|
:passw, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
|
||||||
|
]
|
||||||
|
|
|
@ -4,13 +4,13 @@
|
||||||
# are locale specific, and you may define rules for as many different
|
# are locale specific, and you may define rules for as many different
|
||||||
# locales as you wish. All of these examples are active by default:
|
# locales as you wish. All of these examples are active by default:
|
||||||
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
||||||
# inflect.plural /^(ox)$/i, '\1en'
|
# inflect.plural /^(ox)$/i, "\\1en"
|
||||||
# inflect.singular /^(ox)en/i, '\1'
|
# inflect.singular /^(ox)en/i, "\\1"
|
||||||
# inflect.irregular 'person', 'people'
|
# inflect.irregular "person", "people"
|
||||||
# inflect.uncountable %w( fish sheep )
|
# inflect.uncountable %w( fish sheep )
|
||||||
# end
|
# end
|
||||||
|
|
||||||
# These inflection rules are supported but not enabled by default:
|
# These inflection rules are supported but not enabled by default:
|
||||||
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
||||||
# inflect.acronym 'RESTful'
|
# inflect.acronym "RESTful"
|
||||||
# end
|
# end
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
# Be sure to restart your server when you modify this file.
|
|
||||||
#
|
|
||||||
# This file contains migration options to ease your Rails 5.1 upgrade.
|
|
||||||
#
|
|
||||||
# Once upgraded flip defaults one by one to migrate to the new default.
|
|
||||||
#
|
|
||||||
# Read the Guide for Upgrading Ruby on Rails for more info on each option.
|
|
||||||
|
|
||||||
# Make `form_with` generate non-remote forms.
|
|
||||||
Rails.application.config.action_view.form_with_generates_remote_forms = false
|
|
||||||
|
|
||||||
# Unknown asset fallback will return the path passed in when the given
|
|
||||||
# asset is not present in the asset pipeline.
|
|
||||||
# Rails.application.config.assets.unknown_asset_fallback = false
|
|
|
@ -1,38 +0,0 @@
|
||||||
# Be sure to restart your server when you modify this file.
|
|
||||||
#
|
|
||||||
# This file contains migration options to ease your Rails 5.2 upgrade.
|
|
||||||
#
|
|
||||||
# Once upgraded flip defaults one by one to migrate to the new default.
|
|
||||||
#
|
|
||||||
# Read the Guide for Upgrading Ruby on Rails for more info on each option.
|
|
||||||
|
|
||||||
# Make Active Record use stable #cache_key alongside new #cache_version method.
|
|
||||||
# This is needed for recyclable cache keys.
|
|
||||||
# Rails.application.config.active_record.cache_versioning = true
|
|
||||||
|
|
||||||
# Use AES-256-GCM authenticated encryption for encrypted cookies.
|
|
||||||
# Also, embed cookie expiry in signed or encrypted cookies for increased security.
|
|
||||||
#
|
|
||||||
# This option is not backwards compatible with earlier Rails versions.
|
|
||||||
# It's best enabled when your entire app is migrated and stable on 5.2.
|
|
||||||
#
|
|
||||||
# Existing cookies will be converted on read then written with the new scheme.
|
|
||||||
# Rails.application.config.action_dispatch.use_authenticated_cookie_encryption = true
|
|
||||||
|
|
||||||
# Use AES-256-GCM authenticated encryption as default cipher for encrypting messages
|
|
||||||
# instead of AES-256-CBC, when use_authenticated_message_encryption is set to true.
|
|
||||||
# Rails.application.config.active_support.use_authenticated_message_encryption = true
|
|
||||||
|
|
||||||
# Add default protection from forgery to ActionController::Base instead of in
|
|
||||||
# ApplicationController.
|
|
||||||
# Rails.application.config.action_controller.default_protect_from_forgery = true
|
|
||||||
|
|
||||||
# Store boolean values are in sqlite3 databases as 1 and 0 instead of 't' and
|
|
||||||
# 'f' after migrating old data.
|
|
||||||
# Rails.application.config.active_record.sqlite3.represent_boolean_as_integer = true
|
|
||||||
|
|
||||||
# Use SHA-1 instead of MD5 to generate non-sensitive digests, such as the ETag header.
|
|
||||||
# Rails.application.config.active_support.use_sha1_digests = true
|
|
||||||
|
|
||||||
# Make `form_with` generate id attributes for any generated HTML tags.
|
|
||||||
# Rails.application.config.action_view.form_with_generates_ids = true
|
|
|
@ -1,45 +0,0 @@
|
||||||
# Be sure to restart your server when you modify this file.
|
|
||||||
#
|
|
||||||
# This file contains migration options to ease your Rails 6.0 upgrade.
|
|
||||||
#
|
|
||||||
# Once upgraded flip defaults one by one to migrate to the new default.
|
|
||||||
#
|
|
||||||
# Read the Guide for Upgrading Ruby on Rails for more info on each option.
|
|
||||||
|
|
||||||
# Don't force requests from old versions of IE to be UTF-8 encoded.
|
|
||||||
# Rails.application.config.action_view.default_enforce_utf8 = false
|
|
||||||
|
|
||||||
# Embed purpose and expiry metadata inside signed and encrypted
|
|
||||||
# cookies for increased security.
|
|
||||||
#
|
|
||||||
# This option is not backwards compatible with earlier Rails versions.
|
|
||||||
# It's best enabled when your entire app is migrated and stable on 6.0.
|
|
||||||
# Rails.application.config.action_dispatch.use_cookies_with_metadata = true
|
|
||||||
|
|
||||||
# Change the return value of `ActionDispatch::Response#content_type` to Content-Type header without modification.
|
|
||||||
# Rails.application.config.action_dispatch.return_only_media_type_on_content_type = false
|
|
||||||
|
|
||||||
# Return false instead of self when enqueuing is aborted from a callback.
|
|
||||||
# Rails.application.config.active_job.return_false_on_aborted_enqueue = true
|
|
||||||
|
|
||||||
# Send Active Storage analysis and purge jobs to dedicated queues.
|
|
||||||
# Rails.application.config.active_storage.queues.analysis = :active_storage_analysis
|
|
||||||
# Rails.application.config.active_storage.queues.purge = :active_storage_purge
|
|
||||||
|
|
||||||
# When assigning to a collection of attachments declared via `has_many_attached`, replace existing
|
|
||||||
# attachments instead of appending. Use #attach to add new attachments without replacing existing ones.
|
|
||||||
# Rails.application.config.active_storage.replace_on_assign_to_many = true
|
|
||||||
|
|
||||||
# Use ActionMailer::MailDeliveryJob for sending parameterized and normal mail.
|
|
||||||
#
|
|
||||||
# The default delivery jobs (ActionMailer::Parameterized::DeliveryJob, ActionMailer::DeliveryJob),
|
|
||||||
# will be removed in Rails 6.1. This setting is not backwards compatible with earlier Rails versions.
|
|
||||||
# If you send mail in the background, job workers need to have a copy of
|
|
||||||
# MailDeliveryJob to ensure all delivery jobs are processed properly.
|
|
||||||
# Make sure your entire app is migrated and stable on 6.0 before using this setting.
|
|
||||||
# Rails.application.config.action_mailer.delivery_job = "ActionMailer::MailDeliveryJob"
|
|
||||||
|
|
||||||
# Enable the same cache key to be reused when the object being cached of type
|
|
||||||
# `ActiveRecord::Relation` changes by moving the volatile information (max updated at and count)
|
|
||||||
# of the relation's cache key into the cache version to support recycling cache key.
|
|
||||||
# Rails.application.config.active_record.collection_cache_versioning = true
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
# Be sure to restart your server when you modify this file.
|
||||||
|
|
||||||
|
# Define an application-wide HTTP permissions policy. For further
|
||||||
|
# information see: https://developers.google.com/web/updates/2018/06/feature-policy
|
||||||
|
|
||||||
|
# Rails.application.config.permissions_policy do |policy|
|
||||||
|
# policy.camera :none
|
||||||
|
# policy.gyroscope :none
|
||||||
|
# policy.microphone :none
|
||||||
|
# policy.usb :none
|
||||||
|
# policy.fullscreen :self
|
||||||
|
# policy.payment :self, "https://secure.example.com"
|
||||||
|
# end
|
|
@ -0,0 +1,5 @@
|
||||||
|
require 'net/http'
|
||||||
|
|
||||||
|
File.read(Rails.root.join('config', 'rack_attack_blocklist.txt')).split("\n").each do |blocked_ip|
|
||||||
|
Rack::Attack.blocklist_ip(blocked_ip)
|
||||||
|
end
|
|
@ -1,6 +1,6 @@
|
||||||
bg:
|
bg:
|
||||||
generic:
|
generic:
|
||||||
title: Възможни лекции за OpenFest 2022
|
title: Възможни лекции за OpenFest 2024
|
||||||
submit: Изпрати
|
submit: Изпрати
|
||||||
store_and_submit_changes: Запази локално промените и ги изпрати, ако е възможно
|
store_and_submit_changes: Запази локално промените и ги изпрати, ако е възможно
|
||||||
help_us_reduce_the_conflicts: Помогнете ни да намалим конфликтите в програмата на OpenFest
|
help_us_reduce_the_conflicts: Помогнете ни да намалим конфликтите в програмата на OpenFest
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
en:
|
en:
|
||||||
generic:
|
generic:
|
||||||
title: OpenFest 2022 Talk Preference Poll
|
title: OpenFest 2024 Talk Preference Poll
|
||||||
submit: Submit
|
submit: Submit
|
||||||
store_and_submit_changes: Store your changes locally and submit them if possible
|
store_and_submit_changes: Store your changes locally and submit them if possible
|
||||||
help_us_reduce_the_conflicts: "Help us to reduce the conflicts in OpenFest's schedule"
|
help_us_reduce_the_conflicts: "Help us to reduce the conflicts in OpenFest's schedule"
|
||||||
|
|
|
@ -1,56 +1,34 @@
|
||||||
# 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.
|
# Puma starts a configurable number of processes (workers) and each process
|
||||||
|
# serves each request in a thread from an internal thread pool.
|
||||||
#
|
#
|
||||||
threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
|
# 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
|
||||||
|
# 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
|
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)
|
||||||
port ENV.fetch("PORT") { 3000 }
|
|
||||||
|
|
||||||
# Specifies the `environment` that Puma will run in.
|
# Allow puma to be restarted by `bin/rails restart` command.
|
||||||
#
|
|
||||||
environment ENV.fetch("RAILS_ENV") { "development" }
|
|
||||||
|
|
||||||
# Specifies the number of `workers` to boot in clustered mode.
|
|
||||||
# Workers are forked webserver 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. If you use this option
|
|
||||||
# you need to make sure to reconnect any threads in the `on_worker_boot`
|
|
||||||
# block.
|
|
||||||
#
|
|
||||||
# preload_app!
|
|
||||||
|
|
||||||
# If you are preloading your application and using Active Record, it's
|
|
||||||
# recommended that you close any connections to the database before workers
|
|
||||||
# are forked to prevent connection leakage.
|
|
||||||
#
|
|
||||||
# before_fork do
|
|
||||||
# ActiveRecord::Base.connection_pool.disconnect! if defined?(ActiveRecord)
|
|
||||||
# end
|
|
||||||
|
|
||||||
# The code in the `on_worker_boot` will be called if you are using
|
|
||||||
# clustered mode by specifying a number of `workers`. After each worker
|
|
||||||
# process is booted, this block will be run. If you are using the `preload_app!`
|
|
||||||
# option, you will want to use this block to reconnect to any threads
|
|
||||||
# or connections that may have been created at application boot, as Ruby
|
|
||||||
# cannot share connections between processes.
|
|
||||||
#
|
|
||||||
# on_worker_boot do
|
|
||||||
# ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
|
|
||||||
# end
|
|
||||||
#
|
|
||||||
|
|
||||||
# Allow puma to be restarted by `rails restart` command.
|
|
||||||
plugin :tmp_restart
|
plugin :tmp_restart
|
||||||
|
|
||||||
|
# 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"]
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,6 @@
|
||||||
class TalkPreference < ActiveRecord::Base
|
class TalkPreference < ActiveRecord::Base
|
||||||
self.primary_key = :unique_id
|
self.primary_key = :unique_id
|
||||||
serialize :talks, Array
|
serialize :talks, type: Array, coder: JSON
|
||||||
end
|
end
|
||||||
|
|
||||||
class SelectedTalk < ApplicationRecord
|
class SelectedTalk < ApplicationRecord
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
class TalkPreference < ActiveRecord::Base
|
class TalkPreference < ActiveRecord::Base
|
||||||
self.primary_key = :unique_id
|
self.primary_key = :unique_id
|
||||||
has_many :selected_talks
|
has_many :selected_talks
|
||||||
serialize :talks, Array
|
serialize :talks, type: Array, coder: JSON
|
||||||
end
|
end
|
||||||
|
|
||||||
class SelectedTalk < ApplicationRecord
|
class SelectedTalk < ApplicationRecord
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
# This migration comes from active_storage (originally 20190112182829)
|
||||||
|
class AddServiceNameToActiveStorageBlobs < ActiveRecord::Migration[6.0]
|
||||||
|
def up
|
||||||
|
return unless table_exists?(:active_storage_blobs)
|
||||||
|
|
||||||
|
unless column_exists?(:active_storage_blobs, :service_name)
|
||||||
|
add_column :active_storage_blobs, :service_name, :string
|
||||||
|
|
||||||
|
if configured_service = ActiveStorage::Blob.service.name
|
||||||
|
ActiveStorage::Blob.unscoped.update_all(service_name: configured_service)
|
||||||
|
end
|
||||||
|
|
||||||
|
change_column :active_storage_blobs, :service_name, :string, null: false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
return unless table_exists?(:active_storage_blobs)
|
||||||
|
|
||||||
|
remove_column :active_storage_blobs, :service_name
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,27 @@
|
||||||
|
# This migration comes from active_storage (originally 20191206030411)
|
||||||
|
class CreateActiveStorageVariantRecords < ActiveRecord::Migration[6.0]
|
||||||
|
def change
|
||||||
|
return unless table_exists?(:active_storage_blobs)
|
||||||
|
|
||||||
|
# Use Active Record's configured type for primary key
|
||||||
|
create_table :active_storage_variant_records, id: primary_key_type, if_not_exists: true do |t|
|
||||||
|
t.belongs_to :blob, null: false, index: false, type: blobs_primary_key_type
|
||||||
|
t.string :variation_digest, null: false
|
||||||
|
|
||||||
|
t.index %i[ blob_id variation_digest ], name: "index_active_storage_variant_records_uniqueness", unique: true
|
||||||
|
t.foreign_key :active_storage_blobs, column: :blob_id
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
def primary_key_type
|
||||||
|
config = Rails.configuration.generators
|
||||||
|
config.options[config.orm][:primary_key_type] || :primary_key
|
||||||
|
end
|
||||||
|
|
||||||
|
def blobs_primary_key_type
|
||||||
|
pkey_name = connection.primary_key(:active_storage_blobs)
|
||||||
|
pkey_column = connection.columns(:active_storage_blobs).find { |c| c.name == pkey_name }
|
||||||
|
pkey_column.bigint? ? :bigint : pkey_column.type
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,8 @@
|
||||||
|
# This migration comes from active_storage (originally 20211119233751)
|
||||||
|
class RemoveNotNullOnActiveStorageBlobsChecksum < ActiveRecord::Migration[6.0]
|
||||||
|
def change
|
||||||
|
return unless table_exists?(:active_storage_blobs)
|
||||||
|
|
||||||
|
change_column_null(:active_storage_blobs, :checksum, true)
|
||||||
|
end
|
||||||
|
end
|
|
@ -4,7 +4,7 @@
|
||||||
<title>The page you were looking for doesn't exist (404)</title>
|
<title>The page you were looking for doesn't exist (404)</title>
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||||
<style>
|
<style>
|
||||||
body {
|
.rails-default-error-page {
|
||||||
background-color: #EFEFEF;
|
background-color: #EFEFEF;
|
||||||
color: #2E2F30;
|
color: #2E2F30;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -12,13 +12,13 @@
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.dialog {
|
.rails-default-error-page div.dialog {
|
||||||
width: 95%;
|
width: 95%;
|
||||||
max-width: 33em;
|
max-width: 33em;
|
||||||
margin: 4em auto 0;
|
margin: 4em auto 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.dialog > div {
|
.rails-default-error-page div.dialog > div {
|
||||||
border: 1px solid #CCC;
|
border: 1px solid #CCC;
|
||||||
border-right-color: #999;
|
border-right-color: #999;
|
||||||
border-left-color: #999;
|
border-left-color: #999;
|
||||||
|
@ -31,13 +31,13 @@
|
||||||
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
.rails-default-error-page h1 {
|
||||||
font-size: 100%;
|
font-size: 100%;
|
||||||
color: #730E15;
|
color: #730E15;
|
||||||
line-height: 1.5em;
|
line-height: 1.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.dialog > p {
|
.rails-default-error-page div.dialog > p {
|
||||||
margin: 0 0 1em;
|
margin: 0 0 1em;
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
background-color: #F7F7F7;
|
background-color: #F7F7F7;
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body class="rails-default-error-page">
|
||||||
<!-- This file lives in public/404.html -->
|
<!-- This file lives in public/404.html -->
|
||||||
<div class="dialog">
|
<div class="dialog">
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -0,0 +1,66 @@
|
||||||
|
<!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>
|
|
@ -4,7 +4,7 @@
|
||||||
<title>The change you wanted was rejected (422)</title>
|
<title>The change you wanted was rejected (422)</title>
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||||
<style>
|
<style>
|
||||||
body {
|
.rails-default-error-page {
|
||||||
background-color: #EFEFEF;
|
background-color: #EFEFEF;
|
||||||
color: #2E2F30;
|
color: #2E2F30;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -12,13 +12,13 @@
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.dialog {
|
.rails-default-error-page div.dialog {
|
||||||
width: 95%;
|
width: 95%;
|
||||||
max-width: 33em;
|
max-width: 33em;
|
||||||
margin: 4em auto 0;
|
margin: 4em auto 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.dialog > div {
|
.rails-default-error-page div.dialog > div {
|
||||||
border: 1px solid #CCC;
|
border: 1px solid #CCC;
|
||||||
border-right-color: #999;
|
border-right-color: #999;
|
||||||
border-left-color: #999;
|
border-left-color: #999;
|
||||||
|
@ -31,13 +31,13 @@
|
||||||
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
.rails-default-error-page h1 {
|
||||||
font-size: 100%;
|
font-size: 100%;
|
||||||
color: #730E15;
|
color: #730E15;
|
||||||
line-height: 1.5em;
|
line-height: 1.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.dialog > p {
|
.rails-default-error-page div.dialog > p {
|
||||||
margin: 0 0 1em;
|
margin: 0 0 1em;
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
background-color: #F7F7F7;
|
background-color: #F7F7F7;
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body class="rails-default-error-page">
|
||||||
<!-- This file lives in public/422.html -->
|
<!-- This file lives in public/422.html -->
|
||||||
<div class="dialog">
|
<div class="dialog">
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<title>We're sorry, but something went wrong (500)</title>
|
<title>We're sorry, but something went wrong (500)</title>
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||||
<style>
|
<style>
|
||||||
body {
|
.rails-default-error-page {
|
||||||
background-color: #EFEFEF;
|
background-color: #EFEFEF;
|
||||||
color: #2E2F30;
|
color: #2E2F30;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -12,13 +12,13 @@
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.dialog {
|
.rails-default-error-page div.dialog {
|
||||||
width: 95%;
|
width: 95%;
|
||||||
max-width: 33em;
|
max-width: 33em;
|
||||||
margin: 4em auto 0;
|
margin: 4em auto 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.dialog > div {
|
.rails-default-error-page div.dialog > div {
|
||||||
border: 1px solid #CCC;
|
border: 1px solid #CCC;
|
||||||
border-right-color: #999;
|
border-right-color: #999;
|
||||||
border-left-color: #999;
|
border-left-color: #999;
|
||||||
|
@ -31,13 +31,13 @@
|
||||||
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
.rails-default-error-page h1 {
|
||||||
font-size: 100%;
|
font-size: 100%;
|
||||||
color: #730E15;
|
color: #730E15;
|
||||||
line-height: 1.5em;
|
line-height: 1.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.dialog > p {
|
.rails-default-error-page div.dialog > p {
|
||||||
margin: 0 0 1em;
|
margin: 0 0 1em;
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
background-color: #F7F7F7;
|
background-color: #F7F7F7;
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body class="rails-default-error-page">
|
||||||
<!-- This file lives in public/500.html -->
|
<!-- This file lives in public/500.html -->
|
||||||
<div class="dialog">
|
<div class="dialog">
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -1,5 +1 @@
|
||||||
# See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
|
# See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
|
||||||
#
|
|
||||||
# To ban all spiders from the entire site uncomment the next two lines:
|
|
||||||
# User-agent: *
|
|
||||||
# Disallow: /
|
|
||||||
|
|
Loading…
Reference in New Issue