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 +4 -4
- data/lib/eepub/epub.rb +2 -5
- data/lib/eepub/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c45185b9bc841d1dffbbeadf217e5f78c88e480e
|
4
|
+
data.tar.gz: '092f0704c9c51d76fe5b3284142bf13cbc4d9b86'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 =
|
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
|
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