diff options
-rw-r--r-- | Gemfile.lock | 199 | ||||
-rw-r--r-- | registration.rb | 4 |
2 files changed, 105 insertions, 98 deletions
diff --git a/Gemfile.lock b/Gemfile.lock index f599a4d..0e194b2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,133 +1,138 @@ GEM remote: https://rubygems.org/ specs: - activesupport (4.2.7) - i18n (~> 0.7) - json (~> 1.7, >= 1.7.7) + activesupport (5.2.1) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 0.7, < 2) minitest (~> 5.1) - thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - addressable (2.4.0) - airbrussh (1.1.0) + addressable (2.5.2) + public_suffix (>= 2.0.2, < 4.0) + airbrussh (1.3.0) sshkit (>= 1.6.1, != 1.7.0) - asciidoctor (1.5.4) - backports (3.6.8) - byebug (9.0.5) - capistrano (3.6.0) + asciidoctor (1.5.7.1) + backports (3.11.4) + byebug (10.0.2) + capistrano (3.11.0) airbrussh (>= 1.0.0) - capistrano-harrow i18n rake (>= 10.0.0) sshkit (>= 1.9.0) - capistrano-bundler (1.1.4) + capistrano-bundler (1.3.0) capistrano (~> 3.1) sshkit (~> 1.2) - capistrano-harrow (0.5.3) - capybara (2.7.1) + capybara (3.7.2) addressable - mime-types (>= 1.16) - nokogiri (>= 1.3.3) - rack (>= 1.0.0) - rack-test (>= 0.5.4) - xpath (~> 2.0) - childprocess (0.5.9) + mini_mime (>= 0.1.3) + nokogiri (~> 1.8) + rack (>= 1.6.0) + rack-test (>= 0.6.3) + xpath (~> 3.1) + childprocess (0.9.0) ffi (~> 1.0, >= 1.0.11) - daemons (1.2.4) - diff-lcs (1.2.5) - eventmachine (1.0.9.1) - ffi (1.9.14) - i18n (0.7.0) - json (1.8.3) - mail (2.6.4) - mime-types (>= 1.16, < 4) - mailcatcher (0.6.4) - activesupport (~> 4.0) - eventmachine (= 1.0.9.1) - mail (~> 2.3) - rack (~> 1.5) - sinatra (~> 1.2) - skinny (~> 0.2.3) - sqlite3 (~> 1.3) - thin (~> 1.5.0) - mime-types (3.1) - mime-types-data (~> 3.2015) - mime-types-data (3.2016.0521) - mini_portile2 (2.1.0) - minitest (5.9.0) - multi_json (1.12.1) + concurrent-ruby (1.0.5) + daemons (1.2.6) + diff-lcs (1.3) + eventmachine (1.2.7) + ffi (1.9.25) + haml (5.0.4) + temple (>= 0.8.0) + tilt + i18n (1.1.0) + concurrent-ruby (~> 1.0) + json (2.1.0) + mail (2.7.0) + mini_mime (>= 0.1.1) + mailcatcher (0.2.4) + eventmachine + haml + i18n + json + mail + sinatra + skinny (>= 0.1.2) + sqlite3-ruby + thin + mini_mime (1.0.1) + mini_portile2 (2.3.0) + minitest (5.11.3) + multi_json (1.13.1) + mustermann (1.0.3) net-scp (1.2.1) net-ssh (>= 2.6.5) - net-ssh (3.2.0) - nokogiri (1.6.8) - mini_portile2 (~> 2.1.0) - pkg-config (~> 1.1.7) - pdf-core (0.6.1) - pkg-config (1.1.7) - prawn (2.1.0) - pdf-core (~> 0.6.1) - ttfunk (~> 1.4.0) + net-ssh (5.0.2) + nokogiri (1.8.4) + mini_portile2 (~> 2.3.0) + pdf-core (0.7.0) + prawn (2.2.2) + pdf-core (~> 0.7.0) + ttfunk (~> 1.5) + public_suffix (3.0.3) puma (3.12.0) - rack (1.6.4) - rack-protection (1.5.3) + rack (2.0.5) + rack-protection (2.0.3) rack - rack-test (0.6.3) - rack (>= 1.0) - rake (11.2.2) - rspec (3.5.0) - rspec-core (~> 3.5.0) - rspec-expectations (~> 3.5.0) - rspec-mocks (~> 3.5.0) - rspec-core (3.5.2) - rspec-support (~> 3.5.0) - rspec-expectations (3.5.0) + rack-test (1.1.0) + rack (>= 1.0, < 3) + rake (12.3.1) + rspec (3.8.0) + rspec-core (~> 3.8.0) + rspec-expectations (~> 3.8.0) + rspec-mocks (~> 3.8.0) + rspec-core (3.8.0) + rspec-support (~> 3.8.0) + rspec-expectations (3.8.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.5.0) + rspec-support (~> 3.8.0) rspec-html-matchers (0.9.1) nokogiri (~> 1) rspec (>= 3.0.0.a, < 4) - rspec-mocks (3.5.0) + rspec-mocks (3.8.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.5.0) - rspec-support (3.5.0) - rubyzip (1.2.0) - selenium-webdriver (2.53.4) + rspec-support (~> 3.8.0) + rspec-support (3.8.0) + rubyzip (1.2.2) + selenium-webdriver (3.14.0) childprocess (~> 0.5) - rubyzip (~> 1.0) - websocket (~> 1.0) - sinatra (1.4.7) - rack (~> 1.5) - rack-protection (~> 1.4) - tilt (>= 1.3, < 3) + rubyzip (~> 1.2) + sinatra (2.0.3) + mustermann (~> 1.0) + rack (~> 2.0) + rack-protection (= 2.0.3) + tilt (~> 2.0) sinatra-config-file (1.0) sinatra-contrib - sinatra-contrib (1.4.7) - backports (>= 2.0) + sinatra-contrib (2.0.3) + activesupport (>= 4.0.0) + backports (>= 2.8.2) multi_json - rack-protection - rack-test - sinatra (~> 1.4.0) + mustermann (~> 1.0) + rack-protection (= 2.0.3) + sinatra (= 2.0.3) tilt (>= 1.3, < 3) sinatra-url-for (0.2.2.1) sinatra (>= 0.9.1.1) - skinny (0.2.4) - eventmachine (~> 1.0.0) - thin (>= 1.5, < 1.7) - sqlite3 (1.3.11) - sshkit (1.11.2) + skinny (0.2.2) + eventmachine (~> 1.0) + thin + sqlite3 (1.3.13) + sqlite3-ruby (1.3.3) + sqlite3 (>= 1.3.3) + sshkit (1.17.0) net-scp (>= 1.1.2) net-ssh (>= 2.8.0) - thin (1.5.1) - daemons (>= 1.0.9) - eventmachine (>= 0.12.6) - rack (>= 1.0.0) - thread_safe (0.3.5) - tilt (2.0.5) - ttfunk (1.4.0) - tzinfo (1.2.2) + temple (0.8.0) + thin (1.7.2) + daemons (~> 1.0, >= 1.0.9) + eventmachine (~> 1.0, >= 1.0.4) + rack (>= 1, < 3) + thread_safe (0.3.6) + tilt (2.0.8) + ttfunk (1.5.1) + tzinfo (1.2.5) thread_safe (~> 0.1) - websocket (1.2.3) - xpath (2.0.0) - nokogiri (~> 1.3) + xpath (3.1.0) + nokogiri (~> 1.8) PLATFORMS ruby diff --git a/registration.rb b/registration.rb index bc62cfa..1a9efe1 100644 --- a/registration.rb +++ b/registration.rb @@ -1,3 +1,4 @@ +require 'mustermann' require 'sinatra/base' require 'sinatra/url_for' require 'sinatra/config_file' @@ -10,10 +11,11 @@ class RegistrationApp < Sinatra::Base include ERB::Util set :logging, true + set :pattern, type: :regex config_file File.join(settings.root, 'config.yml') - before %r{^(?!/registrations_closed$)} do + before Mustermann.new('/|/submit') do redirect to('/registrations_closed') unless accept_registrations(settings) end |