sentofu 0.4.2 → 0.5.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
2
  SHA256:
3
- metadata.gz: a8c4c056b7bcf92527c718a23d6f1d416c37f4858a027c3d8ce325eff3f4250d
4
- data.tar.gz: 51bdebdfcca2fbf71807081eabdefce06d42cbfe4544bf2826fc395971ceb4dd
3
+ metadata.gz: dc1b63ccb50a7452fa826049c091e5f0cd989f2060ec670b91352601eea74ef1
4
+ data.tar.gz: 2edb5a28019ceb9de9081851e60b183e0fdaa03ee057340749bd40e7c1df632c
5
5
  SHA512:
6
- metadata.gz: a130e083a690df006ef1875cbd4fc2538cf6b519275a2f7727ad2f24c3ea1c66e977cbd94731d70830075c8a9056858298fc3e3c79cae6eb14b1fab5c8ee7d9b
7
- data.tar.gz: 1860fa18f41ef466094440bbda7845bf713c28e81230f1716325daceeed5322e1a38a692d244c81789f02850883656950a30a62b2043a99a2dea10aad44fd429
6
+ metadata.gz: 6da37664e8512e07d13780af65fe4470389b71a1f5cf902a00a17d7b55b91eebea56a73a85b59428d7159490ba0a7ffd057185e8d1b0355ae0fe3250579627f0
7
+ data.tar.gz: 0ad3181e2d696bb627025f4de4fa61a4903260c83872239d693a5cb27669680b4e600d63dfeb5977ba663e7ca276125e9414fb7c824998c617a0a4b3f3eb9841
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
  # CHANGELOG.md
3
3
 
4
4
 
5
+ ## sentofu 0.5.0 released 2019-08-02
6
+
7
+ * Introduce Sentofu.ssl_verify_mode attr accessor
8
+
9
+
5
10
  ## sentofu 0.4.2 released 2019-07-28
6
11
 
7
12
  * Fix HTTP proxy determination code
data/lib/sentofu.rb CHANGED
@@ -5,6 +5,7 @@ require 'time'
5
5
  require 'base64'
6
6
  require 'webrick' # for the http code to message mapping
7
7
  require 'ostruct'
8
+ require 'openssl'
8
9
  require 'net/http'
9
10
 
10
11
  require 'sentofu/http'
@@ -14,7 +15,7 @@ require 'sentofu/explo'
14
15
 
15
16
  module Sentofu
16
17
 
17
- VERSION = '0.4.2'
18
+ VERSION = '0.5.0'
18
19
 
19
20
  USER_AGENT =
20
21
  "Sentofu #{Sentofu::VERSION} - " +
@@ -24,11 +25,12 @@ module Sentofu
24
25
 
25
26
  @auth_uri = nil
26
27
  @apis = {}
28
+ @ssl_verify_mode = OpenSSL::SSL::VERIFY_PEER
27
29
 
28
30
  class << self
29
31
 
30
32
  attr_reader :auth_uri, :apis
31
- attr_accessor :user_agent
33
+ attr_accessor :user_agent, :ssl_verify_mode
32
34
 
33
35
  def init(versions=%w[ common:1.0.0 company:1.0.0 markets:1.0.0 ])
34
36
 
data/lib/sentofu/http.rb CHANGED
@@ -51,7 +51,10 @@ module Sentofu
51
51
  # Nota Bene:
52
52
  # even if ENV['sentofu_http_proxy'], ENV['http_proxy'] could kick in
53
53
 
54
- http.use_ssl = (uri.scheme == 'https')
54
+ if uri.scheme == 'https'
55
+ http.use_ssl = true
56
+ http.verify_mode = Sentofu.ssl_verify_mode
57
+ end
55
58
 
56
59
  http
57
60
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sentofu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Mettraux
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-27 00:00:00.000000000 Z
11
+ date: 2019-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec