capistrano-ejson 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/capistrano-ejson.gemspec +1 -2
- data/lib/capistrano/tasks/ejson.cap +9 -9
- metadata +7 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 961237d6e1239b05819dca1fd6cbfed446728613a6bee4e6cca13af7438a6d47
|
4
|
+
data.tar.gz: f39cd5ec5ebff741c54dca5e446ac128e075711279a264252184ae288c1bceca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 814787e35197eff42a3de0788c01027cab0e6e5f474ee6b69b97029c368c0fe13cf69905caa430e209b1e2caff886483f17c6e7053781135c2038e40d917da25
|
7
|
+
data.tar.gz: df5547b41b166850fb78f2ab126949b7c63871c0c3cf5f909f89299a3bab1f2d6c51c7de9827620ca06f37febd40fb4a67e3a89dcf3779c175424a84bf6dd7c8
|
data/capistrano-ejson.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "capistrano-ejson"
|
7
|
-
spec.version = "1.0
|
7
|
+
spec.version = "1.1.0"
|
8
8
|
spec.authors = ["Bouke van der Bijl"]
|
9
9
|
spec.email = ["bouke@shopify.com"]
|
10
10
|
spec.description = spec.summary = %q{Automatic EJSON decryption for Capistrano}
|
@@ -19,6 +19,5 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.add_dependency 'capistrano', '~> 3.1'
|
20
20
|
spec.add_dependency 'ejson', '~> 1.0', '>= 1.0.0'
|
21
21
|
|
22
|
-
spec.add_development_dependency "bundler", "~> 1.7"
|
23
22
|
spec.add_development_dependency "rake", "~> 10.0"
|
24
23
|
end
|
@@ -8,23 +8,22 @@ namespace :ejson do
|
|
8
8
|
ejson_file_mode = fetch(:ejson_file_mode)
|
9
9
|
ejson_output_file = fetch(:ejson_output_file)
|
10
10
|
ejson_deploy_mode = fetch(:ejson_deploy_mode)
|
11
|
+
ejson_keydir = fetch(:ejson_keydir)
|
11
12
|
|
12
13
|
case ejson_deploy_mode
|
13
14
|
when :local
|
14
|
-
Open3.
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
upload! StringIO.new(contents), File.join(release_path, ejson_output_file), mode: ejson_file_mode
|
19
|
-
end
|
20
|
-
else
|
21
|
-
raise "Failed to decrypt file #{stderr.read}"
|
15
|
+
out, err, status = Open3.capture3('bundle', 'exec', 'ejson', '--keydir', ejson_keydir, 'decrypt', ejson_file)
|
16
|
+
if status.exitstatus == 0
|
17
|
+
on release_roles(:all) do
|
18
|
+
upload! StringIO.new(out), File.join(release_path, ejson_output_file), mode: ejson_file_mode
|
22
19
|
end
|
20
|
+
else
|
21
|
+
raise "Failed to decrypt file #{err}"
|
23
22
|
end
|
24
23
|
when :remote
|
25
24
|
on release_roles(:all) do
|
26
25
|
within release_path do
|
27
|
-
execute :ejson, :decrypt, "-o", ejson_output_file, ejson_file
|
26
|
+
execute :ejson, "--keydir", ejson_keydir, :decrypt, "-o", ejson_output_file, ejson_file
|
28
27
|
end
|
29
28
|
end
|
30
29
|
else
|
@@ -41,5 +40,6 @@ namespace :load do
|
|
41
40
|
set :ejson_file_mode, nil
|
42
41
|
set :ejson_output_file, 'config/secrets.json'
|
43
42
|
set :ejson_deploy_mode, :local
|
43
|
+
set :ejson_keydir, '/opt/ejson/keys'
|
44
44
|
end
|
45
45
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-ejson
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bouke van der Bijl
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -28,36 +28,22 @@ dependencies:
|
|
28
28
|
name: ejson
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '1.0'
|
34
31
|
- - ">="
|
35
32
|
- !ruby/object:Gem::Version
|
36
33
|
version: 1.0.0
|
34
|
+
- - "~>"
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '1.0'
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
|
-
- - "~>"
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
version: '1.0'
|
44
41
|
- - ">="
|
45
42
|
- !ruby/object:Gem::Version
|
46
43
|
version: 1.0.0
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: bundler
|
49
|
-
requirement: !ruby/object:Gem::Requirement
|
50
|
-
requirements:
|
51
44
|
- - "~>"
|
52
45
|
- !ruby/object:Gem::Version
|
53
|
-
version: '1.
|
54
|
-
type: :development
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
requirements:
|
58
|
-
- - "~>"
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: '1.7'
|
46
|
+
version: '1.0'
|
61
47
|
- !ruby/object:Gem::Dependency
|
62
48
|
name: rake
|
63
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -107,8 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
107
93
|
- !ruby/object:Gem::Version
|
108
94
|
version: '0'
|
109
95
|
requirements: []
|
110
|
-
|
111
|
-
rubygems_version: 2.5.1
|
96
|
+
rubygems_version: 3.0.3
|
112
97
|
signing_key:
|
113
98
|
specification_version: 4
|
114
99
|
summary: Automatic EJSON decryption for Capistrano
|