gepub 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -2
- data/gepub.gemspec +0 -2
- data/lib/gepub/item.rb +6 -0
- data/lib/gepub/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c160b5ee2e710b004e4ef953efe76f412f169f67ebae94db778aa82413b6876f
|
4
|
+
data.tar.gz: 7923d2b022a0a37d386dd950d331a9aa09a46aed7313d0798a9c4d9d99f66370
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7cd22cf616a1d800f5e6f5ea633e9262fc5f3251b32a4606d0890251b24d47327d1b4c18229d36e031d964de20efc3e8ee1a31801726cf3f562cff172d5ea4c8
|
7
|
+
data.tar.gz: fc76a96379d8980c5659c7aada870a93a98a27aa00849e5251088b6e18f21eba40c8777e46339feab8efc2d5527e504da85462b8e8f5ddcae304d386bfda91cf
|
data/.travis.yml
CHANGED
data/gepub.gemspec
CHANGED
@@ -11,8 +11,6 @@ Gem::Specification.new do |s|
|
|
11
11
|
s.summary = %q{a generic EPUB library for Ruby.}
|
12
12
|
s.description = %q{gepub is a generic EPUB parser/generator. Generates and parse EPUB2 and EPUB3}
|
13
13
|
|
14
|
-
s.rubyforge_project = "gepub"
|
15
|
-
|
16
14
|
s.files = `git ls-files`.split("\n").reject { |f| f.match(%r{^spec/}) }
|
17
15
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
18
16
|
s.require_paths = ["lib"]
|
data/lib/gepub/item.rb
CHANGED
@@ -132,6 +132,9 @@ module GEPUB
|
|
132
132
|
# add content data to the item.
|
133
133
|
def add_raw_content(data)
|
134
134
|
@content = data
|
135
|
+
if File.extname(self.href) =~ /x?html$/
|
136
|
+
@content.force_encoding('utf-8')
|
137
|
+
end
|
135
138
|
guess_content_property
|
136
139
|
self
|
137
140
|
end
|
@@ -144,6 +147,9 @@ module GEPUB
|
|
144
147
|
end
|
145
148
|
io.binmode
|
146
149
|
@content = io.read
|
150
|
+
if File.extname(self.href) =~ /x?html$/
|
151
|
+
@content.force_encoding('utf-8')
|
152
|
+
end
|
147
153
|
guess_content_property
|
148
154
|
self
|
149
155
|
end
|
data/lib/gepub/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gepub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- KOJIMA Satoshi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|