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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b03d446f6c71a6105554b794179ec35e719bc3a3c630ece5bd2607edbf379681
4
- data.tar.gz: b8c27f00396dc720d1e5dfc13d92fa5d97061f58947217d873a173c2ce939f7d
3
+ metadata.gz: 182dd726cf90fa76a43d3829859f32bff50b87facef955ed0a74a4d28b1973d4
4
+ data.tar.gz: 3cb12d70ffe789d37662f7159d0f97ec95cd51eee5760ec4c81db55296ae7859
5
5
  SHA512:
6
- metadata.gz: 632a864249f1e89cdf915e28bcfdd8e83dbae9f3b8b4c84d933ccb873eed6d4b5ef3ab74d6775af229e9b49b6e21f9d199fe8990a542ef5b12f50fb8eda3e30d
7
- data.tar.gz: 9105843aac2528104ff2febf949ccd89e9a3efe9724e8a422c5a98de003563b3bd58643f5894964c5a787071b30325c64ace3e13414c2960058c28c2417e1291
6
+ metadata.gz: 34a93984ae7372e5a8f330f2ae56faf2a18999fba0b1914b8b7739e4643293cd73751d5673577b3b9145f0164c3e2aca8a542031d3a459c47ee2483de5b56902
7
+ data.tar.gz: 80773940885ab6f11b9f5deafb72ef6036f1d68398bd1695ccaa8779108505efb479528440c517faccea56d3350ee9ed513d059b87a20b426219e6cf8647dd17
@@ -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', '~> 1.15'
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.map do |e|
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
@@ -1,6 +1,6 @@
1
1
 
2
2
  module Epuber
3
- VERSION = '0.5.6'
3
+ VERSION = '0.5.7'
4
4
 
5
5
  HOME_URL = 'https://github.com/epuber-io/epuber'
6
6
  end
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.6
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: 2018-09-18 00:00:00.000000000 Z
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: '1.15'
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: '1.15'
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
- rubyforge_project:
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.