rpc4json 0.0.3.alpha → 0.0.4.alpha

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,8 +22,8 @@ module JSONRPC
22
22
  'Content-Type' => 'application/json; charset=utf-8'
23
23
  }.freeze
24
24
 
25
- # Add additional HTTP headers to the request.
26
- attr_accessor :http_header_extra
25
+ # Add additional HTTP headers to the request and set the HTTP debug output.
26
+ attr_accessor :http_header_extra, :debug_output
27
27
 
28
28
  def initialize(host = nil, path = nil, port = nil, proxy_host = nil,
29
29
  proxy_port = nil, user = nil, password = nil, use_ssl = nil, timeout = nil)
@@ -103,8 +103,9 @@ module JSONRPC
103
103
 
104
104
  def new_http
105
105
  Net::HTTP.new(@host, @port, @proxy_host, @proxy_port).tap do |http|
106
- http.use_ssl = @use_ssl if @use_ssl
107
- http.verify_mode = @http_verify_mode if @http_verify_mode
106
+ http.set_debug_output(@debug_output || $stdout) if $DEBUG
107
+ http.use_ssl = @use_ssl if @use_ssl
108
+ http.verify_mode = @http_verify_mode if @http_verify_mode
108
109
  http.read_timeout = @timeout
109
110
  http.open_timeout = @timeout
110
111
  end
@@ -10,7 +10,7 @@ module JSONRPC
10
10
  # The minor number version.
11
11
  MINOR = 0
12
12
  # The tiny number version.
13
- TINY = 3
13
+ TINY = 4
14
14
  # The pre realese number version.
15
15
  PRE = :alpha
16
16
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rpc4json
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3.alpha
4
+ version: 0.0.4.alpha
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-10-29 00:00:00.000000000 Z
12
+ date: 2014-11-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler