epub-maker 0.0.4 → 0.0.5

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: 6317049b8e2e449885ad8eb99584c4d50b926250
4
- data.tar.gz: c5418890d270746471835b7bba2a83fc1ece45a8
3
+ metadata.gz: 1c40def444773cc73f4a412792312c708d34fc45
4
+ data.tar.gz: 2a731fbf57f36c9c978707b49d8c060d4086f80b
5
5
  SHA512:
6
- metadata.gz: c897619e13826f2f3eab0d170bb499f3a55005b519f7892dba768825ea2bf62e9ffdd0340726ea033d7498ff88fea109f1517b4ea2e7c41008b3641aca578116
7
- data.tar.gz: 80b88d8cbdf531bee5c5d8ce1f5352c85a69d449076711dea1882d3a4070073f1a5698e4a1d7d099f45dc184cc7fd3d5f347d7fdbd12ae35bf1d8857cbbd53d3
6
+ metadata.gz: 715949ee62b509a9eade435df0d6823d85892ee1ad7f99ff949089abb02386d62cbfcd4a549a4c4e0b615ed1f59681cdcdc6e8794bdf0c8eacb52f3076940948
7
+ data.tar.gz: e7825b5df371b8bf4da010fa72e8099491fe25f2cfe50f291b36acd8a8087fd80e1d56c33531d8a4b9709faec721fadc3d514508274c831e8a61e17b1b08fb26
@@ -1,3 +1,8 @@
1
+ 0.0.5
2
+ -----
3
+
4
+ * Fix bug to modify `dc:rights` to `dc:right`
5
+
1
6
  0.0.4
2
7
  -----
3
8
 
@@ -145,6 +145,10 @@ Todo
145
145
 
146
146
  Recent Changes
147
147
  --------------
148
+ ### 0.0.5
149
+
150
+ * Fix bug to modify `dc:rights` to `dc:right`
151
+
148
152
  ### 0.0.4
149
153
  * API change: #save -> #write for PhysicalContainer classes
150
154
  * Bump required EPUB Parser version: 0.2.0 -> 0.2.6
@@ -83,13 +83,10 @@ module EPUB
83
83
  package
84
84
  end
85
85
 
86
- # @param archive [OCF::PhysicalContainer]
87
86
  def save
88
87
  ocf.save
89
- package.save
90
- resources.each do |item|
91
- item.save
92
- end
88
+ packages.each(&:save)
89
+ resources.each(&:save)
93
90
  end
94
91
  end
95
92
  end
@@ -124,7 +124,9 @@ module EPUB
124
124
  def to_xml_fragment(xml)
125
125
  xml.metadata_('xmlns:dc' => EPUB::NAMESPACES['dc']) {
126
126
  (DC_ELEMS - [:languages]).each do |elems|
127
- singular = elems[0..-2] + '_'
127
+ singular = elems[0..-2]
128
+ singular += 's' if elems == :rights
129
+ singular += '_'
128
130
  __send__("dc_#{elems}").each do |elem|
129
131
  node = xml['dc'].__send__(singular, elem.content)
130
132
  to_xml_attribute node, elem, [:id, :dir]
@@ -222,6 +224,7 @@ module EPUB
222
224
  self
223
225
  end
224
226
 
227
+ # @return [Item]
225
228
  def make_item(options={})
226
229
  item = Item.new
227
230
  [:id, :href, :media_type, :properties, :media_overlay].each do |attr|
@@ -109,9 +109,11 @@ module EPUB
109
109
  end
110
110
  end
111
111
  else
112
- raise 'No rootfile set' if @rootfiles.empty?
112
+ raise 'No rootfile set' if rootfiles.empty?
113
113
  rf = rootfiles.first
114
- book.package = EPUB::Parser::Publication.new(File.read(rf)).parse
114
+ package = EPUB::Parser::Publication.new(File.read(rf)).parse
115
+ book.rootfiles.first.package = package
116
+ package.book = book
115
117
  end
116
118
  end
117
119
  end
@@ -1,5 +1,5 @@
1
1
  module EPUB
2
2
  module Maker
3
- VERSION = "0.0.4"
3
+ VERSION = "0.0.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: epub-maker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - KITAITI Makoto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-05 00:00:00.000000000 Z
11
+ date: 2017-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: epub-parser
@@ -308,7 +308,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
308
308
  version: '0'
309
309
  requirements: []
310
310
  rubyforge_project:
311
- rubygems_version: 2.5.1
311
+ rubygems_version: 2.6.8
312
312
  signing_key:
313
313
  specification_version: 4
314
314
  summary: EPUB Maker