savon 0.2.11 → 0.2.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/savon.rb +1 -1
  3. data/lib/savon/service.rb +6 -1
  4. metadata +2 -2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.11
1
+ 0.2.12
@@ -35,7 +35,7 @@ module Savon
35
35
 
36
36
  end
37
37
 
38
- %w(net/http uri rubygems hpricot apricoteatsgorilla).each do |gem|
38
+ %w(net/http net/https uri rubygems hpricot apricoteatsgorilla).each do |gem|
39
39
  require gem
40
40
  end
41
41
 
@@ -36,6 +36,7 @@ module Savon
36
36
  raise ArgumentError, "Invalid version: #{version}" unless SOAPVersions.include? version
37
37
  @endpoint = URI(endpoint)
38
38
  @version = version
39
+ @ssl = /^https.+/ === endpoint
39
40
  end
40
41
 
41
42
  # Returns an instance of Savon::WSDL.
@@ -121,7 +122,11 @@ module Savon
121
122
 
122
123
  # Returns a Net::HTTP instance.
123
124
  def http
124
- @http ||= Net::HTTP.new(@endpoint.host, @endpoint.port)
125
+ unless @http
126
+ @http ||= Net::HTTP.new(@endpoint.host, @endpoint.port)
127
+ @http.use_ssl = true if @ssl
128
+ end
129
+ @http
125
130
  end
126
131
 
127
132
  # Catches calls to SOAP actions, checks if the method called was found in
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: savon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.11
4
+ version: 0.2.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Harrington
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-13 00:00:00 +01:00
12
+ date: 2009-11-23 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency