capistrano-shared_configs 0.1.0 → 0.1.1
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.
- checksums.yaml +4 -4
- data/README.md +1 -3
- data/lib/capistrano/shared_configs/version.rb +1 -1
- data/lib/capistrano/tasks/shared_configs.rake +20 -15
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7cbcac32427d37f7be2f46de15130127e4f9e13e
|
4
|
+
data.tar.gz: 9c3b46df5b3fd38eced936e1dd6f78b7a006fe6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3732020492528877c0d3c619d4db35b7617427394d93a54cae0d57cd918b4ae9e24c92f7b681c0b9b065366c4f43ca05dba16a1b94776e5fe54b407f7268a925
|
7
|
+
data.tar.gz: 0879adfc20aa6d20f7723e588cc7be38599a2e57a8c01675b4c1777549d1fa01dad603ccabc8447ff8961a497cee86498b283fc9301ea7ae1877d1dd1cf3a230
|
data/README.md
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# Capistrano::SharedConfigs
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
This gem provides capistrano tasks to pull the latest configs from the shared configs branch and update the symlinks in the shared directory.
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
@@ -1,14 +1,5 @@
|
|
1
|
-
def
|
2
|
-
|
3
|
-
on roles(:app) do
|
4
|
-
if test("[ -d #{repo_config_path} ]")
|
5
|
-
within repo_config_path do
|
6
|
-
yield block
|
7
|
-
end
|
8
|
-
else
|
9
|
-
puts "No shared configs located at #{repo_config_path}"
|
10
|
-
end
|
11
|
-
end
|
1
|
+
def repo_config_path
|
2
|
+
Pathname.new("#{shared_path}/repo_configs")
|
12
3
|
end
|
13
4
|
|
14
5
|
namespace :shared_configs do
|
@@ -20,15 +11,29 @@ namespace :shared_configs do
|
|
20
11
|
|
21
12
|
desc 'Pulls the latest from the shared configs directory'
|
22
13
|
task :pull do
|
23
|
-
|
24
|
-
|
14
|
+
on roles(:app) do
|
15
|
+
if test("[ -d #{repo_config_path} ]")
|
16
|
+
execute <<-COMMAND
|
17
|
+
cd #{repo_config_path}
|
18
|
+
git pull
|
19
|
+
COMMAND
|
20
|
+
else
|
21
|
+
puts "Unable to pull shared configs. No shared configs located at #{repo_config_path}."
|
22
|
+
end
|
25
23
|
end
|
26
24
|
end
|
27
25
|
|
28
26
|
desc 'Symlinks the shared configs directory into the capistrano shared directory'
|
29
27
|
task :symlink do
|
30
|
-
|
31
|
-
|
28
|
+
on roles(:app) do
|
29
|
+
if test("[ -d #{repo_config_path} ]")
|
30
|
+
execute <<-COMMAND
|
31
|
+
cd #{repo_config_path}
|
32
|
+
cp -rlf * ../
|
33
|
+
COMMAND
|
34
|
+
else
|
35
|
+
puts "Unable to symlink shared configs. No shared configs located at #{repo_config_path}."
|
36
|
+
end
|
32
37
|
end
|
33
38
|
end
|
34
39
|
end
|