rubypress 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rubypress/client.rb +3 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d76b31cf0b54c82b60480924f06565b258c28fe
|
4
|
+
data.tar.gz: f0cba9c398d95bf16016367c34d904301fc63033
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 09486c8f70750539145155a2acf10ece8d039238ce757e1ed7974b3c96b7a5074ac6c91466c84e93fb94a5876faf07cf3dd84fd699f5647eed4c13d2ba97c5f5
|
7
|
+
data.tar.gz: d7e6f867e0205c6c113a8a027ba2ecb5b71d90a0f2e84d7f6b700aafabefbc97106df45ec2d88a403ea656c070aa6cb37f00271baec89e3e30f713ab1bcdc29f
|
data/lib/rubypress/client.rb
CHANGED
@@ -16,7 +16,7 @@ module Rubypress
|
|
16
16
|
|
17
17
|
attr_reader :connection
|
18
18
|
attr_accessor :port, :ssl_port, :host, :path, :username, :password, :use_ssl, :default_post_fields,
|
19
|
-
:debug, :http_user, :http_password, :retry_timeouts, :cookie
|
19
|
+
:debug, :http_user, :http_password, :retry_timeouts, :timeout, :cookie
|
20
20
|
|
21
21
|
def initialize(options = {})
|
22
22
|
{
|
@@ -32,6 +32,7 @@ module Rubypress
|
|
32
32
|
:http_user => nil,
|
33
33
|
:http_password => nil,
|
34
34
|
:retry_timeouts => false,
|
35
|
+
:timeout => 30,
|
35
36
|
:cookie => nil
|
36
37
|
}.merge(options).each{ |opt| self.send("#{opt[0]}=", opt[1]) }
|
37
38
|
self
|
@@ -39,7 +40,7 @@ module Rubypress
|
|
39
40
|
|
40
41
|
def connection
|
41
42
|
if @connection.nil?
|
42
|
-
@connection = XMLRPC::Client.new(self.host, self.path, (self.use_ssl ? self.ssl_port : self.port),nil,nil,self.http_user,self.http_password,self.use_ssl,
|
43
|
+
@connection = XMLRPC::Client.new(self.host, self.path, (self.use_ssl ? self.ssl_port : self.port),nil,nil,self.http_user,self.http_password,self.use_ssl,self.timeout)
|
43
44
|
@connection.http_header_extra = {'accept-encoding' => 'identity'}
|
44
45
|
@connection.extend(XMLRPCRetryable) if retry_timeouts
|
45
46
|
@connection.cookie = self.cookie unless self.cookie.nil?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubypress
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zach Feldman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: retryable-rb
|