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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 04b8ee2d64a54dd23bec18326e15a6c96e04464f8d698dfbd18a74cee90248de
4
- data.tar.gz: 3bdd14a9a4a5b17a0695ff2fac52f7ed17e6bbc4096284a74f1830a0e3b13c53
3
+ metadata.gz: 79b98ceec5a5bd31ccbcea077c5c109e11b98c64acab7fa9c6d2eb4ede22b25c
4
+ data.tar.gz: e1520191cd13384acd70c13e5a7d390587bb6238c535ba3971e5d8485d3c1920
5
5
  SHA512:
6
- metadata.gz: b9cc2017c9901f49174488a01b688372e0bd0ec54ec024a21a439f4cb73eaa18ce23c6014924c437a7f31e1b9097ac8e647a1cf2d39dbfdaf1bbc31ab301f9d9
7
- data.tar.gz: 8372907e92fd884e207d33e2e60ea6bca97d5e2a54aff59c2c3b7a2a5716b8856e90220019929746f76113ecfad987bd646f20c947d6c73467360f4f78098595
6
+ metadata.gz: 8c6d10a5797d1ee3f66fc520875b3d569e746841f70badfce7f77cbf15e9b67121e09d9e6144ec3cde21ec92eb6afb303849db2939866a49fe61a0b65195fb79
7
+ data.tar.gz: cfb54f2c6bff8808e0a846d2f94d0f5668bb1e1e267b5e4d64725ccaa0182f66f146f9c1ca963858f6e3ff5d93882c813798b34d0d024fb684d084cf1eaaf3c1
@@ -36,3 +36,13 @@ test:2.5:
36
36
  key: ruby:2.5
37
37
  paths:
38
38
  - deps
39
+
40
+ test:2.6:
41
+ image: ruby:2.6-rc
42
+ script: bundle exec rake test
43
+ except:
44
+ - tags
45
+ cache:
46
+ key: ruby:2.6
47
+ paths:
48
+ - deps
@@ -1,3 +1,9 @@
1
+ 0.1.0
2
+ -----
3
+
4
+ * [BUG FIX]Fix the case file extension should be wrong
5
+ * Add Nokogiri to runtime dependencies explicitly
6
+
1
7
  0.0.9
2
8
  -----
3
9
 
@@ -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
@@ -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'
@@ -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 source_file [Pathname, String]
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|
@@ -1,4 +1,5 @@
1
1
  require 'epub/content_document'
2
+ require "nokogiri"
2
3
 
3
4
  module EPUB
4
5
  module ContentDocument
@@ -1,5 +1,6 @@
1
1
  require 'epub/ocf'
2
2
  require 'epub/maker/ocf/physical_container'
3
+ require "nokogiri"
3
4
 
4
5
  # @todo Use refinement
5
6
  module EPUB
@@ -1,5 +1,6 @@
1
1
  require 'securerandom'
2
2
  require 'epub/publication/package'
3
+ require "nokogiri"
3
4
 
4
5
  module EPUB
5
6
  module Publication
@@ -1,5 +1,5 @@
1
1
  module EPUB
2
2
  module Maker
3
- VERSION = "0.0.9"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
@@ -1,6 +1,6 @@
1
1
  require 'simplecov'
2
2
  SimpleCov.start do
3
- add_filter '/test|deps/'
3
+ add_filter /test|deps/
4
4
  end
5
5
 
6
6
  require 'test/unit'
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.9
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-03-12 00:00:00.000000000 Z
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.4
292
+ rubygems_version: 2.7.6
273
293
  signing_key:
274
294
  specification_version: 4
275
295
  summary: EPUB Maker