epuber 0.5.6 → 0.5.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/epuber.gemspec +1 -1
- data/lib/epuber/compiler/nav_generator.rb +5 -1
- data/lib/epuber/compiler/xhtml_processor.rb +3 -1
- data/lib/epuber/version.rb +1 -1
- metadata +7 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 182dd726cf90fa76a43d3829859f32bff50b87facef955ed0a74a4d28b1973d4
|
4
|
+
data.tar.gz: 3cb12d70ffe789d37662f7159d0f97ec95cd51eee5760ec4c81db55296ae7859
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34a93984ae7372e5a8f330f2ae56faf2a18999fba0b1914b8b7739e4643293cd73751d5673577b3b9145f0164c3e2aca8a542031d3a459c47ee2483de5b56902
|
7
|
+
data.tar.gz: 80773940885ab6f11b9f5deafb72ef6036f1d68398bd1695ccaa8779108505efb479528440c517faccea56d3350ee9ed513d059b87a20b426219e6cf8647dd17
|
data/epuber.gemspec
CHANGED
@@ -42,7 +42,7 @@ Gem::Specification.new do |spec|
|
|
42
42
|
spec.add_runtime_dependency 'coffee-script', '~> 2.4'
|
43
43
|
spec.add_runtime_dependency 'bade', '~> 0.2.4'
|
44
44
|
|
45
|
-
spec.add_development_dependency 'bundler'
|
45
|
+
spec.add_development_dependency 'bundler'
|
46
46
|
spec.add_development_dependency 'rspec', '~> 3.2'
|
47
47
|
spec.add_development_dependency 'rubocop', '~> 0.49'
|
48
48
|
spec.add_development_dependency 'rake', '~> 12.2'
|
@@ -121,7 +121,7 @@ module Epuber
|
|
121
121
|
end
|
122
122
|
end
|
123
123
|
|
124
|
-
if @target.epub_version >= 3 && toc_items.length > 0
|
124
|
+
if @target.epub_version >= 3 && toc_items.length > 0 && contains_item_with_title(toc_items)
|
125
125
|
@xml.ol do
|
126
126
|
iterate_lambda.call
|
127
127
|
end
|
@@ -130,6 +130,10 @@ module Epuber
|
|
130
130
|
end
|
131
131
|
end
|
132
132
|
|
133
|
+
def contains_item_with_title(toc_items)
|
134
|
+
toc_items.any? { |a| a.title || contains_item_with_title(a.sub_items) }
|
135
|
+
end
|
136
|
+
|
133
137
|
# @param toc_item [Epuber::Book::TocItem]
|
134
138
|
#
|
135
139
|
def visit_toc_item(toc_item)
|
@@ -58,7 +58,9 @@ module Epuber
|
|
58
58
|
if doc.errors.empty?
|
59
59
|
errors = []
|
60
60
|
else
|
61
|
-
errors = doc.errors
|
61
|
+
errors = doc.errors
|
62
|
+
.reject { |e| e.message.include?('ERROR: Namespace prefix epub') } # skip errors about missing definition of `epub` namespace
|
63
|
+
.map do |e|
|
62
64
|
Problem.new(:error, e.message, text_for_errors, line: e.line, column: e.column, file_path: file_path)
|
63
65
|
end
|
64
66
|
end
|
data/lib/epuber/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: epuber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roman Kříž
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -250,16 +250,16 @@ dependencies:
|
|
250
250
|
name: bundler
|
251
251
|
requirement: !ruby/object:Gem::Requirement
|
252
252
|
requirements:
|
253
|
-
- - "
|
253
|
+
- - ">="
|
254
254
|
- !ruby/object:Gem::Version
|
255
|
-
version: '
|
255
|
+
version: '0'
|
256
256
|
type: :development
|
257
257
|
prerelease: false
|
258
258
|
version_requirements: !ruby/object:Gem::Requirement
|
259
259
|
requirements:
|
260
|
-
- - "
|
260
|
+
- - ">="
|
261
261
|
- !ruby/object:Gem::Version
|
262
|
-
version: '
|
262
|
+
version: '0'
|
263
263
|
- !ruby/object:Gem::Dependency
|
264
264
|
name: rspec
|
265
265
|
requirement: !ruby/object:Gem::Requirement
|
@@ -554,8 +554,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
554
554
|
- !ruby/object:Gem::Version
|
555
555
|
version: '0'
|
556
556
|
requirements: []
|
557
|
-
|
558
|
-
rubygems_version: 2.7.7
|
557
|
+
rubygems_version: 3.0.3
|
559
558
|
signing_key:
|
560
559
|
specification_version: 4
|
561
560
|
summary: Epuber is simple tool to compile and pack source files into EPUB format.
|