meow-deploy 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,19 +8,30 @@ module MeowDeploy
8
8
  'god:stop',
9
9
  'god:restart',
10
10
  'god:reload',
11
- 'bundle:install',
11
+ 'bundle:install'
12
12
  ]
13
13
 
14
14
  def self.load_into(capistrano_config)
15
15
  capistrano_config.load do
16
16
  before(MeowDeployIntegration::TASKS) do
17
- _cset(:rbenv) { "/home/#{fetch(:user)}/.rbenv/bin/rbenv" }
18
- _cset(:god_sites_path) { "/home/#{fetch(:user)}/sites/god" }
17
+ _cset(:rbenv) { "/home/#{user}/.rbenv/bin/rbenv" }
18
+ _cset(:god_sites_path) { "/home/#{user}/sites/god" }
19
19
  _cset(:god_app_path) { "#{current_path}/config/god.conf" }
20
20
  _cset :bundle_flags, "--deployment --quiet --binstubs --shebang ruby-local-exec"
21
- _cset(:default_environment) {
22
- {'PATH' => "/home/#{fetch(:user)}/.rbenv/shims:/home/#{fetch(:user)}/.rbenv/bin:$PATH"}
23
- }
21
+
22
+ env = {'PATH' =>
23
+ "/home/#{user}/.rbenv/shims:/home/#{user}/.rbenv/bin:$PATH" }
24
+
25
+ current_env = fetch(:default_environment)
26
+
27
+ if exists?(:default_environment) &&
28
+ !!current_env['PATH'] &&
29
+ !current_env['PATH'].includes?('rbenv/shims')
30
+
31
+ abort "Make sure to set :default_environment to have PATH include rbenv like this: \n#{env.inspect}"
32
+ else
33
+ set :default_environment, env
34
+ end
24
35
  end
25
36
 
26
37
  namespace :god do
@@ -1,3 +1,3 @@
1
1
  module MeowDeploy
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: meow-deploy
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.2
5
+ version: 0.0.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Kristjan Rang