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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c1bc5b231e9d50e0536403dcc8e99fa1e99f661d
4
- data.tar.gz: 9eb21ac438a44916cc0b1e834ffba8b9df12dbac
3
+ metadata.gz: 5b290807446b6bbda9db10165df6c1dba0615150
4
+ data.tar.gz: e0e6d8b4283e2a19cfba78bc9c14a0e4ad6d2105
5
5
  SHA512:
6
- metadata.gz: 1a3b28ef63cb28962f60c8276de9d0b50822957e5d820004f69f8c4291491c962dc532d2ff9c17f4ee3db13e73e9dcf1dda80a7d19dd880de12faf1ab9bccb12
7
- data.tar.gz: c60c1e743687c23473552cae0881d724636e68ee7057cefe65335b995d5e22fc2e2bb09c249218e43987e9929fdd17a0396e68275a5d6b55e0f8936604a4a71d
6
+ metadata.gz: 8c964c9fc258f0e52531e681cfd5540b057463825a5a3e41031cbddb950f185d04176915947a84cd7e442085cff4a8bbccfe75dbfca85ddd5f790e61236f3f52
7
+ data.tar.gz: 60bf3576eaac65a18ac4fdb652d873593059d620040d810d0db5aaea10a765eed132509156bd2b1d670a98be401bded9712e56c21e803ee10d61268d27f0469e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- svcdeps_tasks (0.1.3)
4
+ svcdeps_tasks (0.1.4)
5
5
  deep_merge (~> 1.2)
6
6
  rspec (~> 3.7)
7
7
 
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'
@@ -1,3 +1,3 @@
1
1
  module SvcdepsTasks
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
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.3
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-09 00:00:00.000000000 Z
11
+ date: 2018-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec