rezzza_capistrano_tools 0.3.2.dev → 0.3.3.dev
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/lib/rezzza_capistrano_tools.rb +1 -0
- data/lib/vaultage.rb +16 -14
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8096b28af35da1b6b382e801d1715cbb457ebde9
|
4
|
+
data.tar.gz: 87d74a636b297f0ff449c574188c77aab5f06c5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0773269ed785c4f8a5315964f93739c29a06e020c0da6c533dc027848e5c5ee32c2821f9a739291374b4c0676ad90c3d62c06a5a4f1a3daf8de5ecc658ca3caa
|
7
|
+
data.tar.gz: 6ef6f4752730177cf3ab16af501f299c1c13ce449dccdadb8f43896aea6658216142abc5d94b0fa67c94c218a6e863dfbb0752acf726df905e8e7dc58dd2d4f6
|
data/lib/vaultage.rb
CHANGED
@@ -11,25 +11,27 @@ end
|
|
11
11
|
|
12
12
|
namespace :vaultage do
|
13
13
|
task :decrypt do
|
14
|
-
|
15
|
-
|
14
|
+
tempfiles = []
|
15
|
+
cryptedpaths = []
|
16
16
|
|
17
17
|
vaultage_files.each_with_index do |files, index|
|
18
|
-
|
19
|
-
|
20
|
-
|
18
|
+
tempfile = Tempfile.new(application)
|
19
|
+
|
20
|
+
top.download(latest_release+"/"+files[0], tempfile.path+"."+vaultage_extension)
|
21
|
+
|
22
|
+
tempfiles.push(tempfile);
|
23
|
+
cryptedpaths.push(tempfile.path+"."+vaultage_extension);
|
21
24
|
end
|
22
25
|
|
23
|
-
system "vaultage decrypt --write --files="+
|
26
|
+
system "vaultage decrypt --write --files="+cryptedpaths.join(',')
|
24
27
|
|
25
28
|
vaultage_files.each_with_index do |files, index|
|
26
|
-
top.upload(
|
29
|
+
top.upload(tempfiles[index].path, latest_release+"/"+files[1])
|
30
|
+
tempfiles[index].unlink
|
27
31
|
end
|
28
32
|
end
|
29
33
|
|
30
34
|
task :diff do
|
31
|
-
randomstr = `openssl rand -base64 10`.strip
|
32
|
-
|
33
35
|
vaultage_files.each_with_index do |files, index|
|
34
36
|
directory = File.dirname(files[0])
|
35
37
|
|
@@ -64,17 +66,17 @@ namespace :vaultage do
|
|
64
66
|
remote = from_vendor ? "composer" : "capistrano"
|
65
67
|
system "cd #{absolute_directory} && git fetch #{remote}"
|
66
68
|
|
67
|
-
tmp1 =
|
68
|
-
tmp2 =
|
69
|
+
tmp1 = Tempfile.new(application)
|
70
|
+
tmp2 = Tempfile.new(application)
|
69
71
|
|
70
72
|
# fetch encrypted file from git
|
71
|
-
system "cd #{absolute_directory} && git show #{remote}/#{branch}:#{files[0].gsub(root_directory, '')} > #{tmp1}"
|
73
|
+
system "cd #{absolute_directory} && git show #{remote}/#{branch}:#{files[0].gsub(root_directory, '')} > #{tmp1.path}.gpg"
|
72
74
|
# download decrypted file on remote server
|
73
|
-
top.download(latest_release+"/"+files[1], tmp2)
|
75
|
+
top.download(latest_release+"/"+files[1], tmp2.path)
|
74
76
|
|
75
77
|
capifony_pretty_print("Diff between local (versionned) #{files[0]} and remote #{files[1]}")
|
76
78
|
|
77
|
-
system "vaultage diff --files=#{tmp1},#{tmp2}"
|
79
|
+
system "vaultage diff --files=#{tmp1.path}.gpg,#{tmp2.path}"
|
78
80
|
end
|
79
81
|
end
|
80
82
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rezzza_capistrano_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3.dev
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Les écureuils de Jean-Marc
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-11-
|
12
|
+
date: 2013-11-20 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: |
|
15
15
|
- Vaultage integration
|