wordpress-wxr 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wordpress/wxr/authors.rb +6 -1
- data/lib/wordpress/wxr/categories.rb +6 -1
- data/lib/wordpress/wxr/version.rb +1 -1
- 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: 96422fc63ea4a194ae6a32f1f105cc25888721bd
|
4
|
+
data.tar.gz: 2b586ae6e1e41221026fcc2fe4b3cfe38686961b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 097d9d3c199ffc08791f71b2654ec25f4bc43ca59663c7531ae57d8db7930d71b8be4a1d4100c40d7f086a4ebb21e4125bed8868f6b0b2a345127cc84ffedf7d
|
7
|
+
data.tar.gz: 6f348a5bfa004f3e45430107260eb45e051bd65c579ffd96d390fe39d1b6778a55974d971124d520e2a9d392d654e0d9b3067212c238e58c18b88716d4ab360d
|
@@ -22,7 +22,12 @@ module Wordpress
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def find_by(login:)
|
25
|
-
|
25
|
+
return if login.empty?
|
26
|
+
|
27
|
+
author = nodes.xpath("wp:author_login[text() = '#{login}']/parent::node()")
|
28
|
+
return unless author
|
29
|
+
|
30
|
+
Author.new(author, wxr)
|
26
31
|
end
|
27
32
|
|
28
33
|
private
|
@@ -22,7 +22,12 @@ module Wordpress
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def find_by(nicename:)
|
25
|
-
|
25
|
+
return if nicename.empty?
|
26
|
+
|
27
|
+
category = nodes.xpath("wp:category_nicename[text() = '#{nicename}']/parent::node()")
|
28
|
+
return unless category
|
29
|
+
|
30
|
+
Category.new(category, wxr)
|
26
31
|
end
|
27
32
|
|
28
33
|
private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wordpress-wxr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ePublishing, inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|