epub-parser 0.4.4 → 0.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d9291e2d914a2318697ab1303feb9a2f04080c1f30d329c0e5a16cc3bf27591a
4
- data.tar.gz: 606db4cc875875e0d4ababcba1b38cee841e64cf18535904a46397af030f691d
3
+ metadata.gz: 25b4d1e1300bee0055f6bf79b79c7c3404e1a18752a558160ef4978c38cd1e46
4
+ data.tar.gz: e467ba867b6fd5e9959e35bdec9c896f2c361f7cceb93fcb6c42539f55213ecc
5
5
  SHA512:
6
- metadata.gz: a834f8c3859d8970252d6d1d70e24f3f2c034468e4bb5b198218c5813bad0884a0cac25e229f2285ef1c7f9f9c37c8962eb242b5db2323392ceb84f340c293c3
7
- data.tar.gz: 34badc2b282ab04c1a9aeb218e359c69d7d6042713b3bcc7851f80882dac01a847cb94b9787241f832960d0b3586e8adeed8d70b7caf6293e66a7c3cc8075dec
6
+ metadata.gz: c1af1a66faccb0812659841be637d51e0e70cbf41d2fd3672287dded4bf147adfa131eba6b4297eadb108d4aa7c6f1414ad932861b3963ff6cab9a235d4b9b78
7
+ data.tar.gz: 6561f63c30009f4e333e99189966aeeceb6c8c190b541d2c0b12711c565a8cb51bcaa1ee37d3623806693981250739371b9006a9e7d8776343b94b5f47c4f65e
@@ -1,5 +1,9 @@
1
1
  = CHANGELOG
2
2
 
3
+ == 0.4.5
4
+
5
+ [BUG FIX]Handle the case EPUB path is a Pathname
6
+
3
7
  == 0.4.4
4
8
 
5
9
  * [BUG FIX]Fix navigation type check bug
@@ -176,6 +176,10 @@ If you find other gems, please tell me or request a pull request.
176
176
 
177
177
  == RECENT CHANGES
178
178
 
179
+ === 0.4.5
180
+
181
+ [BUG FIX]Handle the case EPUB path is a Pathname
182
+
179
183
  === 0.4.4
180
184
 
181
185
  * [BUG FIX]Fix navigation type check bug
@@ -192,14 +196,6 @@ If you find other gems, please tell me or request a pull request.
192
196
  * [BUG FIX]Fix a bug that `epubinfo` command with `--words` or `--chars` option causes load error if there is not Nokogiri in environment
193
197
  * [BUG FIX]Fix a bug that REXML::Element#content ignores descendant nodes
194
198
 
195
- === 0.4.1
196
-
197
- * Add Oga backend for XML document
198
-
199
- === 0.4.0
200
-
201
- * [BUG FIX]Make epub:type a Set
202
-
203
199
  See {file:CHANGELOG.adoc} for older changelogs and details.
204
200
 
205
201
  == TODOS
@@ -103,6 +103,7 @@ if options[:format] == :line
103
103
  if nav
104
104
  nav.traverse do |item, depth|
105
105
  text = item.text || "(No heading)"
106
+ text += "(#{item.types.sort.join(', ')})" unless item.types.empty?
106
107
  puts "#{' ' * depth}#{text}"
107
108
  end
108
109
  else
@@ -41,11 +41,11 @@ module EPUB
41
41
  end
42
42
 
43
43
  def initialize(filepath, container_adapter: nil, book: nil, initialize_with: nil, **options)
44
- if filepath.encoding == Encoding::ASCII_8BIT
44
+ if filepath.to_s.encoding == Encoding::ASCII_8BIT
45
45
  # On Windows and macOS, encoding of file name is set by Ruby,
46
46
  # but on UNIX, always is ASCII-8BIT
47
47
  # See https://docs.ruby-lang.org/ja/2.7.0/class/IO.html
48
- filepath = filepath.dup
48
+ filepath = filepath.to_s.dup
49
49
  require "nkf"
50
50
  filepath.force_encoding NKF.guess(filepath)
51
51
  end
@@ -1,5 +1,5 @@
1
1
  module EPUB
2
2
  class Parser
3
- VERSION = "0.4.4"
3
+ VERSION = "0.4.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: epub-parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - KITAITI Makoto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-15 00:00:00.000000000 Z
11
+ date: 2020-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake