From e58cfb2d84630fd0262ebf613b76d3f6e0d16e69 Mon Sep 17 00:00:00 2001 From: Bilawal Hameed Date: Thu, 13 Apr 2017 01:06:59 +0100 Subject: [PATCH] added skylight --- Gemfile | 1 + Gemfile.lock | 3 +++ config/skylight.yml | 3 +++ no_light_sinatra.rb | 5 +++++ 4 files changed, 12 insertions(+) create mode 100644 config/skylight.yml diff --git a/Gemfile b/Gemfile index 8743dff..40e647d 100644 --- a/Gemfile +++ b/Gemfile @@ -4,6 +4,7 @@ source 'https://rubygems.org' gem 'activemodel-serializers-xml' gem 'bson_ext' gem 'mongo_mapper' +gem 'skylight' gem 'sinatra' gem 'sinatra-contrib' gem 'zippy' diff --git a/Gemfile.lock b/Gemfile.lock index 25e3d2e..c22d478 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -94,6 +94,8 @@ GEM tilt (>= 1.3, < 3) sinatra-reloader (1.0) sinatra-contrib + skylight (1.2.0) + activesupport (>= 3.0.0) term-ansicolor (1.5.0) tins (~> 1.0) thor (0.19.4) @@ -126,6 +128,7 @@ DEPENDENCIES sinatra sinatra-contrib sinatra-reloader + skylight zippy RUBY VERSION diff --git a/config/skylight.yml b/config/skylight.yml new file mode 100644 index 0000000..dec5be8 --- /dev/null +++ b/config/skylight.yml @@ -0,0 +1,3 @@ +--- +# The authentication token for the application. +authentication: pE8A3xuWKldu4Wu-YJe7rJw9ILkBO1HSJ3WmUiOG0M0 diff --git a/no_light_sinatra.rb b/no_light_sinatra.rb index 53bdf4d..0f65f37 100644 --- a/no_light_sinatra.rb +++ b/no_light_sinatra.rb @@ -14,6 +14,11 @@ class NoLightSinatra < Sinatra::Base MongoMapper.setup(ENVIRONMENTS, ENV['RACK_ENV']) end + configure :production do + require "skylight/sinatra" + Skylight.start! + end + get '/' do erb :default_page end