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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 96422fc63ea4a194ae6a32f1f105cc25888721bd
4
- data.tar.gz: 2b586ae6e1e41221026fcc2fe4b3cfe38686961b
3
+ metadata.gz: bc4416bd5b5fd2eea1613d0669d1c5fa8a37430b
4
+ data.tar.gz: f3d386df08c984cd4df09503cb4f4198c7680c7f
5
5
  SHA512:
6
- metadata.gz: 097d9d3c199ffc08791f71b2654ec25f4bc43ca59663c7531ae57d8db7930d71b8be4a1d4100c40d7f086a4ebb21e4125bed8868f6b0b2a345127cc84ffedf7d
7
- data.tar.gz: 6f348a5bfa004f3e45430107260eb45e051bd65c579ffd96d390fe39d1b6778a55974d971124d520e2a9d392d654e0d9b3067212c238e58c18b88716d4ab360d
6
+ metadata.gz: 64a72132b70b56e963fbd3bfaabc076967f7f1d20b979a8c3cc3ce8718fc3dea9b4cbf4e6ac28806125b606569c6e2868b8418eac711282a5700ddd4a3d27dae
7
+ data.tar.gz: 5082ed52781fc10753e6b395711c9338d88d9f0cf682785f4ca3f6d326795e690b33621bb9f4df537c58a6b5da7d7bef4fa89c26a3f27d73182054e6f339a158
@@ -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)
@@ -1,5 +1,5 @@
1
1
  module Wordpress
2
2
  class WXR
3
- VERSION = '0.1.1'.freeze
3
+ VERSION = '0.2.0'.freeze
4
4
  end
5
5
  end
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.1
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-14 00:00:00.000000000 Z
11
+ date: 2017-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler