capistrano-utils 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,7 +13,7 @@ Gem::Specification.new do |gem|
13
13
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
14
14
  gem.name = 'capistrano-utils'
15
15
  gem.require_paths = ['lib']
16
- gem.version = '0.0.8'
16
+ gem.version = '0.0.9'
17
17
 
18
18
  gem.add_dependency 'rake'
19
19
  gem.add_dependency 'capistrano', '>= 2.12.0'
@@ -40,7 +40,7 @@ Capistrano::Configuration.instance(:must_exist).load do
40
40
  end
41
41
 
42
42
  # Deeply link files from a folder to another
43
- def deep_link(from, to)
43
+ def deep_link(from, to, options = {})
44
44
  script = <<-END
45
45
  exhaustive_list_of_files_to_link() {
46
46
  files="";
@@ -48,7 +48,9 @@ Capistrano::Configuration.instance(:must_exist).load do
48
48
  for file in `ls -A1 ${1}`; do
49
49
  dest_file="${2}/${file}";
50
50
  file="${1}/${file}";
51
- if [ -e "${dest_file}" ]; then
51
+ if [ "x${3}" != 'x' ]; then
52
+ files="${files} `exhaustive_list_of_files_to_link ${file} ${2}`";
53
+ elif [ -e "${dest_file}" ]; then
52
54
  files="${files} `exhaustive_list_of_files_to_link ${file} ${dest_file}`";
53
55
  else
54
56
  files="${files} ${file}:${dest_file}";
@@ -57,10 +59,12 @@ Capistrano::Configuration.instance(:must_exist).load do
57
59
  echo "${files}";
58
60
  };
59
61
 
60
- files=`exhaustive_list_of_files_to_link '#{from}' '#{to}'`;
62
+ files=`exhaustive_list_of_files_to_link '#{from}' '#{to}' '#{options[:group] ? 'true' : nil}'`;
61
63
  for file in ${files}; do
62
- ln -s "`echo "${file}" | cut -d: -f1`" \
63
- "`echo "${file}" | cut -d: -f2`";
64
+ from="`echo "${file}" | cut -d: -f1`";
65
+ to="`echo "${file}" | cut -d: -f2`";
66
+ mkdir -p "`dirname ${from}`";
67
+ ln -s "${from}" "${to}";
64
68
  done;
65
69
  END
66
70
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-01 00:00:00.000000000 Z
12
+ date: 2012-07-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -78,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
78
78
  version: '0'
79
79
  segments:
80
80
  - 0
81
- hash: -3298047913881621470
81
+ hash: 1478575717804008666
82
82
  requirements: []
83
83
  rubyforge_project:
84
84
  rubygems_version: 1.8.23