gepub 0.6.9.0 → 0.6.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/examples/builder_example.rb +1 -1
- data/examples/generate_example.rb +1 -1
- data/lib/gepub/resource_builder.rb +4 -0
- data/lib/gepub/version.rb +1 -1
- data/spec/builder_spec.rb +12 -0
- 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: 4c4e620db16926b0183083e20ad92bcd94f378df
|
4
|
+
data.tar.gz: 46cb5ee2b3d03a38c04f5f36f38f53b6e043f8cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3613857a86e89772cb4139fa300cb33169ee3ff54184b16d634832b6910118f7b7addf921014ef2b15de7b370e0b60b7269bff322f4bc87e9302addc7e5f261f
|
7
|
+
data.tar.gz: 0c7fac0b9106ab7fc405b15d9fc80a3f1bbc3633026e20d07ad613f4d97ec8668099053296089bbf7a69e20b72733fa0a8c761dc3f18f57820778882d22c5309
|
data/examples/builder_example.rb
CHANGED
@@ -143,6 +143,10 @@ module GEPUB
|
|
143
143
|
@last_defined_item.toc_text_with_id(text, id)
|
144
144
|
end
|
145
145
|
|
146
|
+
def id(the_id)
|
147
|
+
@last_defined_item.id = the_id
|
148
|
+
end
|
149
|
+
|
146
150
|
def with_media_type(*type)
|
147
151
|
raise 'with_media_type needs block.' unless block_given?
|
148
152
|
@file_postprocess['with_media_type'] = Proc.new { media_type(*type) }
|
data/lib/gepub/version.rb
CHANGED
data/spec/builder_spec.rb
CHANGED
@@ -207,6 +207,18 @@ describe GEPUB::Builder do
|
|
207
207
|
builder.instance_eval{ @book.item_by_href('text/cover.xhtml') }.should_not be_nil
|
208
208
|
end
|
209
209
|
|
210
|
+
it 'should add a file with id' do
|
211
|
+
workdir = File.join(File.dirname(__FILE__),'fixtures', 'builder')
|
212
|
+
builder = GEPUB::Builder.new {
|
213
|
+
resources(:workdir => workdir) {
|
214
|
+
file('text/memo.txt')
|
215
|
+
id 'the_id_of_memo.txt'
|
216
|
+
}
|
217
|
+
}
|
218
|
+
builder.instance_eval{ @book.item_by_href('text/memo.txt') }.should_not be_nil
|
219
|
+
builder.instance_eval{ @book.item_by_href('text/memo.txt').id }.should == 'the_id_of_memo.txt'
|
220
|
+
end
|
221
|
+
|
210
222
|
it 'should add files to book from IO object' do
|
211
223
|
io = File.new(File.join(File.dirname(__FILE__),'fixtures', 'builder', 'text', 'memo.txt'))
|
212
224
|
builder = GEPUB::Builder.new {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gepub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.9.
|
4
|
+
version: 0.6.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- KOJIMA Satoshi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -146,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
146
146
|
version: '0'
|
147
147
|
requirements: []
|
148
148
|
rubyforge_project: gepub
|
149
|
-
rubygems_version: 2.0.
|
149
|
+
rubygems_version: 2.0.3
|
150
150
|
signing_key:
|
151
151
|
specification_version: 4
|
152
152
|
summary: a generic EPUB library for Ruby.
|