capwagen 0.0.2 → 0.0.3
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.
- data/lib/capwagen/version.rb +1 -1
- data/lib/capwagen.rb +12 -5
- metadata +2 -2
data/lib/capwagen/version.rb
CHANGED
data/lib/capwagen.rb
CHANGED
@@ -39,18 +39,25 @@ module Capwagen
|
|
39
39
|
# filling projects with the correct symlinks, is completely different from
|
40
40
|
# Rails projects.
|
41
41
|
task :finalize_update, :except => { :no_release => true } do
|
42
|
-
|
42
|
+
escaped_release = latest_release.to_s.shellescape
|
43
|
+
|
44
|
+
commands = []
|
45
|
+
commands << "chmod -R -- g+w #{escaped_release}" if fetch(:group_writable, true)
|
43
46
|
|
44
47
|
# mkdir -p is making sure that the directories are there for some SCM's that don't
|
45
48
|
# save empty folders
|
46
|
-
(shared_files + shared_dirs).map do |
|
49
|
+
(shared_files + shared_dirs).map do |dir|
|
50
|
+
d = dir.shellescape
|
47
51
|
if (d.rindex('/')) then
|
48
|
-
|
52
|
+
commands += ["rm -rf #{escaped_release}/#{d}",
|
53
|
+
"mkdir -p #{escaped_release}/#{dir.slice(0..(dir.rindex('/'))).shellescape}"]
|
49
54
|
else
|
50
|
-
|
55
|
+
commands << "rm -rf #{escaped_release}/#{d}"
|
51
56
|
end
|
52
|
-
|
57
|
+
commands << "ln -s #{shared_path}/#{dir.split('/').last.shellescape} #{escaped_release}/#{d}"
|
53
58
|
end
|
59
|
+
|
60
|
+
run commands.join(' && ') if commands.any?
|
54
61
|
end
|
55
62
|
|
56
63
|
task :setup, :except => { :no_release => true } do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capwagen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
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: 2013-
|
12
|
+
date: 2013-03-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capistrano
|