diff --git a/.rubocop.yml b/.rubocop.yml index 23a400297..42199a842 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -6,8 +6,6 @@ AllCops: # stuff generated by AR and rails - 'db/schema.rb' - 'db/migrate/*' - # spring generated stuff - - 'bin/*' # epp support files until 'complexity issues' will be solved - 'spec/support/epp.rb' - 'spec/support/epp_contact_xml_builder.rb' diff --git a/Gemfile b/Gemfile index 147273434..a7919bb70 100644 --- a/Gemfile +++ b/Gemfile @@ -115,4 +115,3 @@ group :development, :test do # For unique IDs (used by the epp gem) gem 'uuidtools', '~> 2.1.4' end - diff --git a/bin/rails b/bin/rails index b82341c98..7e12a9fe4 100755 --- a/bin/rails +++ b/bin/rails @@ -2,6 +2,7 @@ begin load File.expand_path('../spring', __FILE__) rescue LoadError + puts 'no spring' end APP_PATH = File.expand_path('../../config/application', __FILE__) require_relative '../config/boot' diff --git a/bin/rake b/bin/rake index 2e9ece45c..54d3c10d0 100755 --- a/bin/rake +++ b/bin/rake @@ -2,6 +2,7 @@ begin load File.expand_path('../spring', __FILE__) rescue LoadError + puts 'no spring' end require_relative '../config/boot' require 'rake' diff --git a/bin/spring b/bin/spring index ec62a6582..adc409e83 100755 --- a/bin/spring +++ b/bin/spring @@ -7,9 +7,10 @@ unless defined?(Spring) require 'rubygems' require 'bundler' - if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ spring \((.*?)\)$.*?^$/m) + match = Bundler.default_lockfile.read.match(/^GEM$.*?^ spring \((.*?)\)$.*?^$/m) + if match ENV['GEM_PATH'] = ([Bundler.bundle_path.to_s] + Gem.path).join(File::PATH_SEPARATOR) - ENV['GEM_HOME'] = '' + ENV['GEM_HOME'] = nil Gem.paths = ENV gem 'spring', match[1] diff --git a/config/deploy.rb b/config/deploy.rb index 1da9b7804..4414d4ea6 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -18,9 +18,9 @@ set :branch, 'master' # Manually create these paths in shared/ (eg: shared/config/database.yml) in your server. # They will be linked in the 'deploy:link_shared_paths' step. set :shared_paths, [ - 'config/database.yml', - 'config/secrets.yml', - 'log', + 'config/database.yml', + 'config/secrets.yml', + 'log', 'public/system' ] @@ -42,25 +42,25 @@ end # Put any custom mkdir's in here for when `mina setup` is ran. # For Rails apps, we'll make some of the shared paths that are shared between # all releases. -task :setup => :environment do - queue! %[mkdir -p "#{deploy_to}/shared/log"] - queue! %[chmod g+rx,u+rwx "#{deploy_to}/shared/log"] +task setup: :environment do + queue! %(mkdir -p "#{deploy_to}/shared/log") + queue! %(chmod g+rx,u+rwx "#{deploy_to}/shared/log") - queue! %[mkdir -p "#{deploy_to}/shared/config"] - queue! %[chmod g+rx,u+rwx "#{deploy_to}/shared/config"] + queue! %(mkdir -p "#{deploy_to}/shared/config") + queue! %(chmod g+rx,u+rwx "#{deploy_to}/shared/config") - queue! %[mkdir -p "#{deploy_to}/shared/public"] - queue! %[chmod g+rx,u+rwx "#{deploy_to}/shared/public"] + queue! %(mkdir -p "#{deploy_to}/shared/public") + queue! %(chmod g+rx,u+rwx "#{deploy_to}/shared/public") - queue! %[mkdir -p "#{deploy_to}/shared/public/system"] - queue! %[chmod g+rx,u+rwx "#{deploy_to}/shared/public/system"] + queue! %(mkdir -p "#{deploy_to}/shared/public/system") + queue! %(chmod g+rx,u+rwx "#{deploy_to}/shared/public/system") - queue! %[touch "#{deploy_to}/shared/config/database.yml"] - queue %[echo "-----> Be sure to edit 'shared/config/database.yml'."] + queue! %(touch "#{deploy_to}/shared/config/database.yml") + queue %(echo '-----> Be sure to edit 'shared/config/database.yml'.') end -desc "Deploys the current version to the server." -task :deploy => :environment do +desc 'Deploys the current version to the server.' +task deploy: :environment do deploy do # Put things that will set up an empty directory into a fully set-up # instance of your project. @@ -82,4 +82,3 @@ end # - http://nadarei.co/mina/tasks # - http://nadarei.co/mina/settings # - http://nadarei.co/mina/helpers -