gepub 0.6.8.6 → 0.6.8.7
Sign up to get free protection for your applications and to get access to all the features.
- data/gepub.gemspec +1 -1
- data/lib/gepub/book.rb +1 -1
- data/lib/gepub/builder.rb +1 -1
- data/lib/gepub/manifest.rb +2 -2
- data/lib/gepub/version.rb +1 -1
- data/spec/package_spec.rb +4 -4
- metadata +4 -4
data/gepub.gemspec
CHANGED
@@ -19,6 +19,6 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.require_paths = ["lib"]
|
20
20
|
|
21
21
|
s.add_development_dependency "rspec", "~> 2.11"
|
22
|
-
s.add_runtime_dependency "nokogiri", "~> 1.5.
|
22
|
+
s.add_runtime_dependency "nokogiri", "~> 1.5.6"
|
23
23
|
s.add_runtime_dependency "rubyzip", "~> 0.9.7"
|
24
24
|
end
|
data/lib/gepub/book.rb
CHANGED
@@ -91,7 +91,7 @@ module GEPUB
|
|
91
91
|
def self.rootfile_from_container(rootfile)
|
92
92
|
doc = Nokogiri::XML::Document.parse(rootfile)
|
93
93
|
ns = doc.root.namespaces
|
94
|
-
defaultns = ns.select{ |name, value| value == CONTAINER_NS }.
|
94
|
+
defaultns = ns.select{ |name, value| value == CONTAINER_NS }.to_a[0][0]
|
95
95
|
doc.css("#{defaultns}|rootfiles > #{defaultns}|rootfile")[0]['full-path']
|
96
96
|
end
|
97
97
|
|
data/lib/gepub/builder.rb
CHANGED
@@ -245,7 +245,7 @@ module GEPUB
|
|
245
245
|
end
|
246
246
|
|
247
247
|
def unique_identifier(val, id = 'BookID', scheme = 'nil')
|
248
|
-
@last_defined_item = MetaItem.new(@book.
|
248
|
+
@last_defined_item = MetaItem.new(@book.set_primary_identifier(val, id, scheme))
|
249
249
|
end
|
250
250
|
|
251
251
|
def alts(alt_vals = {})
|
data/lib/gepub/manifest.rb
CHANGED
data/lib/gepub/version.rb
CHANGED
data/spec/package_spec.rb
CHANGED
@@ -71,14 +71,14 @@ describe GEPUB::Package do
|
|
71
71
|
xml.root.namespaces.size.should == 1
|
72
72
|
xml.root.namespaces['xmlns'].should == GEPUB::XMLUtil::OPF_NS
|
73
73
|
xml.root['version'].should == '3.0'
|
74
|
-
xml.root['lang'].should == 'ja'
|
74
|
+
xml.root['xml:lang'].should == 'ja'
|
75
75
|
# TODO: should check all elements
|
76
76
|
end
|
77
77
|
|
78
78
|
it 'should generate package with prefix attribute' do
|
79
79
|
package = GEPUB::Package.new('OEBPS/package.opf') do
|
80
80
|
|package|
|
81
|
-
package.
|
81
|
+
package.set_primary_identifier('http://example.jp', 'BookID', 'url')
|
82
82
|
package['xml:lang'] = 'ja'
|
83
83
|
package.enable_rendition
|
84
84
|
end
|
@@ -102,7 +102,7 @@ describe GEPUB::Package do
|
|
102
102
|
it 'should generate opf2.0' do
|
103
103
|
opf = GEPUB::Package.new('OEBPS/package.opf', { 'version' => '2.0'}) {
|
104
104
|
|opf|
|
105
|
-
opf.
|
105
|
+
opf.set_primary_identifier('http://example.jp', 'BookID', 'url')
|
106
106
|
opf['xml:lang'] = 'ja'
|
107
107
|
|
108
108
|
# metadata add: style 1
|
@@ -133,7 +133,7 @@ describe GEPUB::Package do
|
|
133
133
|
xml.root.namespaces.size.should == 1
|
134
134
|
xml.root.namespaces['xmlns'].should == GEPUB::XMLUtil::OPF_NS
|
135
135
|
xml.root['version'].should == '2.0'
|
136
|
-
xml.root['lang'].should == 'ja'
|
136
|
+
xml.root['xml:lang'].should == 'ja'
|
137
137
|
end
|
138
138
|
end
|
139
139
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gepub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.8.
|
4
|
+
version: 0.6.8.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-04-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -34,7 +34,7 @@ dependencies:
|
|
34
34
|
requirements:
|
35
35
|
- - ~>
|
36
36
|
- !ruby/object:Gem::Version
|
37
|
-
version: 1.5.
|
37
|
+
version: 1.5.6
|
38
38
|
type: :runtime
|
39
39
|
prerelease: false
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -42,7 +42,7 @@ dependencies:
|
|
42
42
|
requirements:
|
43
43
|
- - ~>
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version: 1.5.
|
45
|
+
version: 1.5.6
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
47
|
name: rubyzip
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|