epub-maker 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.markdown +10 -0
- data/Gemfile +6 -4
- data/README.markdown +40 -28
- data/epub-maker.gemspec +3 -2
- data/lib/epub/maker.rb +57 -41
- data/lib/epub/maker/publication.rb +21 -3
- data/lib/epub/maker/task.rb +21 -8
- data/lib/epub/maker/version.rb +1 -1
- data/test/helper.rb +1 -0
- data/test/test_maker.rb +13 -0
- data/test/test_task.rb +5 -4
- metadata +59 -45
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f7686e5d9b95fd78315282adc67a221417f66c6
|
4
|
+
data.tar.gz: d8c453ee610a382d3bd313c8faee92c5c3e2d86a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73ff726291b887c4de99e76e169e02a3e0f1cc9dc15491f527ff1604b563bae295982e3805c3e70801377462b48c62e56a30c61f351fb0fa6e259dc0a1172469
|
7
|
+
data.tar.gz: 840a22921fdfa05a16e85a5a08d778812e341d4d36d2dd5d05b4c4a687681148da473aea105129d1b50193fe22c382938fe1f6b54879b30ac0c4f386055a19ba
|
data/CHANGELOG.markdown
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
0.0.2
|
2
|
+
-----
|
3
|
+
|
4
|
+
* Detect media type of files more strictly by using MimeMagic
|
5
|
+
* Keep temporary directory remained on error in `EPUB::Maker.make` to help research about it
|
6
|
+
* Define `EPUB::Package#edit`
|
7
|
+
* Make `EPUB::Package#save` able to replace content as well as add
|
8
|
+
* Define `EPUB::Package::Metadata::Meta#valid?`
|
9
|
+
* Drop invalid meta element in metadata on save
|
10
|
+
|
1
11
|
0.0.1
|
2
12
|
------
|
3
13
|
|
data/Gemfile
CHANGED
data/README.markdown
CHANGED
@@ -71,6 +71,33 @@ Usage
|
|
71
71
|
|
72
72
|
For structure of EPUB book, see [EPUB Parser's documentation][epub-parser-doc].
|
73
73
|
|
74
|
+
### In-place editing
|
75
|
+
|
76
|
+
require 'epub/maker'
|
77
|
+
|
78
|
+
book = EPUB::Parser.parse('path/to/book.epub')
|
79
|
+
book.resources.select(&:xhtml?).each do |item|
|
80
|
+
doc = item.content_document.nokogiri
|
81
|
+
title = doc/'title'
|
82
|
+
title.content += ' - Additional Title such like book title'
|
83
|
+
item.content = doc.to_xml
|
84
|
+
item.save
|
85
|
+
end
|
86
|
+
|
87
|
+
Shortcut:
|
88
|
+
|
89
|
+
book.resources.select(&:xhtml?).each do |item|
|
90
|
+
item.edit_with_nokogiri do |doc| # Nokogiri::XML::Document is passed to block
|
91
|
+
doc.search('img').each do |img|
|
92
|
+
img['alt'] = '' if img['alt'].nil?
|
93
|
+
end
|
94
|
+
end # item.content = doc.to_xml is called automatically
|
95
|
+
end # item.save is called automatically
|
96
|
+
|
97
|
+
For APIs of parsed EPUB book, see [EPUB Parser's documentation][epub-parser-doc].
|
98
|
+
|
99
|
+
[epub-parser-doc]: http://rubydoc.info/gems/epub-parser/frames
|
100
|
+
|
74
101
|
### Rake task ###
|
75
102
|
|
76
103
|
**CAUTION**: Still work in progress. File path to require and API will be modified in the future.
|
@@ -78,7 +105,8 @@ For structure of EPUB book, see [EPUB Parser's documentation][epub-parser-doc].
|
|
78
105
|
require 'epub/maker/task'
|
79
106
|
|
80
107
|
DIR = 'path/to/dir/holding/contents'
|
81
|
-
|
108
|
+
EPUB_FILE = DIR + '.epub'
|
109
|
+
EPUB::Maker::Task.new EPUB_FILE do |task|
|
82
110
|
task.titles = ['EPUB Maker Rake Example']
|
83
111
|
|
84
112
|
task.base_dir = DIR
|
@@ -103,33 +131,6 @@ For structure of EPUB book, see [EPUB Parser's documentation][epub-parser-doc].
|
|
103
131
|
task.bindings = {'application/x-demo-slideshow' => "#{DIR}/OPS/impl.xhtml"}
|
104
132
|
end
|
105
133
|
|
106
|
-
### In-place editing
|
107
|
-
|
108
|
-
require 'epub/maker'
|
109
|
-
|
110
|
-
book = EPUB::Parser.parse('path/to/book.epub')
|
111
|
-
book.resources.select(&:xhtml?).each do |item|
|
112
|
-
doc = item.content_document.nokogiri
|
113
|
-
title = doc/'title'
|
114
|
-
title.content += ' - Additional Title such like book title'
|
115
|
-
item.content = doc.to_xml
|
116
|
-
item.save
|
117
|
-
end
|
118
|
-
|
119
|
-
Shortcut:
|
120
|
-
|
121
|
-
book.resources.select(&:xhtml?).each do |item|
|
122
|
-
item.edit_with_nokogiri do |doc| # Nokogiri::XML::Document is passed to block
|
123
|
-
doc.search('img').each do |img|
|
124
|
-
img['alt'] = '' if img['alt'].nil?
|
125
|
-
end
|
126
|
-
end # item.content = doc.to_xml is called automatically
|
127
|
-
end # item.save is called automatically
|
128
|
-
|
129
|
-
For APIs of parsed EPUB book, see [EPUB Parser's documentation][epub-parser-doc].
|
130
|
-
|
131
|
-
[epub-parser-doc]: http://rubydoc.info/gems/epub-parser/frames
|
132
|
-
|
133
134
|
Requirements
|
134
135
|
------------
|
135
136
|
* Ruby 2.0 or later
|
@@ -137,10 +138,21 @@ Requirements
|
|
137
138
|
|
138
139
|
Todo
|
139
140
|
----
|
141
|
+
* Encode filenames as UTF-8 on adding them to package
|
140
142
|
* Refine Rake task
|
143
|
+
* Autodetection of media types
|
144
|
+
* Makable from directory/package document file
|
141
145
|
|
142
146
|
Recent Changes
|
143
147
|
--------------
|
148
|
+
### 0.0.2
|
149
|
+
* Detect media type of files more strictly
|
150
|
+
* Keep temporary directory remained on error in `EPUB::Maker.make`
|
151
|
+
* Define `EPUB::Package#edit`
|
152
|
+
* Make `EPUB::Package#save` able to replace content as well as add
|
153
|
+
* Define `EPUB::Package::Metadata::Meta#valid?`
|
154
|
+
* Drop invalid meta element in metadata on save
|
155
|
+
|
144
156
|
### 0.0.1
|
145
157
|
* Initial release!
|
146
158
|
|
data/epub-maker.gemspec
CHANGED
@@ -21,12 +21,13 @@ Gem::Specification.new do |gem|
|
|
21
21
|
gem.required_ruby_version = '>= 2.0.0'
|
22
22
|
|
23
23
|
gem.add_runtime_dependency 'zipruby'
|
24
|
-
gem.add_runtime_dependency 'epub-parser', '>= 0.
|
24
|
+
gem.add_runtime_dependency 'epub-parser', '>= 0.2.0'
|
25
25
|
gem.add_runtime_dependency 'pathname-common_prefix'
|
26
|
-
gem.add_runtime_dependency '
|
26
|
+
gem.add_runtime_dependency 'mimemagic'
|
27
27
|
gem.add_runtime_dependency 'ruby-uuid'
|
28
28
|
gem.add_runtime_dependency 'archive-zip'
|
29
29
|
gem.add_runtime_dependency 'rake'
|
30
|
+
gem.add_runtime_dependency 'addressable', '>= 2.3.5'
|
30
31
|
|
31
32
|
gem.add_development_dependency 'test-unit-full'
|
32
33
|
gem.add_development_dependency 'epubcheck'
|
data/lib/epub/maker.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'English'
|
1
2
|
require 'pathname'
|
2
3
|
require 'pathname/common_prefix'
|
3
4
|
require 'fileutils'
|
@@ -16,6 +17,8 @@ require 'epub/maker/content_document'
|
|
16
17
|
|
17
18
|
module EPUB
|
18
19
|
module Maker
|
20
|
+
class Error < StandardError; end
|
21
|
+
|
19
22
|
class << self
|
20
23
|
# @param path [Pathname|#to_path|String]
|
21
24
|
# @todo Add option whether mv blocks or not when file locked already
|
@@ -23,56 +26,65 @@ module EPUB
|
|
23
26
|
def make(path)
|
24
27
|
path = Pathname(path) unless path.kind_of? Pathname
|
25
28
|
book = EPUB::Book.new
|
26
|
-
Pathname.mktmpdir 'epub-maker'
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
29
|
+
dir = Pathname.mktmpdir 'epub-maker'
|
30
|
+
temp_path = dir/path.basename
|
31
|
+
mimetype = dir/'mimetype'
|
32
|
+
mimetype.write EPUB::MediaType::EPUB
|
33
|
+
Archive::Zip.open temp_path.to_path, :w do |archive|
|
34
|
+
file = Archive::Zip::Entry.from_file(mimetype.to_path, compression_codec: Archive::Zip::Codec::Store)
|
35
|
+
archive.add_entry file
|
36
|
+
end
|
34
37
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
38
|
+
Zip::Archive.open temp_path.to_path do |archive|
|
39
|
+
yield book if block_given?
|
40
|
+
book.save archive
|
41
|
+
end
|
39
42
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
end
|
43
|
+
path.open 'wb' do |file|
|
44
|
+
raise Error, "File locked by other process: #{path}" unless file.flock File::LOCK_SH|File::LOCK_NB
|
45
|
+
($VERBOSE ? ::FileUtils::Verbose : ::FileUtils).move temp_path.to_path, path.to_path
|
44
46
|
end
|
47
|
+
dir.remove_entry_secure
|
45
48
|
book
|
46
49
|
|
47
50
|
# validate
|
48
51
|
# build_xml
|
49
52
|
# archive
|
53
|
+
rescue => error
|
54
|
+
backtrace = error.backtrace
|
55
|
+
error = error.exception([
|
56
|
+
error.message,
|
57
|
+
"[#{self}]Working directory remained at: #{dir}"
|
58
|
+
].join($RS))
|
59
|
+
backtrace.unshift("#{__FILE__}:#{__LINE__}:in `rescue in #{__method__}'"); error.set_backtrace backtrace; raise error
|
50
60
|
end
|
51
61
|
end
|
52
62
|
end
|
53
63
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
64
|
+
module Book::Features
|
65
|
+
def make_ocf
|
66
|
+
self.ocf = OCF.new
|
67
|
+
ocf.make do |ocf|
|
68
|
+
yield ocf if block_given?
|
69
|
+
end
|
70
|
+
ocf
|
58
71
|
end
|
59
|
-
ocf
|
60
|
-
end
|
61
72
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
73
|
+
def make_package
|
74
|
+
self.package = Publication::Package.new
|
75
|
+
package.make do |package|
|
76
|
+
yield package if block_given?
|
77
|
+
end
|
78
|
+
package
|
66
79
|
end
|
67
|
-
package
|
68
|
-
end
|
69
80
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
81
|
+
# @param archive [Zip::Archive]
|
82
|
+
def save(archive)
|
83
|
+
ocf.save archive
|
84
|
+
package.save archive
|
85
|
+
resources.each do |item|
|
86
|
+
item.save archive
|
87
|
+
end
|
76
88
|
end
|
77
89
|
end
|
78
90
|
end
|
@@ -99,15 +111,19 @@ class Pathname
|
|
99
111
|
end
|
100
112
|
end
|
101
113
|
|
102
|
-
def write(string, mode='w', perm=0666)
|
103
|
-
open mode, perm do |file|
|
104
|
-
file << string
|
105
|
-
end
|
106
|
-
end
|
107
|
-
|
108
114
|
def remove_entry_secure
|
109
115
|
FileUtils.remove_entry_secure to_path
|
110
116
|
end
|
111
117
|
|
112
|
-
|
118
|
+
unless method_defined? :write
|
119
|
+
def write(string, mode='w', perm=0666)
|
120
|
+
open mode, perm do |file|
|
121
|
+
file << string
|
122
|
+
end
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
unless method_defined? :/
|
127
|
+
alias / +
|
128
|
+
end
|
113
129
|
end
|
@@ -40,6 +40,17 @@ module EPUB
|
|
40
40
|
self
|
41
41
|
end
|
42
42
|
|
43
|
+
def edit(archive=nil)
|
44
|
+
yield self if block_given?
|
45
|
+
if archive
|
46
|
+
save archive
|
47
|
+
else
|
48
|
+
Zip::Archive.open manifest.package.book.epub_file do |archive|
|
49
|
+
save archive
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
43
54
|
def make_metadata
|
44
55
|
self.metadata = Metadata.new
|
45
56
|
metadata.make do
|
@@ -73,7 +84,7 @@ module EPUB
|
|
73
84
|
end
|
74
85
|
|
75
86
|
def save(archive)
|
76
|
-
archive.
|
87
|
+
archive.add_or_replace_buffer book.rootfile_path, to_xml
|
77
88
|
end
|
78
89
|
|
79
90
|
module ContentModel
|
@@ -132,6 +143,7 @@ module EPUB
|
|
132
143
|
end
|
133
144
|
|
134
145
|
metas.each do |meta|
|
146
|
+
next unless meta.valid? # TODO: Consider whther to drop or keep as is
|
135
147
|
node = xml.meta(meta.content)
|
136
148
|
to_xml_attribute node, meta, [:property, :id, :scheme]
|
137
149
|
node['refines'] = "##{meta.refines.id}" if meta.refines
|
@@ -140,7 +152,7 @@ module EPUB
|
|
140
152
|
links.each do |link|
|
141
153
|
node = xml.link
|
142
154
|
to_xml_attribute node, link, [:href, :id, :media_type]
|
143
|
-
node['rel'] = link.rel.join(' ') if link.rel
|
155
|
+
node['rel'] = link.rel.to_a.join(' ') if link.rel
|
144
156
|
node['refines'] = "##{link.refines.id}" if link.refines
|
145
157
|
end
|
146
158
|
}
|
@@ -172,6 +184,12 @@ module EPUB
|
|
172
184
|
self.dc_creators = [creator]
|
173
185
|
name
|
174
186
|
end
|
187
|
+
|
188
|
+
class Meta
|
189
|
+
def valid?
|
190
|
+
property
|
191
|
+
end
|
192
|
+
end
|
175
193
|
end
|
176
194
|
|
177
195
|
class Manifest
|
@@ -227,7 +245,7 @@ module EPUB
|
|
227
245
|
items.each do |item|
|
228
246
|
item_node = xml.item_
|
229
247
|
to_xml_attribute item_node, item, [:id, :href, :media_type, :media_overlay]
|
230
|
-
item_node['properties'] = item.properties.join(' ') unless item.properties.empty?
|
248
|
+
item_node['properties'] = item.properties.to_a.join(' ') unless item.properties.empty?
|
231
249
|
item_node['fallback'] = item.fallback.id if item.fallback
|
232
250
|
end
|
233
251
|
}
|
data/lib/epub/maker/task.rb
CHANGED
@@ -1,10 +1,13 @@
|
|
1
1
|
require 'rake'
|
2
2
|
require 'rake/tasklib'
|
3
|
+
require 'mimemagic'
|
3
4
|
require 'epub/maker'
|
4
5
|
|
5
6
|
module EPUB
|
6
7
|
module Maker
|
7
8
|
class Task < ::Rake::TaskLib
|
9
|
+
DUMMY_ROOT_IRI = Addressable::URI.parse('dummy:///').freeze
|
10
|
+
|
8
11
|
attr_accessor :target, :base_dir, :files, :file_map_proc,
|
9
12
|
:container, :rootfiles, :make_rootfiles, :package_direction, :language,
|
10
13
|
:titles, :contributors,
|
@@ -26,6 +29,7 @@ module EPUB
|
|
26
29
|
@base_dir = Dir.pwd
|
27
30
|
@rootfiles = FileList.new
|
28
31
|
@make_rootfiles = false
|
32
|
+
@resources = FileList.new
|
29
33
|
@package_direction = 'rtl'
|
30
34
|
@language = 'en'
|
31
35
|
@file_map = {}
|
@@ -63,17 +67,13 @@ module EPUB
|
|
63
67
|
end
|
64
68
|
|
65
69
|
package.make_manifest do |manifest|
|
66
|
-
|
70
|
+
rootfile_absolute_path = DUMMY_ROOT_IRI + package.book.ocf.container.rootfile.full_path
|
67
71
|
resources.each_with_index do |resource, index|
|
68
|
-
|
72
|
+
resource_absolute_iri = DUMMY_ROOT_IRI + file_map[resource]
|
69
73
|
manifest.make_item do |item|
|
70
74
|
item.id = "item-#{index + 1}"
|
71
|
-
href =
|
72
|
-
item.
|
73
|
-
item.media_type = media_types[resource] ||
|
74
|
-
case resource_path.extname
|
75
|
-
when '.xhtml', '.html' then 'application/xhtml+xml'
|
76
|
-
end
|
75
|
+
item.href = resource_absolute_iri.route_from(rootfile_absolute_path)
|
76
|
+
item.media_type = detect_media_type(resource)
|
77
77
|
item.content_file = resource
|
78
78
|
item.properties << 'nav' if navs.include? item.entry_name
|
79
79
|
item.properties << 'scripted' unless Nokogiri.XML(open(resource)).search('script').empty?
|
@@ -129,6 +129,19 @@ module EPUB
|
|
129
129
|
end
|
130
130
|
@file_map
|
131
131
|
end
|
132
|
+
|
133
|
+
# @param resource [String] resource path to detect media type
|
134
|
+
# @return [String] detected media type
|
135
|
+
def detect_media_type(resource)
|
136
|
+
detected = media_types[resource]
|
137
|
+
return detected if detected
|
138
|
+
|
139
|
+
detected = MimeMagic.by_magic(open(resource)).type
|
140
|
+
detected = 'application/xhtml+xml' if detected == 'text/html'
|
141
|
+
return detected if detected
|
142
|
+
|
143
|
+
MimeMagic.by_path(resource).type
|
144
|
+
end
|
132
145
|
end
|
133
146
|
end
|
134
147
|
end
|
data/lib/epub/maker/version.rb
CHANGED
data/test/helper.rb
CHANGED
data/test/test_maker.rb
CHANGED
@@ -63,4 +63,17 @@ class TestMaker < Test::Unit::TestCase
|
|
63
63
|
|
64
64
|
assert_valid_epub @file.to_path
|
65
65
|
end
|
66
|
+
|
67
|
+
def test_working_directory_remains_when_error_occurred
|
68
|
+
error_message = nil
|
69
|
+
begin
|
70
|
+
EPUB::Maker.make @file do |book|
|
71
|
+
end
|
72
|
+
rescue => error
|
73
|
+
error_message = error.message
|
74
|
+
end
|
75
|
+
dirname = error_message.match(/\[EPUB::Maker\].*:\s*(.+)\Z/m).captures.last
|
76
|
+
|
77
|
+
assert_path_exist dirname
|
78
|
+
end
|
66
79
|
end
|
data/test/test_task.rb
CHANGED
@@ -13,13 +13,11 @@ class TestTask < Test::Unit::TestCase
|
|
13
13
|
|
14
14
|
task.base_dir = @base_dir
|
15
15
|
|
16
|
-
task.files.include "#{@base_dir}/**/*"
|
17
|
-
task.files.exclude {|entry| ! File.file? entry}
|
18
|
-
|
19
16
|
task.rootfile = "#{@base_dir}/OPS/ルートファイル.opf"
|
20
17
|
task.make_rootfiles = true
|
21
18
|
|
22
|
-
task.resources
|
19
|
+
task.resources.include "#{@base_dir}/**/*"
|
20
|
+
task.resources.exclude {|entry| ! File.file? entry}
|
23
21
|
task.resources.exclude /\.opf/
|
24
22
|
task.resources.exclude /META\-INF/
|
25
23
|
|
@@ -31,6 +29,9 @@ class TestTask < Test::Unit::TestCase
|
|
31
29
|
task.spine.exclude /\.xml\z/
|
32
30
|
|
33
31
|
task.bindings = {'application/x-demo-slideshow' => "#{@base_dir}/OPS/impl.xhtml"}
|
32
|
+
|
33
|
+
task.files = task.rootfiles + task.resources
|
34
|
+
task.files.include "#{@base_dir}/META-INF/*.xml"
|
34
35
|
end
|
35
36
|
end
|
36
37
|
|
metadata
CHANGED
@@ -1,251 +1,265 @@
|
|
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.2
|
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: 2015-07-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: zipruby
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: epub-parser
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.2.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.2.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: pathname-common_prefix
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: mimemagic
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: ruby-uuid
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: archive-zip
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rake
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: addressable
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 2.3.5
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 2.3.5
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: test-unit-full
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
114
128
|
requirements:
|
115
|
-
- -
|
129
|
+
- - ">="
|
116
130
|
- !ruby/object:Gem::Version
|
117
131
|
version: '0'
|
118
132
|
type: :development
|
119
133
|
prerelease: false
|
120
134
|
version_requirements: !ruby/object:Gem::Requirement
|
121
135
|
requirements:
|
122
|
-
- -
|
136
|
+
- - ">="
|
123
137
|
- !ruby/object:Gem::Version
|
124
138
|
version: '0'
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
140
|
name: epubcheck
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|
128
142
|
requirements:
|
129
|
-
- -
|
143
|
+
- - ">="
|
130
144
|
- !ruby/object:Gem::Version
|
131
145
|
version: '0'
|
132
146
|
type: :development
|
133
147
|
prerelease: false
|
134
148
|
version_requirements: !ruby/object:Gem::Requirement
|
135
149
|
requirements:
|
136
|
-
- -
|
150
|
+
- - ">="
|
137
151
|
- !ruby/object:Gem::Version
|
138
152
|
version: '0'
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
154
|
name: epzip
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|
142
156
|
requirements:
|
143
|
-
- -
|
157
|
+
- - ">="
|
144
158
|
- !ruby/object:Gem::Version
|
145
159
|
version: '0'
|
146
160
|
type: :development
|
147
161
|
prerelease: false
|
148
162
|
version_requirements: !ruby/object:Gem::Requirement
|
149
163
|
requirements:
|
150
|
-
- -
|
164
|
+
- - ">="
|
151
165
|
- !ruby/object:Gem::Version
|
152
166
|
version: '0'
|
153
167
|
- !ruby/object:Gem::Dependency
|
154
168
|
name: simplecov
|
155
169
|
requirement: !ruby/object:Gem::Requirement
|
156
170
|
requirements:
|
157
|
-
- -
|
171
|
+
- - ">="
|
158
172
|
- !ruby/object:Gem::Version
|
159
173
|
version: '0'
|
160
174
|
type: :development
|
161
175
|
prerelease: false
|
162
176
|
version_requirements: !ruby/object:Gem::Requirement
|
163
177
|
requirements:
|
164
|
-
- -
|
178
|
+
- - ">="
|
165
179
|
- !ruby/object:Gem::Version
|
166
180
|
version: '0'
|
167
181
|
- !ruby/object:Gem::Dependency
|
168
182
|
name: pry
|
169
183
|
requirement: !ruby/object:Gem::Requirement
|
170
184
|
requirements:
|
171
|
-
- -
|
185
|
+
- - ">="
|
172
186
|
- !ruby/object:Gem::Version
|
173
187
|
version: '0'
|
174
188
|
type: :development
|
175
189
|
prerelease: false
|
176
190
|
version_requirements: !ruby/object:Gem::Requirement
|
177
191
|
requirements:
|
178
|
-
- -
|
192
|
+
- - ">="
|
179
193
|
- !ruby/object:Gem::Version
|
180
194
|
version: '0'
|
181
195
|
- !ruby/object:Gem::Dependency
|
182
196
|
name: pry-doc
|
183
197
|
requirement: !ruby/object:Gem::Requirement
|
184
198
|
requirements:
|
185
|
-
- -
|
199
|
+
- - ">="
|
186
200
|
- !ruby/object:Gem::Version
|
187
201
|
version: '0'
|
188
202
|
type: :development
|
189
203
|
prerelease: false
|
190
204
|
version_requirements: !ruby/object:Gem::Requirement
|
191
205
|
requirements:
|
192
|
-
- -
|
206
|
+
- - ">="
|
193
207
|
- !ruby/object:Gem::Version
|
194
208
|
version: '0'
|
195
209
|
- !ruby/object:Gem::Dependency
|
196
210
|
name: yard
|
197
211
|
requirement: !ruby/object:Gem::Requirement
|
198
212
|
requirements:
|
199
|
-
- -
|
213
|
+
- - ">="
|
200
214
|
- !ruby/object:Gem::Version
|
201
215
|
version: '0'
|
202
216
|
type: :development
|
203
217
|
prerelease: false
|
204
218
|
version_requirements: !ruby/object:Gem::Requirement
|
205
219
|
requirements:
|
206
|
-
- -
|
220
|
+
- - ">="
|
207
221
|
- !ruby/object:Gem::Version
|
208
222
|
version: '0'
|
209
223
|
- !ruby/object:Gem::Dependency
|
210
224
|
name: redcarpet
|
211
225
|
requirement: !ruby/object:Gem::Requirement
|
212
226
|
requirements:
|
213
|
-
- -
|
227
|
+
- - ">="
|
214
228
|
- !ruby/object:Gem::Version
|
215
229
|
version: '0'
|
216
230
|
type: :development
|
217
231
|
prerelease: false
|
218
232
|
version_requirements: !ruby/object:Gem::Requirement
|
219
233
|
requirements:
|
220
|
-
- -
|
234
|
+
- - ">="
|
221
235
|
- !ruby/object:Gem::Version
|
222
236
|
version: '0'
|
223
237
|
- !ruby/object:Gem::Dependency
|
224
238
|
name: gem-man
|
225
239
|
requirement: !ruby/object:Gem::Requirement
|
226
240
|
requirements:
|
227
|
-
- -
|
241
|
+
- - ">="
|
228
242
|
- !ruby/object:Gem::Version
|
229
243
|
version: '0'
|
230
244
|
type: :development
|
231
245
|
prerelease: false
|
232
246
|
version_requirements: !ruby/object:Gem::Requirement
|
233
247
|
requirements:
|
234
|
-
- -
|
248
|
+
- - ">="
|
235
249
|
- !ruby/object:Gem::Version
|
236
250
|
version: '0'
|
237
251
|
- !ruby/object:Gem::Dependency
|
238
252
|
name: ronn
|
239
253
|
requirement: !ruby/object:Gem::Requirement
|
240
254
|
requirements:
|
241
|
-
- -
|
255
|
+
- - ">="
|
242
256
|
- !ruby/object:Gem::Version
|
243
257
|
version: '0'
|
244
258
|
type: :development
|
245
259
|
prerelease: false
|
246
260
|
version_requirements: !ruby/object:Gem::Requirement
|
247
261
|
requirements:
|
248
|
-
- -
|
262
|
+
- - ">="
|
249
263
|
- !ruby/object:Gem::Version
|
250
264
|
version: '0'
|
251
265
|
description: This library supports making and editing EPUB books
|
@@ -256,7 +270,7 @@ executables:
|
|
256
270
|
extensions: []
|
257
271
|
extra_rdoc_files: []
|
258
272
|
files:
|
259
|
-
- .gitignore
|
273
|
+
- ".gitignore"
|
260
274
|
- CHANGELOG.markdown
|
261
275
|
- Gemfile
|
262
276
|
- LICENSE.txt
|
@@ -276,6 +290,7 @@ files:
|
|
276
290
|
- test/fixtures/book/OPS/item-2.xhtml
|
277
291
|
- test/fixtures/book/OPS/nav.xhtml
|
278
292
|
- test/fixtures/book/OPS/slideshow.xml
|
293
|
+
- test/fixtures/book/OPS/ルートファイル.opf
|
279
294
|
- test/helper.rb
|
280
295
|
- test/make_task.rake
|
281
296
|
- test/schemas/epub-nav-30.rnc
|
@@ -287,7 +302,6 @@ files:
|
|
287
302
|
- test/test_maker_ocf.rb
|
288
303
|
- test/test_maker_publication.rb
|
289
304
|
- test/test_task.rb
|
290
|
-
- test/fixtures/book/OPS/ルートファイル.opf
|
291
305
|
homepage: ''
|
292
306
|
licenses: []
|
293
307
|
metadata: {}
|
@@ -297,17 +311,17 @@ require_paths:
|
|
297
311
|
- lib
|
298
312
|
required_ruby_version: !ruby/object:Gem::Requirement
|
299
313
|
requirements:
|
300
|
-
- -
|
314
|
+
- - ">="
|
301
315
|
- !ruby/object:Gem::Version
|
302
316
|
version: 2.0.0
|
303
317
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
304
318
|
requirements:
|
305
|
-
- -
|
319
|
+
- - ">="
|
306
320
|
- !ruby/object:Gem::Version
|
307
321
|
version: '0'
|
308
322
|
requirements: []
|
309
323
|
rubyforge_project:
|
310
|
-
rubygems_version: 2.
|
324
|
+
rubygems_version: 2.4.6
|
311
325
|
signing_key:
|
312
326
|
specification_version: 4
|
313
327
|
summary: EPUB Maker
|
@@ -318,6 +332,7 @@ test_files:
|
|
318
332
|
- test/fixtures/book/OPS/item-2.xhtml
|
319
333
|
- test/fixtures/book/OPS/nav.xhtml
|
320
334
|
- test/fixtures/book/OPS/slideshow.xml
|
335
|
+
- test/fixtures/book/OPS/ルートファイル.opf
|
321
336
|
- test/helper.rb
|
322
337
|
- test/make_task.rake
|
323
338
|
- test/schemas/epub-nav-30.rnc
|
@@ -329,5 +344,4 @@ test_files:
|
|
329
344
|
- test/test_maker_ocf.rb
|
330
345
|
- test/test_maker_publication.rb
|
331
346
|
- test/test_task.rb
|
332
|
-
- test/fixtures/book/OPS/ルートファイル.opf
|
333
347
|
has_rdoc:
|