eepub 0.3.2 → 0.3.3

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
  SHA1:
3
- metadata.gz: 47898b927d644865e6bfc5acafa1e338b105cade
4
- data.tar.gz: 8caef5facc55165930418b10b81d476fb7b91dec
3
+ metadata.gz: c45185b9bc841d1dffbbeadf217e5f78c88e480e
4
+ data.tar.gz: '092f0704c9c51d76fe5b3284142bf13cbc4d9b86'
5
5
  SHA512:
6
- metadata.gz: e859a6ee9cf51421654bc57e32d1894427481fab98d9d7d31a404f23312ae22321b4afdc103a195f43b620295fb450b403f8d97481ac776101feeb3231693a18
7
- data.tar.gz: 1a8cba1bb4e01126b8c70a24b6ee1906151a2aaaea906535cdf0b9a8fb6c478d116467081990dc962b2edda91b38c2ed8b227e2ca80e67505586caf6a2cb018e
6
+ metadata.gz: afb59c1326599703a5acd010533975bc1bdcd1c475c8e20577376968dfb72378dc43a6234997417a69f155382ca13968ef27a83230a3f3fe22fd4e3b4bf92d25
7
+ data.tar.gz: 8185b4abbfb85da2be4f9f9372746e5e067215d38bca441606c9d34c955a660c12d2126f284881d6112b02ad111be229cc9382823f130c7c781d149d81b19809
data/lib/eepub/epub.rb CHANGED
@@ -27,7 +27,7 @@ module Eepub
27
27
 
28
28
  def title
29
29
  @title ||= Zip::File.open(path) {|zip|
30
- rootfile_doc = REXML::Document.new(rootfile_entry(zip).get_input_stream)
30
+ rootfile_doc = rootfile_entry(zip).get_input_stream(&REXML::Document.method(:new))
31
31
 
32
32
  REXML::XPath.first(rootfile_doc, '//dc:title', XMLNS.slice('dc')).text
33
33
  }
@@ -44,10 +44,7 @@ module Eepub
44
44
 
45
45
  REXML::XPath.first(rootfile_doc, '//dc:title', XMLNS.slice('dc')).text = title
46
46
 
47
- zip.get_output_stream rootfile_entry.name do |stream|
48
- stream.write rootfile_doc.to_s
49
- end
50
-
47
+ zip.get_output_stream rootfile_entry.name, &rootfile_doc.method(:write)
51
48
  zip.commit
52
49
  end
53
50
  end
data/lib/eepub/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Eepub
2
- VERSION = '0.3.2'
2
+ VERSION = '0.3.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eepub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keita Urashima