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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c508f0f64861473322c5f44bb0ba0b325d7cf8e9
4
- data.tar.gz: 8c1ceb4a0594e5291fb669d77e56de4021f37a6f
2
+ SHA256:
3
+ metadata.gz: 961237d6e1239b05819dca1fd6cbfed446728613a6bee4e6cca13af7438a6d47
4
+ data.tar.gz: f39cd5ec5ebff741c54dca5e446ac128e075711279a264252184ae288c1bceca
5
5
  SHA512:
6
- metadata.gz: 19c8a6b8bc027c0d067bd7fe5d2f29e95b700eef11f3c566e4d1267717b9163fadb0b2f5d0c297312177978c06f7586b95771129e787044121c9c8eb2057e4a3
7
- data.tar.gz: 906aa68770018c0b2ea96ecee2dbd6a8ba45de95c4cc40d09b391799acdf2a509d1f4a7caed9874a6e8ed73f87737905084d40eceecc524fd44376f975f49d98
6
+ metadata.gz: 814787e35197eff42a3de0788c01027cab0e6e5f474ee6b69b97029c368c0fe13cf69905caa430e209b1e2caff886483f17c6e7053781135c2038e40d917da25
7
+ data.tar.gz: df5547b41b166850fb78f2ab126949b7c63871c0c3cf5f909f89299a3bab1f2d6c51c7de9827620ca06f37febd40fb4a67e3a89dcf3779c175424a84bf6dd7c8
@@ -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.1"
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.popen3('bundle', 'exec', 'ejson', 'decrypt', ejson_file) do |stdin, stdout, stderr, wait_thr|
15
- if wait_thr.value == 0
16
- contents = stdout.read
17
- on release_roles(:all) do
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.1
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: 2016-03-28 00:00:00.000000000 Z
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.7'
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
- rubyforge_project:
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