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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/qdoc.rb +35 -32
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1332595880b70af9aeb092d1bb1e39ee80a8f251
4
- data.tar.gz: 6fc4f28dfa9a9f5e0c72ae36ff19a9417b92c0e6
3
+ metadata.gz: 68804b9ca888170e9057f2c797182eefdcaea3e8
4
+ data.tar.gz: a54575dcf4f33853779645006c4ceefa03be2c21
5
5
  SHA512:
6
- metadata.gz: 93ef5e7ca0f3612f432024019e9a63d593e00c00dff5baa134d4881b60945a92069b3c40c4550cfdb03f35099a83f781334cdb9b81fd71c30cd69cb15fbcca35
7
- data.tar.gz: 1829f9c72f7ac65233480f7fc65fb8cfd111c0777ce09b0f6e469040fa1f6026658552ad779130c5475501f3d8a15a516c58cce7f1599e690ab36698287c2397
6
+ metadata.gz: 5cbaea21201d28e653525244ad0629c5211fd933b6f238c8446da171fad25a47cc1add9e1869640e256e155497c324a29f4e40b5b411b7bef4379b443b89f1d0
7
+ data.tar.gz: 9537db5b8f6f89c91f74865e95ef43d294d8f0a81077ae0cb2a66b78c04d4d36bd67ea875df2d4a5f8da697c676f4146ba49ef15aa7693e4d8f4cba78357b424
@@ -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>txt|md|rc)\z/) do |match|
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
- <title>" + title + "</title>
101
- <link href='bootstrap.min.css' rel='stylesheet'>
102
- <style>
103
- .bs-sidebar .nav > li > a {
104
- padding-top: 0px;
105
- padding-bottom: 0px;
106
- padding-left: 10px;
107
- font-size: 90%;
108
- }
109
- .bs-sidebar .nav .nav > li > a {
110
- padding-top: 0px;
111
- padding-bottom: 0px;
112
- padding-left: 20px;
113
- font-size: 75%;
114
- }
115
- .bs-sidebar .nav .nav .nav > li > a {
116
- padding-top: 0px;
117
- padding-bottom: 0px;
118
- padding-left: 60px;
119
- font-size: 80%;
120
- }
121
- </style>
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
- <div class='row'>
125
- <div class='col-md-3 hidden-print'>" + \
126
- create_nav( content ) + \
127
- "</div>
128
- <div class='col-md-9'>" + \
129
- content + \
130
- "</div>
131
- </div>
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.101
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: 2014-07-09 00:00:00.000000000 Z
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.2.2
104
+ rubygems_version: 2.4.5
105
105
  signing_key:
106
106
  specification_version: 4
107
107
  summary: A quick doc converter