wordpress-wxr 0.1.1 → 0.2.0
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/item.rb +8 -0
- 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: bc4416bd5b5fd2eea1613d0669d1c5fa8a37430b
|
4
|
+
data.tar.gz: f3d386df08c984cd4df09503cb4f4198c7680c7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64a72132b70b56e963fbd3bfaabc076967f7f1d20b979a8c3cc3ce8718fc3dea9b4cbf4e6ac28806125b606569c6e2868b8418eac711282a5700ddd4a3d27dae
|
7
|
+
data.tar.gz: 5082ed52781fc10753e6b395711c9338d88d9f0cf682785f4ca3f6d326795e690b33621bb9f4df537c58a6b5da7d7bef4fa89c26a3f27d73182054e6f339a158
|
data/lib/wordpress/wxr/item.rb
CHANGED
@@ -81,6 +81,14 @@ module Wordpress
|
|
81
81
|
end
|
82
82
|
end
|
83
83
|
|
84
|
+
def pages
|
85
|
+
wxr.pages.select { |page| page.parent_id == id }
|
86
|
+
end
|
87
|
+
|
88
|
+
def parent_id
|
89
|
+
Integer(node.xpath('wp:post_parent').text)
|
90
|
+
end
|
91
|
+
|
84
92
|
# def comments
|
85
93
|
# node.xpath('wp:comment').map do |comment_node|
|
86
94
|
# Comment.new(comment_node)
|
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.
|
4
|
+
version: 0.2.0
|
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-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|