rpub 0.4.0 → 0.5.0
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.
- checksums.yaml +7 -0
- data/.gitignore +1 -1
- data/.rspec +0 -1
- data/.travis.yml +3 -4
- data/.yardopts +1 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +70 -46
- data/Guardfile +6 -0
- data/HISTORY.md +10 -0
- data/README.md +1 -1
- data/Rakefile +7 -2
- data/bin/rpub +64 -1
- data/doc/.gitignore +8 -0
- data/doc/api/Rpub.html +339 -0
- data/doc/api/Rpub/Book.html +983 -0
- data/doc/api/Rpub/Chapter.html +737 -0
- data/doc/api/Rpub/Command.html +356 -0
- data/doc/api/Rpub/Commands.html +117 -0
- data/doc/api/Rpub/Commands/Clean.html +216 -0
- data/doc/api/Rpub/Commands/Compile.html +218 -0
- data/doc/api/Rpub/Commands/Generate.html +242 -0
- data/doc/api/Rpub/Commands/Package.html +230 -0
- data/doc/api/Rpub/Commands/Preview.html +216 -0
- data/doc/api/Rpub/Commands/Stats.html +226 -0
- data/doc/api/Rpub/Compressor.html +687 -0
- data/doc/api/Rpub/Context.html +553 -0
- data/doc/api/Rpub/Document.html +647 -0
- data/doc/api/Rpub/Document/OutlineElement.html +388 -0
- data/doc/api/Rpub/Epub.html +465 -0
- data/doc/api/Rpub/Epub/Container.html +224 -0
- data/doc/api/Rpub/Epub/Content.html +344 -0
- data/doc/api/Rpub/Epub/Cover.html +236 -0
- data/doc/api/Rpub/Epub/HtmlToc.html +240 -0
- data/doc/api/Rpub/Epub/Toc.html +244 -0
- data/doc/api/Rpub/FilesystemSource.html +544 -0
- data/doc/api/Rpub/HashDelegation.html +281 -0
- data/doc/api/Rpub/HashDelegation/ClassMethods.html +175 -0
- data/doc/api/Rpub/MediaType.html +192 -0
- data/doc/api/Rpub/Preview.html +464 -0
- data/doc/api/Rpub/XmlFile.html +457 -0
- data/doc/api/_index.html +405 -0
- data/doc/api/class_list.html +54 -0
- data/doc/api/css/common.css +1 -0
- data/doc/api/css/full_list.css +57 -0
- data/doc/api/css/style.css +339 -0
- data/doc/api/file.HISTORY.html +131 -0
- data/doc/api/file.LICENSE.html +92 -0
- data/doc/api/file.README.html +337 -0
- data/doc/api/file_list.html +62 -0
- data/doc/api/frames.html +26 -0
- data/doc/api/index.html +337 -0
- data/doc/api/js/app.js +219 -0
- data/doc/api/js/full_list.js +178 -0
- data/doc/api/js/jquery.js +4 -0
- data/doc/api/method_list.html +533 -0
- data/doc/api/top-level-namespace.html +112 -0
- data/doc/index.html +312 -0
- data/doc/javascripts/scale.fix.js +17 -0
- data/doc/params.json +1 -0
- data/doc/stylesheets/pygment_trac.css +69 -0
- data/doc/stylesheets/styles.css +255 -0
- data/features/clean.feature +31 -0
- data/features/compile.feature +49 -0
- data/features/embedded_assets.feature +51 -0
- data/features/generate.feature +63 -0
- data/features/layout.feature +41 -0
- data/features/package.feature +30 -0
- data/features/previews.feature +66 -0
- data/features/stats.feature +18 -0
- data/features/step_definitions/general_steps.rb +60 -0
- data/features/styles.feature +33 -0
- data/features/support/env.rb +7 -0
- data/features/table_of_contents.feature +35 -0
- data/lib/rpub.rb +28 -31
- data/lib/rpub/book.rb +9 -16
- data/lib/rpub/chapter.rb +4 -54
- data/lib/rpub/command.rb +32 -0
- data/lib/rpub/commands/clean.rb +4 -49
- data/lib/rpub/commands/compile.rb +4 -49
- data/lib/rpub/commands/generate.rb +10 -67
- data/lib/rpub/commands/package.rb +9 -37
- data/lib/rpub/commands/preview.rb +4 -54
- data/lib/rpub/commands/stats.rb +6 -10
- data/lib/rpub/compressor.rb +3 -3
- data/lib/rpub/context.rb +48 -0
- data/lib/rpub/document.rb +68 -0
- data/lib/rpub/epub.rb +8 -7
- data/lib/rpub/epub/content.rb +9 -30
- data/lib/rpub/epub/cover.rb +1 -8
- data/lib/rpub/epub/html_toc.rb +4 -9
- data/lib/rpub/epub/toc.rb +16 -13
- data/lib/rpub/filesystem_source.rb +47 -0
- data/lib/rpub/media_type.rb +16 -0
- data/lib/rpub/preview.rb +29 -0
- data/lib/rpub/version.rb +1 -1
- data/lib/rpub/xml_file.rb +4 -1
- data/rpub.gemspec +6 -7
- data/spec/rpub/book_spec.rb +45 -45
- data/spec/rpub/chapter_spec.rb +87 -22
- data/spec/rpub/epub/container_spec.rb +3 -5
- data/spec/rpub/epub/content_spec.rb +62 -41
- data/spec/rpub/epub/cover_spec.rb +3 -5
- data/spec/rpub/epub/html_toc_spec.rb +8 -8
- data/spec/rpub/epub/toc_spec.rb +20 -22
- data/spec/rpub_spec.rb +1 -3
- data/spec/spec_helper.rb +28 -0
- data/support/config.yml +1 -0
- data/support/styles.css +3 -3
- metadata +131 -120
- data/lib/rpub/commander.rb +0 -23
- data/lib/rpub/commands/base.rb +0 -33
- data/lib/rpub/commands/help.rb +0 -37
- data/lib/rpub/commands/main.rb +0 -45
- data/lib/rpub/compilation_helpers.rb +0 -73
- data/lib/rpub/subclass_tracker.rb +0 -53
- data/spec/rpub/commands/clean_spec.rb +0 -46
- data/spec/rpub/commands/generate_spec.rb +0 -52
- data/spec/rpub/commands/main_spec.rb +0 -26
- data/spec/rpub/commands/package_spec.rb +0 -33
- data/spec/rpub/commands/preview_spec.rb +0 -43
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 0251f7be52f4891eae2209f471dc5e5e5e16476e
|
|
4
|
+
data.tar.gz: 876b09bb922ec2ae31d5a9793c6448f504a739bc
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: c96ac8f8d9a5bc5f26383ddf94e387ec0572c6ff267c5f83a7716777798708a07abf65224e90b593d16dff89ecfca92bac1db38ee70dd0d4c7e7f71fdeb5f99f
|
|
7
|
+
data.tar.gz: 95c58f48494807c7a774b854fd3cb77e399ff69bfc85466bbef9d899c1a585d15555ba574cd179a660efe21f9c6898b56c44758048ec2d36ba679b6b21ee4995
|
data/.gitignore
CHANGED
data/.rspec
CHANGED
data/.travis.yml
CHANGED
data/.yardopts
CHANGED
data/Gemfile
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
source
|
|
1
|
+
source 'https://rubygems.org'
|
|
2
2
|
gemspec
|
data/Gemfile.lock
CHANGED
|
@@ -1,70 +1,94 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
rpub (0.
|
|
4
|
+
rpub (0.5.0)
|
|
5
5
|
builder
|
|
6
|
+
commander
|
|
6
7
|
kramdown
|
|
7
8
|
nokogiri
|
|
8
9
|
rubyzip
|
|
9
10
|
textstats
|
|
10
11
|
typogruby
|
|
11
|
-
typogruby
|
|
12
12
|
|
|
13
13
|
GEM
|
|
14
|
-
remote:
|
|
14
|
+
remote: https://rubygems.org/
|
|
15
15
|
specs:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
16
|
+
aruba (0.6.0)
|
|
17
|
+
childprocess (>= 0.3.6)
|
|
18
|
+
cucumber (>= 1.1.1)
|
|
19
|
+
rspec-expectations (>= 2.7.0)
|
|
20
|
+
builder (3.2.2)
|
|
21
|
+
childprocess (0.5.3)
|
|
22
|
+
ffi (~> 1.0, >= 1.0.11)
|
|
23
|
+
commander (4.2.1)
|
|
24
|
+
highline (~> 1.6.11)
|
|
25
|
+
coveralls (0.7.0)
|
|
26
|
+
multi_json (~> 1.3)
|
|
27
|
+
rest-client
|
|
28
|
+
simplecov (>= 0.7)
|
|
29
|
+
term-ansicolor
|
|
30
|
+
thor
|
|
31
|
+
cucumber (1.3.16)
|
|
32
|
+
builder (>= 2.1.2)
|
|
33
|
+
diff-lcs (>= 1.1.3)
|
|
34
|
+
gherkin (~> 2.12)
|
|
35
|
+
multi_json (>= 1.7.5, < 2.0)
|
|
36
|
+
multi_test (>= 0.1.1)
|
|
37
|
+
diff-lcs (1.2.5)
|
|
38
|
+
docile (1.1.5)
|
|
39
|
+
ffi (1.9.3)
|
|
40
|
+
gherkin (2.12.2)
|
|
41
|
+
multi_json (~> 1.3)
|
|
42
|
+
highline (1.6.21)
|
|
43
|
+
kramdown (1.5.0)
|
|
44
|
+
mime-types (2.3)
|
|
45
|
+
mini_portile (0.6.1)
|
|
46
|
+
multi_json (1.10.1)
|
|
47
|
+
multi_test (0.1.1)
|
|
48
|
+
netrc (0.7.7)
|
|
49
|
+
nokogiri (1.6.4.1)
|
|
50
|
+
mini_portile (~> 0.6.0)
|
|
51
|
+
rake (10.3.2)
|
|
52
|
+
rest-client (1.7.2)
|
|
53
|
+
mime-types (>= 1.16, < 3.0)
|
|
54
|
+
netrc (~> 0.7)
|
|
55
|
+
rspec (3.0.0)
|
|
56
|
+
rspec-core (~> 3.0.0)
|
|
57
|
+
rspec-expectations (~> 3.0.0)
|
|
58
|
+
rspec-mocks (~> 3.0.0)
|
|
59
|
+
rspec-core (3.0.4)
|
|
60
|
+
rspec-support (~> 3.0.0)
|
|
61
|
+
rspec-expectations (3.0.4)
|
|
62
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
63
|
+
rspec-support (~> 3.0.0)
|
|
64
|
+
rspec-mocks (3.0.4)
|
|
65
|
+
rspec-support (~> 3.0.0)
|
|
66
|
+
rspec-support (3.0.4)
|
|
46
67
|
rubypants (0.2.0)
|
|
47
|
-
rubyzip (
|
|
48
|
-
simplecov (0.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
68
|
+
rubyzip (1.1.6)
|
|
69
|
+
simplecov (0.9.0)
|
|
70
|
+
docile (~> 1.1.0)
|
|
71
|
+
multi_json
|
|
72
|
+
simplecov-html (~> 0.8.0)
|
|
73
|
+
simplecov-html (0.8.0)
|
|
74
|
+
term-ansicolor (1.3.0)
|
|
75
|
+
tins (~> 1.0)
|
|
52
76
|
textstats (0.0.2)
|
|
53
|
-
thor (0.
|
|
54
|
-
|
|
77
|
+
thor (0.19.1)
|
|
78
|
+
tins (1.3.1)
|
|
79
|
+
typogruby (1.0.17)
|
|
55
80
|
rubypants
|
|
56
|
-
yard (0.8.
|
|
81
|
+
yard (0.8.7.4)
|
|
57
82
|
|
|
58
83
|
PLATFORMS
|
|
59
84
|
ruby
|
|
60
85
|
|
|
61
86
|
DEPENDENCIES
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
87
|
+
aruba
|
|
88
|
+
coveralls
|
|
89
|
+
cucumber
|
|
65
90
|
rake
|
|
66
|
-
rb-fsevent
|
|
67
91
|
rpub!
|
|
68
|
-
rspec
|
|
92
|
+
rspec (~> 3.0)
|
|
69
93
|
simplecov
|
|
70
94
|
yard
|
data/Guardfile
CHANGED
|
@@ -3,3 +3,9 @@ guard 'rspec', :version => 2 do
|
|
|
3
3
|
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
|
4
4
|
watch('spec/spec_helper.rb') { "spec" }
|
|
5
5
|
end
|
|
6
|
+
|
|
7
|
+
guard 'cucumber' do
|
|
8
|
+
watch(%r{^features/.+\.feature$})
|
|
9
|
+
watch(%r{^features/support/.+$}) { 'features' }
|
|
10
|
+
watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'features' }
|
|
11
|
+
end
|
data/HISTORY.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# History
|
|
2
2
|
|
|
3
|
+
## (unreleased)
|
|
4
|
+
|
|
5
|
+
* Respect `max_level` setting in human-readable table of contents
|
|
6
|
+
* Use default configuration when no `config.yml` file can be found
|
|
7
|
+
* Allow passing in custom configuration file in `compile` command with -c option
|
|
8
|
+
* Bugfix: count ePub table of contents order from 1, not from 0
|
|
9
|
+
* Output `clean` command warnings on stderr, not stdout
|
|
10
|
+
* Round readability statistics from `stats` command
|
|
11
|
+
* Bugfix: let `stats` command consider less than one page still one page, not 0 pages
|
|
12
|
+
|
|
3
13
|
## 0.4.0
|
|
4
14
|
|
|
5
15
|
* Generate ePub table of contents from markdown headings
|
data/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Rpub -- an ePub generator in Ruby [](http://travis-ci.org/avdgaag/rpub) [](http://travis-ci.org/avdgaag/rpub) [](https://coveralls.io/r/avdgaag/rpub)
|
|
2
2
|
|
|
3
3
|
## Introduction
|
|
4
4
|
|
data/Rakefile
CHANGED
|
@@ -2,10 +2,15 @@ require 'bundler'
|
|
|
2
2
|
Bundler::GemHelper.install_tasks
|
|
3
3
|
Bundler.setup
|
|
4
4
|
|
|
5
|
-
require 'rspec/core/rake_task'
|
|
6
5
|
|
|
7
6
|
desc 'Default: run specs.'
|
|
8
|
-
task :default => :spec
|
|
7
|
+
task :default => [:spec, :cucumber]
|
|
9
8
|
|
|
9
|
+
require 'rspec/core/rake_task'
|
|
10
10
|
desc 'Run specs'
|
|
11
11
|
RSpec::Core::RakeTask.new
|
|
12
|
+
|
|
13
|
+
require 'cucumber/rake/task'
|
|
14
|
+
Cucumber::Rake::Task.new do |t|
|
|
15
|
+
t.cucumber_opts = '--format progress --tags ~@epubcheck'
|
|
16
|
+
end
|
data/bin/rpub
CHANGED
|
@@ -3,4 +3,67 @@
|
|
|
3
3
|
$:.unshift File.expand_path('../../lib', __FILE__)
|
|
4
4
|
require 'rpub'
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
gem = Gem::Specification.load(File.expand_path('../../rpub.gemspec', __FILE__))
|
|
7
|
+
|
|
8
|
+
require 'commander/import'
|
|
9
|
+
program :name, gem.name
|
|
10
|
+
program :version, gem.version.to_s
|
|
11
|
+
program :description, gem.description
|
|
12
|
+
program :help_formatter, :compact
|
|
13
|
+
|
|
14
|
+
default_command :compile
|
|
15
|
+
|
|
16
|
+
command :clean do |c|
|
|
17
|
+
c.syntax = 'rpub clean [OPTIONS]'
|
|
18
|
+
c.summary = 'Remove all generated files'
|
|
19
|
+
c.description = 'Clean up all generated files, such as the standard generated .epub file, package files and preview files.'
|
|
20
|
+
c.option '-d', '--[no-]dryrun', 'Only list files to be removed'
|
|
21
|
+
c.option '-c', '--config FILENAME', 'Specify an explicit configuration file to use'
|
|
22
|
+
c.when_called Rpub::Commands::Clean
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
command :generate do |c|
|
|
26
|
+
c.syntax = 'rpub generate [OPTIONS]'
|
|
27
|
+
c.summary = 'Generate default project files'
|
|
28
|
+
c.description = 'Generate one or more standard files to get started with a new project. By default an entire skeleton project is generated, but by passing the -s, -l, -c options you can generate just a single file.'
|
|
29
|
+
c.option '-s', '--[no-]styles', 'Generate default stylesheet'
|
|
30
|
+
c.option '-l', '--[no-]layout', 'Generate default HTML layout'
|
|
31
|
+
c.option '-c', '--[no-]config', 'Generate default configuration'
|
|
32
|
+
c.when_called Rpub::Commands::Generate
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
command :stats do |c|
|
|
36
|
+
c.syntax = 'rpub stats'
|
|
37
|
+
c.summary = 'Basic text statistics'
|
|
38
|
+
c.description = 'Display basic statistics of all the content in the current project'
|
|
39
|
+
c.option '-c', '--config FILENAME', 'Specify an explicit configuration file to use'
|
|
40
|
+
c.when_called Rpub::Commands::Stats
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
command :preview do |c|
|
|
44
|
+
c.syntax = 'rpub preview [OPTIONS]'
|
|
45
|
+
c.summary = 'Single-page HTML preview of entire book'
|
|
46
|
+
c.description = 'Generate a single-page HTML file for easy previewing of your content with the layout and styles used when generating .epub files. By default, the output file will be named "preview.html".'
|
|
47
|
+
c.option '-l', '--layout FILENAME', 'Specify an explicit layout file to use'
|
|
48
|
+
c.option '-o', '--output FILENAME', 'Specify an explicit output file'
|
|
49
|
+
c.option '-c', '--config FILENAME', 'Specify an explicit configuration file to use'
|
|
50
|
+
c.when_called Rpub::Commands::Preview
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
command :package do |c|
|
|
54
|
+
c.syntax = 'rpub package [OPTIONS]'
|
|
55
|
+
c.summary = 'Package book and support file for distribution'
|
|
56
|
+
c.description = 'Compile your ebook to an ePub file and package it into an archive together with optional other files for easy distibution. You might want to include a README file, a license or other promotion material.'
|
|
57
|
+
c.option '-c', '--config FILENAME', 'Specify an explicit configuration file to use'
|
|
58
|
+
c.when_called Rpub::Commands::Package
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
command :compile do |c|
|
|
62
|
+
c.syntax = 'rpub compile [OPTIONS]'
|
|
63
|
+
c.summary = 'Compile chapters into .epub file'
|
|
64
|
+
c.description = ' Compile your Markdown-formatted input files to a valid .epub output file using the options described in config.yml. This will use the layout.html and styles.css files in your project directory if present.'
|
|
65
|
+
c.option '-l', '--layout FILENAME', 'Specify an explicit layout file to use'
|
|
66
|
+
c.option '-s', '--styles FILENAME', 'Specify an explicit stylesheet file to use'
|
|
67
|
+
c.option '-c', '--config FILENAME', 'Specify an explicit configuration file to use'
|
|
68
|
+
c.when_called Rpub::Commands::Compile
|
|
69
|
+
end
|
data/doc/.gitignore
ADDED
data/doc/api/Rpub.html
ADDED
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
4
|
+
<head>
|
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
6
|
+
<title>
|
|
7
|
+
Module: Rpub
|
|
8
|
+
|
|
9
|
+
— Rpub, a simple ePub generator library in Ruby
|
|
10
|
+
|
|
11
|
+
</title>
|
|
12
|
+
|
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
|
14
|
+
|
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
|
16
|
+
|
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
|
19
|
+
relpath = '';
|
|
20
|
+
framesUrl = "frames.html#!Rpub.html";
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
|
25
|
+
|
|
26
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
</head>
|
|
30
|
+
<body>
|
|
31
|
+
<div id="header">
|
|
32
|
+
<div id="menu">
|
|
33
|
+
|
|
34
|
+
<a href="_index.html">Index (R)</a> »
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
<span class="title">Rpub</span>
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<div id="search">
|
|
44
|
+
|
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
|
46
|
+
href="class_list.html">
|
|
47
|
+
Class List
|
|
48
|
+
</a>
|
|
49
|
+
|
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
|
51
|
+
href="method_list.html">
|
|
52
|
+
Method List
|
|
53
|
+
</a>
|
|
54
|
+
|
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
|
56
|
+
href="file_list.html">
|
|
57
|
+
File List
|
|
58
|
+
</a>
|
|
59
|
+
|
|
60
|
+
</div>
|
|
61
|
+
<div class="clear"></div>
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<iframe id="search_frame"></iframe>
|
|
65
|
+
|
|
66
|
+
<div id="content"><h1>Module: Rpub
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
</h1>
|
|
71
|
+
|
|
72
|
+
<dl class="box">
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
<dt class="r1 last">Defined in:</dt>
|
|
82
|
+
<dd class="r1 last">lib/rpub.rb<span class="defines">,<br />
|
|
83
|
+
lib/rpub/epub.rb,<br /> lib/rpub/book.rb,<br /> lib/rpub/command.rb,<br /> lib/rpub/context.rb,<br /> lib/rpub/version.rb,<br /> lib/rpub/preview.rb,<br /> lib/rpub/chapter.rb,<br /> lib/rpub/xml_file.rb,<br /> lib/rpub/epub/toc.rb,<br /> lib/rpub/document.rb,<br /> lib/rpub/media_type.rb,<br /> lib/rpub/epub/cover.rb,<br /> lib/rpub/compressor.rb,<br /> lib/rpub/epub/content.rb,<br /> lib/rpub/epub/html_toc.rb,<br /> lib/rpub/commands/clean.rb,<br /> lib/rpub/commands/stats.rb,<br /> lib/rpub/epub/container.rb,<br /> lib/rpub/hash_delegation.rb,<br /> lib/rpub/commands/preview.rb,<br /> lib/rpub/commands/compile.rb,<br /> lib/rpub/commands/package.rb,<br /> lib/rpub/filesystem_source.rb,<br /> lib/rpub/commands/generate.rb</span>
|
|
84
|
+
</dd>
|
|
85
|
+
|
|
86
|
+
</dl>
|
|
87
|
+
<div class="clear"></div>
|
|
88
|
+
|
|
89
|
+
<h2>Defined Under Namespace</h2>
|
|
90
|
+
<p class="children">
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Rpub/Commands.html" title="Rpub::Commands (module)">Commands</a></span>, <span class='object_link'><a href="Rpub/FilesystemSource.html" title="Rpub::FilesystemSource (module)">FilesystemSource</a></span>, <span class='object_link'><a href="Rpub/HashDelegation.html" title="Rpub::HashDelegation (module)">HashDelegation</a></span>, <span class='object_link'><a href="Rpub/MediaType.html" title="Rpub::MediaType (module)">MediaType</a></span>
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Rpub/Book.html" title="Rpub::Book (class)">Book</a></span>, <span class='object_link'><a href="Rpub/Chapter.html" title="Rpub::Chapter (class)">Chapter</a></span>, <span class='object_link'><a href="Rpub/Command.html" title="Rpub::Command (class)">Command</a></span>, <span class='object_link'><a href="Rpub/Compressor.html" title="Rpub::Compressor (class)">Compressor</a></span>, <span class='object_link'><a href="Rpub/Context.html" title="Rpub::Context (class)">Context</a></span>, <span class='object_link'><a href="Rpub/Document.html" title="Rpub::Document (class)">Document</a></span>, <span class='object_link'><a href="Rpub/Epub.html" title="Rpub::Epub (class)">Epub</a></span>, <span class='object_link'><a href="Rpub/Preview.html" title="Rpub::Preview (class)">Preview</a></span>, <span class='object_link'><a href="Rpub/XmlFile.html" title="Rpub::XmlFile (class)">XmlFile</a></span>
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
</p>
|
|
101
|
+
|
|
102
|
+
<h2>Constant Summary</h2>
|
|
103
|
+
|
|
104
|
+
<dl class="constants">
|
|
105
|
+
|
|
106
|
+
<dt id="GEM_ROOT-constant" class="">GEM_ROOT =
|
|
107
|
+
|
|
108
|
+
</dt>
|
|
109
|
+
<dd><pre class="code"><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>../../</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='kw'>__FILE__</span><span class='rparen'>)</span></pre></dd>
|
|
110
|
+
|
|
111
|
+
<dt id="VERSION-constant" class="">VERSION =
|
|
112
|
+
|
|
113
|
+
</dt>
|
|
114
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>0.4.1</span><span class='tstring_end'>'</span></span></pre></dd>
|
|
115
|
+
|
|
116
|
+
</dl>
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
<h2>
|
|
127
|
+
Class Method Summary
|
|
128
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
|
129
|
+
</h2>
|
|
130
|
+
|
|
131
|
+
<ul class="summary">
|
|
132
|
+
|
|
133
|
+
<li class="public ">
|
|
134
|
+
<span class="summary_signature">
|
|
135
|
+
|
|
136
|
+
<a href="#document_factory-class_method" title="document_factory (class method)">+ (Object) <strong>document_factory</strong> </a>
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
</span>
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
<span class="summary_desc"><div class='inline'>
|
|
151
|
+
</div></span>
|
|
152
|
+
|
|
153
|
+
</li>
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
<li class="public ">
|
|
157
|
+
<span class="summary_signature">
|
|
158
|
+
|
|
159
|
+
<a href="#source-class_method" title="source (class method)">+ (Object) <strong>source</strong> </a>
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
</span>
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
<span class="summary_desc"><div class='inline'>
|
|
174
|
+
</div></span>
|
|
175
|
+
|
|
176
|
+
</li>
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
<li class="public ">
|
|
180
|
+
<span class="summary_signature">
|
|
181
|
+
|
|
182
|
+
<a href="#support_file-class_method" title="support_file (class method)">+ (String) <strong>support_file</strong>(path) </a>
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
</span>
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
<span class="summary_desc"><div class='inline'><p>Full path to a file that was relative to the gem support directory.</p>
|
|
197
|
+
</div></span>
|
|
198
|
+
|
|
199
|
+
</li>
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
</ul>
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
<div id="class_method_details" class="method_details_list">
|
|
208
|
+
<h2>Class Method Details</h2>
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
<div class="method_details first">
|
|
212
|
+
<h3 class="signature first" id="document_factory-class_method">
|
|
213
|
+
|
|
214
|
+
+ (<tt>Object</tt>) <strong>document_factory</strong>
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
</h3><table class="source_code">
|
|
221
|
+
<tr>
|
|
222
|
+
<td>
|
|
223
|
+
<pre class="lines">
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
28
|
|
227
|
+
29
|
|
228
|
+
30</pre>
|
|
229
|
+
</td>
|
|
230
|
+
<td>
|
|
231
|
+
<pre class="code"><span class="info file"># File 'lib/rpub.rb', line 28</span>
|
|
232
|
+
|
|
233
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_document_factory'>document_factory</span>
|
|
234
|
+
<span class='const'>Rpub</span><span class='op'>::</span><span class='const'>Document</span><span class='period'>.</span><span class='id identifier rubyid_method'>method</span><span class='lparen'>(</span><span class='symbol'>:new</span><span class='rparen'>)</span>
|
|
235
|
+
<span class='kw'>end</span></pre>
|
|
236
|
+
</td>
|
|
237
|
+
</tr>
|
|
238
|
+
</table>
|
|
239
|
+
</div>
|
|
240
|
+
|
|
241
|
+
<div class="method_details ">
|
|
242
|
+
<h3 class="signature " id="source-class_method">
|
|
243
|
+
|
|
244
|
+
+ (<tt>Object</tt>) <strong>source</strong>
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
</h3><table class="source_code">
|
|
251
|
+
<tr>
|
|
252
|
+
<td>
|
|
253
|
+
<pre class="lines">
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
24
|
|
257
|
+
25
|
|
258
|
+
26</pre>
|
|
259
|
+
</td>
|
|
260
|
+
<td>
|
|
261
|
+
<pre class="code"><span class="info file"># File 'lib/rpub.rb', line 24</span>
|
|
262
|
+
|
|
263
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_source'>source</span>
|
|
264
|
+
<span class='const'>FilesystemSource</span>
|
|
265
|
+
<span class='kw'>end</span></pre>
|
|
266
|
+
</td>
|
|
267
|
+
</tr>
|
|
268
|
+
</table>
|
|
269
|
+
</div>
|
|
270
|
+
|
|
271
|
+
<div class="method_details ">
|
|
272
|
+
<h3 class="signature " id="support_file-class_method">
|
|
273
|
+
|
|
274
|
+
+ (<tt>String</tt>) <strong>support_file</strong>(path)
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
</h3><div class="docstring">
|
|
281
|
+
<div class="discussion">
|
|
282
|
+
<p>Returns full path to a file that was relative to the gem support directory</p>
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
</div>
|
|
286
|
+
</div>
|
|
287
|
+
<div class="tags">
|
|
288
|
+
|
|
289
|
+
<p class="tag_title">Returns:</p>
|
|
290
|
+
<ul class="return">
|
|
291
|
+
|
|
292
|
+
<li>
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
<span class='type'>(<tt>String</tt>)</span>
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
—
|
|
300
|
+
<div class='inline'><p>full path to a file that was relative to the gem support directory</p>
|
|
301
|
+
</div>
|
|
302
|
+
|
|
303
|
+
</li>
|
|
304
|
+
|
|
305
|
+
</ul>
|
|
306
|
+
|
|
307
|
+
</div><table class="source_code">
|
|
308
|
+
<tr>
|
|
309
|
+
<td>
|
|
310
|
+
<pre class="lines">
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
20
|
|
314
|
+
21
|
|
315
|
+
22</pre>
|
|
316
|
+
</td>
|
|
317
|
+
<td>
|
|
318
|
+
<pre class="code"><span class="info file"># File 'lib/rpub.rb', line 20</span>
|
|
319
|
+
|
|
320
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_support_file'>support_file</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
|
|
321
|
+
<span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='const'>GEM_ROOT</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>support</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
|
|
322
|
+
<span class='kw'>end</span></pre>
|
|
323
|
+
</td>
|
|
324
|
+
</tr>
|
|
325
|
+
</table>
|
|
326
|
+
</div>
|
|
327
|
+
|
|
328
|
+
</div>
|
|
329
|
+
|
|
330
|
+
</div>
|
|
331
|
+
|
|
332
|
+
<div id="footer">
|
|
333
|
+
Generated on Thu Aug 14 19:54:32 2014 by
|
|
334
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
335
|
+
0.8.7.4 (ruby-2.1.2).
|
|
336
|
+
</div>
|
|
337
|
+
|
|
338
|
+
</body>
|
|
339
|
+
</html>
|