spreedly 2.0.8 → 2.0.9

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: 9538b6c1ed8e7ba11071b8dc757c7e7a1d4732d8
4
- data.tar.gz: 63dd3d5646e29f2a58e49ed71a54218c1a3fb13c
3
+ metadata.gz: 875f18b0344ae1e3a1edce418d74ab253904f91b
4
+ data.tar.gz: 27780df6cbf87547d9bbef082d7ec82228fb226c
5
5
  SHA512:
6
- metadata.gz: e6ed1813c4f1b9e2e4e5c3d855a6562e1bb4dd8482f900d07073cd0b27af78f5551da9ecbd015bc57c80c4cbf8890d4a1415aacf8580c3eb38bc86457abecaa1
7
- data.tar.gz: 63048ed38605a0d135614be7916f4a51f8e8a3672ac8dffbe05b57ab736be989224c687ef26209fd28e18223037fd8acaea79450c767dc63b85ada4dbbc3fe9f
6
+ metadata.gz: 7749a2db90e831323fbb4e65c972922640e4931e5b41ba1afffacd85c2bd14c2fa28857e17eb7f613a0cdc43aeb625323df7f56944c370b3da9f4040c7ea3d95
7
+ data.tar.gz: 1ff5a74e8638f4197d906ebe312c4d2b85fcf887deb4dae507280d8428b45bb40afbc1cd3a3947f2b498e3e321a8ddf9803ac680fcaf77a567ed506abb773974
@@ -30,13 +30,20 @@ module Spreedly
30
30
  private
31
31
  def http
32
32
  http = Net::HTTP.new(endpoint.host, endpoint.port)
33
+ configure_ssl(http)
33
34
  http.open_timeout = 64
34
35
  http.read_timeout = 64
36
+ http
37
+ end
38
+
39
+ def configure_ssl(http)
40
+ return unless endpoint.scheme == "https"
41
+
35
42
  http.use_ssl = true
36
43
  http.verify_mode = OpenSSL::SSL::VERIFY_PEER
37
44
  http.ca_file = File.dirname(__FILE__) + '/../certs/cacert.pem'
38
- http
39
45
  end
46
+
40
47
  end
41
48
 
42
49
  class OptionsWithResponseBody < Net::HTTPRequest
@@ -1,3 +1,3 @@
1
1
  module Spreedly
2
- VERSION = "2.0.8"
2
+ VERSION = "2.0.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spreedly
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.8
4
+ version: 2.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Spreedly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-12 00:00:00.000000000 Z
11
+ date: 2014-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri