diff --git a/Gemfile b/Gemfile index 0d9161d..9f69798 100755 --- a/Gemfile +++ b/Gemfile @@ -11,7 +11,8 @@ gem 'dotenv' gem 'guardian-content', github: 'Jackopo/contentapi-ruby' gem 'haml' gem 'sinatra' -gem 'thin' +# gem 'thin' +gem 'falcon' gem 'will_paginate', '~> 3.1.1' group :development do diff --git a/Gemfile.lock b/Gemfile.lock index 0bbfd0a..ee8ba3e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,6 +11,26 @@ GEM addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) ast (2.4.2) + async (1.30.1) + console (~> 1.10) + nio4r (~> 2.3) + timers (~> 4.1) + async-container (0.16.12) + async + async-io + async-http (0.56.5) + async (>= 1.25) + async-io (>= 1.28) + async-pool (>= 0.2) + protocol-http (~> 0.22.0) + protocol-http1 (~> 0.14.0) + protocol-http2 (~> 0.14.0) + async-http-cache (0.4.2) + async-http (~> 0.56) + async-io (1.32.2) + async + async-pool (0.3.9) + async (>= 1.25) backport (1.1.2) benchmark (0.1.1) better_errors (2.9.1) @@ -19,17 +39,31 @@ GEM rack (>= 0.9.0) binding_of_caller (1.0.0) debug_inspector (>= 0.0.1) + build-environment (1.13.0) byebug (11.1.3) coderay (1.1.3) + console (1.14.0) + fiber-local crack (0.4.5) rexml - daemons (1.3.1) debug_inspector (1.0.0) diff-lcs (1.4.4) dotenv (2.7.6) e2mmap (0.1.0) erubi (1.10.0) - eventmachine (1.2.7) + falcon (0.39.2) + async + async-container (~> 0.16.0) + async-http (~> 0.56.0) + async-http-cache (~> 0.4.0) + async-io (~> 1.22) + build-environment (~> 1.13) + bundler + localhost (~> 1.1) + process-metrics (~> 0.2.0) + rack (>= 1.0) + samovar (~> 2.1) + fiber-local (1.0.0) haml (5.2.1) temple (>= 0.8.0) tilt @@ -45,6 +79,8 @@ GEM rexml kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) + localhost (1.1.9) + mapping (1.1.1) method_source (1.0.0) mime-types (3.3.1) mime-types-data (~> 3.2015) @@ -52,6 +88,7 @@ GEM multi_xml (0.6.0) mustermann (1.1.1) ruby2_keywords (~> 0.0.1) + nio4r (2.5.8) nokogiri (1.13.1-x86_64-darwin) racc (~> 1.4) nokogiri (1.13.1-x86_64-linux) @@ -59,6 +96,16 @@ GEM parallel (1.20.1) parser (3.0.0.0) ast (~> 2.4.1) + process-metrics (0.2.1) + console (~> 1.8) + samovar (~> 2.1) + protocol-hpack (1.4.2) + protocol-http (0.22.5) + protocol-http1 (0.14.2) + protocol-http (~> 0.22) + protocol-http2 (0.14.2) + protocol-hpack (~> 1.4) + protocol-http (~> 0.18) pry (0.13.1) coderay (~> 1.1) method_source (~> 1.0) @@ -106,6 +153,9 @@ GEM parser (>= 2.7.1.5) ruby-progressbar (1.11.0) ruby2_keywords (0.0.4) + samovar (2.1.4) + console (~> 1.0) + mapping (~> 1.0) sinatra (2.1.0) mustermann (~> 1.0) rack (~> 2.2) @@ -126,12 +176,9 @@ GEM tilt (~> 2.0) yard (~> 0.9, >= 0.9.24) temple (0.8.2) - thin (1.8.0) - daemons (~> 1.0, >= 1.0.9) - eventmachine (~> 1.0, >= 1.0.4) - rack (>= 1, < 3) thor (1.1.0) tilt (2.0.10) + timers (4.3.3) unicode-display_width (2.0.0) vcr (6.0.0) webmock (3.11.1) @@ -149,6 +196,7 @@ DEPENDENCIES better_errors binding_of_caller dotenv + falcon guardian-content! haml irb @@ -158,7 +206,6 @@ DEPENDENCIES rspec sinatra solargraph - thin vcr webmock will_paginate (~> 3.1.1) diff --git a/Procfile b/Procfile index 171b7e4..e67c4e3 100755 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: RUBYOPT=--jit bundle exec thin -R config.ru start -p $PORT -e $RACK_ENV +web: RUBYOPT=--jit bundle exec falcon serve -c config.ru diff --git a/config.ru b/config.ru index 05e9ae7..417094a 100755 --- a/config.ru +++ b/config.ru @@ -5,4 +5,5 @@ require 'bundler' require 'dotenv/load' Bundler.require require './config/app' -GuardianLowDataApp.run! +use GuardianLowDataApp +run lambda {|env| [404, {}, []]} diff --git a/config/app.rb b/config/app.rb index c47f914..7888c68 100755 --- a/config/app.rb +++ b/config/app.rb @@ -13,7 +13,7 @@ class GuardianLowDataApp < ApplicationController set :haml, format: :html5 set :logging, true - set :server, %(thin) + set :server, %(falcon) set :views, File.expand_path('../app/views', __dir__) set :public_folder, 'public' enable :sessions @@ -22,7 +22,6 @@ class GuardianLowDataApp < ApplicationController configure :development do set :bind, '0.0.0.0' - set :port, 3000 use BetterErrors::Middleware BetterErrors.application_root = File.expand_path(__dir__) end