sdoc_all 1.0.7 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.tmignore +1 -0
- data/{LICENSE → LICENSE.txt} +1 -1
- data/README.markdown +206 -0
- data/Rakefile +26 -35
- data/VERSION +1 -1
- data/bin/sdoc-all +2 -0
- data/lib/sdoc_all.rb +14 -38
- data/lib/sdoc_all/base.rb +3 -3
- data/lib/sdoc_all/core_extensions.rb +31 -0
- data/lib/sdoc_all/generator/sdoc_all/templates/config.yml +1 -1
- data/lib/sdoc_all/parts/rails.rb +34 -23
- data/lib/tasks/sdoc_all_rake.rb +2 -2
- data/sdoc_all.gemspec +56 -60
- data/spec/spec_helper.rb +7 -10
- metadata +84 -31
- data/.gitignore +0 -5
- data/Manifest +0 -30
- data/README.rdoc +0 -160
- data/lib/shell_escape.rb +0 -64
data/.tmignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
/*.gemspec
|
data/{LICENSE → LICENSE.txt}
RENAMED
data/README.markdown
ADDED
@@ -0,0 +1,206 @@
|
|
1
|
+
# sdoc-all
|
2
|
+
Command line tool to get documentation for ruby, rails, gems, plugins and other ruby code in one place
|
3
|
+
|
4
|
+
## Warning
|
5
|
+
This gem is no longer maintained, try [doc gem](https://rubygems.org/gems/doc) — it is sdoc_all <del>with blackjack and hookers!</del> rewritten from scratch.
|
6
|
+
|
7
|
+
## Getting Started
|
8
|
+
|
9
|
+
gem install sdoc_all
|
10
|
+
sdoc-all <place for your documentation>; cd <place for your documentation>
|
11
|
+
<your favorite editor> config.yml
|
12
|
+
rake run
|
13
|
+
|
14
|
+
## config.yml
|
15
|
+
|
16
|
+
### example
|
17
|
+
|
18
|
+
---
|
19
|
+
min_update_interval: 1 hour
|
20
|
+
sdoc:
|
21
|
+
- ruby: 1.8.7
|
22
|
+
- rails
|
23
|
+
- gems:
|
24
|
+
exclude:
|
25
|
+
- mysql
|
26
|
+
- rails
|
27
|
+
- actionmailer
|
28
|
+
- actionpack
|
29
|
+
- activerecord
|
30
|
+
- activeresource
|
31
|
+
- activesupport
|
32
|
+
- plugins: ~/.plugins
|
33
|
+
- path: ~/some/path
|
34
|
+
|
35
|
+
### options
|
36
|
+
|
37
|
+
time to skip updates (for now ruby and plugins are updated)
|
38
|
+
days, hours, minutes, seconds accepted
|
39
|
+
|
40
|
+
min_update_interval: 1 hour
|
41
|
+
|
42
|
+
title of resulting page
|
43
|
+
|
44
|
+
title: "full reference"
|
45
|
+
|
46
|
+
list of things you want to document
|
47
|
+
carefully watch indent - 4 spaces for options
|
48
|
+
|
49
|
+
sdoc:
|
50
|
+
|
51
|
+
### ruby
|
52
|
+
|
53
|
+
ruby 1.8.6 source will be downloaded for you from ftp.ruby-lang.org and placed in folder sources
|
54
|
+
|
55
|
+
- ruby: 1.8.6
|
56
|
+
|
57
|
+
to auto detect ruby version pass `ruby binary` instead of version (this binary will be asked to execute `print "#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"`)
|
58
|
+
|
59
|
+
- ruby: `ruby`
|
60
|
+
or
|
61
|
+
|
62
|
+
- ruby: `/usr/bin/ruby`
|
63
|
+
|
64
|
+
or
|
65
|
+
|
66
|
+
- ruby: `/usr/bin/env ruby`
|
67
|
+
|
68
|
+
…
|
69
|
+
|
70
|
+
if you don't want updates use this
|
71
|
+
|
72
|
+
- ruby:
|
73
|
+
version: 1.8.6
|
74
|
+
update: false
|
75
|
+
|
76
|
+
also as ruby has no index page, you can create folder with index.html in it (also there can be stylesheets, images or whatever you want but they should be linked relatively; I choose http://www.zenspider.com/Languages/Ruby/QuickRef.html :) ) and put path to it in config like
|
77
|
+
|
78
|
+
- ruby:
|
79
|
+
version: 1.8.6
|
80
|
+
index: ruby_quick_ref
|
81
|
+
|
82
|
+
to build stdlib documentation for every group not fully present in ruby documentation (based on http://stdlib-doc.rubyforge.org)
|
83
|
+
|
84
|
+
- ruby:
|
85
|
+
version: 1.8.6
|
86
|
+
stdlib: true
|
87
|
+
|
88
|
+
to integrate stdlib to main ruby documentation use
|
89
|
+
|
90
|
+
- ruby:
|
91
|
+
version: 1.8.6
|
92
|
+
stdlib: integrate
|
93
|
+
|
94
|
+
### rails
|
95
|
+
|
96
|
+
choose rails version
|
97
|
+
|
98
|
+
- rails: 2.3.2
|
99
|
+
|
100
|
+
latest installed version will be used
|
101
|
+
|
102
|
+
- rails
|
103
|
+
|
104
|
+
### gems
|
105
|
+
|
106
|
+
document all gems
|
107
|
+
|
108
|
+
- gems
|
109
|
+
|
110
|
+
document nokogiri and hpricot gems
|
111
|
+
|
112
|
+
- gems: [nokogiri, hpricot]
|
113
|
+
|
114
|
+
document nokogiri gem (gem is just an alias to gems)
|
115
|
+
|
116
|
+
- gem: nokogiri
|
117
|
+
|
118
|
+
document all installed versions of nokogiri and hpricot gems (not latest)
|
119
|
+
|
120
|
+
- gems:
|
121
|
+
only: [nokogiri, hpricot]
|
122
|
+
versions: all
|
123
|
+
|
124
|
+
document all gems except mysql and gems related to rails
|
125
|
+
|
126
|
+
- gems:
|
127
|
+
exclude:
|
128
|
+
- mysql
|
129
|
+
- rails
|
130
|
+
- actionmailer
|
131
|
+
- actionpack
|
132
|
+
- activerecord
|
133
|
+
- activeresource
|
134
|
+
- activesupport
|
135
|
+
|
136
|
+
### plugins
|
137
|
+
|
138
|
+
document plugins in folder ~/.plugins (they will also be updated if they are under git)
|
139
|
+
|
140
|
+
- plugins: ~/.plugins
|
141
|
+
|
142
|
+
document plugins in folder sources/plugins
|
143
|
+
|
144
|
+
- plugins
|
145
|
+
|
146
|
+
document only dump plugin
|
147
|
+
|
148
|
+
- plugin:
|
149
|
+
path: ~/.plugins
|
150
|
+
only: dump
|
151
|
+
|
152
|
+
document dump, access and data_columns plugins
|
153
|
+
|
154
|
+
- plugins:
|
155
|
+
path: ~/.plugins
|
156
|
+
only: [dump, access, data_columns]
|
157
|
+
|
158
|
+
don't update plugins under git
|
159
|
+
|
160
|
+
- plugins:
|
161
|
+
path: ~/.plugins
|
162
|
+
update: false
|
163
|
+
|
164
|
+
document all plugins except acts_as_fu and acts_as_bar
|
165
|
+
|
166
|
+
- plugins:
|
167
|
+
path: ~/.plugins
|
168
|
+
exclude: [acts_as_fu, acts_as_bar]
|
169
|
+
|
170
|
+
### paths
|
171
|
+
|
172
|
+
document file or directory (you can create .document file in directory to tell rdoc what to document)
|
173
|
+
|
174
|
+
- path: ~/lib/bin
|
175
|
+
|
176
|
+
it can be a glob (each entry will be documented separately)
|
177
|
+
|
178
|
+
- paths: ~/lib/*
|
179
|
+
|
180
|
+
or array (note that name of documentation for each will be relative path from common ancestor)
|
181
|
+
|
182
|
+
- paths: [~/lib/*, ~/scripts/**, /test.rb, /rm-rf.rb]
|
183
|
+
|
184
|
+
if you want to specify more options (roots are not globed in this form)
|
185
|
+
|
186
|
+
- paths:
|
187
|
+
root: ~/lib/app
|
188
|
+
main: README
|
189
|
+
paths: [+*, +lib/*.rb, +tasks/*.rake, -*.sw*, -OLD_README]
|
190
|
+
|
191
|
+
or array form (mixed type)
|
192
|
+
|
193
|
+
- paths:
|
194
|
+
- root: ~/lib/app
|
195
|
+
main: SUPAREADME
|
196
|
+
paths: [+*, +lib/*.rb, +tasks/*.rake, -*.sw*, -OLD_README]
|
197
|
+
- ~/lib/app2
|
198
|
+
- root: ~/lib/app3
|
199
|
+
main: SUPAREADME
|
200
|
+
- root: ~/lib/app3
|
201
|
+
paths: *.rb
|
202
|
+
- ~/lib/old/app*
|
203
|
+
|
204
|
+
## Copyright
|
205
|
+
|
206
|
+
Copyright (c) 2010 Ivan Kuchin. See LICENSE.txt for details.
|
data/Rakefile
CHANGED
@@ -1,43 +1,34 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
require 'rake'
|
2
|
+
require 'jeweler'
|
3
|
+
require 'rake/gem_ghost_task'
|
4
|
+
require 'rspec/core/rake_task'
|
3
5
|
|
4
|
-
|
5
|
-
summary = 'Documentation for everything'
|
6
|
-
description = 'Command line tool to get documentation for ruby, rails, gems and plugins in one place'
|
6
|
+
name = 'sdoc_all'
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
j.add_dependency 'colored'
|
16
|
-
j.add_dependency 'progress', '>= 0.0.8'
|
17
|
-
j.add_dependency 'rake'
|
18
|
-
j.add_dependency 'rubigen'
|
19
|
-
j.add_dependency 'sdoc'
|
20
|
-
end
|
8
|
+
Jeweler::Tasks.new do |gem|
|
9
|
+
gem.name = name
|
10
|
+
gem.summary = %Q{Documentation for everything}
|
11
|
+
gem.description = %Q{Command line tool to get documentation for ruby, rails, gems and plugins in one place}
|
12
|
+
gem.homepage = "http://github.com/toy/#{name}"
|
13
|
+
gem.license = 'MIT'
|
14
|
+
gem.authors = ['Ivan Kuchin']
|
21
15
|
|
22
|
-
|
16
|
+
gem.add_runtime_dependency 'activesupport', '~> 2.3.0'
|
17
|
+
gem.add_runtime_dependency 'colored'
|
18
|
+
gem.add_runtime_dependency 'progress', '>= 0.0.8'
|
19
|
+
gem.add_runtime_dependency 'rake'
|
20
|
+
gem.add_runtime_dependency 'rubigen'
|
21
|
+
gem.add_runtime_dependency 'sdoc'
|
23
22
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
gem_path = Pathname(Gem.searcher.find(name).full_gem_path)
|
28
|
-
current_path = Pathname('.').expand_path
|
29
|
-
cmd = gem_path.writable? && gem_path.parent.writable? ? %w() : %w(sudo)
|
30
|
-
system(*cmd + %W[rm -r #{gem_path}])
|
31
|
-
system(*cmd + %W[ln -s #{current_path} #{gem_path}])
|
32
|
-
end
|
33
|
-
|
34
|
-
rescue LoadError
|
35
|
-
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
23
|
+
gem.add_development_dependency 'jeweler', '~> 1.5.1'
|
24
|
+
gem.add_development_dependency 'rake-gem-ghost'
|
25
|
+
gem.add_development_dependency 'rspec'
|
36
26
|
end
|
27
|
+
Jeweler::RubygemsDotOrgTasks.new
|
28
|
+
Rake::GemGhostTask.new
|
37
29
|
|
38
|
-
|
39
|
-
|
40
|
-
spec.
|
41
|
-
spec.spec_files = FileList['spec/**/*_spec.rb']
|
30
|
+
RSpec::Core::RakeTask.new(:spec) do |spec|
|
31
|
+
spec.rspec_opts = ['--colour --format progress']
|
32
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
42
33
|
end
|
43
34
|
task :default => :spec
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.3.1
|
data/bin/sdoc-all
CHANGED
data/lib/sdoc_all.rb
CHANGED
@@ -5,44 +5,15 @@ require 'fileutils'
|
|
5
5
|
require 'find'
|
6
6
|
require 'digest'
|
7
7
|
|
8
|
-
require 'rubygems'
|
9
|
-
require 'active_support'
|
10
8
|
require 'rake'
|
11
9
|
require 'progress'
|
12
10
|
require 'colored'
|
11
|
+
require 'activesupport'
|
13
12
|
|
14
13
|
__DIR__ = File.dirname(__FILE__)
|
15
14
|
$:.unshift(__DIR__) unless $:.include?(__DIR__) || $:.include?(File.expand_path(__DIR__))
|
16
15
|
|
17
|
-
|
18
|
-
def sort_by!(&block)
|
19
|
-
replace(sort_by(&block))
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
class Pathname
|
24
|
-
def write(s)
|
25
|
-
open('w') do |f|
|
26
|
-
f.write(s)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
def hidden?
|
30
|
-
basename.to_s =~ /^\./
|
31
|
-
end
|
32
|
-
def visible?
|
33
|
-
!hidden?
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
class String
|
38
|
-
def shrink(max_length)
|
39
|
-
if length > max_length
|
40
|
-
"#{self[0, max_length - 1]}…"
|
41
|
-
else
|
42
|
-
self
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
16
|
+
require 'sdoc_all/core_extensions'
|
46
17
|
|
47
18
|
class SdocAll
|
48
19
|
class << self
|
@@ -71,6 +42,14 @@ class SdocAll
|
|
71
42
|
end
|
72
43
|
|
73
44
|
def run(options = {})
|
45
|
+
message = 'WARNING: sdoc_all is no longer maintained, try doc gem'
|
46
|
+
$stderr.puts message
|
47
|
+
run!(options)
|
48
|
+
ensure
|
49
|
+
$stderr.puts message
|
50
|
+
end
|
51
|
+
|
52
|
+
def run!(options = {})
|
74
53
|
Base.dry_run! if options[:dry_run]
|
75
54
|
Base.verbose_level = options[:verbose_level]
|
76
55
|
Progress.lines = true if Base.verbose_level >= 1
|
@@ -83,10 +62,7 @@ class SdocAll
|
|
83
62
|
Base.remove_if_present(Base.docs_path)
|
84
63
|
else
|
85
64
|
Base.chdir(Base.docs_path) do
|
86
|
-
to_delete = Dir.glob('*')
|
87
|
-
tasks.each do |task|
|
88
|
-
to_delete -= task.occupied_doc_pathes
|
89
|
-
end
|
65
|
+
to_delete = Dir.glob('*') - tasks.map(&:occupied_doc_pathes).flatten
|
90
66
|
to_delete.each do |path|
|
91
67
|
Base.remove_if_present(path)
|
92
68
|
end
|
@@ -127,7 +103,7 @@ class SdocAll
|
|
127
103
|
Base.system(*cmd + paths)
|
128
104
|
|
129
105
|
if Base.public_path.directory?
|
130
|
-
|
106
|
+
(Base.public_path + 'docs').make_symlink(Base.docs_path.relative_path_from(Base.public_path))
|
131
107
|
config_hash_path.open('w') do |f|
|
132
108
|
f.write(config_hash)
|
133
109
|
end
|
@@ -148,9 +124,9 @@ class SdocAll
|
|
148
124
|
config = YAML.load_file('config.yml').symbolize_keys rescue {}
|
149
125
|
|
150
126
|
min_update_interval = if config[:min_update_interval].to_s[/(\d+)\s*(.*)/]
|
151
|
-
$1.to_i.send({'d' => :days, 'h' => :hours, 'm' => :minutes}[$2[0, 1].downcase] || :
|
127
|
+
$1.to_i.send({'m' => :months, 'w' => :weeks, 'd' => :days, 'h' => :hours, 'm' => :minutes}[$2[0, 1].downcase] || :days)
|
152
128
|
else
|
153
|
-
1.
|
129
|
+
1.week
|
154
130
|
end
|
155
131
|
|
156
132
|
created = last_build_sdoc_version_path.mtime rescue nil
|
data/lib/sdoc_all/base.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'shellwords'
|
2
2
|
|
3
3
|
class SdocAll
|
4
4
|
class Base
|
@@ -131,7 +131,7 @@ class SdocAll
|
|
131
131
|
|
132
132
|
def system(*args)
|
133
133
|
args = args.map(&:to_s)
|
134
|
-
command = args.length == 1 ? args.first :
|
134
|
+
command = args.length == 1 ? args.first : args.shelljoin
|
135
135
|
if verbose_level >= 1
|
136
136
|
puts [dirs.last && "cd #{dirs.last}", command].compact.join('; ').shrink(250).blue
|
137
137
|
end
|
@@ -170,7 +170,7 @@ class SdocAll
|
|
170
170
|
def remove_if_present(path)
|
171
171
|
path = Pathname(path)
|
172
172
|
if path.exist?
|
173
|
-
puts "rm -r #{
|
173
|
+
puts "rm -r #{path.to_s.shellescape}".magenta
|
174
174
|
FileUtils.remove_entry(path) unless dry_run?
|
175
175
|
end
|
176
176
|
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
class Array
|
2
|
+
def sort_by!(&block)
|
3
|
+
replace(sort_by(&block))
|
4
|
+
end
|
5
|
+
end
|
6
|
+
|
7
|
+
class Pathname
|
8
|
+
def write(s)
|
9
|
+
open('w') do |f|
|
10
|
+
f.write(s)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def hidden?
|
15
|
+
basename.to_s =~ /^\./
|
16
|
+
end
|
17
|
+
|
18
|
+
def visible?
|
19
|
+
!hidden?
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
class String
|
24
|
+
def shrink(max_length)
|
25
|
+
if length > max_length
|
26
|
+
"#{self[0, max_length - 1]}…"
|
27
|
+
else
|
28
|
+
self
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
data/lib/sdoc_all/parts/rails.rb
CHANGED
@@ -5,7 +5,7 @@ class SdocAll
|
|
5
5
|
raw_config = {:version => raw_config} unless raw_config.is_a?(Hash)
|
6
6
|
|
7
7
|
if raw_config[:version]
|
8
|
-
|
8
|
+
if self.class.versions(raw_config[:version]).empty?
|
9
9
|
raise ConfigError.new("you don't have rails #{raw_config[:version]} installed")
|
10
10
|
end
|
11
11
|
else
|
@@ -15,7 +15,7 @@ class SdocAll
|
|
15
15
|
end
|
16
16
|
|
17
17
|
@config = {
|
18
|
-
:version => raw_config.delete(:version)
|
18
|
+
:version => self.class.versions(raw_config.delete(:version)).last,
|
19
19
|
}
|
20
20
|
|
21
21
|
raise_unknown_options_if_not_blank!(raw_config)
|
@@ -23,46 +23,57 @@ class SdocAll
|
|
23
23
|
|
24
24
|
def add_tasks(options = {})
|
25
25
|
version = config[:version]
|
26
|
-
path = sources_path + version
|
26
|
+
path = sources_path + "r#{version}"
|
27
27
|
|
28
28
|
unless path.directory?
|
29
29
|
Base.remove_if_present(path)
|
30
30
|
sources_path
|
31
|
-
Base.with_env 'VERSION', version do
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
paths = FileList.new
|
38
|
-
Base.chdir(path) do
|
39
|
-
File.open('vendor/rails/railties/lib/tasks/documentation.rake') do |f|
|
40
|
-
true until f.readline['Rake::RDocTask.new("rails")']
|
41
|
-
until (line = f.readline.strip) == '}'
|
42
|
-
if line['rdoc.rdoc_files.include']
|
43
|
-
paths.include(line[/'(.*)'/, 1])
|
44
|
-
elsif line['rdoc.rdoc_files.exclude']
|
45
|
-
paths.exclude(line[/'(.*)'/, 1])
|
31
|
+
Base.with_env 'VERSION', version.to_s do
|
32
|
+
if version.to_s[/\d+/].to_i < 3
|
33
|
+
Base.system('rails', "_#{version}_", path)
|
34
|
+
Base.chdir(path) do
|
35
|
+
Base.system('rake', 'rails:freeze:gems')
|
46
36
|
end
|
37
|
+
else
|
38
|
+
Base.system('rails', "_#{version}_", 'new', path)
|
47
39
|
end
|
48
40
|
end
|
49
|
-
paths.resolve
|
50
41
|
end
|
42
|
+
self.class.used_sources << path
|
43
|
+
|
51
44
|
Base.add_task(
|
52
45
|
:src_path => path,
|
53
46
|
:doc_path => "rails-#{version}",
|
54
|
-
:paths =>
|
47
|
+
:paths => get_paths(path),
|
55
48
|
:title => "rails-#{version}"
|
56
49
|
)
|
57
50
|
end
|
58
51
|
|
52
|
+
def get_paths(app_dir)
|
53
|
+
code = %{
|
54
|
+
require 'rubygems'
|
55
|
+
require 'rake'
|
56
|
+
require 'rake/rdoctask'
|
57
|
+
|
58
|
+
Rake::RDocTask.class_eval{ def define; puts rdoc_files if name == 'rails'; end }
|
59
|
+
|
60
|
+
class RDocTaskWithoutDescriptions < Rake::RDocTask
|
61
|
+
def initialize(name = :rdoc); super; puts rdoc_files if name == 'rails'; end
|
62
|
+
end
|
63
|
+
|
64
|
+
Dir.chdir(ARGV.first){ load('Rakefile') }
|
65
|
+
}.strip.gsub(/\s*\n\s*/m, '; ')
|
66
|
+
args = 'ruby', '-e', code, app_dir.to_s
|
67
|
+
IO.popen(args.shelljoin, &:readlines).map(&:strip)
|
68
|
+
end
|
69
|
+
|
59
70
|
class << self
|
60
|
-
def versions
|
71
|
+
def versions(version_string = nil)
|
61
72
|
[].tap do |versions|
|
62
|
-
Gem.source_index.search(Gem::Dependency.new('rails')).each do |spec|
|
73
|
+
Gem.source_index.search(Gem::Dependency.new('rails', version_string)).each do |spec|
|
63
74
|
versions << spec.version
|
64
75
|
end
|
65
|
-
end.sort
|
76
|
+
end.sort
|
66
77
|
end
|
67
78
|
end
|
68
79
|
end
|
data/lib/tasks/sdoc_all_rake.rb
CHANGED
@@ -3,7 +3,7 @@ require 'sdoc_all'
|
|
3
3
|
task :default => :run
|
4
4
|
|
5
5
|
def run_options
|
6
|
-
dry_run = ENV['DRY_RUN']
|
6
|
+
dry_run = ENV['DRY_RUN'] && %w[1 t T].include?(ENV['DRY_RUN'][0, 1])
|
7
7
|
verbose_level = ENV['VERBOSE_LEVEL'].to_i
|
8
8
|
{
|
9
9
|
:dry_run => dry_run,
|
@@ -11,7 +11,7 @@ def run_options
|
|
11
11
|
}
|
12
12
|
end
|
13
13
|
|
14
|
-
desc "Build/update documentation (DRY_RUN=true to skip execution of commands (sets VERBOSE_LEVEL to
|
14
|
+
desc "Build/update documentation (DRY_RUN=true to skip execution of commands (sets VERBOSE_LEVEL to 2), VERBOSE_LEVEL: 0 (default) - only progress and explanations, 1 - output commands to be executed, 2 - output result of command execution)"
|
15
15
|
task :run do
|
16
16
|
SdocAll.run(run_options)
|
17
17
|
end
|
data/sdoc_all.gemspec
CHANGED
@@ -1,99 +1,95 @@
|
|
1
1
|
# Generated by jeweler
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
8
|
-
s.version = "1.
|
7
|
+
s.name = "sdoc_all"
|
8
|
+
s.version = "1.3.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = ["
|
12
|
-
s.date =
|
13
|
-
s.
|
14
|
-
s.description = %q{Command line tool to get documentation for ruby, rails, gems and plugins in one place}
|
11
|
+
s.authors = ["Ivan Kuchin"]
|
12
|
+
s.date = "2011-10-23"
|
13
|
+
s.description = "Command line tool to get documentation for ruby, rails, gems and plugins in one place"
|
15
14
|
s.executables = ["sdoc-all"]
|
16
15
|
s.extra_rdoc_files = [
|
17
|
-
"LICENSE",
|
18
|
-
|
16
|
+
"LICENSE.txt",
|
17
|
+
"README.markdown"
|
19
18
|
]
|
20
19
|
s.files = [
|
21
20
|
".autotest",
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
"sdoc_all.gemspec",
|
45
|
-
"spec/sdoc_all/file_list_spec.rb",
|
46
|
-
"spec/sdoc_all/gems_spec.rb",
|
47
|
-
"spec/sdoc_all/paths_spec.rb",
|
48
|
-
"spec/sdoc_all/plugins_spec.rb",
|
49
|
-
"spec/sdoc_all/rails_spec.rb",
|
50
|
-
"spec/sdoc_all/ruby_spec.rb",
|
51
|
-
"spec/sdoc_all_spec.rb",
|
52
|
-
"spec/spec.opts",
|
53
|
-
"spec/spec_helper.rb"
|
54
|
-
]
|
55
|
-
s.homepage = %q{http://github.com/toy/sdoc_all}
|
56
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
57
|
-
s.require_paths = ["lib"]
|
58
|
-
s.rubygems_version = %q{1.3.6}
|
59
|
-
s.summary = %q{Documentation for everything}
|
60
|
-
s.test_files = [
|
21
|
+
".tmignore",
|
22
|
+
"LICENSE.txt",
|
23
|
+
"README.markdown",
|
24
|
+
"Rakefile",
|
25
|
+
"VERSION",
|
26
|
+
"bin/sdoc-all",
|
27
|
+
"lib/sdoc_all.rb",
|
28
|
+
"lib/sdoc_all/base.rb",
|
29
|
+
"lib/sdoc_all/config_error.rb",
|
30
|
+
"lib/sdoc_all/core_extensions.rb",
|
31
|
+
"lib/sdoc_all/file_list.rb",
|
32
|
+
"lib/sdoc_all/generator/sdoc_all/sdoc_all_generator.rb",
|
33
|
+
"lib/sdoc_all/generator/sdoc_all/templates/Rakefile",
|
34
|
+
"lib/sdoc_all/generator/sdoc_all/templates/config.yml",
|
35
|
+
"lib/sdoc_all/parts/gems.rb",
|
36
|
+
"lib/sdoc_all/parts/paths.rb",
|
37
|
+
"lib/sdoc_all/parts/plugins.rb",
|
38
|
+
"lib/sdoc_all/parts/rails.rb",
|
39
|
+
"lib/sdoc_all/parts/ruby.rb",
|
40
|
+
"lib/sdoc_all/task.rb",
|
41
|
+
"lib/tasks/sdoc_all_rake.rb",
|
42
|
+
"sdoc_all.gemspec",
|
61
43
|
"spec/sdoc_all/file_list_spec.rb",
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
44
|
+
"spec/sdoc_all/gems_spec.rb",
|
45
|
+
"spec/sdoc_all/paths_spec.rb",
|
46
|
+
"spec/sdoc_all/plugins_spec.rb",
|
47
|
+
"spec/sdoc_all/rails_spec.rb",
|
48
|
+
"spec/sdoc_all/ruby_spec.rb",
|
49
|
+
"spec/sdoc_all_spec.rb",
|
50
|
+
"spec/spec.opts",
|
51
|
+
"spec/spec_helper.rb"
|
69
52
|
]
|
53
|
+
s.homepage = "http://github.com/toy/sdoc_all"
|
54
|
+
s.licenses = ["MIT"]
|
55
|
+
s.require_paths = ["lib"]
|
56
|
+
s.rubygems_version = "1.8.11"
|
57
|
+
s.summary = "Documentation for everything"
|
70
58
|
|
71
59
|
if s.respond_to? :specification_version then
|
72
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
73
60
|
s.specification_version = 3
|
74
61
|
|
75
|
-
if Gem::Version.new(Gem::
|
76
|
-
s.add_runtime_dependency(%q<activesupport>, ["
|
62
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
63
|
+
s.add_runtime_dependency(%q<activesupport>, ["~> 2.3.0"])
|
77
64
|
s.add_runtime_dependency(%q<colored>, [">= 0"])
|
78
65
|
s.add_runtime_dependency(%q<progress>, [">= 0.0.8"])
|
79
66
|
s.add_runtime_dependency(%q<rake>, [">= 0"])
|
80
67
|
s.add_runtime_dependency(%q<rubigen>, [">= 0"])
|
81
68
|
s.add_runtime_dependency(%q<sdoc>, [">= 0"])
|
69
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.5.1"])
|
70
|
+
s.add_development_dependency(%q<rake-gem-ghost>, [">= 0"])
|
71
|
+
s.add_development_dependency(%q<rspec>, [">= 0"])
|
82
72
|
else
|
83
|
-
s.add_dependency(%q<activesupport>, ["
|
73
|
+
s.add_dependency(%q<activesupport>, ["~> 2.3.0"])
|
84
74
|
s.add_dependency(%q<colored>, [">= 0"])
|
85
75
|
s.add_dependency(%q<progress>, [">= 0.0.8"])
|
86
76
|
s.add_dependency(%q<rake>, [">= 0"])
|
87
77
|
s.add_dependency(%q<rubigen>, [">= 0"])
|
88
78
|
s.add_dependency(%q<sdoc>, [">= 0"])
|
79
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.1"])
|
80
|
+
s.add_dependency(%q<rake-gem-ghost>, [">= 0"])
|
81
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
89
82
|
end
|
90
83
|
else
|
91
|
-
s.add_dependency(%q<activesupport>, ["
|
84
|
+
s.add_dependency(%q<activesupport>, ["~> 2.3.0"])
|
92
85
|
s.add_dependency(%q<colored>, [">= 0"])
|
93
86
|
s.add_dependency(%q<progress>, [">= 0.0.8"])
|
94
87
|
s.add_dependency(%q<rake>, [">= 0"])
|
95
88
|
s.add_dependency(%q<rubigen>, [">= 0"])
|
96
89
|
s.add_dependency(%q<sdoc>, [">= 0"])
|
90
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.1"])
|
91
|
+
s.add_dependency(%q<rake-gem-ghost>, [">= 0"])
|
92
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
97
93
|
end
|
98
94
|
end
|
99
95
|
|
data/spec/spec_helper.rb
CHANGED
@@ -1,17 +1,14 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
require 'spec'
|
4
|
-
require 'stringio'
|
5
|
-
|
6
|
-
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
7
|
-
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
1
|
+
$:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
|
2
|
+
require 'rspec'
|
8
3
|
require 'sdoc_all'
|
9
4
|
|
10
|
-
|
11
|
-
|
5
|
+
require 'stringio'
|
6
|
+
|
7
|
+
RSpec.configure do |config|
|
8
|
+
config.before do
|
12
9
|
SdocAll::Base.stub!(:system)
|
13
10
|
SdocAll::Base.stub!(:remove_if_present)
|
14
|
-
class <<Dir
|
11
|
+
class << Dir
|
15
12
|
alias original_chdir chdir
|
16
13
|
end
|
17
14
|
Dir.stub!(:chdir).and_yield
|
metadata
CHANGED
@@ -1,41 +1,47 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sdoc_all
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 25
|
5
|
+
prerelease:
|
5
6
|
segments:
|
6
7
|
- 1
|
7
|
-
-
|
8
|
-
-
|
9
|
-
version: 1.
|
8
|
+
- 3
|
9
|
+
- 1
|
10
|
+
version: 1.3.1
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
|
-
-
|
13
|
+
- Ivan Kuchin
|
13
14
|
autorequire:
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date:
|
18
|
-
default_executable: sdoc-all
|
18
|
+
date: 2011-10-23 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: activesupport
|
22
22
|
prerelease: false
|
23
23
|
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
24
25
|
requirements:
|
25
|
-
- -
|
26
|
+
- - ~>
|
26
27
|
- !ruby/object:Gem::Version
|
28
|
+
hash: 3
|
27
29
|
segments:
|
30
|
+
- 2
|
31
|
+
- 3
|
28
32
|
- 0
|
29
|
-
version:
|
33
|
+
version: 2.3.0
|
30
34
|
type: :runtime
|
31
35
|
version_requirements: *id001
|
32
36
|
- !ruby/object:Gem::Dependency
|
33
37
|
name: colored
|
34
38
|
prerelease: false
|
35
39
|
requirement: &id002 !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
36
41
|
requirements:
|
37
42
|
- - ">="
|
38
43
|
- !ruby/object:Gem::Version
|
44
|
+
hash: 3
|
39
45
|
segments:
|
40
46
|
- 0
|
41
47
|
version: "0"
|
@@ -45,9 +51,11 @@ dependencies:
|
|
45
51
|
name: progress
|
46
52
|
prerelease: false
|
47
53
|
requirement: &id003 !ruby/object:Gem::Requirement
|
54
|
+
none: false
|
48
55
|
requirements:
|
49
56
|
- - ">="
|
50
57
|
- !ruby/object:Gem::Version
|
58
|
+
hash: 15
|
51
59
|
segments:
|
52
60
|
- 0
|
53
61
|
- 0
|
@@ -59,9 +67,11 @@ dependencies:
|
|
59
67
|
name: rake
|
60
68
|
prerelease: false
|
61
69
|
requirement: &id004 !ruby/object:Gem::Requirement
|
70
|
+
none: false
|
62
71
|
requirements:
|
63
72
|
- - ">="
|
64
73
|
- !ruby/object:Gem::Version
|
74
|
+
hash: 3
|
65
75
|
segments:
|
66
76
|
- 0
|
67
77
|
version: "0"
|
@@ -71,9 +81,11 @@ dependencies:
|
|
71
81
|
name: rubigen
|
72
82
|
prerelease: false
|
73
83
|
requirement: &id005 !ruby/object:Gem::Requirement
|
84
|
+
none: false
|
74
85
|
requirements:
|
75
86
|
- - ">="
|
76
87
|
- !ruby/object:Gem::Version
|
88
|
+
hash: 3
|
77
89
|
segments:
|
78
90
|
- 0
|
79
91
|
version: "0"
|
@@ -83,14 +95,60 @@ dependencies:
|
|
83
95
|
name: sdoc
|
84
96
|
prerelease: false
|
85
97
|
requirement: &id006 !ruby/object:Gem::Requirement
|
98
|
+
none: false
|
86
99
|
requirements:
|
87
100
|
- - ">="
|
88
101
|
- !ruby/object:Gem::Version
|
102
|
+
hash: 3
|
89
103
|
segments:
|
90
104
|
- 0
|
91
105
|
version: "0"
|
92
106
|
type: :runtime
|
93
107
|
version_requirements: *id006
|
108
|
+
- !ruby/object:Gem::Dependency
|
109
|
+
name: jeweler
|
110
|
+
prerelease: false
|
111
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
112
|
+
none: false
|
113
|
+
requirements:
|
114
|
+
- - ~>
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
hash: 1
|
117
|
+
segments:
|
118
|
+
- 1
|
119
|
+
- 5
|
120
|
+
- 1
|
121
|
+
version: 1.5.1
|
122
|
+
type: :development
|
123
|
+
version_requirements: *id007
|
124
|
+
- !ruby/object:Gem::Dependency
|
125
|
+
name: rake-gem-ghost
|
126
|
+
prerelease: false
|
127
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
128
|
+
none: false
|
129
|
+
requirements:
|
130
|
+
- - ">="
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
hash: 3
|
133
|
+
segments:
|
134
|
+
- 0
|
135
|
+
version: "0"
|
136
|
+
type: :development
|
137
|
+
version_requirements: *id008
|
138
|
+
- !ruby/object:Gem::Dependency
|
139
|
+
name: rspec
|
140
|
+
prerelease: false
|
141
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
142
|
+
none: false
|
143
|
+
requirements:
|
144
|
+
- - ">="
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
hash: 3
|
147
|
+
segments:
|
148
|
+
- 0
|
149
|
+
version: "0"
|
150
|
+
type: :development
|
151
|
+
version_requirements: *id009
|
94
152
|
description: Command line tool to get documentation for ruby, rails, gems and plugins in one place
|
95
153
|
email:
|
96
154
|
executables:
|
@@ -98,20 +156,20 @@ executables:
|
|
98
156
|
extensions: []
|
99
157
|
|
100
158
|
extra_rdoc_files:
|
101
|
-
- LICENSE
|
102
|
-
- README.
|
159
|
+
- LICENSE.txt
|
160
|
+
- README.markdown
|
103
161
|
files:
|
104
162
|
- .autotest
|
105
|
-
- .
|
106
|
-
- LICENSE
|
107
|
-
-
|
108
|
-
- README.rdoc
|
163
|
+
- .tmignore
|
164
|
+
- LICENSE.txt
|
165
|
+
- README.markdown
|
109
166
|
- Rakefile
|
110
167
|
- VERSION
|
111
168
|
- bin/sdoc-all
|
112
169
|
- lib/sdoc_all.rb
|
113
170
|
- lib/sdoc_all/base.rb
|
114
171
|
- lib/sdoc_all/config_error.rb
|
172
|
+
- lib/sdoc_all/core_extensions.rb
|
115
173
|
- lib/sdoc_all/file_list.rb
|
116
174
|
- lib/sdoc_all/generator/sdoc_all/sdoc_all_generator.rb
|
117
175
|
- lib/sdoc_all/generator/sdoc_all/templates/Rakefile
|
@@ -122,7 +180,6 @@ files:
|
|
122
180
|
- lib/sdoc_all/parts/rails.rb
|
123
181
|
- lib/sdoc_all/parts/ruby.rb
|
124
182
|
- lib/sdoc_all/task.rb
|
125
|
-
- lib/shell_escape.rb
|
126
183
|
- lib/tasks/sdoc_all_rake.rb
|
127
184
|
- sdoc_all.gemspec
|
128
185
|
- spec/sdoc_all/file_list_spec.rb
|
@@ -134,42 +191,38 @@ files:
|
|
134
191
|
- spec/sdoc_all_spec.rb
|
135
192
|
- spec/spec.opts
|
136
193
|
- spec/spec_helper.rb
|
137
|
-
has_rdoc: true
|
138
194
|
homepage: http://github.com/toy/sdoc_all
|
139
|
-
licenses:
|
140
|
-
|
195
|
+
licenses:
|
196
|
+
- MIT
|
141
197
|
post_install_message:
|
142
|
-
rdoc_options:
|
143
|
-
|
198
|
+
rdoc_options: []
|
199
|
+
|
144
200
|
require_paths:
|
145
201
|
- lib
|
146
202
|
required_ruby_version: !ruby/object:Gem::Requirement
|
203
|
+
none: false
|
147
204
|
requirements:
|
148
205
|
- - ">="
|
149
206
|
- !ruby/object:Gem::Version
|
207
|
+
hash: 3
|
150
208
|
segments:
|
151
209
|
- 0
|
152
210
|
version: "0"
|
153
211
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
212
|
+
none: false
|
154
213
|
requirements:
|
155
214
|
- - ">="
|
156
215
|
- !ruby/object:Gem::Version
|
216
|
+
hash: 3
|
157
217
|
segments:
|
158
218
|
- 0
|
159
219
|
version: "0"
|
160
220
|
requirements: []
|
161
221
|
|
162
222
|
rubyforge_project:
|
163
|
-
rubygems_version: 1.
|
223
|
+
rubygems_version: 1.8.11
|
164
224
|
signing_key:
|
165
225
|
specification_version: 3
|
166
226
|
summary: Documentation for everything
|
167
|
-
test_files:
|
168
|
-
|
169
|
-
- spec/sdoc_all/gems_spec.rb
|
170
|
-
- spec/sdoc_all/paths_spec.rb
|
171
|
-
- spec/sdoc_all/plugins_spec.rb
|
172
|
-
- spec/sdoc_all/rails_spec.rb
|
173
|
-
- spec/sdoc_all/ruby_spec.rb
|
174
|
-
- spec/sdoc_all_spec.rb
|
175
|
-
- spec/spec_helper.rb
|
227
|
+
test_files: []
|
228
|
+
|
data/Manifest
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
LICENSE
|
2
|
-
Manifest
|
3
|
-
README.rdoc
|
4
|
-
Rakefile
|
5
|
-
VERSION.yml
|
6
|
-
bin/sdoc-all
|
7
|
-
lib/sdoc_all.rb
|
8
|
-
lib/sdoc_all/base.rb
|
9
|
-
lib/sdoc_all/config_error.rb
|
10
|
-
lib/sdoc_all/file_list.rb
|
11
|
-
lib/sdoc_all/generator/sdoc_all/sdoc_all_generator.rb
|
12
|
-
lib/sdoc_all/generator/sdoc_all/templates/Rakefile
|
13
|
-
lib/sdoc_all/generator/sdoc_all/templates/config.yml
|
14
|
-
lib/sdoc_all/parts/gems.rb
|
15
|
-
lib/sdoc_all/parts/paths.rb
|
16
|
-
lib/sdoc_all/parts/plugins.rb
|
17
|
-
lib/sdoc_all/parts/rails.rb
|
18
|
-
lib/sdoc_all/parts/ruby.rb
|
19
|
-
lib/sdoc_all/task.rb
|
20
|
-
lib/shell_escape.rb
|
21
|
-
lib/tasks/sdoc_all_rake.rb
|
22
|
-
spec/sdoc_all/file_list_spec.rb
|
23
|
-
spec/sdoc_all/gems_spec.rb
|
24
|
-
spec/sdoc_all/paths_spec.rb
|
25
|
-
spec/sdoc_all/plugins_spec.rb
|
26
|
-
spec/sdoc_all/rails_spec.rb
|
27
|
-
spec/sdoc_all/ruby_spec.rb
|
28
|
-
spec/sdoc_all_spec.rb
|
29
|
-
spec/spec.opts
|
30
|
-
spec/spec_helper.rb
|
data/README.rdoc
DELETED
@@ -1,160 +0,0 @@
|
|
1
|
-
= sdoc-all
|
2
|
-
Command line tool to get documentation for ruby, rails, gems, plugins and other ruby code in one place
|
3
|
-
|
4
|
-
== Getting Started
|
5
|
-
sudo gem install voloko-sdoc sdoc_all
|
6
|
-
sdoc-all <place for your documentation>; cd <place for your documentation>
|
7
|
-
<your favorite editor> config.yml
|
8
|
-
rake run
|
9
|
-
|
10
|
-
== config.yml
|
11
|
-
|
12
|
-
=== example
|
13
|
-
---
|
14
|
-
min_update_interval: 1 hour
|
15
|
-
sdoc:
|
16
|
-
- ruby: 1.8.7
|
17
|
-
- rails
|
18
|
-
- gems:
|
19
|
-
exclude:
|
20
|
-
- mysql
|
21
|
-
- rails
|
22
|
-
- actionmailer
|
23
|
-
- actionpack
|
24
|
-
- activerecord
|
25
|
-
- activeresource
|
26
|
-
- activesupport
|
27
|
-
- plugins: ~/.plugins
|
28
|
-
- path: ~/some/path
|
29
|
-
|
30
|
-
=== options
|
31
|
-
time to skip updates (for now ruby and plugins are updated)
|
32
|
-
days, hours, minutes, seconds accepted
|
33
|
-
min_update_interval: 1 hour
|
34
|
-
|
35
|
-
title of resulting page
|
36
|
-
title: "full reference"
|
37
|
-
|
38
|
-
list of things you want to document
|
39
|
-
carefully watch indent - 4 spaces for options
|
40
|
-
sdoc:
|
41
|
-
|
42
|
-
=== ruby
|
43
|
-
ruby 1.8.6 source will be downloaded for you from ftp.ruby-lang.org and placed in folder sources
|
44
|
-
- ruby: 1.8.6
|
45
|
-
|
46
|
-
to auto detect ruby version pass `ruby binary` instead of version (this binary will be asked to execute <tt>print "#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"</tt>)
|
47
|
-
- ruby: `ruby`
|
48
|
-
or
|
49
|
-
- ruby: `/usr/bin/ruby`
|
50
|
-
or
|
51
|
-
- ruby: `/usr/bin/env ruby`
|
52
|
-
…
|
53
|
-
|
54
|
-
if you don't want updates use this
|
55
|
-
- ruby:
|
56
|
-
version: 1.8.6
|
57
|
-
update: false
|
58
|
-
|
59
|
-
also as ruby has no index page, you can create folder with index.html in it (also there can be stylesheets, images or whatever you want but they should be linked relatively; I choose http://www.zenspider.com/Languages/Ruby/QuickRef.html :) ) and put path to it in config like
|
60
|
-
- ruby:
|
61
|
-
version: 1.8.6
|
62
|
-
index: ruby_quick_ref
|
63
|
-
|
64
|
-
to build stdlib documentation for every group not fully present in ruby documentation (based on http://stdlib-doc.rubyforge.org)
|
65
|
-
- ruby:
|
66
|
-
version: 1.8.6
|
67
|
-
stdlib: true
|
68
|
-
|
69
|
-
to integrate stdlib to main ruby documentation use
|
70
|
-
- ruby:
|
71
|
-
version: 1.8.6
|
72
|
-
stdlib: integrate
|
73
|
-
|
74
|
-
=== rails
|
75
|
-
choose rails version
|
76
|
-
- rails: 2.3.2
|
77
|
-
|
78
|
-
latest installed version will be used
|
79
|
-
- rails
|
80
|
-
|
81
|
-
=== gems
|
82
|
-
document all gems
|
83
|
-
- gems
|
84
|
-
|
85
|
-
document nokogiri and hpricot gems
|
86
|
-
- gems: [nokogiri, hpricot]
|
87
|
-
|
88
|
-
document nokogiri gem (gem is just an alias to gems)
|
89
|
-
- gem: nokogiri
|
90
|
-
|
91
|
-
document all installed versions of nokogiri and hpricot gems (not latest)
|
92
|
-
- gems:
|
93
|
-
only: [nokogiri, hpricot]
|
94
|
-
versions: all
|
95
|
-
|
96
|
-
document all gems except mysql and gems related to rails
|
97
|
-
- gems:
|
98
|
-
exclude:
|
99
|
-
- mysql
|
100
|
-
- rails
|
101
|
-
- actionmailer
|
102
|
-
- actionpack
|
103
|
-
- activerecord
|
104
|
-
- activeresource
|
105
|
-
- activesupport
|
106
|
-
|
107
|
-
=== plugins
|
108
|
-
document plugins in folder ~/.plugins (they will also be updated if they are under git)
|
109
|
-
- plugins: ~/.plugins
|
110
|
-
|
111
|
-
document plugins in folder sources/plugins
|
112
|
-
- plugins
|
113
|
-
|
114
|
-
document only dump plugin
|
115
|
-
- plugin:
|
116
|
-
path: ~/.plugins
|
117
|
-
only: dump
|
118
|
-
|
119
|
-
document dump, access and data_columns plugins
|
120
|
-
- plugins:
|
121
|
-
path: ~/.plugins
|
122
|
-
only: [dump, access, data_columns]
|
123
|
-
|
124
|
-
don't update plugins under git
|
125
|
-
- plugins:
|
126
|
-
path: ~/.plugins
|
127
|
-
update: false
|
128
|
-
|
129
|
-
document all plugins except acts_as_fu and acts_as_bar
|
130
|
-
- plugins:
|
131
|
-
path: ~/.plugins
|
132
|
-
exclude: [acts_as_fu, acts_as_bar]
|
133
|
-
|
134
|
-
=== paths
|
135
|
-
document file or directory (you can create .document file in directory to tell rdoc what to document)
|
136
|
-
- path: ~/lib/bin
|
137
|
-
|
138
|
-
it can be a glob (each entry will be documented separately)
|
139
|
-
- paths: ~/lib/*
|
140
|
-
|
141
|
-
or array (note that name of documentation for each will be relative path from common ancestor)
|
142
|
-
- paths: [~/lib/*, ~/scripts/**, /test.rb, /rm-rf.rb]
|
143
|
-
|
144
|
-
if you want to specify more options (roots are not globed in this form)
|
145
|
-
- paths:
|
146
|
-
root: ~/lib/app
|
147
|
-
main: README
|
148
|
-
paths: [+*, +lib/*.rb, +tasks/*.rake, -*.sw*, -OLD_README]
|
149
|
-
|
150
|
-
or array form (mixed type)
|
151
|
-
- paths:
|
152
|
-
- root: ~/lib/app
|
153
|
-
main: SUPAREADME
|
154
|
-
paths: [+*, +lib/*.rb, +tasks/*.rake, -*.sw*, -OLD_README]
|
155
|
-
- ~/lib/app2
|
156
|
-
- root: ~/lib/app3
|
157
|
-
main: SUPAREADME
|
158
|
-
- root: ~/lib/app3
|
159
|
-
paths: *.rb
|
160
|
-
- ~/lib/old/app*
|
data/lib/shell_escape.rb
DELETED
@@ -1,64 +0,0 @@
|
|
1
|
-
# escape.rb - escape/unescape library for several formats
|
2
|
-
#
|
3
|
-
# Copyright (C) 2006,2007 Tanaka Akira <akr@fsij.org>
|
4
|
-
#
|
5
|
-
# Redistribution and use in source and binary forms, with or without
|
6
|
-
# modification, are permitted provided that the following conditions are met:
|
7
|
-
#
|
8
|
-
# 1. Redistributions of source code must retain the above copyright notice, this
|
9
|
-
# list of conditions and the following disclaimer.
|
10
|
-
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
11
|
-
# this list of conditions and the following disclaimer in the documentation
|
12
|
-
# and/or other materials provided with the distribution.
|
13
|
-
# 3. The name of the author may not be used to endorse or promote products
|
14
|
-
# derived from this software without specific prior written permission.
|
15
|
-
#
|
16
|
-
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
17
|
-
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
18
|
-
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
19
|
-
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
20
|
-
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
21
|
-
# OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
22
|
-
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
23
|
-
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
24
|
-
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
25
|
-
# OF SUCH DAMAGE.
|
26
|
-
|
27
|
-
# Escape module provides several escape functions.
|
28
|
-
# * shell command
|
29
|
-
# modified to work only with shell
|
30
|
-
module ShellEscape
|
31
|
-
module_function
|
32
|
-
|
33
|
-
# Escape.shell_command composes
|
34
|
-
# a sequence of words to
|
35
|
-
# a single shell command line.
|
36
|
-
# All shell meta characters are quoted and
|
37
|
-
# the words are concatenated with interleaving space.
|
38
|
-
def command(*args)
|
39
|
-
args.map{ |arg| word(arg) } * ' '
|
40
|
-
end
|
41
|
-
|
42
|
-
# Escape.shell_single_word quotes shell meta characters.
|
43
|
-
#
|
44
|
-
# The result string is always single shell word, even if
|
45
|
-
# the argument is "".
|
46
|
-
def word(word)
|
47
|
-
word = word.to_s
|
48
|
-
if word.empty?
|
49
|
-
"''"
|
50
|
-
elsif %r{\A[0-9A-Za-z+,./:=@_-]+\z} =~ word
|
51
|
-
word
|
52
|
-
else
|
53
|
-
result = ''
|
54
|
-
word.scan(/('+)|[^']+/) {
|
55
|
-
if $1
|
56
|
-
result << %q{\'} * $1.length
|
57
|
-
else
|
58
|
-
result << "'#{$&}'"
|
59
|
-
end
|
60
|
-
}
|
61
|
-
result
|
62
|
-
end
|
63
|
-
end
|
64
|
-
end
|