From 0b88cad9722960bbeb509c2511d370fa9178cd20 Mon Sep 17 00:00:00 2001 From: jk779 <1104528+jk779@users.noreply.github.com> Date: Mon, 22 Jan 2024 12:13:51 +0100 Subject: [PATCH] Update to sinatra 4, update puma, add 404 handler --- Gemfile | 2 +- Gemfile.lock | 38 +++++++++++++++++++++++--------------- csp_reporter.rb | 4 ++++ 3 files changed, 28 insertions(+), 16 deletions(-) diff --git a/Gemfile b/Gemfile index 7420ed8..313d650 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source 'https://rubygems.org' -gem 'sinatra' +gem 'sinatra', '~> 4.0' gem 'sqlite3' gem 'json' gem 'puma' diff --git a/Gemfile.lock b/Gemfile.lock index 9c9ede9..0968cb8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,32 +1,40 @@ GEM remote: https://rubygems.org/ specs: - json (2.6.3) - mustermann (2.0.2) + base64 (0.2.0) + json (2.7.1) + mustermann (3.0.0) ruby2_keywords (~> 0.0.1) - nio4r (2.5.9) - puma (6.4.0) + nio4r (2.7.0) + puma (6.4.2) nio4r (~> 2.0) - rack (2.2.8) - rack-protection (2.2.4) - rack + rack (3.0.8) + rack-protection (4.0.0) + base64 (>= 0.1.0) + rack (>= 3.0.0, < 4) + rack-session (2.0.0) + rack (>= 3.0.0) ruby2_keywords (0.0.5) - sinatra (2.2.4) - mustermann (~> 2.0) - rack (~> 2.2) - rack-protection (= 2.2.4) + sinatra (4.0.0) + mustermann (~> 3.0) + rack (>= 3.0.0, < 4) + rack-protection (= 4.0.0) + rack-session (>= 2.0.0, < 3) tilt (~> 2.0) - sqlite3 (1.6.1-arm64-darwin) - tilt (2.0.11) + sqlite3 (1.7.0-arm64-darwin) + sqlite3 (1.7.0-x86_64-linux) + tilt (2.3.0) PLATFORMS arm64-darwin-22 + arm64-darwin-23 + x86_64-linux DEPENDENCIES json puma - sinatra + sinatra (~> 4.0) sqlite3 BUNDLED WITH - 2.4.12 + 2.5.5 diff --git a/csp_reporter.rb b/csp_reporter.rb index be4b256..7188a33 100644 --- a/csp_reporter.rb +++ b/csp_reporter.rb @@ -47,3 +47,7 @@ def authorized? @reports = DB.execute("SELECT * FROM CSP_Reports ORDER BY created_at DESC LIMIT 1000") erb :reports end + +not_found do + 'Not found ¯\_(ツ)_/¯' +end