hako-etcenv 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -0
- data/hako-etcenv.gemspec +1 -1
- data/lib/hako/env_providers/etcenv.rb +16 -2
- 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: d2a9495a38130707e4051a01395c08c0f975af9e
|
4
|
+
data.tar.gz: d94365656739c8b1f9ac808520f72126155a8d99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e728461943005d520218ed1bc9886a88fdc7923ea2f264d7eae6a285ecaff3b7d83ec4b31e79af340f0b2582d07d96e4f37dfa18ac4c7ba48b8f1d7521bbaeb3
|
7
|
+
data.tar.gz: cc5cf45a12dd2e7bec14a92d19408db3b8d6dd51d44cb63a95444a752193b1e8419ff16662376f88482f3eeb7681216f0a14f8795f9873d4d07fe42cf7589a0d
|
data/.rubocop.yml
CHANGED
data/hako-etcenv.gemspec
CHANGED
@@ -20,8 +20,8 @@ module Hako
|
|
20
20
|
port: uri.port,
|
21
21
|
use_ssl: uri.scheme == 'https',
|
22
22
|
ca_file: options.fetch('ca_file', nil),
|
23
|
-
ssl_cert:
|
24
|
-
ssl_key:
|
23
|
+
ssl_cert: ssl_cert(options.fetch('ssl_cert', nil)),
|
24
|
+
ssl_key: ssl_key(options.fetch('ssl_key', nil)),
|
25
25
|
)
|
26
26
|
@root = options.fetch('root')
|
27
27
|
end
|
@@ -35,6 +35,20 @@ module Hako
|
|
35
35
|
end
|
36
36
|
env
|
37
37
|
end
|
38
|
+
|
39
|
+
private
|
40
|
+
|
41
|
+
def ssl_cert(cert_path)
|
42
|
+
if cert_path
|
43
|
+
OpenSSL::X509::Certificate.new(::File.read(cert_path))
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
def ssl_key(key_path)
|
48
|
+
if key_path
|
49
|
+
OpenSSL::PKey::RSA.new(::File.read(key_path))
|
50
|
+
end
|
51
|
+
end
|
38
52
|
end
|
39
53
|
end
|
40
54
|
end
|