growthforecast-client 0.82.4 → 0.82.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/growthforecast-client.gemspec +1 -1
- data/lib/growthforecast/client.rb +12 -5
- 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: b41f177d531cf2b88ca1eb7dfa1f2c3c6d58c3d8
|
|
4
|
+
data.tar.gz: 01edda669806df5061c66d81af5084a0b7eceb11
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 20eab688f217b655f54cd8bb645650d1339d1fbfbe67aac828d8bd7f8216875a9cdc1289590c5cfe9ea2697c9d8587d98f8170d787871c3d4e7aa66def66fc01
|
|
7
|
+
data.tar.gz: 9a8701065fb70055c2c4b656b6c726aa87b37c99dd1b40f0abee20d8a5533514d6ad4fd78358b8ce57c0510dfb0ee181dde87558934fbab89053928ef51bf704
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
|
2
2
|
require 'net/http'
|
|
3
|
+
require 'net/https'
|
|
3
4
|
require 'uri'
|
|
4
5
|
require 'json'
|
|
5
6
|
require 'cgi'
|
|
@@ -25,15 +26,16 @@ module GrowthForecast
|
|
|
25
26
|
opts = stringify_keys(opts)
|
|
26
27
|
|
|
27
28
|
URI.parse(base_uri).tap {|uri|
|
|
28
|
-
@host
|
|
29
|
-
@port
|
|
30
|
-
@use_ssl
|
|
29
|
+
@host = uri.host
|
|
30
|
+
@port = uri.port
|
|
31
|
+
@use_ssl = uri.scheme == 'https'
|
|
31
32
|
}
|
|
32
33
|
@debug_dev = opts['debug_dev'] # IO object such as STDOUT
|
|
33
34
|
@open_timeout = opts['open_timeout'] # 60
|
|
34
35
|
@read_timeout = opts['read_timeout'] # 60
|
|
35
|
-
@verify_ssl = opts['verify_ssl']
|
|
36
36
|
@keepalive = opts['keepalive']
|
|
37
|
+
@verify_ssl = opts['verify_ssl']
|
|
38
|
+
@ca_file = opts['ca_file']
|
|
37
39
|
end
|
|
38
40
|
|
|
39
41
|
def http_connection
|
|
@@ -41,7 +43,12 @@ module GrowthForecast
|
|
|
41
43
|
http.use_ssl = @use_ssl
|
|
42
44
|
http.open_timeout = @open_timeout if @open_timeout
|
|
43
45
|
http.read_timeout = @read_timeout if @read_timeout
|
|
44
|
-
|
|
46
|
+
if @verify_ssl
|
|
47
|
+
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
|
48
|
+
http.ca_file = @ca_file if @ca_file
|
|
49
|
+
else
|
|
50
|
+
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
|
51
|
+
end
|
|
45
52
|
http.set_debug_output(@debug_dev) if @debug_dev
|
|
46
53
|
}
|
|
47
54
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: growthforecast-client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.82.
|
|
4
|
+
version: 0.82.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Naotoshi Seo
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-06-
|
|
11
|
+
date: 2014-06-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: thor
|