epub-maker 0.0.6 → 0.0.7

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
  SHA1:
3
- metadata.gz: dd80bab3836300bb946438407d0cd8c931557277
4
- data.tar.gz: 7430a5c2e9680f0f93a9c7e2f7f1fb7339bef339
3
+ metadata.gz: 8284f37476b729d56b4c9f57568741a32688ae05
4
+ data.tar.gz: af1bfe62426f12598dc402eb52121f73222333c0
5
5
  SHA512:
6
- metadata.gz: b6a2af0f44dcfa9ee4f934ddb4b7a32b99c06aafe9a812e72409e447292325811d2d5e123a13b92006bc588454e886d33575fa047a25763f08e338ce9a6a2f02
7
- data.tar.gz: 8ab6ec574eec7d760130e67285bd0264656b36e979dd00ecffac80cbd1d6105c48bb42d1221357c49caee524d14dcead69babba27f0ce42d1413852758cf72bf
6
+ metadata.gz: cbb15761fdcc3268c0f25ef01e2583e01431156d28d097f440273e59419f1b6a96981bcedda7d2a5919e0dd72ed25b8ca0edc4d216ebbbee28006d5cb7aebd89
7
+ data.tar.gz: f221a87aa32563df6b1223c4529111bef06bcd4c10d5f1020cf6a24c620ed2eab0296101f897e5b1b875889ae6f924aaa1bd3b8409a5e3402fb8fad7f540b4c4
@@ -1,3 +1,8 @@
1
+ 0.0.7
2
+ -----
3
+
4
+ * Change temporary directory used by `EPUB::Maker.archive` to avoid Error::EXDEV Invalid cross-device link @ rb_file_s_rename
5
+
1
6
  0.0.6
2
7
  -----
3
8
 
@@ -150,6 +150,13 @@ You can specify target file path.
150
150
  % ls target/dir
151
151
  book.epub
152
152
 
153
+ It also has Ruby API.
154
+
155
+ require 'epub/maker'
156
+
157
+ EPUB::Maker.archive 'path/to/book' # => #<Pathname:path/to/book.epub>
158
+ EPUB::Maker.archive 'source/dir/book', 'target/dir/book.epub' # => #<Pathname:target/dir/book.epub>
159
+
153
160
  [epzip]: https://github.com/takahashim/epzip
154
161
 
155
162
  Requirements
@@ -166,6 +173,10 @@ Todo
166
173
 
167
174
  Recent Changes
168
175
  --------------
176
+ ### 0.0.7
177
+
178
+ * Change temporary directory used by `EPUB::Maker.archive`
179
+
169
180
  ### 0.0.6
170
181
 
171
182
  * Add `epub-archive` command
@@ -180,20 +191,6 @@ Recent Changes
180
191
  * Bump required EPUB Parser version: 0.2.0 -> 0.2.6
181
192
  * Deprecate `EPUB::OCF::PhysicalContainer.save`
182
193
 
183
- ### 0.0.3
184
- * Bump up required Ruby version: >= 2.0.0 -> >= 2.1.0
185
-
186
- ### 0.0.2
187
- * Detect media type of files more strictly
188
- * Keep temporary directory remained on error in `EPUB::Maker.make`
189
- * Define `EPUB::Package#edit`
190
- * Make `EPUB::Package#save` able to replace content as well as add
191
- * Define `EPUB::Package::Metadata::Meta#valid?`
192
- * Drop invalid meta element in metadata on save
193
-
194
- ### 0.0.1
195
- * Initial release!
196
-
197
194
  Contributing
198
195
  ------------
199
196
 
@@ -201,4 +198,4 @@ Contributing
201
198
  2. Create your feature branch (`git checkout -b my-new-feature`)
202
199
  3. Commit your changes (`git commit -am 'Add some feature'`)
203
200
  4. Push to the branch (`git push origin my-new-feature`)
204
- 5. Create new Pull Request
201
+ 5. Create new Merge Request
@@ -1,6 +1,7 @@
1
1
  require 'English'
2
2
  require 'pathname'
3
3
  require 'fileutils'
4
+ require 'tempfile'
4
5
  require 'tmpdir'
5
6
  require 'time'
6
7
  require 'uuid'
@@ -76,9 +77,8 @@ module EPUB
76
77
 
77
78
  epub_file ||= source_dir.sub_ext(".epub")
78
79
  epub_file = Pathname(epub_file)
79
-
80
- Pathname.mktmpdir do |dir|
81
- temp_dest = dir/epub_file.basename
80
+ Pathname.mktmpdir "epub-maker", epub_file.dirname do |dir|
81
+ temp_dest = Pathname(Tempfile.create(epub_file.basename.to_path, dir))
82
82
  temp_container = dir/source_dir.basename
83
83
 
84
84
  temp_container.mkdir
@@ -1,5 +1,5 @@
1
1
  module EPUB
2
2
  module Maker
3
- VERSION = "0.0.6"
3
+ VERSION = "0.0.7"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: epub-maker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - KITAITI Makoto