` tags appear in results snippet
0.4.0
=====
[Compare v0.3.20...v0.4.0](https://github.com/voloko/sdoc/compare/v0.3.20...v0.4.0)
No friendly log for this version yet, but PRs are welcome!
sdoc-1.0.0/Gemfile 0000664 0000000 0000000 00000000231 13236346070 0013733 0 ustar 00root root 0000000 0000000 source "https://rubygems.org"
gemspec
gem "rake", "< 11"
gem "minitest"
gem "hoe"
if ENV["rdoc"] == "master"
gem "rdoc", :github => "ruby/rdoc"
end
sdoc-1.0.0/LICENSE 0000664 0000000 0000000 00000012046 13236346070 0013454 0 ustar 00root root 0000000 0000000 Copyright (c) 2014 Vladimir Kolesnikov, and Nathan Broadbent
Copyright (c) 2014-2017 Zachary Scott
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Darkfish RDoc HTML Generator
Copyright (c) 2007, 2008, Michael Granger. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the author/s, nor the names of the project's
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
RDoc is copyrighted free software.
You can redistribute it and/or modify it under either the terms of the GPL
version 2 (see the file GPL), or the conditions below:
1. You may make and give away verbatim copies of the source form of the
software without restriction, provided that you duplicate all of the
original copyright notices and associated disclaimers.
2. You may modify your copy of the software in any way, provided that
you do at least ONE of the following:
a) place your modifications in the Public Domain or otherwise
make them Freely Available, such as by posting said
modifications to Usenet or an equivalent medium, or by allowing
the author to include your modifications in the software.
b) use the modified software only within your corporation or
organization.
c) give non-standard binaries non-standard names, with
instructions on where to get the original software distribution.
d) make other distribution arrangements with the author.
3. You may distribute the software in object code or binary form,
provided that you do at least ONE of the following:
a) distribute the binaries and library files of the software,
together with instructions (in the manual page or equivalent)
on where to get the original distribution.
b) accompany the distribution with the machine-readable source of
the software.
c) give non-standard binaries non-standard names, with
instructions on where to get the original software distribution.
d) make other distribution arrangements with the author.
4. You may modify and include the part of the software into any other
software (possibly commercial). But some files in the distribution
are not written by the author, so that they are not under these terms.
For the list of those files and their copying conditions, see the
file LEGAL.
5. The scripts and library files supplied as input to or produced as
output from the software do not automatically fall under the
copyright of the software, but belong to whomever generated them,
and may be sold commercially, and may be aggregated with this
software.
6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.
sdoc-1.0.0/README.md 0000664 0000000 0000000 00000006343 13236346070 0013731 0 ustar 00root root 0000000 0000000 # SDoc
[](https://travis-ci.org/zzak/sdoc)
**Powering http://api.rubyonrails.org/**
### What is sdoc?
SDoc is an HTML template built on top of the RDoc documentation generator for Ruby code.
Provided are two command-line tools you get when you installing the gem:
* `sdoc` - command line tool to run rdoc with `generator=shtml` (searchable HTML)
* `sdoc-merge` - command line tool to merge multiple sdoc folders into a single documentation site
### Getting Started
```bash
# Install the gem
gem install sdoc
# Generate documentation for 'projectdir'
sdoc projectdir
```
### sdoc
`sdoc` is simply a wrapper for the `rdoc` command line tool. See `sdoc --help` for more details.
When using the `sdoc` command, `--fmt` is set to `shtml` by default. The default template (or `-T` option) is set to `shtml`, but you can also use the `direct` template when generating documentation.
Example:
```bash
sdoc -o doc/rails -T direct rails
```
### sdoc-merge
`sdoc-merge` is useful tool for combining multiple projects documentation into one HTML website. See `sdoc-merge --help` for more details.
```
Usage: sdoc-merge [options] directories
-n, --names [NAMES] Names of merged repositories. Comma separated
-o, --op [DIRECTORY] Set the output directory
-t, --title [TITLE] Set the title of merged file
```
Example:
```bash
sdoc-merge --title "Ruby v1.9, Rails v2.3.2.1" --op merged --names "Ruby,Rails" ruby-v1.9 rails-v2.3.2.1
```
### Rake Task
If you want, you can setup a task in your `Rakefile` for generating your project's documentation via the `rake rdoc` command.
```ruby
# Rakefile
require 'sdoc' # and use your RDoc task the same way you used it before
require 'rdoc/task' # ensure this file is also required in order to use `RDoc::Task`
RDoc::Task.new do |rdoc|
rdoc.rdoc_dir = 'doc/rdoc' # name of output directory
rdoc.generator = 'sdoc' # explictly set the sdoc generator
rdoc.template = 'rails' # template used on api.rubyonrails.org
end
```
NOTE: If you don't set `template` the default "sdoc" template is chosen, with a lighter color scheme.
Now you can execute this command with `rake rdoc`, to compile the documentation for the current project directory.
Alternatively you can pass this command a path to the project you wish to compile: `rake rdoc path/to/project`.
### RDoc
As mentioned before, SDoc is built on top of the RDoc project.
If you notice any bugs in the output of your documentation, it may be RDoc's fault and should be [reported upstream](https://github.com/rdoc/rdoc/issues/new).
An example of an SDoc bug would be:
* Exception is raised when merging project documentation (ala `sdoc-merge`)
* Error or warning in JavaScript or HTML found in your browser
* Generation fails with some exception (likely due to incompatibility with RDoc)
Please feel free to still report issues here for both projects, especially if you aren't sure.
As maintainer of both projects, I'll see if I can identify the root of the cause :bow: :bow: :bow:
### Who?
* Vladimir Kolesnikov ([voloko](https://github.com/voloko))
* Nathan Broadbent ([ndbroadbent](https://github.com/ndbroadbent))
* Zachary Scott ([zzak](https://github.com/zzak))
sdoc-1.0.0/Rakefile 0000664 0000000 0000000 00000001071 13236346070 0014110 0 ustar 00root root 0000000 0000000 require 'bundler'
Bundler::GemHelper.install_tasks
require 'rake/testtask'
Rake::TestTask.new do |t|
t.pattern = "spec/*_spec.rb"
t.libs << "spec"
end
task :default => :test
task :spec => :test
require 'sdoc'
require 'rdoc/task'
rails = File.expand_path "rails"
directory rails do
sh "git clone --depth=1 https://github.com/rails/rails"
end
namespace :test do
task :rails => rails
RDoc::Task.new(:rails) do |rdoc|
rdoc.rdoc_dir = 'doc/rails'
rdoc.generator = 'sdoc'
rdoc.template = 'rails'
rdoc.rdoc_files.include("rails/")
end
end
sdoc-1.0.0/bin/ 0000775 0000000 0000000 00000000000 13236346070 0013214 5 ustar 00root root 0000000 0000000 sdoc-1.0.0/bin/sdoc 0000775 0000000 0000000 00000001122 13236346070 0014066 0 ustar 00root root 0000000 0000000 #!/usr/bin/env ruby -KU
require 'sdoc'
begin
ARGV.unshift('--format=sdoc') if ARGV.grep(/\A(-f|--fmt|--format|-r|-R|--ri|--ri-site)\b/).empty?
r = RDoc::RDoc.new
r.document ARGV
rescue SystemExit
raise
rescue Exception => e
if $DEBUG_RDOC then
$stderr.puts e.message
$stderr.puts "#{e.backtrace.join "\n\t"}"
$stderr.puts
elsif Interrupt === e then
$stderr.puts
$stderr.puts 'Interrupted'
else
$stderr.puts "uh-oh! RDoc had a problem:"
$stderr.puts e.message
$stderr.puts
$stderr.puts "run with --debug for full backtrace"
end
exit 1
end
sdoc-1.0.0/bin/sdoc-merge 0000775 0000000 0000000 00000000761 13236346070 0015173 0 ustar 00root root 0000000 0000000 #!/usr/bin/env ruby -KU
require File.dirname(__FILE__) + '/../lib/sdoc' # add extensions
require 'sdoc/merge'
begin
m = SDoc::Merge.new
m.merge(ARGV)
rescue SystemExit
raise
rescue Exception => e
if $DEBUG_RDOC then
$stderr.puts e.message
$stderr.puts "#{e.backtrace.join "\n\t"}"
$stderr.puts
elsif Interrupt === e then
$stderr.puts
$stderr.puts 'Interrupted'
else
$stderr.puts "uh-oh! SDoc merge had a problem:"
$stderr.puts e.message
end
exit 1
end
sdoc-1.0.0/lib/ 0000775 0000000 0000000 00000000000 13236346070 0013212 5 ustar 00root root 0000000 0000000 sdoc-1.0.0/lib/rdoc/ 0000775 0000000 0000000 00000000000 13236346070 0014141 5 ustar 00root root 0000000 0000000 sdoc-1.0.0/lib/rdoc/discover.rb 0000664 0000000 0000000 00000000157 13236346070 0016307 0 ustar 00root root 0000000 0000000 begin
gem 'rdoc', '~> 5.0'
require File.join(File.dirname(__FILE__), '/../sdoc')
rescue Gem::LoadError
end
sdoc-1.0.0/lib/rdoc/generator/ 0000775 0000000 0000000 00000000000 13236346070 0016127 5 ustar 00root root 0000000 0000000 sdoc-1.0.0/lib/rdoc/generator/template/ 0000775 0000000 0000000 00000000000 13236346070 0017742 5 ustar 00root root 0000000 0000000 sdoc-1.0.0/lib/rdoc/generator/template/merge/ 0000775 0000000 0000000 00000000000 13236346070 0021041 5 ustar 00root root 0000000 0000000 sdoc-1.0.0/lib/rdoc/generator/template/merge/index.rhtml 0000664 0000000 0000000 00000000514 13236346070 0023220 0 ustar 00root root 0000000 0000000
<% end %>
<% context.each_section do |section, constants, attributes| %>
<% if section.title then %>
<%= h section.title %>
<% end %>
<% if section.comment then %>
<%= section.description %>
<% end %>
<% unless constants.empty? %>
Constants
<% constants.each do |const| %>
<%= h const.name %>
=
<%= h const.value %>
<% if const.comment %>
<%= const.description.strip %>
<% end %>
<% end %>
<% end %>
<% unless attributes.empty? %>
Attributes
<% attributes.each do |attrib| %>
[<%= attrib.rw %>]
<%= h attrib.name %>
<%= attrib.description.strip %>
<% end %>
<% end %>
<%
context.methods_by_type(section).each do |type, visibilities|
next if visibilities.empty?
visibilities.each do |visibility, methods|
next if methods.empty?
%>
<% end %>
<% if method.token_stream %>
<% markup = method.markup_code %>
<%
# generate github link
github = if options.github
if markup =~ /File\s(\S+), line (\d+)/
path = $1
line = $2.to_i
end
path && github_url(path)
else
false
end
%>