gepub 0.0.3 → 0.0.5

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.
data/.gitignore ADDED
@@ -0,0 +1,21 @@
1
+ ## MAC OS
2
+ .DS_Store
3
+
4
+ ## TEXTMATE
5
+ *.tmproj
6
+ tmtags
7
+
8
+ ## EMACS
9
+ *~
10
+ \#*
11
+ .\#*
12
+
13
+ ## VIM
14
+ *.swp
15
+
16
+ ## PROJECT::GENERAL
17
+ coverage
18
+ rdoc
19
+ pkg
20
+
21
+ ## PROJECT::SPECIFIC
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.3
1
+ 0.0.5
@@ -38,6 +38,14 @@ module GEPUB
38
38
  @metadata[:creator] = author
39
39
  end
40
40
 
41
+ def contributor
42
+ @metadata[:contributor]
43
+ end
44
+
45
+ def contributor=(contributor)
46
+ @metadata[:contributor] = contributor
47
+ end
48
+
41
49
  def publisher
42
50
  @metadata[:publisher]
43
51
  end
data/spec/gepub_spec.rb CHANGED
@@ -3,26 +3,11 @@ require File.dirname(__FILE__) + '/spec_helper.rb'
3
3
  require 'rubygems'
4
4
  require 'xml/libxml'
5
5
 
6
- # for parsing only elements. DO I REALLY NEED THIS !?
7
- class LibXML::XML::Node
8
- def next_element
9
- r = self.next
10
- r = r.next while !r.element?
11
- r
12
- end
13
-
14
- def first_child_element
15
- r = self.first
16
- r = r.next_element if !r.element?
17
- r
18
- end
19
- end
20
-
21
-
22
6
  describe GEPUB::Generator do
23
7
  before do
24
8
  @generator = GEPUB::Generator.new('thetitle')
25
9
  @generator.author = "theauthor"
10
+ @generator.contributor = "contributors contributors!"
26
11
  @generator.publisher = "thepublisher"
27
12
  @generator.date = "2010-05-05"
28
13
  @generator.identifier = "http://example.jp/foobar/"
@@ -111,5 +96,15 @@ describe GEPUB::Generator do
111
96
  spine['toc'].should == 'ncx'
112
97
  spine.find_first('a:itemref')['idref'].should == 'c1'
113
98
  end
114
-
99
+
100
+ it "should have correct cover image" do
101
+
102
+ @generator.addCoverImage("/path/to/cover.jpg")
103
+ opf = LibXML::XML::Parser.string(@generator.opf_xml).parse
104
+ opf.root.namespaces.default_prefix='a'
105
+
106
+
107
+
108
+ end
109
+
115
110
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 3
9
- version: 0.0.3
8
+ - 5
9
+ version: 0.0.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - KOJIMA Satoshi
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-05-08 00:00:00 +09:00
17
+ date: 2010-06-11 00:00:00 +09:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -40,6 +40,7 @@ extensions: []
40
40
  extra_rdoc_files:
41
41
  - README.rdoc
42
42
  files:
43
+ - .gitignore
43
44
  - README.rdoc
44
45
  - Rakefile
45
46
  - VERSION