repub 0.3.4 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,9 +1,15 @@
1
+ == 0.3.5 / 2009-09-06
2
+
3
+ * Bug fixes
4
+
5
+ * Fixed incorrect path for added external files in OPF (Christian Steinert)
6
+
1
7
  == 0.3.4 / 2009-07-17
2
8
 
3
9
  * Bug fixes
4
10
 
5
11
  * Pre- and post processing filters moved to separate modules.
6
- * Non-conformant element IDs are now fixed automaticly
12
+ * Non-conformant element IDs are now fixed automatically
7
13
  * Regardless of the source settings, doctype now is always set to XHTML 1.0 Transitional
8
14
  * -F (disable fixups) option removed, fixups are always on
9
15
  * Documentation updates
@@ -1,7 +1,7 @@
1
1
  module Repub
2
2
 
3
3
  # :stopdoc:
4
- VERSION = '0.3.4'
4
+ VERSION = '0.3.5'
5
5
  LIBPATH = File.expand_path(File.dirname(__FILE__)) + File::SEPARATOR
6
6
  PATH = File.dirname(LIBPATH) + File::SEPARATOR
7
7
  # :startdoc:
@@ -41,6 +41,8 @@ module Repub
41
41
 
42
42
  rescue RuntimeError => ex
43
43
  log.fatal "** ERROR: #{ex.to_s}"
44
+ rescue Exception => ex
45
+ log.fatal "** ERROR: #{ex.to_s}" unless ex.is_a? SystemExit
44
46
  end
45
47
 
46
48
  end
@@ -9,10 +9,10 @@ module Repub
9
9
  class BuilderException < RuntimeError; end
10
10
 
11
11
  def build(parser)
12
- Builder.new(options).build(parser)
12
+ BuilderSupport.new(options).build(parser)
13
13
  end
14
14
 
15
- class Builder
15
+ class BuilderSupport
16
16
  include Logger
17
17
 
18
18
  attr_reader :output_path
@@ -118,7 +118,7 @@ module Repub
118
118
  @options[:add].each do |file|
119
119
  log.debug "-- Copying external file #{file}"
120
120
  FileUtils.cp(file, '.')
121
- @opf << file
121
+ @opf << File.basename(file)
122
122
  end if @options[:add]
123
123
  end
124
124
 
@@ -9,7 +9,7 @@ module Repub
9
9
  class ParserException < RuntimeError; end
10
10
 
11
11
  def parse(cache)
12
- Parser.new(options).parse(cache)
12
+ ParserSupport.new(options).parse(cache)
13
13
  end
14
14
 
15
15
  # Default selectors, some reasonable values
@@ -21,7 +21,7 @@ module Repub
21
21
  :toc_section => './ul'
22
22
  }
23
23
 
24
- class Parser
24
+ class ParserSupport
25
25
  include Logger
26
26
 
27
27
  attr_reader :cache
@@ -36,7 +36,7 @@ module Repub
36
36
  unless match.empty?
37
37
  log.debug "-- Fixing broken element IDs"
38
38
  match.each do |m|
39
- # fix id so it starts with alpha char
39
+ # fix id attribute
40
40
  s.gsub!(m.join(''), m.join('x'))
41
41
  # update fragment references
42
42
  s.gsub!(/##{m[1]}(['"])/, "#x#{m[1]}\\1")
@@ -15,6 +15,7 @@ module Repub
15
15
  @media_type = 'application/oebps-package+xml'
16
16
  @metadata = Metadata.new('Untitled', 'en', uid, Date.today.to_s)
17
17
  @items = []
18
+ @ncx = nil
18
19
  end
19
20
 
20
21
  class Metadata < Struct.new(
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{repub}
5
- s.version = "0.3.4"
5
+ s.version = "0.3.5"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Dmitri Goutnik"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: repub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitri Goutnik
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-17 00:00:00 +04:00
12
+ date: 2009-09-06 00:00:00 +04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 1.3.2
23
+ version: 1.3.3
24
24
  version:
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: builder
@@ -151,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
151
151
  requirements: []
152
152
 
153
153
  rubyforge_project: repub
154
- rubygems_version: 1.3.4
154
+ rubygems_version: 1.3.5
155
155
  signing_key:
156
156
  specification_version: 3
157
157
  summary: Repub is a simple HTML to ePub converter