cdoc 0.1.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 +9 -0
- data/.travis.yml +5 -0
- data/Gemfile +8 -0
- data/LICENSE.txt +21 -0
- data/README.md +44 -0
- data/Rakefile +10 -0
- data/bin/cdoc +9 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/cdoc.gemspec +36 -0
- data/lib/cdoc.rb +187 -0
- data/lib/cdoc/layout.html +0 -0
- data/lib/cdoc/version.rb +3 -0
- data/lib/layouts/default.html +16 -0
- data/lib/styles/markdown4.css +112 -0
- data/lib/styles/pygments_github.css +61 -0
- metadata +106 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 012f909628d011dd541bc011899dc952849da0f2
|
4
|
+
data.tar.gz: c21c90cffd4c62383fd94ab44407b15f5fe3e089
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 949a99bd3b56e056b5c03a7a906e3dd3c178b374df0419f7ff417ad61c86daacdd62cf9bf850397e321bacd91822aef16a54f7f95039df5b019cb5f0e262194c
|
7
|
+
data.tar.gz: 5fef22b87d31974cf1f949ae9b55b32038ffd26f34a60b4c291dca2661b1f155106180fd689b711e75ba9158dd6e5632380281e537b8812f958cd21a3a285f2d
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 Deepak Kumar
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
# Cdoc
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/cdoc`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'cdoc'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install cdoc
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
cd to your rails application and run
|
26
|
+
|
27
|
+
$ cdoc
|
28
|
+
$ open doc/index.html
|
29
|
+
|
30
|
+
## Development
|
31
|
+
|
32
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
33
|
+
|
34
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
35
|
+
|
36
|
+
## Contributing
|
37
|
+
|
38
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/cdoc. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
39
|
+
|
40
|
+
|
41
|
+
## License
|
42
|
+
|
43
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
44
|
+
|
data/Rakefile
ADDED
data/bin/cdoc
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "cdoc"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
data/cdoc.gemspec
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'cdoc/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "cdoc"
|
8
|
+
spec.version = Cdoc::VERSION
|
9
|
+
spec.authors = ["Deepak Kumar"]
|
10
|
+
spec.email = ["deepakkumarnd@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Generate single page api documentation for Rails application.}
|
13
|
+
spec.description = %q{Generate single page api documentation for Rails application.}
|
14
|
+
spec.homepage = ""
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
18
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
19
|
+
if spec.respond_to?(:metadata)
|
20
|
+
spec.metadata['allowed_push_host'] = "https://rubygems.org"
|
21
|
+
else
|
22
|
+
raise "RubyGems 2.0 or newer is required to protect against " \
|
23
|
+
"public gem pushes."
|
24
|
+
end
|
25
|
+
|
26
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
27
|
+
f.match(%r{^(test|spec|features)/})
|
28
|
+
end
|
29
|
+
spec.bindir = "bin"
|
30
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
31
|
+
spec.require_paths = ["lib"]
|
32
|
+
|
33
|
+
spec.add_development_dependency "bundler", "~> 1.13"
|
34
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
35
|
+
spec.add_development_dependency "minitest", "~> 5.0"
|
36
|
+
end
|
data/lib/cdoc.rb
ADDED
@@ -0,0 +1,187 @@
|
|
1
|
+
require 'cdoc/version'
|
2
|
+
require 'rake'
|
3
|
+
Bundler.require(:default)
|
4
|
+
|
5
|
+
module Cdoc
|
6
|
+
class DocRenderer < Redcarpet::Render::HTML
|
7
|
+
def block_code(code, lang='text')
|
8
|
+
lang = lang && lang.split.first || "text"
|
9
|
+
Pygments.highlight(code, lexer: lang)
|
10
|
+
# output = add_code_tags(
|
11
|
+
# Pygmentize.process(code, lang), lang
|
12
|
+
# )
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
class DocString
|
17
|
+
def initialize
|
18
|
+
@docstring = ''
|
19
|
+
end
|
20
|
+
|
21
|
+
def title(title)
|
22
|
+
@title = title
|
23
|
+
@docstring << "\n" + "# #{title}" + "\n"
|
24
|
+
end
|
25
|
+
|
26
|
+
def section(str)
|
27
|
+
@docstring << "\n" + "## #{str}" + "\n"
|
28
|
+
end
|
29
|
+
|
30
|
+
def subsection(str)
|
31
|
+
lines = str.split("\n")
|
32
|
+
index = 0
|
33
|
+
|
34
|
+
loop do
|
35
|
+
line = lines[index]
|
36
|
+
|
37
|
+
if line.nil?
|
38
|
+
break
|
39
|
+
elsif m = line.match(/@\w+/) # tag line if it start with @<tag>
|
40
|
+
block = tagged_line(line, m[0])
|
41
|
+
elsif line.start_with?(' ') # if the line start with 2 or more spaces
|
42
|
+
code_block = []
|
43
|
+
code_block << line.sub(' ', '')
|
44
|
+
|
45
|
+
loop do
|
46
|
+
line = lines[index + 1]
|
47
|
+
|
48
|
+
if line.nil? || !line.start_with?(' ')
|
49
|
+
code_str = code_block.join("\n")
|
50
|
+
# try to parse this as json
|
51
|
+
begin
|
52
|
+
json = JSON.parse(code_str)
|
53
|
+
code_str = JSON.pretty_generate(json)
|
54
|
+
block = ["\n", '```json', code_str, '```'].join("\n")
|
55
|
+
rescue JSON::ParserError => e
|
56
|
+
puts e.message
|
57
|
+
block = ["\n", '```', code_str, '```'].join("\n")
|
58
|
+
end
|
59
|
+
|
60
|
+
break
|
61
|
+
else
|
62
|
+
code_block << line.sub(' ', '')
|
63
|
+
index = index + 1
|
64
|
+
end
|
65
|
+
end
|
66
|
+
else
|
67
|
+
block = line
|
68
|
+
end
|
69
|
+
|
70
|
+
@docstring << block
|
71
|
+
index = index + 1
|
72
|
+
end
|
73
|
+
|
74
|
+
@docstring << "\n"
|
75
|
+
end
|
76
|
+
|
77
|
+
def tagged_line(line, tag)
|
78
|
+
t = line.sub(tag, '').strip
|
79
|
+
t_l = "\n" + tag.sub('@','').capitalize
|
80
|
+
|
81
|
+
if !t.empty?
|
82
|
+
t_l = t_l + " **#{t.strip}**\n\n"
|
83
|
+
end
|
84
|
+
|
85
|
+
t_l
|
86
|
+
end
|
87
|
+
|
88
|
+
def finish
|
89
|
+
FileUtils.mkdir_p('doc') unless Dir.exists?('doc')
|
90
|
+
render_as_markdown
|
91
|
+
render_as_html
|
92
|
+
end
|
93
|
+
|
94
|
+
def render_as_markdown
|
95
|
+
f = File.open('doc/index.md', 'w+')
|
96
|
+
f.write(@docstring)
|
97
|
+
f.close
|
98
|
+
end
|
99
|
+
|
100
|
+
def render_as_html
|
101
|
+
layout_file = File.join(File.dirname(__FILE__), 'layouts/default.html')
|
102
|
+
layout = File.read(layout_file)
|
103
|
+
f = File.open('doc/index.html', 'w+')
|
104
|
+
renderer = DocRenderer.new
|
105
|
+
markdown = Redcarpet::Markdown.new(renderer, fenced_code_blocks: true)
|
106
|
+
html = layout % { title: @title, content: markdown.render(@docstring)}
|
107
|
+
f.write(html)
|
108
|
+
f.close
|
109
|
+
|
110
|
+
unless Dir.exists?('doc/css')
|
111
|
+
puts File.join(File.dirname(__FILE__), 'styles')
|
112
|
+
FileUtils.cp_r(File.join(File.dirname(__FILE__), 'styles'), 'doc/css')
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
class CDoc
|
118
|
+
|
119
|
+
attr_accessor :files, :docstring
|
120
|
+
|
121
|
+
def initialize
|
122
|
+
@files = Rake::FileList.new('app/controllers/**/*.rb')
|
123
|
+
@files = @files.select { |file| file.end_with?('_controller.rb') }
|
124
|
+
@doc = DocString.new
|
125
|
+
end
|
126
|
+
|
127
|
+
def generate
|
128
|
+
@doc.title('Chillr API Documentaion')
|
129
|
+
|
130
|
+
@file_groups = files.group_by { |f| File.basename(f, '_controller.rb') }
|
131
|
+
|
132
|
+
@file_groups.each do |group, files|
|
133
|
+
@doc.section(group.capitalize)
|
134
|
+
files.each do |file|
|
135
|
+
docs = extract_documentation(file)
|
136
|
+
docs.each do |doc|
|
137
|
+
@doc.subsection(doc)
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
@doc.finish
|
143
|
+
end
|
144
|
+
|
145
|
+
def extract_documentation(file)
|
146
|
+
begin
|
147
|
+
lines = File.readlines(file)
|
148
|
+
rescue => e
|
149
|
+
puts "#{e.class}: Error reading file #{file}. Skip"
|
150
|
+
return
|
151
|
+
end
|
152
|
+
|
153
|
+
docs = []
|
154
|
+
doclines = []
|
155
|
+
recording = false
|
156
|
+
|
157
|
+
lines.each do |line|
|
158
|
+
if !recording && (line.strip == '#doc')
|
159
|
+
recording = true
|
160
|
+
next
|
161
|
+
end
|
162
|
+
|
163
|
+
if recording
|
164
|
+
line = line.strip
|
165
|
+
|
166
|
+
if line.empty?
|
167
|
+
next
|
168
|
+
elsif line.start_with?('#')
|
169
|
+
doclines << line.strip.sub('#', '')
|
170
|
+
else
|
171
|
+
recording = false
|
172
|
+
docs << doclines.join("\n")
|
173
|
+
doclines = []
|
174
|
+
end
|
175
|
+
end
|
176
|
+
end
|
177
|
+
|
178
|
+
if recording && (doclines.length != 0)
|
179
|
+
recording = false
|
180
|
+
docs << doclines.join("\n")
|
181
|
+
doclines = []
|
182
|
+
end
|
183
|
+
|
184
|
+
docs
|
185
|
+
end
|
186
|
+
end
|
187
|
+
end
|
File without changes
|
data/lib/cdoc/version.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
7
|
+
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
|
8
|
+
<title>%{title}</title>
|
9
|
+
|
10
|
+
<link href="css/markdown4.css" rel="stylesheet">
|
11
|
+
<link href="css/pygments_github.css" rel="stylesheet">
|
12
|
+
</head>
|
13
|
+
<body>
|
14
|
+
%{content}
|
15
|
+
</body>
|
16
|
+
</html>
|
@@ -0,0 +1,112 @@
|
|
1
|
+
@charset "utf-8";
|
2
|
+
|
3
|
+
/**
|
4
|
+
* markdown.css
|
5
|
+
*
|
6
|
+
* This program is free software: you can redistribute it and/or modify it under
|
7
|
+
* the terms of the GNU Lesser General Public License as published by the Free
|
8
|
+
* Software Foundation, either version 3 of the License, or (at your option) any
|
9
|
+
* later version.
|
10
|
+
*
|
11
|
+
* This program is distributed in the hope that it will be useful, but WITHOUT
|
12
|
+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
13
|
+
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
14
|
+
* details.
|
15
|
+
*
|
16
|
+
* You should have received a copy of the GNU Lesser General Public License
|
17
|
+
* along with this program. If not, see http://gnu.org/licenses/lgpl.txt.
|
18
|
+
*
|
19
|
+
* @project Weblog and Open Source Projects of Florian Wolters
|
20
|
+
* @version GIT: $Id$
|
21
|
+
* @package xhtml-css
|
22
|
+
* @author Florian Wolters <florian.wolters.85@googlemail.com>
|
23
|
+
* @copyright 2012 Florian Wolters
|
24
|
+
* @cssdoc version 1.0-pre
|
25
|
+
* @license http://gnu.org/licenses/lgpl.txt GNU Lesser General Public License
|
26
|
+
* @link http://github.com/FlorianWolters/jekyll-bootstrap-theme
|
27
|
+
* @media all
|
28
|
+
* @valid true
|
29
|
+
*/
|
30
|
+
|
31
|
+
body {
|
32
|
+
font-family: Helvetica, Arial, Freesans, clean, sans-serif;
|
33
|
+
padding:1em;
|
34
|
+
margin:auto;
|
35
|
+
max-width:42em;
|
36
|
+
background:#fefefe;
|
37
|
+
}
|
38
|
+
|
39
|
+
h1, h2, h3, h4, h5, h6 {
|
40
|
+
font-weight: bold;
|
41
|
+
}
|
42
|
+
|
43
|
+
h1 {
|
44
|
+
color: #000000;
|
45
|
+
font-size: 28px;
|
46
|
+
}
|
47
|
+
|
48
|
+
h2 {
|
49
|
+
border-bottom: 1px solid #CCCCCC;
|
50
|
+
color: #000000;
|
51
|
+
font-size: 24px;
|
52
|
+
}
|
53
|
+
|
54
|
+
h3 {
|
55
|
+
font-size: 18px;
|
56
|
+
}
|
57
|
+
|
58
|
+
h4 {
|
59
|
+
font-size: 16px;
|
60
|
+
}
|
61
|
+
|
62
|
+
h5 {
|
63
|
+
font-size: 14px;
|
64
|
+
}
|
65
|
+
|
66
|
+
h6 {
|
67
|
+
color: #777777;
|
68
|
+
background-color: inherit;
|
69
|
+
font-size: 14px;
|
70
|
+
}
|
71
|
+
|
72
|
+
hr {
|
73
|
+
height: 0.2em;
|
74
|
+
border: 0;
|
75
|
+
color: #CCCCCC;
|
76
|
+
background-color: #CCCCCC;
|
77
|
+
}
|
78
|
+
|
79
|
+
p, blockquote, ul, ol, dl, li, table, pre {
|
80
|
+
margin: 15px 0;
|
81
|
+
}
|
82
|
+
|
83
|
+
code, pre {
|
84
|
+
border-radius: 3px;
|
85
|
+
background-color: #F8F8F8;
|
86
|
+
color: inherit;
|
87
|
+
}
|
88
|
+
|
89
|
+
code {
|
90
|
+
border: 1px solid #EAEAEA;
|
91
|
+
margin: 0 2px;
|
92
|
+
padding: 0 5px;
|
93
|
+
}
|
94
|
+
|
95
|
+
pre {
|
96
|
+
border: 1px solid #CCCCCC;
|
97
|
+
line-height: 1.25em;
|
98
|
+
overflow: auto;
|
99
|
+
padding: 6px 10px;
|
100
|
+
}
|
101
|
+
|
102
|
+
pre > code {
|
103
|
+
border: 0;
|
104
|
+
margin: 0;
|
105
|
+
padding: 0;
|
106
|
+
}
|
107
|
+
|
108
|
+
a, a:visited {
|
109
|
+
color: #4183C4;
|
110
|
+
background-color: inherit;
|
111
|
+
text-decoration: none;
|
112
|
+
}
|
@@ -0,0 +1,61 @@
|
|
1
|
+
.highlight .hll { background-color: #ffffcc }
|
2
|
+
.highlight .c { color: #999988; font-style: italic } /* Comment */
|
3
|
+
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
|
4
|
+
.highlight .k { color: #000000; font-weight: bold } /* Keyword */
|
5
|
+
.highlight .o { color: #000000; font-weight: bold } /* Operator */
|
6
|
+
.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
|
7
|
+
.highlight .cp { color: #999999; font-weight: bold; font-style: italic } /* Comment.Preproc */
|
8
|
+
.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
|
9
|
+
.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
|
10
|
+
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
|
11
|
+
.highlight .ge { color: #000000; font-style: italic } /* Generic.Emph */
|
12
|
+
.highlight .gr { color: #aa0000 } /* Generic.Error */
|
13
|
+
.highlight .gh { color: #999999 } /* Generic.Heading */
|
14
|
+
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
|
15
|
+
.highlight .go { color: #888888 } /* Generic.Output */
|
16
|
+
.highlight .gp { color: #555555 } /* Generic.Prompt */
|
17
|
+
.highlight .gs { font-weight: bold } /* Generic.Strong */
|
18
|
+
.highlight .gu { color: #aaaaaa } /* Generic.Subheading */
|
19
|
+
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
|
20
|
+
.highlight .kc { color: #000000; font-weight: bold } /* Keyword.Constant */
|
21
|
+
.highlight .kd { color: #000000; font-weight: bold } /* Keyword.Declaration */
|
22
|
+
.highlight .kn { color: #000000; font-weight: bold } /* Keyword.Namespace */
|
23
|
+
.highlight .kp { color: #000000; font-weight: bold } /* Keyword.Pseudo */
|
24
|
+
.highlight .kr { color: #000000; font-weight: bold } /* Keyword.Reserved */
|
25
|
+
.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */
|
26
|
+
.highlight .m { color: #009999 } /* Literal.Number */
|
27
|
+
.highlight .s { color: #d01040 } /* Literal.String */
|
28
|
+
.highlight .na { color: #008080 } /* Name.Attribute */
|
29
|
+
.highlight .nb { color: #0086B3 } /* Name.Builtin */
|
30
|
+
.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */
|
31
|
+
.highlight .no { color: #008080 } /* Name.Constant */
|
32
|
+
.highlight .nd { color: #3c5d5d; font-weight: bold } /* Name.Decorator */
|
33
|
+
.highlight .ni { color: #800080 } /* Name.Entity */
|
34
|
+
.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */
|
35
|
+
.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */
|
36
|
+
.highlight .nl { color: #990000; font-weight: bold } /* Name.Label */
|
37
|
+
.highlight .nn { color: #555555 } /* Name.Namespace */
|
38
|
+
.highlight .nt { color: #000080 } /* Name.Tag */
|
39
|
+
.highlight .nv { color: #008080 } /* Name.Variable */
|
40
|
+
.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */
|
41
|
+
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
|
42
|
+
.highlight .mf { color: #009999 } /* Literal.Number.Float */
|
43
|
+
.highlight .mh { color: #009999 } /* Literal.Number.Hex */
|
44
|
+
.highlight .mi { color: #009999 } /* Literal.Number.Integer */
|
45
|
+
.highlight .mo { color: #009999 } /* Literal.Number.Oct */
|
46
|
+
.highlight .sb { color: #d01040 } /* Literal.String.Backtick */
|
47
|
+
.highlight .sc { color: #d01040 } /* Literal.String.Char */
|
48
|
+
.highlight .sd { color: #d01040 } /* Literal.String.Doc */
|
49
|
+
.highlight .s2 { color: #d01040 } /* Literal.String.Double */
|
50
|
+
.highlight .se { color: #d01040 } /* Literal.String.Escape */
|
51
|
+
.highlight .sh { color: #d01040 } /* Literal.String.Heredoc */
|
52
|
+
.highlight .si { color: #d01040 } /* Literal.String.Interpol */
|
53
|
+
.highlight .sx { color: #d01040 } /* Literal.String.Other */
|
54
|
+
.highlight .sr { color: #009926 } /* Literal.String.Regex */
|
55
|
+
.highlight .s1 { color: #d01040 } /* Literal.String.Single */
|
56
|
+
.highlight .ss { color: #990073 } /* Literal.String.Symbol */
|
57
|
+
.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */
|
58
|
+
.highlight .vc { color: #008080 } /* Name.Variable.Class */
|
59
|
+
.highlight .vg { color: #008080 } /* Name.Variable.Global */
|
60
|
+
.highlight .vi { color: #008080 } /* Name.Variable.Instance */
|
61
|
+
.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */
|
metadata
ADDED
@@ -0,0 +1,106 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cdoc
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Deepak Kumar
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-02-06 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.13'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.13'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: minitest
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '5.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '5.0'
|
55
|
+
description: Generate single page api documentation for Rails application.
|
56
|
+
email:
|
57
|
+
- deepakkumarnd@gmail.com
|
58
|
+
executables:
|
59
|
+
- cdoc
|
60
|
+
- console
|
61
|
+
- setup
|
62
|
+
extensions: []
|
63
|
+
extra_rdoc_files: []
|
64
|
+
files:
|
65
|
+
- ".gitignore"
|
66
|
+
- ".travis.yml"
|
67
|
+
- Gemfile
|
68
|
+
- LICENSE.txt
|
69
|
+
- README.md
|
70
|
+
- Rakefile
|
71
|
+
- bin/cdoc
|
72
|
+
- bin/console
|
73
|
+
- bin/setup
|
74
|
+
- cdoc.gemspec
|
75
|
+
- lib/cdoc.rb
|
76
|
+
- lib/cdoc/layout.html
|
77
|
+
- lib/cdoc/version.rb
|
78
|
+
- lib/layouts/default.html
|
79
|
+
- lib/styles/markdown4.css
|
80
|
+
- lib/styles/pygments_github.css
|
81
|
+
homepage: ''
|
82
|
+
licenses:
|
83
|
+
- MIT
|
84
|
+
metadata:
|
85
|
+
allowed_push_host: https://rubygems.org
|
86
|
+
post_install_message:
|
87
|
+
rdoc_options: []
|
88
|
+
require_paths:
|
89
|
+
- lib
|
90
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
91
|
+
requirements:
|
92
|
+
- - ">="
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: '0'
|
95
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
96
|
+
requirements:
|
97
|
+
- - ">="
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: '0'
|
100
|
+
requirements: []
|
101
|
+
rubyforge_project:
|
102
|
+
rubygems_version: 2.6.10
|
103
|
+
signing_key:
|
104
|
+
specification_version: 4
|
105
|
+
summary: Generate single page api documentation for Rails application.
|
106
|
+
test_files: []
|