Compare commits

..

1 Commits

Author SHA1 Message Date
dependabot[bot] 3bed7e30f6
Bump rack from 2.2.4 to 2.2.6.2
Bumps [rack](https://github.com/rack/rack) from 2.2.4 to 2.2.6.2.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rack/rack/compare/2.2.4...v2.2.6.2)

---
updated-dependencies:
- dependency-name: rack
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-19 01:15:30 +00:00
44 changed files with 504 additions and 2521 deletions

View File

@ -1,60 +0,0 @@
# 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
View File

@ -1,30 +1,32 @@
source 'https://rubygems.org' source 'https://rubygems.org'
gem 'rails', '~> 7.2.1' gem 'rails', '~> 6.0.4'
gem 'coffee-rails' gem 'sqlite3'
gem 'sass-rails' gem 'sass-rails'
gem 'uglifier' gem 'uglifier'
gem 'coffee-rails'
# gem 'therubyracer', platforms: :ruby # gem 'therubyracer', platforms: :ruby
gem 'jbuilder'
gem 'jquery-rails' gem 'jquery-rails'
gem 'jbuilder'
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 'sqlite3' gem 'capistrano-rails'
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

View File

@ -1,8 +1,8 @@
GIT GIT
remote: https://github.com/rails/activeresource.git remote: https://github.com/rails/activeresource.git
revision: a1f6a19652709f2da6aaa2559f7cd0a4f7d2cf3e revision: 9dfc15e98007d0e546c404d7236a218bb04a8698
specs: specs:
activeresource (6.1.1) activeresource (6.0.0)
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 (7.2.1) actioncable (6.0.5.1)
actionpack (= 7.2.1) actionpack (= 6.0.5.1)
activesupport (= 7.2.1)
nio4r (~> 2.0) nio4r (~> 2.0)
websocket-driver (>= 0.6.1) websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6) actionmailbox (6.0.5.1)
actionmailbox (7.2.1) actionpack (= 6.0.5.1)
actionpack (= 7.2.1) activejob (= 6.0.5.1)
activejob (= 7.2.1) activerecord (= 6.0.5.1)
activerecord (= 7.2.1) activestorage (= 6.0.5.1)
activestorage (= 7.2.1) activesupport (= 6.0.5.1)
activesupport (= 7.2.1) mail (>= 2.7.1)
mail (>= 2.8.0) actionmailer (6.0.5.1)
actionmailer (7.2.1) actionpack (= 6.0.5.1)
actionpack (= 7.2.1) actionview (= 6.0.5.1)
actionview (= 7.2.1) activejob (= 6.0.5.1)
activejob (= 7.2.1) mail (~> 2.5, >= 2.5.4)
activesupport (= 7.2.1) rails-dom-testing (~> 2.0)
mail (>= 2.8.0) actionpack (6.0.5.1)
rails-dom-testing (~> 2.2) actionview (= 6.0.5.1)
actionpack (7.2.1) activesupport (= 6.0.5.1)
actionview (= 7.2.1) rack (~> 2.0, >= 2.0.8)
activesupport (= 7.2.1)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4, < 3.2)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3) rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2) rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.6) rails-html-sanitizer (~> 1.0, >= 1.2.0)
useragent (~> 0.16) actiontext (6.0.5.1)
actiontext (7.2.1) actionpack (= 6.0.5.1)
actionpack (= 7.2.1) activerecord (= 6.0.5.1)
activerecord (= 7.2.1) activestorage (= 6.0.5.1)
activestorage (= 7.2.1) activesupport (= 6.0.5.1)
activesupport (= 7.2.1)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5) nokogiri (>= 1.8.5)
actionview (7.2.1) actionview (6.0.5.1)
activesupport (= 7.2.1) activesupport (= 6.0.5.1)
builder (~> 3.1) builder (~> 3.1)
erubi (~> 1.11) erubi (~> 1.4)
rails-dom-testing (~> 2.2) rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.6) rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (7.2.1) activejob (6.0.5.1)
activesupport (= 7.2.1) activesupport (= 6.0.5.1)
globalid (>= 0.3.6) globalid (>= 0.3.6)
activemodel (7.2.1) activemodel (6.0.5.1)
activesupport (= 7.2.1) activesupport (= 6.0.5.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 (7.2.1) activerecord (6.0.5.1)
activemodel (= 7.2.1) activemodel (= 6.0.5.1)
activesupport (= 7.2.1) activesupport (= 6.0.5.1)
timeout (>= 0.4.0) activestorage (6.0.5.1)
activestorage (7.2.1) actionpack (= 6.0.5.1)
actionpack (= 7.2.1) activejob (= 6.0.5.1)
activejob (= 7.2.1) activerecord (= 6.0.5.1)
activerecord (= 7.2.1)
activesupport (= 7.2.1)
marcel (~> 1.0) marcel (~> 1.0)
activesupport (7.2.1) activesupport (6.0.5.1)
base64 concurrent-ruby (~> 1.0, >= 1.0.2)
bigdecimal i18n (>= 0.7, < 2)
concurrent-ruby (~> 1.0, >= 1.3.1) minitest (~> 5.1)
connection_pool (>= 2.2.5) tzinfo (~> 1.1)
drb zeitwerk (~> 2.2, >= 2.2.2)
i18n (>= 1.6, < 2) airbrussh (1.4.1)
logger (>= 1.4.2) sshkit (>= 1.6.1, != 1.7.0)
minitest (>= 5.1) builder (3.2.4)
securerandom (>= 0.3) capistrano (3.17.1)
tzinfo (~> 2.0, >= 2.0.5) airbrussh (>= 1.0.0)
base64 (0.2.0) i18n
bigdecimal (3.1.8) rake (>= 10.0.0)
bootsnap (1.18.4) sshkit (>= 1.9.0)
msgpack (~> 1.2) capistrano-bundler (2.1.0)
builder (3.3.0) capistrano (~> 3.1)
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,112 +97,85 @@ GEM
coffee-script-source coffee-script-source
execjs execjs
coffee-script-source (1.12.2) coffee-script-source (1.12.2)
concurrent-ruby (1.3.4) concurrent-ruby (1.1.10)
connection_pool (2.4.1)
crass (1.0.6) crass (1.0.6)
date (3.3.4) ed25519 (1.3.0)
drb (2.2.1) erubi (1.11.0)
erubi (1.13.0) execjs (2.8.1)
execjs (2.9.1) ffi (1.15.5)
ffi (1.17.0) globalid (1.0.0)
globalid (1.2.1) activesupport (>= 5.0)
activesupport (>= 6.1) i18n (1.12.0)
i18n (1.14.5)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
io-console (0.7.2) jbuilder (2.11.5)
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.6.0) jquery-rails (4.5.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)
logger (1.6.1) listen (3.7.1)
loofah (2.22.0) rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
loofah (2.18.0)
crass (~> 1.0.2) crass (~> 1.0.2)
nokogiri (>= 1.12.0) nokogiri (>= 1.5.9)
mail (2.8.1) mail (2.7.1)
mini_mime (>= 0.1.1) mini_mime (>= 0.1.1)
net-imap marcel (1.0.2)
net-pop method_source (1.0.0)
net-smtp mini_mime (1.1.2)
marcel (1.0.4) mini_portile2 (2.8.0)
method_source (1.1.0) minitest (5.16.3)
mini_mime (1.1.5) net-scp (4.0.0.rc1)
mini_portile2 (2.8.7) net-ssh (>= 2.6.5, < 8.0.0)
minitest (5.25.1) net-ssh (7.0.1)
msgpack (1.7.2) nio4r (2.5.8)
net-imap (0.4.16) nokogiri (1.13.8)
date mini_portile2 (~> 2.8.0)
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.5.8) pg (1.4.3)
pry (0.14.2) pry (0.14.1)
coderay (~> 1.1) coderay (~> 1.1)
method_source (~> 1.0) method_source (~> 1.0)
pry-rails (0.3.11) pry-rails (0.3.9)
pry (>= 0.13.0) pry (>= 0.10.4)
psych (5.1.2) puma (4.3.12)
stringio
puma (6.4.2)
nio4r (~> 2.0) nio4r (~> 2.0)
racc (1.8.1) racc (1.6.0)
rack (3.1.7) rack (2.2.6.2)
rack-attack (6.7.0) rack-test (2.0.2)
rack (>= 1.0, < 4)
rack-session (2.0.0)
rack (>= 3.0.0)
rack-test (2.1.0)
rack (>= 1.3) rack (>= 1.3)
rackup (2.1.0) rails (6.0.5.1)
rack (>= 3) actioncable (= 6.0.5.1)
webrick (~> 1.8) actionmailbox (= 6.0.5.1)
rails (7.2.1) actionmailer (= 6.0.5.1)
actioncable (= 7.2.1) actionpack (= 6.0.5.1)
actionmailbox (= 7.2.1) actiontext (= 6.0.5.1)
actionmailer (= 7.2.1) actionview (= 6.0.5.1)
actionpack (= 7.2.1) activejob (= 6.0.5.1)
actiontext (= 7.2.1) activemodel (= 6.0.5.1)
actionview (= 7.2.1) activerecord (= 6.0.5.1)
activejob (= 7.2.1) activestorage (= 6.0.5.1)
activemodel (= 7.2.1) activesupport (= 6.0.5.1)
activerecord (= 7.2.1) bundler (>= 1.3.0)
activestorage (= 7.2.1) railties (= 6.0.5.1)
activesupport (= 7.2.1) sprockets-rails (>= 2.0.0)
bundler (>= 1.15.0) rails-dom-testing (2.0.3)
railties (= 7.2.1) activesupport (>= 4.2.0)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6) nokogiri (>= 1.6)
rails-html-sanitizer (1.6.0) rails-html-sanitizer (1.4.3)
loofah (~> 2.21) loofah (~> 2.3)
nokogiri (~> 1.14) railties (6.0.5.1)
railties (7.2.1) actionpack (= 6.0.5.1)
actionpack (= 7.2.1) activesupport (= 6.0.5.1)
activesupport (= 7.2.1) method_source
irb (~> 1.13) rake (>= 0.8.7)
rackup (>= 1.0.0) thor (>= 0.20.3, < 2.0)
rake (>= 12.2) rake (13.0.6)
thor (~> 1.0, >= 1.2.2) rb-fsevent (0.11.2)
zeitwerk (~> 2.6) rb-inotify (0.10.1)
rake (13.2.1) ffi (~> 1.0)
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)
@ -213,50 +186,51 @@ GEM
sprockets (> 3.0) sprockets (> 3.0)
sprockets-rails sprockets-rails
tilt tilt
securerandom (0.3.1) spring (4.0.0)
spring (4.2.1) sprockets (4.1.1)
sprockets (4.2.1)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
rack (>= 2.2.4, < 4) rack (> 1, < 3)
sprockets-rails (3.5.2) sprockets-rails (3.4.2)
actionpack (>= 6.1) actionpack (>= 5.2)
activesupport (>= 6.1) activesupport (>= 5.2)
sprockets (>= 3.0.0) sprockets (>= 3.0.0)
sqlite3 (2.0.4) sqlite3 (1.4.4)
mini_portile2 (~> 2.8.0) sshkit (1.21.2)
stringio (3.1.1) net-scp (>= 1.1.2)
thor (1.3.2) net-ssh (>= 2.8.0)
tilt (2.4.0) thor (1.2.1)
timeout (0.4.1) thread_safe (0.3.6)
tzinfo (2.0.6) tilt (2.0.11)
concurrent-ruby (~> 1.0) tzinfo (1.2.10)
thread_safe (~> 0.1)
uglifier (4.2.0) uglifier (4.2.0)
execjs (>= 0.3.0, < 3) execjs (>= 0.3.0, < 3)
useragent (0.16.10) websocket-driver (0.7.5)
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.18) zeitwerk (2.6.0)
PLATFORMS PLATFORMS
ruby ruby
DEPENDENCIES DEPENDENCIES
activeresource! activeresource!
bootsnap capistrano-rails
capistrano-rvm
capistrano3-puma
coffee-rails coffee-rails
ed25519
jbuilder jbuilder
jquery-rails jquery-rails
listen
pg pg
pry-rails pry-rails
puma puma (< 5)
rack-attack rails (~> 6.0.4)
rails (~> 7.2.1)
sass-rails sass-rails
spring spring
sqlite3 sqlite3
uglifier uglifier
BUNDLED WITH BUNDLED WITH
2.5.16 2.2.22

Binary file not shown.

After

Width:  |  Height:  |  Size: 388 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

View File

@ -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 = ENV['GAUGE_TALKS_ENDPOINT'] || 'https://cfp.openfest.org/api/conferences/1' self.site = "https://cfp.openfest.org/api/conferences/9"
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)

View File

@ -72,7 +72,9 @@
<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="80"><h2>Technical</h2><div id="qrcode" class="hidden"></div></div> <div class="track" id="72"><h2>Technical</h2><div id="qrcode" class="hidden"></div></div>
<div class="track" id="79"><h2>Advanced Technical</h2></div> <div class="track" id="69"><h2>Advanced Technical</h2></div>
<div class="track" id="81"><h2>OpenArt</h2></div> <div class="track" id="70"><h2>OpenBiz</h2></div>
<div class="track" id="82"><h2>Community/Social</h2></div> <div class="track" id="68"><h2>Civic Hacking</h2></div>
<div class="track" id="67"><h2>Social</h2></div>
<div class="track" id="71"><h2>Education</h2></div>

View File

@ -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.webp' %>"> <meta name="twitter:image" content="<%= image_url 'openfest-splash.png' %>">
<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.webp' %>"> <meta property="og:image" content="<%= image_url 'openfest-splash.png' %>">
<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">

View File

@ -1,8 +0,0 @@
#!/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 "${@}"

View File

@ -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'

View File

@ -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

View File

@ -1,37 +1,36 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
require "fileutils" require 'fileutils'
APP_ROOT = File.expand_path("..", __dir__) # path to your application root.
APP_NAME = "gauge" APP_ROOT = File.expand_path('..', __dir__)
def system!(*args) def system!(*args)
system(*args, exception: true) system(*args) || abort("\n== Command #{args} failed ==")
end end
FileUtils.chdir APP_ROOT do FileUtils.chdir APP_ROOT do
# This script is a way to set up or update your development environment automatically. # This script is a way to setup or update your development environment automatically.
# This script is idempotent, so that you can run it at any time and get an expectable outcome. # This script is idempotent, so that you can run it at anytime 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

View File

@ -9,24 +9,16 @@ 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 7.2 config.load_defaults 5.1
# 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 = %i[bg en] config.i18n.available_locales = [:bg, :en]
config.i18n.default_locale = :bg config.i18n.default_locale = :bg
# Please, add to the `ignore` list any other `lib` subdirectories that do # Settings in config/environments/* take precedence over those specified here.
# not contain `.rb` files, or that should not be reloaded or eager loaded. # Application configuration can go into files in config/initializers
# Common ones are `templates`, `generators`, or `middleware`, for example. # -- all .rb files in that directory are automatically loaded after loading
config.autoload_lib(ignore: %w[assets tasks]) # the framework and any gems in your application.
# 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

View File

@ -1,4 +1,3 @@
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'

View File

@ -21,10 +21,5 @@ test:
database: db/test.sqlite3 database: db/test.sqlite3
production: production:
adapter: postgresql <<: *default
encoding: unicode database: db/production.sqlite3
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"] %>

View File

@ -1,5 +1,5 @@
# config valid only for current version of Capistrano # config valid only for current version of Capistrano
lock '3.17.1' lock '3.14.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'

View File

@ -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!

View File

@ -1,12 +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.
# In the development environment your application's code is reloaded any time # In the development environment your application's code is reloaded on
# it changes. This slows down response time but is perfect for development # every request. 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.enable_reloading = true config.cache_classes = false
# Do not eager load code on boot. # Do not eager load code on boot.
config.eager_load = false config.eager_load = false
@ -14,17 +12,16 @@ 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 = { "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
@ -37,42 +34,29 @@ 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
# Highlight code that enqueued background job in logs. # Debug mode disables concatenation and preprocessing of assets.
config.active_job.verbose_enqueue_logs = true # This option may cause significant delays in view rendering with a large
# 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.i18n.raise_on_missing_translations = true # config.action_view.raise_on_missing_translations = true
# Annotate rendered view with file names. # Use an evented file watcher to asynchronously detect changes in source code,
config.action_view.annotate_rendered_view_with_filenames = true # routes, locales, etc. This feature depends on the listen gem.
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
# Uncomment if you wish to allow Action Cable access from any origin.
# config.action_cable.disable_request_forgery_protection = true
# Raise error when a before_action's only/except options reference missing actions.
config.action_controller.raise_on_missing_callback_actions = true
end end

View File

@ -1,10 +1,8 @@
require "active_support/core_ext/integer/time"
Rails.application.configure do Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb. # Settings specified here will take precedence over those in config/application.rb.
# Code is not reloaded between requests. # Code is not reloaded between requests.
config.enable_reloading = false config.cache_classes = true
# 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
@ -13,69 +11,56 @@ 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 ENV["RAILS_MASTER_KEY"], config/master.key, or an environment # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
# key such as config/credentials/production.key. This key is used to decrypt credentials (and other encrypted files). # or in config/master.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. # Disable serving static files from the `/public` folder by default since
# config.public_file_server.enabled = false # Apache or NGINX already handles this.
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
# Compress CSS using a preprocessor. # Compress JavaScripts and CSS.
config.assets.js_compressor = :uglifier
# config.assets.css_compressor = :sass # config.assets.css_compressor = :sass
# Do not fall back to assets pipeline if a precompiled asset is missed. # Do not fallback 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.asset_host = "http://assets.example.com" # config.action_controller.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
# Skip http-to-https redirect for the default health check endpoint. # Use the lowest log level to ensure availability of diagnostic information
# config.ssl_options = { redirect: { exclude: ->(request) { request.path == "/up" } } } # when problems arise.
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.
@ -86,17 +71,43 @@ 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
# Don't log any deprecations. # Send deprecation notices to registered listeners.
config.active_support.report_deprecations = false config.active_support.deprecation = :notify
# 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
# Enable DNS rebinding protection and other `Host` header attacks. # Inserts middleware to perform automatic connection switching.
# config.hosts = [ # The `database_selector` hash is used to pass options to the DatabaseSelector
# "example.com", # Allow requests from example.com # middleware. The `delay` is used to determine how long to wait after a write
# /.*\.example\.com/ # Allow requests from subdomains like `www.example.com` # to send a subsequent read to the primary.
# ] #
# Skip DNS rebinding protection for the default health check endpoint. # The `database_resolver` class is used by the middleware to determine which
# config.host_authorization = { exclude: ->(request) { request.path == "/up" } } # database is appropriate to use based on the time delay.
#
# The `database_resolver_context` class is used by the middleware to set
# timestamps for the last write to the primary. The resolver uses the context
# class timestamps to determine how long to wait before reading from the
# replica.
#
# By default Rails will store a last write timestamp in the session. The
# DatabaseSelector middleware is designed as such you can define your own
# strategy for connection switching and pass that into the middleware through
# these configuration options.
# config.active_record.database_selector = { delay: 2.seconds }
# config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver
# config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session
end end

View File

@ -1,5 +1,3 @@
require "active_support/core_ext/integer/time"
# The test environment is used exclusively to run your application's # The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that # test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suite and is wiped # your test database is "scratch space" for the test suite and is wiped
@ -7,26 +5,27 @@ 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.
config.cache_classes = true
# While tests run files are not watched, reloading is not necessary. # Do not eager load code on boot. This avoids loading your whole application
config.enable_reloading = false # just for the purpose of running a single test. If you are using a tool that
# preloads Rails for running tests, you may have to set it to true.
# Eager loading loads your entire application. When running a single test locally, config.eager_load = false
# this is usually not necessary, and can slow down your test suite. However, it's
# recommended that you enable it in continuous integration systems to ensure eager
# loading is working properly before deploying your code.
config.eager_load = ENV["CI"].present?
# 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 = false
# 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
@ -34,8 +33,6 @@ 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.
@ -43,25 +40,9 @@ 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.action_view.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

View File

@ -1,12 +1,14 @@
# 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 )

View File

@ -1,25 +1,30 @@
# 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
# See the Securing Rails Applications Guide for more information: # For further information see the following documentation
# https://guides.rubyonrails.org/security.html#content-security-policy-header # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
# Rails.application.configure do # Rails.application.config.content_security_policy do |policy|
# config.content_security_policy do |policy| # policy.default_src :self, :https
# policy.default_src :self, :https # policy.font_src :self, :https, :data
# policy.font_src :self, :https, :data # policy.img_src :self, :https, :data
# policy.img_src :self, :https, :data # policy.object_src :none
# policy.object_src :none # policy.script_src :self, :https
# policy.script_src :self, :https # policy.style_src :self, :https
# policy.style_src :self, :https # # If you are using webpack-dev-server then specify webpack-dev-server host
# # Specify URI for violation reports # policy.connect_src :self, :https, "http://localhost:3035", "ws://localhost:3035" if Rails.env.development?
# # policy.report_uri "/csp-violation-report-endpoint"
# end # # Specify URI for violation reports
# # # 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

View File

@ -1,8 +1,4 @@
# Be sure to restart your server when you modify this file. # Be sure to restart your server when you modify this file.
# Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file. # Configure sensitive parameters which will be filtered from the log file.
# Use this to limit dissemination of sensitive information. Rails.application.config.filter_parameters += [:password]
# 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
]

View File

@ -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

View File

@ -0,0 +1,14 @@
# 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

View File

@ -0,0 +1,38 @@
# 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

View File

@ -0,0 +1,45 @@
# 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

View File

@ -1,13 +0,0 @@
# 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

View File

@ -1,5 +0,0 @@
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

View File

@ -1,6 +1,6 @@
bg: bg:
generic: generic:
title: Възможни лекции за OpenFest 2024 title: Възможни лекции за OpenFest 2022
submit: Изпрати submit: Изпрати
store_and_submit_changes: Запази локално промените и ги изпрати, ако е възможно store_and_submit_changes: Запази локално промените и ги изпрати, ако е възможно
help_us_reduce_the_conflicts: Помогнете ни да намалим конфликтите в програмата на OpenFest help_us_reduce_the_conflicts: Помогнете ни да намалим конфликтите в програмата на OpenFest

View File

@ -1,6 +1,6 @@
en: en:
generic: generic:
title: OpenFest 2024 Talk Preference Poll title: OpenFest 2022 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"

View File

@ -1,34 +1,56 @@
# 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
# Puma starts a configurable number of processes (workers) and each process # and maximum; this matches the default thread size of Active Record.
# serves each request in a thread from an internal thread pool.
# #
# The ideal number of threads per worker depends both on how much time the threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
# 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 }
# Allow puma to be restarted by `bin/rails restart` command. # Specifies the `environment` that Puma will run in.
#
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

View File

@ -1,6 +1,6 @@
class TalkPreference < ActiveRecord::Base class TalkPreference < ActiveRecord::Base
self.primary_key = :unique_id self.primary_key = :unique_id
serialize :talks, type: Array, coder: JSON serialize :talks, Array
end end
class SelectedTalk < ApplicationRecord class SelectedTalk < ApplicationRecord

View File

@ -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, type: Array, coder: JSON serialize :talks, Array
end end
class SelectedTalk < ApplicationRecord class SelectedTalk < ApplicationRecord

View File

@ -1,22 +0,0 @@
# 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

View File

@ -1,27 +0,0 @@
# 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

View File

@ -1,8 +0,0 @@
# 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

View File

@ -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>
.rails-default-error-page { body {
background-color: #EFEFEF; background-color: #EFEFEF;
color: #2E2F30; color: #2E2F30;
text-align: center; text-align: center;
@ -12,13 +12,13 @@
margin: 0; margin: 0;
} }
.rails-default-error-page div.dialog { div.dialog {
width: 95%; width: 95%;
max-width: 33em; max-width: 33em;
margin: 4em auto 0; margin: 4em auto 0;
} }
.rails-default-error-page div.dialog > div { 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);
} }
.rails-default-error-page h1 { h1 {
font-size: 100%; font-size: 100%;
color: #730E15; color: #730E15;
line-height: 1.5em; line-height: 1.5em;
} }
.rails-default-error-page div.dialog > p { 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 class="rails-default-error-page"> <body>
<!-- This file lives in public/404.html --> <!-- This file lives in public/404.html -->
<div class="dialog"> <div class="dialog">
<div> <div>

View File

@ -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>

View File

@ -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>
.rails-default-error-page { body {
background-color: #EFEFEF; background-color: #EFEFEF;
color: #2E2F30; color: #2E2F30;
text-align: center; text-align: center;
@ -12,13 +12,13 @@
margin: 0; margin: 0;
} }
.rails-default-error-page div.dialog { div.dialog {
width: 95%; width: 95%;
max-width: 33em; max-width: 33em;
margin: 4em auto 0; margin: 4em auto 0;
} }
.rails-default-error-page div.dialog > div { 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);
} }
.rails-default-error-page h1 { h1 {
font-size: 100%; font-size: 100%;
color: #730E15; color: #730E15;
line-height: 1.5em; line-height: 1.5em;
} }
.rails-default-error-page div.dialog > p { 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 class="rails-default-error-page"> <body>
<!-- This file lives in public/422.html --> <!-- This file lives in public/422.html -->
<div class="dialog"> <div class="dialog">
<div> <div>

View File

@ -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>
.rails-default-error-page { body {
background-color: #EFEFEF; background-color: #EFEFEF;
color: #2E2F30; color: #2E2F30;
text-align: center; text-align: center;
@ -12,13 +12,13 @@
margin: 0; margin: 0;
} }
.rails-default-error-page div.dialog { div.dialog {
width: 95%; width: 95%;
max-width: 33em; max-width: 33em;
margin: 4em auto 0; margin: 4em auto 0;
} }
.rails-default-error-page div.dialog > div { 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);
} }
.rails-default-error-page h1 { h1 {
font-size: 100%; font-size: 100%;
color: #730E15; color: #730E15;
line-height: 1.5em; line-height: 1.5em;
} }
.rails-default-error-page div.dialog > p { 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 class="rails-default-error-page"> <body>
<!-- This file lives in public/500.html --> <!-- This file lives in public/500.html -->
<div class="dialog"> <div class="dialog">
<div> <div>

View File

@ -1 +1,5 @@
# See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file # See http://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: /

View File