capistrano-helpers 0.3.0 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.3.2
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{capistrano-helpers}
5
- s.version = "0.3.0"
5
+ s.version = "0.3.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Scott Woods"]
@@ -5,6 +5,7 @@ CapistranoHelpers.with_configuration do
5
5
  namespace :gems do
6
6
  desc "Install gems on the remote server."
7
7
  task :install, :roles => :app do
8
+ rails_env = fetch(:rails_env, "production")
8
9
  run "cd #{current_release} && #{sudo} rake gems:install RAILS_ENV=#{rails_env}"
9
10
  end
10
11
  end
@@ -9,7 +9,10 @@ CapistranoHelpers.with_configuration do
9
9
  abort 'You must specify which privates to symlink using the "set :privates" command.'
10
10
  end
11
11
  privates.each do |path|
12
- run "ln -nfs #{shared_path}/private/#{path} #{release_path}/#{path}"
12
+ if release_path.nil? || release_path.empty? || path.nil? || path.empty?
13
+ raise "Release path or path are nil!"
14
+ end
15
+ run "rm -rf #{release_path}/#{path} && ln -nfs #{shared_path}/private/#{path} #{release_path}/#{path}"
13
16
  end
14
17
  end
15
18
  end
@@ -9,7 +9,10 @@ CapistranoHelpers.with_configuration do
9
9
  abort 'You must specify which files to symlink using the "set :shared" command.'
10
10
  end
11
11
  shared.each do |path|
12
- run "ln -nfs #{shared_path}/#{path} #{release_path}/#{path}"
12
+ if release_path.nil? || release_path.empty? || path.nil? || path.empty?
13
+ raise "Release path or path are nil!"
14
+ end
15
+ run "rm -rf #{release_path}/#{path} && ln -nfs #{shared_path}/#{path} #{release_path}/#{path}"
13
16
  end
14
17
  end
15
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Woods