qdoc 0.0.101 → 0.0.105
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 +4 -4
- data/lib/qdoc.rb +35 -32
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 68804b9ca888170e9057f2c797182eefdcaea3e8
|
|
4
|
+
data.tar.gz: a54575dcf4f33853779645006c4ceefa03be2c21
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5cbaea21201d28e653525244ad0629c5211fd933b6f238c8446da171fad25a47cc1add9e1869640e256e155497c324a29f4e40b5b411b7bef4379b443b89f1d0
|
|
7
|
+
data.tar.gz: 9537db5b8f6f89c91f74865e95ef43d294d8f0a81077ae0cb2a66b78c04d4d36bd67ea875df2d4a5f8da697c676f4146ba49ef15aa7693e4d8f4cba78357b424
|
data/lib/qdoc.rb
CHANGED
|
@@ -10,9 +10,11 @@ class QDoc
|
|
|
10
10
|
# [options[:output_directory] set the directory to be created for documentation
|
|
11
11
|
# [options#index_content] set the static index page message
|
|
12
12
|
def initialize( options = {} )
|
|
13
|
-
defaults = { output_directory: "doc", index_content: "Choose from the list." }
|
|
13
|
+
defaults = { output_directory: "doc", index_content: "Choose from the list.", target_extensions: %w(md rc html) }
|
|
14
14
|
options = defaults.merge options
|
|
15
15
|
@out_dir = options[:output_directory]
|
|
16
|
+
|
|
17
|
+
@target_extensions = options[:target_extensions].join("|")
|
|
16
18
|
|
|
17
19
|
@index = { file: "index.html", title: "index", extension: "html", content: options[:index_content], directory: nil, output_file: "index.html", parse: false }
|
|
18
20
|
|
|
@@ -55,7 +57,7 @@ class QDoc
|
|
|
55
57
|
documents = [ @index ]
|
|
56
58
|
locations.each do |dir|
|
|
57
59
|
Dir.foreach("./#{dir}") do |node|
|
|
58
|
-
node.match(/(?<name>.*)\.(?<ext
|
|
60
|
+
node.match(/(?<name>.*)\.(?<ext>#{@target_extensions})\z/) do |match|
|
|
59
61
|
filehead = match[:name]
|
|
60
62
|
file_ext = match[:ext]
|
|
61
63
|
filename = filehead + "." + file_ext
|
|
@@ -97,38 +99,39 @@ class QDoc
|
|
|
97
99
|
"<!DOCTYPE html>
|
|
98
100
|
<html>
|
|
99
101
|
<head>
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
102
|
+
<title>" + title + "</title>
|
|
103
|
+
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
|
|
104
|
+
<link href='bootstrap.min.css' rel='stylesheet'>
|
|
105
|
+
<style>
|
|
106
|
+
.bs-sidebar .nav > li > a {
|
|
107
|
+
padding-top: 0px;
|
|
108
|
+
padding-bottom: 0px;
|
|
109
|
+
padding-left: 10px;
|
|
110
|
+
font-size: 90%;
|
|
111
|
+
}
|
|
112
|
+
.bs-sidebar .nav .nav > li > a {
|
|
113
|
+
padding-top: 0px;
|
|
114
|
+
padding-bottom: 0px;
|
|
115
|
+
padding-left: 20px;
|
|
116
|
+
font-size: 75%;
|
|
117
|
+
}
|
|
118
|
+
.bs-sidebar .nav .nav .nav > li > a {
|
|
119
|
+
padding-top: 0px;
|
|
120
|
+
padding-bottom: 0px;
|
|
121
|
+
padding-left: 60px;
|
|
122
|
+
font-size: 80%;
|
|
123
|
+
}
|
|
124
|
+
</style>
|
|
122
125
|
</head>
|
|
123
126
|
<body>
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
create_nav( content ) +
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
content +
|
|
130
|
-
|
|
131
|
-
|
|
127
|
+
<div class='row'>
|
|
128
|
+
<div class='col-md-3 hidden-print'>" + \
|
|
129
|
+
create_nav( content ) + "
|
|
130
|
+
</div>
|
|
131
|
+
<div class='col-md-9'>" + \
|
|
132
|
+
content + "
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
132
135
|
</body>"
|
|
133
136
|
end
|
|
134
137
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: qdoc
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.105
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Patrick Sereno
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2015-07-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: redcarpet
|
|
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
101
101
|
version: '0'
|
|
102
102
|
requirements: []
|
|
103
103
|
rubyforge_project:
|
|
104
|
-
rubygems_version: 2.
|
|
104
|
+
rubygems_version: 2.4.5
|
|
105
105
|
signing_key:
|
|
106
106
|
specification_version: 4
|
|
107
107
|
summary: A quick doc converter
|