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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b11104464cf0ba2c0b9f992f358b64744f483f9be7e968ef39f95205d96c70ad
4
- data.tar.gz: 359d48099a93f1ab48d8228e87ebc24824cea6b7fdf18947d79d008446d4dc5f
3
+ metadata.gz: c160b5ee2e710b004e4ef953efe76f412f169f67ebae94db778aa82413b6876f
4
+ data.tar.gz: 7923d2b022a0a37d386dd950d331a9aa09a46aed7313d0798a9c4d9d99f66370
5
5
  SHA512:
6
- metadata.gz: 04f08290f8723bfea3cc0a87c6a384a6b6e6aec18427159a9d3c3b2e0848b4facf58cae061de2ddc6d6911a47c63c9c7128a344d0b8e53b7155524dfdcc52740
7
- data.tar.gz: 82ef0233bfa22fe19e354a854d824a5edd2a00ec7f530074d908a1c9d4f29d870b2b198229340998a6c03678dc31b34201c5971d9d0116ef52271c0e6966f69e
6
+ metadata.gz: 7cd22cf616a1d800f5e6f5ea633e9262fc5f3251b32a4606d0890251b24d47327d1b4c18229d36e031d964de20efc3e8ee1a31801726cf3f562cff172d5ea4c8
7
+ data.tar.gz: fc76a96379d8980c5659c7aada870a93a98a27aa00849e5251088b6e18f21eba40c8777e46339feab8efc2d5527e504da85462b8e8f5ddcae304d386bfda91cf
data/.travis.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.5.5
4
- - 2.6.3
3
+ - 2.5.6
4
+ - 2.6.4
5
5
  script: bundle exec rake spec
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
@@ -1,4 +1,4 @@
1
1
  module GEPUB
2
2
  # GEPUB gem version
3
- VERSION = "1.0.4"
3
+ VERSION = "1.0.5"
4
4
  end
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
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-05-27 00:00:00.000000000 Z
11
+ date: 2019-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri