epub-maker 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.markdown +5 -0
- data/README.markdown +4 -0
- data/lib/epub/maker.rb +2 -5
- data/lib/epub/maker/publication.rb +4 -1
- data/lib/epub/maker/task.rb +4 -2
- data/lib/epub/maker/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c40def444773cc73f4a412792312c708d34fc45
|
4
|
+
data.tar.gz: 2a731fbf57f36c9c978707b49d8c060d4086f80b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 715949ee62b509a9eade435df0d6823d85892ee1ad7f99ff949089abb02386d62cbfcd4a549a4c4e0b615ed1f59681cdcdc6e8794bdf0c8eacb52f3076940948
|
7
|
+
data.tar.gz: e7825b5df371b8bf4da010fa72e8099491fe25f2cfe50f291b36acd8a8087fd80e1d56c33531d8a4b9709faec721fadc3d514508274c831e8a61e17b1b08fb26
|
data/CHANGELOG.markdown
CHANGED
data/README.markdown
CHANGED
@@ -145,6 +145,10 @@ Todo
|
|
145
145
|
|
146
146
|
Recent Changes
|
147
147
|
--------------
|
148
|
+
### 0.0.5
|
149
|
+
|
150
|
+
* Fix bug to modify `dc:rights` to `dc:right`
|
151
|
+
|
148
152
|
### 0.0.4
|
149
153
|
* API change: #save -> #write for PhysicalContainer classes
|
150
154
|
* Bump required EPUB Parser version: 0.2.0 -> 0.2.6
|
data/lib/epub/maker.rb
CHANGED
@@ -124,7 +124,9 @@ module EPUB
|
|
124
124
|
def to_xml_fragment(xml)
|
125
125
|
xml.metadata_('xmlns:dc' => EPUB::NAMESPACES['dc']) {
|
126
126
|
(DC_ELEMS - [:languages]).each do |elems|
|
127
|
-
singular = elems[0..-2]
|
127
|
+
singular = elems[0..-2]
|
128
|
+
singular += 's' if elems == :rights
|
129
|
+
singular += '_'
|
128
130
|
__send__("dc_#{elems}").each do |elem|
|
129
131
|
node = xml['dc'].__send__(singular, elem.content)
|
130
132
|
to_xml_attribute node, elem, [:id, :dir]
|
@@ -222,6 +224,7 @@ module EPUB
|
|
222
224
|
self
|
223
225
|
end
|
224
226
|
|
227
|
+
# @return [Item]
|
225
228
|
def make_item(options={})
|
226
229
|
item = Item.new
|
227
230
|
[:id, :href, :media_type, :properties, :media_overlay].each do |attr|
|
data/lib/epub/maker/task.rb
CHANGED
@@ -109,9 +109,11 @@ module EPUB
|
|
109
109
|
end
|
110
110
|
end
|
111
111
|
else
|
112
|
-
raise 'No rootfile set' if
|
112
|
+
raise 'No rootfile set' if rootfiles.empty?
|
113
113
|
rf = rootfiles.first
|
114
|
-
|
114
|
+
package = EPUB::Parser::Publication.new(File.read(rf)).parse
|
115
|
+
book.rootfiles.first.package = package
|
116
|
+
package.book = book
|
115
117
|
end
|
116
118
|
end
|
117
119
|
end
|
data/lib/epub/maker/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: epub-maker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.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:
|
11
|
+
date: 2017-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: epub-parser
|
@@ -308,7 +308,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
308
308
|
version: '0'
|
309
309
|
requirements: []
|
310
310
|
rubyforge_project:
|
311
|
-
rubygems_version: 2.
|
311
|
+
rubygems_version: 2.6.8
|
312
312
|
signing_key:
|
313
313
|
specification_version: 4
|
314
314
|
summary: EPUB Maker
|