diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..b67497e --- /dev/null +++ b/Gemfile @@ -0,0 +1,6 @@ +source 'https://rubygems.org' + +gem 'shotgun' +gem 'sinatra' +gem 'unicorn' +gem 'pry' diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..7f0c9b3 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,35 @@ +GEM + remote: https://rubygems.org/ + specs: + coderay (1.0.5) + kgio (2.7.4) + method_source (0.7.1) + pry (0.9.8.4) + coderay (~> 1.0.5) + method_source (~> 0.7.1) + slop (>= 2.4.4, < 3) + rack (1.4.1) + rack-protection (1.2.0) + rack + raindrops (0.8.0) + shotgun (0.9) + rack (>= 1.0) + sinatra (1.3.2) + rack (~> 1.3, >= 1.3.6) + rack-protection (~> 1.2) + tilt (~> 1.3, >= 1.3.3) + slop (2.4.4) + tilt (1.3.3) + unicorn (4.2.0) + kgio (~> 2.6) + rack + raindrops (~> 0.7) + +PLATFORMS + ruby + +DEPENDENCIES + pry + shotgun + sinatra + unicorn diff --git a/Procfile b/Procfile new file mode 100644 index 0000000..9c82374 --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb diff --git a/app.rb b/app.rb new file mode 100644 index 0000000..49f05e8 --- /dev/null +++ b/app.rb @@ -0,0 +1,10 @@ +require 'bundler/setup' + +require 'sinatra' +require 'pry' + +class App < Sinatra::Base + get '*' do + redirect "http://facebook.com#{request.env['PATH_INFO']}", 301 + end +end diff --git a/config.ru b/config.ru new file mode 100644 index 0000000..bcba2d6 --- /dev/null +++ b/config.ru @@ -0,0 +1,3 @@ +require './app.rb' + +run App diff --git a/config/unicorn.rb b/config/unicorn.rb new file mode 100644 index 0000000..131bd62 --- /dev/null +++ b/config/unicorn.rb @@ -0,0 +1,2 @@ +worker_processes 8 +timeout 30