uberdoc 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -0
- data/Gemfile.lock +2 -0
- data/README.md +24 -13
- data/VERSION +1 -1
- data/lib/uberdoc/options.rb +6 -0
- data/lib/uberdoc/tasks/doxygen_task.rb +17 -15
- data/lib/uberdoc/utils.rb +31 -10
- data/uberdoc.gemspec +5 -2
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8db80f0fb41de31a5ce0fbc61899c3ddef1b4827
|
4
|
+
data.tar.gz: 7fafea493c93c3b4b06f480a7da933b93a7dbf23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf3fa0676a41fec0460f666d6b6a6b2400fe342589a7db9779bf437a0b974f225c651dae5f0cbc57f407cb17516fd5178684ae74af1598540817fbf6ea6a8704
|
7
|
+
data.tar.gz: a27264fcb0cd0d9cfb8a69f8e35c04cf823f62759697ad9be8e0cae89bc7636cf8aa405e36379718a2f90d651ef0f9300805d55cc2bb0d7da9601836aec8c590
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -9,6 +9,7 @@ GEM
|
|
9
9
|
tzinfo (~> 1.1)
|
10
10
|
addressable (2.3.6)
|
11
11
|
builder (3.2.2)
|
12
|
+
colorize (0.7.5)
|
12
13
|
descendants_tracker (0.0.4)
|
13
14
|
thread_safe (~> 0.3, >= 0.3.1)
|
14
15
|
docile (1.1.5)
|
@@ -74,6 +75,7 @@ PLATFORMS
|
|
74
75
|
|
75
76
|
DEPENDENCIES
|
76
77
|
bundler (~> 1.0)
|
78
|
+
colorize
|
77
79
|
jeweler (~> 2.0.1)
|
78
80
|
rdoc (~> 3.12)
|
79
81
|
shoulda
|
data/README.md
CHANGED
@@ -3,16 +3,27 @@ UberDoc
|
|
3
3
|
|
4
4
|
A Documentation Generator
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
6
|
+
Installation
|
7
|
+
------------
|
8
|
+
|
9
|
+
* Initial Install: `gem install uberdoc`
|
10
|
+
* Update to latest: `gem update uberdoc`
|
11
|
+
|
12
|
+
Prepend `sudo` to each command if you are using the system Ruby on Mac.
|
13
|
+
|
14
|
+
Post Install
|
15
|
+
------------
|
16
|
+
|
17
|
+
Run `uberdoc --doctor` to run diagnostics for missing dependencies on your system
|
18
|
+
|
19
|
+
Help on Available Command
|
20
|
+
-------------------------
|
21
|
+
|
22
|
+
* `uberdoc -h`
|
23
|
+
|
24
|
+
Adding Custom Tasks
|
25
|
+
-------------------
|
26
|
+
|
27
|
+
* If your task needs custom switches and command line options, add the same to the options parser
|
28
|
+
* Create a new `UberDoc::Task` subclass in the `lib/tasks` folder and name it `<your_task_name>_task.rb`
|
29
|
+
* Your custom subclass will be automatically picked up and asked to perform its task on the appropriate switches
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.1
|
data/lib/uberdoc/options.rb
CHANGED
@@ -15,6 +15,7 @@ module UberDoc
|
|
15
15
|
options.verbose = false
|
16
16
|
options.generate = false
|
17
17
|
options.doctor = false
|
18
|
+
options.docset = false
|
18
19
|
|
19
20
|
parser = OptionParser.new do |opts|
|
20
21
|
|
@@ -42,6 +43,11 @@ module UberDoc
|
|
42
43
|
options.doctor = true
|
43
44
|
end
|
44
45
|
|
46
|
+
opts.on("--docset",
|
47
|
+
"Generate Docsets as well as HTML docs") do |docset|
|
48
|
+
options.docset = true
|
49
|
+
end
|
50
|
+
|
45
51
|
end # OptionParser
|
46
52
|
|
47
53
|
parser.parse!(args)
|
@@ -36,27 +36,29 @@ module UberDoc
|
|
36
36
|
|
37
37
|
File.open(composite_doxyfile_path, 'w') {|f| f.write(composite_doxyfile_contents) }
|
38
38
|
|
39
|
-
|
39
|
+
if @options.docset
|
40
|
+
puts "Generating docset for #{project_name}"
|
40
41
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
42
|
+
# Change into the directory and invoke doxygen
|
43
|
+
FileUtils.cd(project_dir) do
|
44
|
+
UberDoc::Util::execute_command("#{DOXYGEN_BIN} #{composite_doxyfile_path}", @options.verbose)
|
45
|
+
end
|
45
46
|
|
46
|
-
|
47
|
-
|
47
|
+
# Change into the HTML directory and make the docset
|
48
|
+
html_output_directory = File.join(absolute_out_dir, "html")
|
48
49
|
|
49
|
-
|
50
|
-
|
51
|
-
|
50
|
+
FileUtils.cd(html_output_directory) do
|
51
|
+
UberDoc::Util::execute_command("make", @options.verbose)
|
52
|
+
end
|
52
53
|
|
53
|
-
|
54
|
-
|
54
|
+
# Find the docset file in the directory and move it one level up
|
55
|
+
docset_directory = File.join(absolute_out_dir, "docset")
|
55
56
|
|
56
|
-
|
57
|
+
FileUtils.mkdir_p(docset_directory)
|
57
58
|
|
58
|
-
|
59
|
-
|
59
|
+
Dir["#{html_output_directory}/**/*.docset"].each do |docset|
|
60
|
+
FileUtils.mv(docset, docset_directory)
|
61
|
+
end
|
60
62
|
end
|
61
63
|
|
62
64
|
# Generate the docset again but this time with treeview
|
data/lib/uberdoc/utils.rb
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
require 'open3'
|
3
3
|
require 'fileutils'
|
4
4
|
require 'pp'
|
5
|
+
require 'colorize'
|
5
6
|
|
6
7
|
module UberDoc
|
7
8
|
module Util
|
@@ -13,20 +14,40 @@ module UberDoc
|
|
13
14
|
# Exectues the given command and optionally dumps the command and its output
|
14
15
|
#
|
15
16
|
def self.execute_command(command, verbose)
|
16
|
-
stdin, stdout, stderr, wait_thr = Open3.popen3(command)
|
17
|
-
|
18
|
-
res = stdout.read
|
19
17
|
|
20
18
|
if verbose
|
21
|
-
puts ">>>>>>>>>>>>>>>>>>>>>>>>>"
|
22
|
-
puts "Command '#{command}'"
|
23
|
-
puts res
|
24
|
-
puts "<<<<<<<<<<<<<<<<<<<<<<<<<"
|
19
|
+
puts ">>>>>>>>>>>>>>>>>>>>>>>>>".green
|
20
|
+
puts "Command '#{command}'".green
|
25
21
|
end
|
26
22
|
|
27
|
-
|
28
|
-
stdout
|
29
|
-
|
23
|
+
res = ""
|
24
|
+
Open3.popen3(command) do |stdin, stdout, stderr, thread|
|
25
|
+
|
26
|
+
{:out => stdout, :err => stderr}.each do |key, stream|
|
27
|
+
Thread.new do
|
28
|
+
until (line = stream.gets).nil? do
|
29
|
+
if key == :out
|
30
|
+
res += line
|
31
|
+
end
|
32
|
+
|
33
|
+
if verbose
|
34
|
+
case key
|
35
|
+
when :out
|
36
|
+
puts line
|
37
|
+
when :err
|
38
|
+
puts line.red
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
thread.join
|
46
|
+
end
|
47
|
+
|
48
|
+
if verbose
|
49
|
+
puts "<<<<<<<<<<<<<<<<<<<<<<<<<".green
|
50
|
+
end
|
30
51
|
|
31
52
|
return res
|
32
53
|
end
|
data/uberdoc.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: uberdoc 0.3.
|
5
|
+
# stub: uberdoc 0.3.1 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "uberdoc"
|
9
|
-
s.version = "0.3.
|
9
|
+
s.version = "0.3.1"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
@@ -50,12 +50,14 @@ Gem::Specification.new do |s|
|
|
50
50
|
s.specification_version = 4
|
51
51
|
|
52
52
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
53
|
+
s.add_runtime_dependency(%q<colorize>, [">= 0"])
|
53
54
|
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
54
55
|
s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
|
55
56
|
s.add_development_dependency(%q<bundler>, ["~> 1.0"])
|
56
57
|
s.add_development_dependency(%q<jeweler>, ["~> 2.0.1"])
|
57
58
|
s.add_development_dependency(%q<simplecov>, [">= 0"])
|
58
59
|
else
|
60
|
+
s.add_dependency(%q<colorize>, [">= 0"])
|
59
61
|
s.add_dependency(%q<shoulda>, [">= 0"])
|
60
62
|
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
61
63
|
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
@@ -63,6 +65,7 @@ Gem::Specification.new do |s|
|
|
63
65
|
s.add_dependency(%q<simplecov>, [">= 0"])
|
64
66
|
end
|
65
67
|
else
|
68
|
+
s.add_dependency(%q<colorize>, [">= 0"])
|
66
69
|
s.add_dependency(%q<shoulda>, [">= 0"])
|
67
70
|
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
68
71
|
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uberdoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chinmay Garde
|
@@ -10,6 +10,20 @@ bindir: bin
|
|
10
10
|
cert_chain: []
|
11
11
|
date: 2015-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: colorize
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: shoulda
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|