kerryb-right_http_connection 1.2.4 → 1.2.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/Rakefile +1 -1
  2. data/lib/right_http_connection.rb +9 -5
  3. metadata +6 -4
data/Rakefile CHANGED
@@ -14,7 +14,7 @@ require File.join(File.dirname(__FILE__), 'lib', 'right_http_connection')
14
14
  AUTHOR = 'RightScale' # can also be an array of Authors
15
15
  EMAIL = "rubygems@rightscale.com"
16
16
  DESCRIPTION = "RightScale's robust HTTP/S connection module"
17
- GEM_NAME = 'right_http_connection' # what ppl will type to install your gem
17
+ GEM_NAME = 'kerryb-right_http_connection' # what ppl will type to install your gem
18
18
  RUBYFORGE_PROJECT = 'rightscale' # The unix name for your project
19
19
  HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org"
20
20
  DOWNLOAD_PATH = "http://rubyforge.org/projects/#{RUBYFORGE_PROJECT}"
@@ -21,8 +21,6 @@
21
21
  # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
22
  #
23
23
 
24
- STDERR.puts 'WARNING: right_http_connection gem has been changed!'
25
-
26
24
  require "net/https"
27
25
  require "uri"
28
26
  require "time"
@@ -36,7 +34,7 @@ module RightHttpConnection #:nodoc:
36
34
  module VERSION #:nodoc:
37
35
  MAJOR = 1
38
36
  MINOR = 2
39
- TINY = 4
37
+ TINY = 5
40
38
 
41
39
  STRING = [MAJOR, MINOR, TINY].join('.')
42
40
  end
@@ -286,10 +284,16 @@ them.
286
284
  @server = request_params[:server]
287
285
  @port = request_params[:port]
288
286
  @protocol = request_params[:protocol]
287
+ @proxy = request_params[:proxy]
289
288
 
290
289
  @logger.info("Opening new #{@protocol.upcase} connection to #@server:#@port")
291
- # @http = Net::HTTP.new(@server, @port)
292
- @http = Net::HTTP::Proxy('proxy.intra.bt.com', 8080).new(@server, @port)
290
+ if @proxy
291
+ @logger.info("Using proxy #{@proxy}")
292
+ proxy_uri = URI::parse(@proxy)
293
+ @http = Net::HTTP::Proxy(proxy_uri.host, proxy_uri.port).new(@server, @port)
294
+ else
295
+ @http = Net::HTTP.new(@server, @port)
296
+ end
293
297
  @http.open_timeout = @params[:http_connection_open_timeout]
294
298
  @http.read_timeout = @params[:http_connection_read_timeout]
295
299
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kerryb-right_http_connection
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
4
+ version: 1.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - RightScale
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-03-03 00:00:00 -08:00
12
+ date: 2010-02-02 00:00:00 +00:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -33,6 +33,8 @@ files:
33
33
  - setup.rb
34
34
  has_rdoc: true
35
35
  homepage: http://rightscale.rubyforge.org
36
+ licenses: []
37
+
36
38
  post_install_message:
37
39
  rdoc_options:
38
40
  - --main
@@ -54,9 +56,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
54
56
  requirements: []
55
57
 
56
58
  rubyforge_project: rightscale
57
- rubygems_version: 1.2.0
59
+ rubygems_version: 1.3.5
58
60
  signing_key:
59
- specification_version: 2
61
+ specification_version: 3
60
62
  summary: RightScale's robust HTTP/S connection module
61
63
  test_files: []
62
64