chamber 2.9.0 → 2.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/chamber/commands/heroku/push.rb +1 -1
- data/lib/chamber/commands/securable.rb +2 -2
- data/lib/chamber/encryption_methods/ssl.rb +4 -4
- data/lib/chamber/file.rb +4 -4
- data/lib/chamber/version.rb +1 -1
- data/spec/lib/chamber/context_resolver_spec.rb +1 -1
- data/spec/lib/chamber/file_spec.rb +25 -25
- metadata +5 -4
- metadata.gz.sig +0 -0
- data/Rakefile +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ecd2c070d7f7877b3b727f904c140acc8974712
|
4
|
+
data.tar.gz: 79b12b587b92be9f7b177c4ad4349b93a4425610
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b6038491608666d4b67b1d4eed6d7c87b8e623d27c09878da29affb9d7b78b4a39a8433584e839926beec8b615dbcadc5c07f7b917a2794c3dbe1d5be2153ea
|
7
|
+
data.tar.gz: 7924650c9d08ecd452b9e89f5b9b592e065678f2b681d040e2ec48b5640727c471f76d442f5a7c60c7c662e1aca4c89e36ca63cabc4fdcdd956b3f27a08d4c5f
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
@@ -9,8 +9,8 @@ module Securable
|
|
9
9
|
super
|
10
10
|
|
11
11
|
ignored_settings_options = options.
|
12
|
-
|
13
|
-
|
12
|
+
merge(files: ignored_settings_filepaths).
|
13
|
+
reject { |k, _v| k == 'basepath' }
|
14
14
|
self.ignored_settings_instance = Chamber::Instance.new(ignored_settings_options)
|
15
15
|
self.current_settings_instance = Chamber::Instance.new(options)
|
16
16
|
self.only_sensitive = options[:only_sensitive]
|
@@ -27,11 +27,11 @@ class Ssl
|
|
27
27
|
value
|
28
28
|
else
|
29
29
|
key, iv, decoded_string = value.
|
30
|
-
|
31
|
-
|
32
|
-
|
30
|
+
match(LARGE_DATA_STRING_PATTERN).
|
31
|
+
captures.
|
32
|
+
map do |part|
|
33
33
|
Base64.strict_decode64(part)
|
34
|
-
|
34
|
+
end
|
35
35
|
key = decryption_key.private_decrypt(key)
|
36
36
|
|
37
37
|
cipher_dec = OpenSSL::Cipher::Cipher.new('AES-128-CBC')
|
data/lib/chamber/file.rb
CHANGED
@@ -82,16 +82,16 @@ class File < Pathname
|
|
82
82
|
escaped_value = Regexp.escape(value)
|
83
83
|
|
84
84
|
file_contents.
|
85
|
-
|
85
|
+
sub!(
|
86
86
|
/^(\s*)_secure_#{escaped_name}(\s*):(\s*)['"]?#{escaped_value}['"]?$/,
|
87
87
|
"\\1_secure_#{name_pieces.last}\\2:\\3#{secure_value}",
|
88
|
-
|
88
|
+
)
|
89
89
|
|
90
90
|
file_contents.
|
91
|
-
|
91
|
+
sub!(
|
92
92
|
/^(\s*)_secure_#{escaped_name}(\s*):(\s*)\|((?:\n\1\s{2}.*)+)/,
|
93
93
|
"\\1_secure_#{name_pieces.last}\\2:\\3#{secure_value}",
|
94
|
-
|
94
|
+
)
|
95
95
|
end
|
96
96
|
|
97
97
|
write(file_contents)
|
data/lib/chamber/version.rb
CHANGED
@@ -20,16 +20,16 @@ describe File do
|
|
20
20
|
settings_file = File.new path: tempfile.path
|
21
21
|
|
22
22
|
allow(Settings).to receive(:new).
|
23
|
-
|
23
|
+
and_return :settings
|
24
24
|
|
25
25
|
file_settings = settings_file.to_settings
|
26
26
|
|
27
27
|
expect(file_settings).to eql :settings
|
28
28
|
expect(Settings).to have_received(:new).
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
29
|
+
with(settings: { 'test' => 'settings' },
|
30
|
+
namespaces: {},
|
31
|
+
decryption_key: nil,
|
32
|
+
encryption_key: nil)
|
33
33
|
end
|
34
34
|
|
35
35
|
it 'can convert a file whose contents are empty' do
|
@@ -37,16 +37,16 @@ describe File do
|
|
37
37
|
settings_file = File.new path: tempfile.path
|
38
38
|
|
39
39
|
allow(Settings).to receive(:new).
|
40
|
-
|
40
|
+
and_return :settings
|
41
41
|
|
42
42
|
file_settings = settings_file.to_settings
|
43
43
|
|
44
44
|
expect(file_settings).to eql :settings
|
45
45
|
expect(Settings).to have_received(:new).
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
46
|
+
with(settings: {},
|
47
|
+
namespaces: {},
|
48
|
+
decryption_key: nil,
|
49
|
+
encryption_key: nil)
|
50
50
|
end
|
51
51
|
|
52
52
|
it 'throws an error when the file contents are malformed' do
|
@@ -68,12 +68,12 @@ describe File do
|
|
68
68
|
settings_file.to_settings
|
69
69
|
|
70
70
|
expect(Settings).to have_received(:new).
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
71
|
+
with(settings: { 'test' => 'settings' },
|
72
|
+
namespaces: {
|
73
|
+
environment: :development,
|
74
|
+
},
|
75
|
+
decryption_key: nil,
|
76
|
+
encryption_key: nil)
|
77
77
|
end
|
78
78
|
|
79
79
|
it 'can handle files which contain ERB markup' do
|
@@ -84,26 +84,26 @@ describe File do
|
|
84
84
|
|
85
85
|
settings_file.to_settings
|
86
86
|
expect(Settings).to have_received(:new).
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
87
|
+
with(settings: { 'test' => 2 },
|
88
|
+
namespaces: {},
|
89
|
+
decryption_key: nil,
|
90
|
+
encryption_key: nil)
|
91
91
|
end
|
92
92
|
|
93
93
|
it 'does not throw an error when attempting to convert a file which does not exist' do
|
94
94
|
settings_file = File.new path: 'no/path'
|
95
95
|
|
96
96
|
allow(Settings).to receive(:new).
|
97
|
-
|
97
|
+
and_return :settings
|
98
98
|
|
99
99
|
file_settings = settings_file.to_settings
|
100
100
|
|
101
101
|
expect(file_settings).to eql :settings
|
102
102
|
expect(Settings).to have_received(:new).
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
103
|
+
with(settings: {},
|
104
|
+
namespaces: {},
|
105
|
+
decryption_key: nil,
|
106
|
+
encryption_key: nil)
|
107
107
|
end
|
108
108
|
|
109
109
|
it 'can securely encrypt the settings contained in a file' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chamber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.9.
|
4
|
+
version: 2.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- thekompanee
|
@@ -34,7 +34,7 @@ cert_chain:
|
|
34
34
|
QwSfDGz6+zsImi5N3UT71+mk7YcviQSgvMRl3VkAv8MZ6wcJ5SQRpf9w0OeFH6Ln
|
35
35
|
nNbCoHiYeXX/lz/M6AIbxDIZZTwxcyvF7bdrQ2fbH5MsfQ==
|
36
36
|
-----END CERTIFICATE-----
|
37
|
-
date: 2016-
|
37
|
+
date: 2016-08-23 00:00:00.000000000 Z
|
38
38
|
dependencies:
|
39
39
|
- !ruby/object:Gem::Dependency
|
40
40
|
name: thor
|
@@ -104,7 +104,6 @@ extra_rdoc_files: []
|
|
104
104
|
files:
|
105
105
|
- LICENSE.txt
|
106
106
|
- README.md
|
107
|
-
- Rakefile
|
108
107
|
- bin/chamber
|
109
108
|
- lib/chamber.rb
|
110
109
|
- lib/chamber/binary/heroku.rb
|
@@ -192,7 +191,8 @@ files:
|
|
192
191
|
homepage: https://github.com/thekompanee/chamber
|
193
192
|
licenses:
|
194
193
|
- MIT
|
195
|
-
metadata:
|
194
|
+
metadata:
|
195
|
+
allowed_push_host: https://rubygems.org
|
196
196
|
post_install_message:
|
197
197
|
rdoc_options: []
|
198
198
|
require_paths:
|
@@ -252,3 +252,4 @@ test_files:
|
|
252
252
|
- spec/rails-engine-test/spec/dummy/script/rails
|
253
253
|
- spec/spec_key
|
254
254
|
- spec/spec_key.pub
|
255
|
+
has_rdoc:
|
metadata.gz.sig
CHANGED
Binary file
|