epub-maker 0.0.9 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitlab-ci.yml +10 -0
- data/CHANGELOG.markdown +6 -0
- data/README.markdown +6 -1
- data/epub-maker.gemspec +1 -0
- data/lib/epub/maker.rb +4 -4
- data/lib/epub/maker/content_document.rb +1 -0
- data/lib/epub/maker/ocf.rb +1 -0
- data/lib/epub/maker/publication.rb +1 -0
- data/lib/epub/maker/version.rb +1 -1
- data/test/helper.rb +1 -1
- metadata +23 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79b98ceec5a5bd31ccbcea077c5c109e11b98c64acab7fa9c6d2eb4ede22b25c
|
4
|
+
data.tar.gz: e1520191cd13384acd70c13e5a7d390587bb6238c535ba3971e5d8485d3c1920
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c6d10a5797d1ee3f66fc520875b3d569e746841f70badfce7f77cbf15e9b67121e09d9e6144ec3cde21ec92eb6afb303849db2939866a49fe61a0b65195fb79
|
7
|
+
data.tar.gz: cfb54f2c6bff8808e0a846d2f94d0f5668bb1e1e267b5e4d64725ccaa0182f66f146f9c1ca963858f6e3ff5d93882c813798b34d0d024fb684d084cf1eaaf3c1
|
data/.gitlab-ci.yml
CHANGED
data/CHANGELOG.markdown
CHANGED
data/README.markdown
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
EPUB Maker
|
2
2
|
==========
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/epub-maker.svg)](http://badge.fury.io/rb/epub-maker)
|
4
|
-
[![Dependency Status](https://gemnasium.com/KitaitiMakoto/epub-maker.png)](https://gemnasium.com/KitaitiMakoto/epub-maker)
|
5
4
|
[![pipeline status](https://gitlab.com/KitaitiMakoto/epub-maker/badges/master/pipeline.svg)](https://gitlab.com/KitaitiMakoto/epub-maker/commits/master)
|
6
5
|
[![coverage report](https://gitlab.com/KitaitiMakoto/epub-maker/badges/master/coverage.svg)](https://gitlab.com/KitaitiMakoto/epub-maker/commits/master)
|
7
6
|
|
@@ -178,6 +177,12 @@ Todo
|
|
178
177
|
|
179
178
|
Recent Changes
|
180
179
|
--------------
|
180
|
+
|
181
|
+
### 0.1.0
|
182
|
+
|
183
|
+
* [BUG FIX]Fix the case file extension should be wrong
|
184
|
+
* Add Nokogiri to runtime dependencies explicitly
|
185
|
+
|
181
186
|
### 0.0.9
|
182
187
|
|
183
188
|
* Remove [ruby-uuid][] gem from dependencies
|
data/epub-maker.gemspec
CHANGED
@@ -25,6 +25,7 @@ Gem::Specification.new do |gem|
|
|
25
25
|
gem.add_runtime_dependency 'archive-zip'
|
26
26
|
gem.add_runtime_dependency 'rake'
|
27
27
|
gem.add_runtime_dependency 'addressable', '>= 2.3.5'
|
28
|
+
gem.add_runtime_dependency "nokogiri", ">= 1.6.0", "< 1.9"
|
28
29
|
|
29
30
|
gem.add_development_dependency 'zipruby'
|
30
31
|
gem.add_development_dependency 'test-unit'
|
data/lib/epub/maker.rb
CHANGED
@@ -6,8 +6,6 @@ require 'tmpdir'
|
|
6
6
|
require 'time'
|
7
7
|
require 'archive/zip'
|
8
8
|
require 'epub'
|
9
|
-
require 'epub/constants'
|
10
|
-
require 'epub/book'
|
11
9
|
require 'epub/parser'
|
12
10
|
require "epub/maker/version"
|
13
11
|
require 'epub/maker/ocf'
|
@@ -61,7 +59,7 @@ module EPUB
|
|
61
59
|
end
|
62
60
|
|
63
61
|
# Substance of +epub-archive+ command
|
64
|
-
# @param
|
62
|
+
# @param source_dir [Pathname, String]
|
65
63
|
# @param epub_file [Pathname, String, nil]
|
66
64
|
# @return [Pathname] Path to generated EPUB file
|
67
65
|
# @raise [RuntimeError] if directory +source_dir+ doesn't exist
|
@@ -71,10 +69,12 @@ module EPUB
|
|
71
69
|
# @todo Accept compression method option
|
72
70
|
# @todo Accept compression level option
|
73
71
|
def archive(source_dir, epub_file = nil)
|
72
|
+
source_dir = source_dir.to_s
|
73
|
+
source_dir = source_dir.to_s[0..-2] if source_dir.to_s.end_with? "/"
|
74
|
+
epub_file ||= source_dir + ".epub"
|
74
75
|
source_dir = Pathname(source_dir)
|
75
76
|
raise "source directory #{source_dir} not exist" unless source_dir.exist?
|
76
77
|
|
77
|
-
epub_file ||= source_dir.sub_ext(".epub")
|
78
78
|
epub_file = Pathname(epub_file)
|
79
79
|
temp_dest = Pathname(Tempfile.create(epub_file.basename.to_path, epub_file.dirname.to_path))
|
80
80
|
Pathname.mktmpdir "epub-maker" do |dir|
|
data/lib/epub/maker/ocf.rb
CHANGED
data/lib/epub/maker/version.rb
CHANGED
data/test/helper.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.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- KITAITI Makoto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: epub-parser
|
@@ -80,6 +80,26 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 2.3.5
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: nokogiri
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 1.6.0
|
90
|
+
- - "<"
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '1.9'
|
93
|
+
type: :runtime
|
94
|
+
prerelease: false
|
95
|
+
version_requirements: !ruby/object:Gem::Requirement
|
96
|
+
requirements:
|
97
|
+
- - ">="
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: 1.6.0
|
100
|
+
- - "<"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '1.9'
|
83
103
|
- !ruby/object:Gem::Dependency
|
84
104
|
name: zipruby
|
85
105
|
requirement: !ruby/object:Gem::Requirement
|
@@ -269,7 +289,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
269
289
|
version: '0'
|
270
290
|
requirements: []
|
271
291
|
rubyforge_project:
|
272
|
-
rubygems_version: 2.7.
|
292
|
+
rubygems_version: 2.7.6
|
273
293
|
signing_key:
|
274
294
|
specification_version: 4
|
275
295
|
summary: EPUB Maker
|