diff --git a/Capfile b/Capfile index 83c5340..c6092be 100644 --- a/Capfile +++ b/Capfile @@ -7,7 +7,6 @@ require 'capistrano/deploy' require 'capistrano/puma' require 'capistrano/puma/workers' require 'capistrano/puma/jungle' -require 'capistrano/puma/monit' require 'capistrano/rbenv' require 'capistrano/bundler' require 'capistrano/nginx' diff --git a/Gemfile b/Gemfile index 83840bd..ce616e3 100644 --- a/Gemfile +++ b/Gemfile @@ -18,6 +18,7 @@ gem 'puma' gem 'pundit' gem 'simple_form' gem 'upmin-admin' +gem 'dotenv-rails' group :development do gem 'better_errors' gem 'rubocop', require: false @@ -32,7 +33,6 @@ group :development do gem 'capistrano-rbenv' gem 'capistrano-nginx', github: 'koenpunt/capistrano-nginx' gem "capistrano-db-tasks", require: false - gem 'foreman' gem 'guard-bundler' gem 'guard-rails' gem 'guard-rspec' diff --git a/Gemfile.lock b/Gemfile.lock index 7e5bba2..6356a09 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -97,6 +97,10 @@ GEM actionmailer (>= 3.2.6, < 5) devise (>= 3.2.0) diff-lcs (1.2.5) + dotenv (2.0.2) + dotenv-rails (2.0.2) + dotenv (= 2.0.2) + railties (~> 4.0) erubis (2.7.0) execjs (2.6.0) factory_girl (4.5.0) @@ -107,8 +111,6 @@ GEM faker (1.5.0) i18n (~> 0.5) ffi (1.9.10) - foreman (0.78.0) - thor (~> 0.19.1) formatador (0.2.5) guard (2.13.0) formatador (>= 0.2.4) @@ -355,9 +357,9 @@ DEPENDENCIES database_cleaner devise devise_invitable + dotenv-rails factory_girl_rails faker - foreman guard-bundler guard-ctags-bundler guard-rails diff --git a/bin/dotenv b/bin/dotenv new file mode 100755 index 0000000..f6fc0f5 --- /dev/null +++ b/bin/dotenv @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +# +# This file was generated by Bundler. +# +# The application 'dotenv' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require 'pathname' +ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +require 'rubygems' +require 'bundler/setup' + +load Gem.bin_path('dotenv', 'dotenv') diff --git a/bin/rails b/bin/rails index 7308c4f..657440d 100755 --- a/bin/rails +++ b/bin/rails @@ -1,8 +1,4 @@ #!/usr/bin/env ruby -begin - load File.expand_path("../spring", __FILE__) -rescue LoadError -end # # This file was generated by Bundler. # diff --git a/bin/rake b/bin/rake index 54fd234..26c7a2d 100755 --- a/bin/rake +++ b/bin/rake @@ -1,8 +1,4 @@ #!/usr/bin/env ruby -begin - load File.expand_path("../spring", __FILE__) -rescue LoadError -end # # This file was generated by Bundler. # diff --git a/bin/rspec b/bin/rspec index 5318d0c..0c86b5c 100755 --- a/bin/rspec +++ b/bin/rspec @@ -1,8 +1,4 @@ #!/usr/bin/env ruby -begin - load File.expand_path("../spring", __FILE__) -rescue LoadError -end # # This file was generated by Bundler. # diff --git a/bin/spring b/bin/spring index 7b45d37..38fee6f 100755 --- a/bin/spring +++ b/bin/spring @@ -1,15 +1,16 @@ #!/usr/bin/env ruby +# +# This file was generated by Bundler. +# +# The application 'spring' is installed as part of a gem, and +# this file is here to facilitate running it. +# -# This file loads spring without using Bundler, in order to be fast. -# It gets overwritten when you run the `spring binstub` command. +require 'pathname' +ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) -unless defined?(Spring) - require "rubygems" - require "bundler" +require 'rubygems' +require 'bundler/setup' - if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m) - Gem.paths = { "GEM_PATH" => [Bundler.bundle_path.to_s, *Gem.path].uniq } - gem "spring", match[1] - require "spring/binstub" - end -end +load Gem.bin_path('spring', 'spring') diff --git a/config/deploy.rb b/config/deploy.rb index 2d80fd8..8363a66 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -15,7 +15,7 @@ set :deploy_to, '/home/jesse/web/thirteen-tien-len' # set :log_level, :debug # set :pty, true -set :linked_files, %w{config/database.yml config/application.yml db/data.yml} +set :linked_files, %w{config/database.yml .env} set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system public/lift-calculator} set :rbenv_type, :user # or :system, depends on your rbenv setup