gepub 0.6.9.0 → 0.6.9.1

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: 2840238e6aba48557afd114e5aa9fe928429a821
4
- data.tar.gz: abe8e9d1089ebe5c49f6b1ba33244a15477d816c
3
+ metadata.gz: 4c4e620db16926b0183083e20ad92bcd94f378df
4
+ data.tar.gz: 46cb5ee2b3d03a38c04f5f36f38f53b6e043f8cb
5
5
  SHA512:
6
- metadata.gz: f0996df2489524bfcfbeaf277328d959545ed6ab9a8fa532228cdda0e57a7f38c9e87ddb2778a5a5d54811de5c9200a751f35797a3f1b2d6cc5792693bc5b0ed
7
- data.tar.gz: 7160c790cb89236d70c467a2df05fe106894c4df43e2d32b06e16c8f23bff7bd0335a264ce463df0faa7ddb13c8b8802dfc2c0a92bc19843abe252da34b010c3
6
+ metadata.gz: 3613857a86e89772cb4139fa300cb33169ee3ff54184b16d634832b6910118f7b7addf921014ef2b15de7b370e0b60b7269bff322f4bc87e9302addc7e5f261f
7
+ data.tar.gz: 0c7fac0b9106ab7fc405b15d9fc80a3f1bbc3633026e20d07ad613f4d97ec8668099053296089bbf7a69e20b72733fa0a8c761dc3f18f57820778882d22c5309
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- require 'rubygem'
2
+ require 'rubygems'
3
3
  require 'gepub'
4
4
  workdir = 'epub/example/'
5
5
  builder = GEPUB::Builder.new {
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- require 'rubygem'
2
+ require 'rubygems'
3
3
  require 'gepub'
4
4
 
5
5
  book = GEPUB::Book.new
@@ -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
@@ -1,4 +1,4 @@
1
1
  module GEPUB
2
2
  # GEPUB gem version
3
- VERSION = "0.6.9.0"
3
+ VERSION = "0.6.9.1"
4
4
  end
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.0
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: 2013-06-26 00:00:00.000000000 Z
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.2
149
+ rubygems_version: 2.0.3
150
150
  signing_key:
151
151
  specification_version: 4
152
152
  summary: a generic EPUB library for Ruby.