rubypress 1.0.3 → 1.0.4
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 +5 -3
- 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: 6aaed16b1f55bdfeb53008a99a2bf858cd5c9491
|
4
|
+
data.tar.gz: 8c069c6a914a8a719722eacbb1ecfe2fe1b63d9a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c4d11588d711b121fd831c93e8df3a0f5a9527c5251adea549cc61342514be715b60949ea039a5daebc0e06836163aede2852750c2348ec4ea03fdc70a5d44b
|
7
|
+
data.tar.gz: a8c7948bdc62b35ae6591ac37dff17500d7b3a22a3079721ccce58a101ad3cf0674ede017d98fffd7e86e16be395dfa39934b63a88c837b56c368c7efb746e20
|
data/lib/rubypress/client.rb
CHANGED
@@ -12,7 +12,7 @@ module Rubypress
|
|
12
12
|
class Client
|
13
13
|
|
14
14
|
attr_reader :connection
|
15
|
-
attr_accessor :port, :host, :path, :username, :password, :use_ssl, :default_post_fields, :debug
|
15
|
+
attr_accessor :port, :host, :path, :username, :password, :use_ssl, :default_post_fields, :debug, :http_user, :http_password
|
16
16
|
|
17
17
|
def initialize(options = {})
|
18
18
|
{
|
@@ -23,13 +23,15 @@ module Rubypress
|
|
23
23
|
:username => nil,
|
24
24
|
:password => nil,
|
25
25
|
:default_post_fields => %w(post terms custom_fields),
|
26
|
-
:debug => false
|
26
|
+
:debug => false,
|
27
|
+
:http_user => nil,
|
28
|
+
:http_password => nil
|
27
29
|
}.merge(options).each{ |opt| self.send("#{opt[0]}=", opt[1]) }
|
28
30
|
self
|
29
31
|
end
|
30
32
|
|
31
33
|
def connection
|
32
|
-
server = XMLRPC::Client.new(self.host, self.path, self.port,nil,nil,
|
34
|
+
server = XMLRPC::Client.new(self.host, self.path, self.port,nil,nil,self.http_user,self.http_password,self.use_ssl,nil)
|
33
35
|
server.http_header_extra = {'accept-encoding' => 'identity'}
|
34
36
|
@connection = server
|
35
37
|
end
|
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.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zach Feldman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Easily access WordPress installations through the WordPress XML-RPC API.
|
14
14
|
This gem exactly mirrors the functionality provided by the WordPress XML-RPC API
|