diff --git a/Gemfile b/Gemfile index ee21e54..aca9e16 100644 --- a/Gemfile +++ b/Gemfile @@ -2,15 +2,9 @@ source 'http://rubygems.org' ruby '2.1.1' -gem 'rails', '~> 3.2.16' +gem 'rails', '~> 3.2.17' gem 'mysql2', '~> 0.3.15' - -# Deployment gem 'foreman', '~> 0.63.0' -gem 'capistrano', '~> 3.1.0' -gem 'capistrano-rbenv', '~> 2.0.2' -gem 'capistrano-bundler', '~> 1.1.2' -gem 'capistrano-rails', '~> 1.1' # Libraries gem 'jquery-rails' @@ -29,17 +23,19 @@ gem 'rmagick', require: false gem 'will_paginate', git: 'https://github.com/p7r/will_paginate.git', branch: 'rails3' gem 'newrelic_rpm', '~> 3.7.2.195' -group 'staging', 'production' do - gem 'kgio', '~> 2.9.2' - gem 'dalli', '~> 2.7.0' - gem 'unicorn', '~> 4.8.2' +group :assets do + gem 'uglifier', '~> 2.5.0' end -group 'development' do +group :development do + gem 'capistrano', '~> 3.1.0' + gem 'capistrano-rbenv', '~> 2.0.2' + gem 'capistrano-bundler', '~> 1.1.2' + gem 'capistrano-rails', '~> 1.1' gem 'annotate', '~> 2.6.2' end -group 'test' do +group :test do gem 'simplecov', '~> 0.7.1', require: false gem 'rspec-rails', '~> 2.14.1' gem 'rspec-given', '~> 3.5.4' @@ -48,7 +44,13 @@ group 'test' do gem 'factory_girl_rails', '~> 4.4.1' end -group 'development', 'test' do +group :development, :test do gem 'pry-debugger', '~> 0.2.2' gem 'dotenv-rails', '~> 0.10.0' end + +group :staging, :production do + gem 'kgio', '~> 2.9.2' + gem 'dalli', '~> 2.7.0' + gem 'unicorn', '~> 4.8.2' +end diff --git a/Gemfile.lock b/Gemfile.lock index 6c23221..67264cc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -228,6 +228,9 @@ GEM polyglot polyglot (>= 0.3.1) tzinfo (0.3.38) + uglifier (2.5.0) + execjs (>= 0.3.0) + json (>= 1.8.0) unicorn (4.8.2) kgio (~> 2.6) rack @@ -265,7 +268,7 @@ DEPENDENCIES nokogiri poltergeist (~> 1.5.0) pry-debugger (~> 0.2.2) - rails (~> 3.2.16) + rails (~> 3.2.17) rbbcode rmagick rspec-given (~> 3.5.4) @@ -274,5 +277,6 @@ DEPENDENCIES simplecov (~> 0.7.1) therubyracer tinymce-rails + uglifier (~> 2.5.0) unicorn (~> 4.8.2) will_paginate! diff --git a/INSTALL.md b/INSTALL.md index 3fa109a..0c64fd1 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -58,6 +58,8 @@ Switch user to deploy, and install rbenv ## Install the ENSL site -Create the `.env` and `config/database.yml` files with the appropriate credentials. +Create the `.env` file with the appropriate credentials. - mkdir /var/www/virtual/ensl.org/deploy \ No newline at end of file + mkdir /var/www/virtual/ensl.org/deploy + mkdir /var/www/virtual/ensl.org/deploy/shared + touch /var/www/virtual/ensl.org/deploy/shared/.env \ No newline at end of file diff --git a/config/deploy.rb b/config/deploy.rb index ea2669d..8984b0f 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -5,7 +5,7 @@ set :scm, :git set :repo_url, 'git@github.com:ENSL/ensl.org.git' set :keep_releases, 10 -set :linked_files, %w{config/database.yml} +set :linked_files, %w{.env} set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system} set :normalize_asset_timestamps, %{public/images public/javascripts public/stylesheets} diff --git a/config/environment.rb b/config/environment.rb index eb1e6cf..380ee77 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -1,7 +1,8 @@ require File.expand_path('../application', __FILE__) - +require 'dotenv' require 'verification' require 'exceptions' require 'extra' +Dotenv.load Ensl::Application.initialize! \ No newline at end of file