epubinfo_with_toc 0.5.2 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +1 -1
- data/lib/epubinfo/models/table_of_contents/resource.rb +6 -7
- metadata +14 -8
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NzU5NzFlNjU0MGZmMTczMjhiNTg4ZDMwZGMyZTUwYmYzZWQ3NDg3NA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YWYwZjdiYzMzMDhiYTJmNDVmOGQxYzUzZWZhYTQyZDllNWMyNzQyNQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZDE3OTBjYzEzZTc1MzVmNTk1YjQyYTFhN2JiZGQ3MjUxMjVkZDM1OGIwNTc1
|
10
|
+
ZTQyN2RmNjc2MTA5NjNiMTdjYTE5ZTVlMmUxODIzYzMzNzllZjZhYzE3ZDQx
|
11
|
+
NWFlNjQ4NWIxZWQwYTg1N2ZiMDZmMzJjZDI0MWMyMTkxYTNjYjA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NDEzNDFhMTdiZjA1OWEwYjU4MTNiNTdkZTIwYTcyOWNkMTcwY2Q4OTdlMzVi
|
14
|
+
YmZiNGM5NGExNjNkNzQ5MjFiYWUxOWJhMTc0NGQ1YzkyM2M4ZTJhNDVjM2Y4
|
15
|
+
MWFmMjNmNmZjYmRkZmEyOTc2NzFmMGFiNGI1ZGQxZWIxMjNjYTM=
|
data/README.md
CHANGED
@@ -58,12 +58,13 @@ class Resource
|
|
58
58
|
|
59
59
|
def spine
|
60
60
|
@spine ||=
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
61
|
+
begin
|
62
|
+
spine_resources = @table_of_contents.spine.first.xpath('./itemref').map { |s| s['idref'] }
|
63
|
+
spine_resources.map{|a| self.to_a.select{|t| t[:id].eql?(a)}}.flatten
|
64
|
+
end
|
65
65
|
end
|
66
66
|
|
67
|
+
|
67
68
|
def ncx
|
68
69
|
@ncx ||=
|
69
70
|
begin
|
@@ -114,9 +115,7 @@ class Resource
|
|
114
115
|
uri_ref = ''
|
115
116
|
order = ''
|
116
117
|
|
117
|
-
|
118
|
-
content = @table_of_contents.document.xpath("//content[starts-with(@src,'#{uri}')]")
|
119
|
-
nav_point = content.search('../../navPoint').first
|
118
|
+
nav_point = @table_of_contents.document.xpath("//navPoint[descendant-or-self::*//content[starts-with(@src, '#{uri}')]]").first
|
120
119
|
|
121
120
|
if nav_point #unless nav_point.nil? || nav_point.empty?
|
122
121
|
label = nav_point.at('navLabel text').content || ''
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: epubinfo_with_toc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christof Dorner
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-02-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rubyzip
|
@@ -31,14 +31,16 @@ dependencies:
|
|
31
31
|
requirements:
|
32
32
|
- - ! '>='
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version:
|
34
|
+
version: !binary |-
|
35
|
+
MS40LjI=
|
35
36
|
type: :runtime
|
36
37
|
prerelease: false
|
37
38
|
version_requirements: !ruby/object:Gem::Requirement
|
38
39
|
requirements:
|
39
40
|
- - ! '>='
|
40
41
|
- !ruby/object:Gem::Version
|
41
|
-
version:
|
42
|
+
version: !binary |-
|
43
|
+
MS40LjI=
|
42
44
|
- !ruby/object:Gem::Dependency
|
43
45
|
name: rspec
|
44
46
|
requirement: !ruby/object:Gem::Requirement
|
@@ -59,28 +61,32 @@ dependencies:
|
|
59
61
|
requirements:
|
60
62
|
- - ~>
|
61
63
|
- !ruby/object:Gem::Version
|
62
|
-
version:
|
64
|
+
version: !binary |-
|
65
|
+
MC44Ljc=
|
63
66
|
type: :development
|
64
67
|
prerelease: false
|
65
68
|
version_requirements: !ruby/object:Gem::Requirement
|
66
69
|
requirements:
|
67
70
|
- - ~>
|
68
71
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
72
|
+
version: !binary |-
|
73
|
+
MC44Ljc=
|
70
74
|
- !ruby/object:Gem::Dependency
|
71
75
|
name: jeweler
|
72
76
|
requirement: !ruby/object:Gem::Requirement
|
73
77
|
requirements:
|
74
78
|
- - ~>
|
75
79
|
- !ruby/object:Gem::Version
|
76
|
-
version:
|
80
|
+
version: !binary |-
|
81
|
+
MS44LjM=
|
77
82
|
type: :development
|
78
83
|
prerelease: false
|
79
84
|
version_requirements: !ruby/object:Gem::Requirement
|
80
85
|
requirements:
|
81
86
|
- - ~>
|
82
87
|
- !ruby/object:Gem::Version
|
83
|
-
version:
|
88
|
+
version: !binary |-
|
89
|
+
MS44LjM=
|
84
90
|
- !ruby/object:Gem::Dependency
|
85
91
|
name: redcarpet
|
86
92
|
requirement: !ruby/object:Gem::Requirement
|