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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5b3280f3998917bc24978e82e87c0946a8eb59c7
4
- data.tar.gz: fc799d6507200b816b14aa224947b7e1eae7987d
3
+ metadata.gz: b41f177d531cf2b88ca1eb7dfa1f2c3c6d58c3d8
4
+ data.tar.gz: 01edda669806df5061c66d81af5084a0b7eceb11
5
5
  SHA512:
6
- metadata.gz: e28a4ada7a5e80d44adc8c2ff84b621a5b5e336aff9d7374326801591a9f3b5b30305c8fd76d0a1ea6bb70e96b97da8a27475d81610dcd1c101b6f6459f06f44
7
- data.tar.gz: f3f8df49f1970806525b6c11dc726c59188b3db0b552f929556ae5a98440973141aba7d56fa0ff633b66bba2d6ce242b0fe891fcee16f2a13f7627f69c8ee3ac
6
+ metadata.gz: 20eab688f217b655f54cd8bb645650d1339d1fbfbe67aac828d8bd7f8216875a9cdc1289590c5cfe9ea2697c9d8587d98f8170d787871c3d4e7aa66def66fc01
7
+ data.tar.gz: 9a8701065fb70055c2c4b656b6c726aa87b37c99dd1b40f0abee20d8a5533514d6ad4fd78358b8ce57c0510dfb0ee181dde87558934fbab89053928ef51bf704
@@ -1,3 +1,9 @@
1
+ # 0.82.5 (2014/06/12)
2
+
3
+ Fixes:
4
+
5
+ - Fix for uninitialized constant OpenSSL (thanks @kui)
6
+
1
7
  # 0.82.4 (2014/06/10)
2
8
 
3
9
  Fixes:
@@ -3,7 +3,7 @@
3
3
 
4
4
  Gem::Specification.new do |gem|
5
5
  gem.name = 'growthforecast-client'
6
- gem.version = '0.82.4'
6
+ gem.version = '0.82.5'
7
7
  gem.authors = ["Naotoshi Seo"]
8
8
  gem.email = ["sonots@gmail.com"]
9
9
  gem.homepage = "https://github.com/sonots/growthforecast-client"
@@ -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 = uri.host
29
- @port = uri.port
30
- @use_ssl = uri.scheme == 'https'
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
- http.verify_mode = OpenSSL::SSL::VERIFY_NONE unless @verify_ssl
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
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-10 00:00:00.000000000 Z
11
+ date: 2014-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor