invisiblellama-repub 0.3.4 → 0.3.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/History.txt CHANGED
@@ -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
data/lib/repub.rb CHANGED
@@ -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:
data/lib/repub/app.rb CHANGED
@@ -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(
data/repub.gemspec CHANGED
@@ -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: invisiblellama-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
@@ -110,6 +110,7 @@ files:
110
110
  - test/test_parser.rb
111
111
  has_rdoc: false
112
112
  homepage: http://rubyforge.org/projects/repub/
113
+ licenses:
113
114
  post_install_message:
114
115
  rdoc_options:
115
116
  - --main
@@ -131,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
131
132
  requirements: []
132
133
 
133
134
  rubyforge_project: repub
134
- rubygems_version: 1.2.0
135
+ rubygems_version: 1.3.5
135
136
  signing_key:
136
137
  specification_version: 3
137
138
  summary: Repub is a simple HTML to ePub converter