svcdeps_tasks 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/probe.rb +19 -2
- data/lib/svcdeps_tasks/version.rb +1 -1
- 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: 5b290807446b6bbda9db10165df6c1dba0615150
|
4
|
+
data.tar.gz: e0e6d8b4283e2a19cfba78bc9c14a0e4ad6d2105
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c964c9fc258f0e52531e681cfd5540b057463825a5a3e41031cbddb950f185d04176915947a84cd7e442085cff4a8bbccfe75dbfca85ddd5f790e61236f3f52
|
7
|
+
data.tar.gz: 60bf3576eaac65a18ac4fdb652d873593059d620040d810d0db5aaea10a765eed132509156bd2b1d670a98be401bded9712e56c21e803ee10d61268d27f0469e
|
data/Gemfile.lock
CHANGED
data/lib/probe.rb
CHANGED
@@ -74,10 +74,27 @@ class Probe
|
|
74
74
|
|
75
75
|
headers.each {|k,v| req[k] = v }
|
76
76
|
|
77
|
-
opts = {}
|
77
|
+
opts = {}
|
78
|
+
|
79
|
+
if is_https
|
80
|
+
if @opts[:ca_file]
|
81
|
+
opts[:ca_file] = @opts[:ca_file]
|
82
|
+
end
|
83
|
+
|
84
|
+
if @opts[:cert_file]
|
85
|
+
opts[:cert] = OpenSSL::X509::Certificate.new( File.read @opts[:cert_file] )
|
86
|
+
end
|
87
|
+
|
88
|
+
if @opts[:key_file]
|
89
|
+
opts[:key] = OpenSSL::PKey::RSA.new( File.read @opts[:key_file] )
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
78
93
|
opts[:use_ssl] = is_https
|
79
94
|
opts[:verify_mode] = OpenSSL::SSL::VERIFY_NONE if is_https && insecure
|
80
|
-
|
95
|
+
|
96
|
+
p [opts]
|
97
|
+
|
81
98
|
Net::HTTP.start( uri.host, uri.port, opts ) do |http|
|
82
99
|
res = http.request(req)
|
83
100
|
raise "Request to #{url} returned code #{res.code}" unless res.code == '200'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: svcdeps_tasks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tiago Lopo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|