[rubygem-sdoc] Initial commit

Josef Stribny jstribny at fedoraproject.org
Tue Nov 26 08:30:06 UTC 2013


commit 91cb1e0b01f7b0be5df0867b3113b64e002199c7
Author: Josef Stribny <jstribny at redhat.com>
Date:   Tue Nov 26 09:29:50 2013 +0100

    Initial commit

 .gitignore                            |    1 +
 rubygem-sdoc-rdoc-4.0-support.patch   |  650 +++++++++++++++++++++++++++++++++
 rubygem-sdoc-version-option-fix.patch |   32 ++
 rubygem-sdoc.spec                     |  124 +++++++
 sdoc-merge.1                          |   57 +++
 sdoc.1                                |   44 +++
 sources                               |    1 +
 7 files changed, 909 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..97123b0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/sdoc-0.3.20.gem
diff --git a/rubygem-sdoc-rdoc-4.0-support.patch b/rubygem-sdoc-rdoc-4.0-support.patch
new file mode 100644
index 0000000..f86fdb3
--- /dev/null
+++ b/rubygem-sdoc-rdoc-4.0-support.patch
@@ -0,0 +1,650 @@
+From e581d620378362d48c8f13a966be633b5da45414 Mon Sep 17 00:00:00 2001
+From: Yuichiro Suzuki <u16suzu at gmail.com>
+Date: Thu, 5 Sep 2013 11:39:42 +0900
+Subject: [PATCH] Fix: typo comand
+
+---
+ README.md | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/README.md b/README.md
+index 921ff28..bb87304 100644
+--- a/README.md
++++ b/README.md
+@@ -7,7 +7,7 @@
+ RDoc generator to build searchable HTML documentation for Ruby code.
+ 
+ * `sdoc` - command line tool to run rdoc with `generator=shtml` (searchable HTML)
+-* `sdoc-merge` - comand line tool to merge multiple sdoc folders into a single documentation site
++* `sdoc-merge` - command line tool to merge multiple sdoc folders into a single documentation site
+ 
+ 
+ ### Getting Started
+@@ -63,4 +63,4 @@ end
+ # Who?
+ 
+ * Vladimir Kolesnikov ([voloko](https://github.com/voloko))
+-* Nathan Broadbent ([ndbroadbent](https://github.com/ndbroadbent))
+\ No newline at end of file
++* Nathan Broadbent ([ndbroadbent](https://github.com/ndbroadbent))
+-- 
+1.8.4
+
+From 277b7dca64e8672687b262bdf93a997cd36c8e10 Mon Sep 17 00:00:00 2001
+From: Jean Mertz <jean at mertz.fm>
+Date: Sun, 17 Feb 2013 16:37:24 +0100
+Subject: [PATCH 1/9] First pass to make sdoc work with RDoc 4
+
+These are the bare minimum required changes to make the generator pass without errors. Some
+things still not working:
+
+* Github link now showing up
+* Code blocks not working correctly (using Markdown)
+* Probably more errors
+---
+ lib/rdoc/discover.rb    |  2 +-
+ lib/sdoc.rb             |  4 ++--
+ lib/sdoc/generator.rb   | 16 +++++++++++-----
+ lib/sdoc/github.rb      |  8 ++++----
+ lib/sdoc/templatable.rb | 14 +++++++-------
+ sdoc.gemspec            |  4 ++--
+ 6 files changed, 27 insertions(+), 21 deletions(-)
+
+diff --git a/lib/rdoc/discover.rb b/lib/rdoc/discover.rb
+index 11a5ff5..aa55858 100644
+--- a/lib/rdoc/discover.rb
++++ b/lib/rdoc/discover.rb
+@@ -1,5 +1,5 @@
+ begin
+-  gem 'rdoc', '~> 3'
++  gem 'rdoc', '~> 4.0.0.rc'
+   require File.join(File.dirname(__FILE__), '/../sdoc')
+ rescue Gem::LoadError
+ end
+diff --git a/lib/sdoc.rb b/lib/sdoc.rb
+index 331096f..66da852 100644
+--- a/lib/sdoc.rb
++++ b/lib/sdoc.rb
+@@ -1,7 +1,7 @@
+ $:.unshift File.dirname(__FILE__)
+ require "rubygems"
+-gem 'rdoc', '~> 3'
++gem 'rdoc', '~> 4.0.0.rc'
+ 
+ module SDoc end
+-  
++
+ require 'sdoc/generator'
+diff --git a/lib/sdoc/generator.rb b/lib/sdoc/generator.rb
+index 144b963..2f10f20 100644
+--- a/lib/sdoc/generator.rb
++++ b/lib/sdoc/generator.rb
+@@ -120,6 +120,11 @@ class RDoc::Generator::SDoc
+ 
+   attr_reader :options
+ 
++  ##
++  # The RDoc::Store that is the source of the generated content
++
++  attr_reader :store
++
+   def self.setup_options(options)
+     @github = false
+     options.se_index = true
+@@ -148,7 +153,8 @@ def self.setup_options(options)
+ 
+   end
+ 
+-  def initialize(options)
++  def initialize(store, options)
++    @store   = store
+     @options = options
+     if @options.respond_to?('diagram=')
+       @options.diagram = false
+@@ -161,15 +167,15 @@ def initialize(options)
+     @json_index = RDoc::Generator::JsonIndex.new self, options
+   end
+ 
+-  def generate(top_levels)
++  def generate
+     @outputdir = Pathname.new(@options.op_dir).expand_path(@base_dir)
+-    @files = top_levels.sort
+-    @classes = RDoc::TopLevel.all_classes_and_modules.sort
++    @files = @store.all_files.sort
++    @classes = @store.all_classes_and_modules.sort
+ 
+     # Now actually write the output
+     copy_resources
+     generate_class_tree
+-    @json_index.generate top_levels
++    @json_index.generate
+     generate_file_files
+     generate_class_files
+     generate_index_file
+diff --git a/lib/sdoc/github.rb b/lib/sdoc/github.rb
+index 37c149b..7cab6e8 100644
+--- a/lib/sdoc/github.rb
++++ b/lib/sdoc/github.rb
+@@ -2,7 +2,7 @@ module SDoc::GitHub
+   def github_url(path)
+     unless @github_url_cache.has_key? path
+       @github_url_cache[path] = false
+-      file = RDoc::TopLevel.find_file_named(path)
++      file = @store.find_file_named(path)
+       if file
+         base_url = repository_url(path)
+         if base_url
+@@ -16,7 +16,7 @@ def github_url(path)
+     end
+     @github_url_cache[path]
+   end
+-  
++
+   protected
+ 
+   def have_git?
+@@ -33,7 +33,7 @@ def commit_sha1(path)
+     m = s.match(/commit\s+(\S+)/)
+     m ? m[1] : false
+   end
+-  
++
+   def repository_url(path)
+     return false unless have_git?
+     s = Dir.chdir(File.join(base_dir, File.dirname(path))) do
+@@ -51,7 +51,7 @@ def path_relative_to_repository(path)
+ 
+   def path_to_git_dir(path)
+     while !path.empty? && path != '.'
+-      if (File.exists? File.join(path, '.git')) 
++      if (File.exists? File.join(path, '.git'))
+         return path
+       end
+       path = File.dirname(path)
+diff --git a/lib/sdoc/templatable.rb b/lib/sdoc/templatable.rb
+index 0e2a376..fea1138 100644
+--- a/lib/sdoc/templatable.rb
++++ b/lib/sdoc/templatable.rb
+@@ -20,7 +20,7 @@ def eval_template(templatefile, context)
+         ], err.backtrace
+       end
+   end
+-  
++
+   ### Load and render the erb template with the given +template_name+ within
+   ### current context. Adds all +local_assigns+ to context
+   def include_template(template_name, local_assigns = {})
+@@ -28,13 +28,13 @@ def include_template(template_name, local_assigns = {})
+     templatefile = @template_dir + template_name
+     eval("#{source};eval_template(templatefile, binding)")
+   end
+-  
++
+ 	### Load and render the erb template in the given +templatefile+ within the
+ 	### specified +context+ (a Binding object) and write it out to +outfile+.
+ 	### Both +templatefile+ and +outfile+ should be Pathname-like objects.
+ 	def render_template( templatefile, context, outfile )
+     output = eval_template(templatefile, context)
+-    
++
+     # TODO delete this dirty hack when documentation for example for GeneratorMethods will not be cutted off by <script> tag
+     begin
+       if output.respond_to? :force_encoding
+@@ -44,9 +44,9 @@ def render_template( templatefile, context, outfile )
+         output = output.gsub('<script>', '&lt;script&gt;')
+       end
+     rescue Exception => e
+-      
++
+     end
+-    
++
+ 		unless $dryrun
+ 			outfile.dirname.mkpath
+ 			outfile.open( 'w', 0644 ) do |file|
+@@ -56,5 +56,5 @@ def render_template( templatefile, context, outfile )
+ 			debug_msg "  would have written %d bytes to %s" %
+ 			[ output.length, outfile ]
+ 		end
+-	end  
+-end
+\ No newline at end of file
++	end
++end
+
+From 2faa4d3c683e91f8c581a4fdc96bc04b3c3e445b Mon Sep 17 00:00:00 2001
+From: Zachary Scott <zachary at zacharyscott.net>
+Date: Sat, 23 Mar 2013 11:51:41 -0400
+Subject: [PATCH 2/9] bump rdoc to released 4.0.0
+
+---
+ lib/rdoc/discover.rb | 2 +-
+ lib/sdoc.rb          | 2 +-
+ sdoc.gemspec         | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/lib/rdoc/discover.rb b/lib/rdoc/discover.rb
+index aa55858..520cb09 100644
+--- a/lib/rdoc/discover.rb
++++ b/lib/rdoc/discover.rb
+@@ -1,5 +1,5 @@
+ begin
+-  gem 'rdoc', '~> 4.0.0.rc'
++  gem 'rdoc', '~> 4.0.0'
+   require File.join(File.dirname(__FILE__), '/../sdoc')
+ rescue Gem::LoadError
+ end
+diff --git a/lib/sdoc.rb b/lib/sdoc.rb
+index 66da852..daf080e 100644
+--- a/lib/sdoc.rb
++++ b/lib/sdoc.rb
+@@ -1,6 +1,6 @@
+ $:.unshift File.dirname(__FILE__)
+ require "rubygems"
+-gem 'rdoc', '~> 4.0.0.rc'
++gem 'rdoc', '~> 4.0.0'
+ 
+ module SDoc end
+
+
+From cb907716d5f7c95c2411d0d08cbdfa09191d499e Mon Sep 17 00:00:00 2001
+From: Zachary Scott <zachary at zacharyscott.net>
+Date: Sat, 23 Mar 2013 12:09:37 -0400
+Subject: [PATCH 3/9] default to RDoc::Options#pipe = true
+
+---
+ lib/sdoc/generator.rb | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lib/sdoc/generator.rb b/lib/sdoc/generator.rb
+index 2f10f20..9290efe 100644
+--- a/lib/sdoc/generator.rb
++++ b/lib/sdoc/generator.rb
+@@ -159,6 +159,7 @@ def initialize(store, options)
+     if @options.respond_to?('diagram=')
+       @options.diagram = false
+     end
++    @options.pipe = true
+     @github_url_cache = {}
+ 
+     @template_dir = Pathname.new(options.template_dir)
+-- 
+1.8.4
+
+
+From 9111895e4fad7afe5bcdb80caec2f929304c7b6f Mon Sep 17 00:00:00 2001
+From: Zachary Scott <zachary at zacharyscott.net>
+Date: Sat, 23 Mar 2013 23:11:31 -0400
+Subject: [PATCH 4/9] add Gemfile, just points to sdoc.gemspec
+
+---
+ Gemfile | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 Gemfile
+
+diff --git a/Gemfile b/Gemfile
+new file mode 100644
+index 0000000..b4e2a20
+--- /dev/null
++++ b/Gemfile
+@@ -0,0 +1,3 @@
++source "https://rubygems.org"
++
++gemspec
+-- 
+1.8.4
+
+From 585eba434454c40fc3360f443b84e7444da66e78 Mon Sep 17 00:00:00 2001
+From: Zachary Scott <zachary at zacharyscott.net>
+Date: Sat, 23 Mar 2013 23:12:43 -0400
+Subject: [PATCH 6/9] remove rspec task and add rake testtask
+
+---
+ Rakefile | 13 +++++++------
+ 1 file changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/Rakefile b/Rakefile
+index 0113d85..2ab2f24 100644
+--- a/Rakefile
++++ b/Rakefile
+@@ -3,10 +3,11 @@ require 'rubygems'
+ require 'bundler'
+ Bundler::GemHelper.install_tasks
+ 
+-gem 'rspec', '>= 2.5.0'
+-require 'rspec/core/rake_task'
++require 'rake/testtask'
+ 
+-desc "Run all specs"
+-RSpec::Core::RakeTask.new(:spec)
+-task :default => :spec
+-task :test => :spec
++Rake::TestTask.new do |t|
++  t.pattern = "spec/**/*_spec.rb"
++end
++
++task :default => :test
++task :spec => :test
+-- 
+1.8.4
+
+
+From adc7a0f190a48dae7ebc0a46a770a1aea1c0e785 Mon Sep 17 00:00:00 2001
+From: Zachary Scott <zachary at zacharyscott.net>
+Date: Sat, 23 Mar 2013 23:13:33 -0400
+Subject: [PATCH 7/9] added specs for SDoc::Generator using MiniTest::Spec::DSL
+ with RDoc::TestCase
+
+---
+ spec/sdoc/generator_spec.rb | 55 +++++++++++++++++++++++++++++++++++++++++++++
+ spec/spec_helper.rb         | 13 +++++++++++
+ 2 files changed, 68 insertions(+)
+ create mode 100644 spec/sdoc/generator_spec.rb
+ create mode 100644 spec/spec_helper.rb
+
+diff --git a/spec/sdoc/generator_spec.rb b/spec/sdoc/generator_spec.rb
+new file mode 100644
+index 0000000..b432fe4
+--- /dev/null
++++ b/spec/sdoc/generator_spec.rb
+@@ -0,0 +1,55 @@
++require File.join(File.dirname(__FILE__), '/../spec_helper')
++
++describe RDoc::Generator::SDoc do
++  before :each do
++    @options = RDoc::Options.new
++    @options.setup_generator 'sdoc'
++    @parser = @options.option_parser
++  end
++
++  it "should find sdoc generator" do
++    RDoc::RDoc::GENERATORS.must_include 'sdoc'
++  end
++
++  it "should use sdoc generator" do
++    @options.generator.must_equal RDoc::Generator::SDoc
++    @options.generator_name.must_equal 'sdoc'
++  end
++
++  it "should parse github option" do
++    out, err = capture_io do
++      @parser.parse '--github'
++    end
++
++    err.wont_match /^invalid options/
++    @options.github.must_equal true
++  end
++
++  it "should parse github short-hand option" do
++    out, err = capture_io do
++      @parser.parse '-g'
++    end
++
++    err.wont_match /^invalid options/
++    @options.github.must_equal true
++  end
++
++  it "should parse no search engine index option" do
++    out, err = capture_io do
++      @parser.parse '--no-se-index'
++    end
++
++    err.wont_match /^invalid options/
++    @options.se_index.must_equal false
++  end
++
++  it "should parse no-se-index shorthand option" do
++    out, err = capture_io do
++      @parser.parse '-ns'
++    end
++
++    err.wont_match /^invalid options/
++    @options.se_index.must_equal false
++  end
++
++end
+diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
+new file mode 100644
+index 0000000..51cb469
+--- /dev/null
++++ b/spec/spec_helper.rb
+@@ -0,0 +1,13 @@
++require 'rubygems'
++require 'bundler/setup'
++
++require 'sdoc'
++
++require 'rdoc/test_case'
++
++require 'minitest/autorun'
++
++class SDoc::TestCase < RDoc::TestCase
++  include MiniTest::Spec::DSL
++end
++
+-- 
+1.8.4
+
+
+From 751d338579fe94cf76584c3e3f13bbaf953fd950 Mon Sep 17 00:00:00 2001
+From: Zachary Scott <zachary at zacharyscott.net>
+Date: Wed, 17 Jul 2013 11:24:17 -0400
+Subject: [PATCH 8/9] update .gitignore
+
+---
+ .gitignore | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/.gitignore b/.gitignore
+index cc4adf6..bf7e55b 100644
+--- a/.gitignore
++++ b/.gitignore
+@@ -1,3 +1,6 @@
++*.gem
++.bundle
+ pkg
+ doc
+-/test.rb
+\ No newline at end of file
++/test.rb
++Gemfile.lock
+-- 
+1.8.4
+
+
+From 4a19f8229b62d9e8accb7b249f280ce1b71f1a74 Mon Sep 17 00:00:00 2001
+From: Zachary Scott <zachary at zacharyscott.net>
+Date: Sat, 10 Aug 2013 16:37:00 +0000
+Subject: [PATCH 9/9] fixed search index option with @KevinSjoberg
+
+---
+ lib/rdoc/generator/template/sdoc/se_index.rhtml    |  8 --------
+ lib/rdoc/generator/template/sdoc/searchindex.rhtml |  8 ++++++++
+ lib/sdoc/generator.rb                              | 16 ++++++++--------
+ spec/sdoc/generator_spec.rb                        | 10 +++++-----
+ 4 files changed, 21 insertions(+), 21 deletions(-)
+ delete mode 100644 lib/rdoc/generator/template/sdoc/se_index.rhtml
+ create mode 100644 lib/rdoc/generator/template/sdoc/searchindex.rhtml
+
+diff --git a/lib/rdoc/generator/template/sdoc/se_index.rhtml b/lib/rdoc/generator/template/sdoc/se_index.rhtml
+deleted file mode 100644
+index 20f2dad..0000000
+--- a/lib/rdoc/generator/template/sdoc/se_index.rhtml
++++ /dev/null
+@@ -1,8 +0,0 @@
+-<html>
+-    <head>File index</head>
+-    <body>
+-    <% @files.each do |file| %>
+-      <a href="../<%= file.path %>"><%= file.relative_name %></a>
+-    <% end %>
+-    </body>
+-</html>
+\ No newline at end of file
+diff --git a/lib/rdoc/generator/template/sdoc/searchindex.rhtml b/lib/rdoc/generator/template/sdoc/searchindex.rhtml
+new file mode 100644
+index 0000000..20f2dad
+--- /dev/null
++++ b/lib/rdoc/generator/template/sdoc/searchindex.rhtml
+@@ -0,0 +1,8 @@
++<html>
++    <head>File index</head>
++    <body>
++    <% @files.each do |file| %>
++      <a href="../<%= file.path %>"><%= file.relative_name %></a>
++    <% end %>
++    </body>
++</html>
+\ No newline at end of file
+diff --git a/lib/sdoc/generator.rb b/lib/sdoc/generator.rb
+index 9290efe..1e56463 100644
+--- a/lib/sdoc/generator.rb
++++ b/lib/sdoc/generator.rb
+@@ -22,7 +22,7 @@ def with_documentation?
+ 
+ class RDoc::Options
+   attr_accessor :github
+-  attr_accessor :se_index
++  attr_accessor :search_index
+ end
+ 
+ class RDoc::AnyMethod
+@@ -127,7 +127,7 @@ class RDoc::Generator::SDoc
+ 
+   def self.setup_options(options)
+     @github = false
+-    options.se_index = true
++    options.search_index = true
+ 
+     opt = options.option_parser
+     opt.separator nil
+@@ -139,15 +139,15 @@ def self.setup_options(options)
+     end
+     opt.separator nil
+ 
+-    opt.on("--no-se-index", "-ns",
++    opt.on("--without-search", "-s",
+            "Do not generated index file for search engines.",
+            "SDoc uses javascript to refrence individual documentation pages.",
+            "Search engine crawlers are not smart enough to find all the",
+            "referenced pages.",
+            "To help them SDoc generates a static file with links to every",
+            "documentation page. This file is not shown to the user."
+-           ) do |value|
+-      options.se_index = false
++           ) do
++      options.search_index = false
+     end
+     opt.separator nil
+ 
+@@ -180,7 +180,7 @@ def generate
+     generate_file_files
+     generate_class_files
+     generate_index_file
+-    generate_se_index if @options.se_index
++    generate_search_index if @options.search_index
+   end
+ 
+   def class_dir
+@@ -359,9 +359,9 @@ def generate_index_file
+   end
+ 
+   ### Generate file with links for the search engine
+-  def generate_se_index
++  def generate_search_index
+     debug_msg "Generating search engine index in #@outputdir"
+-    templatefile = @template_dir + 'se_index.rhtml'
++    templatefile = @template_dir + 'search_index.rhtml'
+     outfile      = @outputdir + 'panel/links.html'
+ 
+     self.render_template( templatefile, binding(), outfile ) unless @options.dry_run
+--
+1.8.4
+
+From 3ee81e3239f4408c38f57b35344dbd424e7eab1d Mon Sep 17 00:00:00 2001
+From: Josef Stribny <jstribny at redhat.com>
+Date: Thu, 24 Oct 2013 14:48:46 +0200
+Subject: [PATCH] Fix: Rename searchindex.rhtml file
+ 
+---
+lib/rdoc/generator/template/sdoc/search_index.rhtml | 8 ++++++++
+lib/rdoc/generator/template/sdoc/searchindex.rhtml | 8 --------
+2 files changed, 8 insertions(+), 8 deletions(-)
+create mode 100644 lib/rdoc/generator/template/sdoc/search_index.rhtml
+delete mode 100644 lib/rdoc/generator/template/sdoc/searchindex.rhtml
+ 
+diff --git a/lib/rdoc/generator/template/sdoc/search_index.rhtml b/lib/rdoc/generator/template/sdoc/search_index.rhtml
+new file mode 100644
+index 0000000..20f2dad
+--- /dev/null
++++ b/lib/rdoc/generator/template/sdoc/search_index.rhtml
+@@ -0,0 +1,8 @@
++<html>
++ <head>File index</head>
++ <body>
++ <% @files.each do |file| %>
++ <a href="../<%= file.path %>"><%= file.relative_name %></a>
++ <% end %>
++ </body>
++</html>
+\ No newline at end of file
+
+
+diff --git a/lib/rdoc/generator/template/rails/se_index.rhtml b/lib/rdoc/generator/template/rails/search_index.rhtml
+new file mode 100644
+index 0000000..20f2dad
+--- /dev/null
++++ b/lib/rdoc/generator/template/rails/search_index.rhtml
+@@ -0,0 +1,8 @@
++<html>
++ <head>File index</head>
++ <body>
++ <% @files.each do |file| %>
++ <a href="../<%= file.path %>"><%= file.relative_name %></a>
++ <% end %>
++ </body>
++</html>
+\ No newline at end of file
+
+diff --git a/sdoc.gemspec b/sdoc.gemspec
+index 9fb4862..d45bd0a 100644
+--- a/sdoc.gemspec
++++ b/sdoc.gemspec
+@@ -3,16 +3,16 @@
+ 
+ Gem::Specification.new do |s|
+   s.name = "sdoc"
+-  s.version = "0.3.20"
++  s.version = "0.4.0.rc1"
+ 
+   s.required_rubygems_version = Gem::Requirement.new(">= 1.3.6") if s.respond_to? :required_rubygems_version=
+-  s.authors = ["Vladimir Kolesnikov", "Nathan Broadbent"]
++  s.authors = ["Vladimir Kolesnikov", "Nathan Broadbent", "Jean Mertz"]
+   s.date = "2012-11-21"
+   s.description = "rdoc generator html with javascript search index."
+   s.email = "voloko at gmail.com"
+   s.executables = ["sdoc", "sdoc-merge"]
+   s.extra_rdoc_files = ["README.md"]
+-  s.files = [".gitignore", ".rake_tasks~", "LICENSE", "README.md", "Rakefile", "bin/sdoc", "bin/sdoc-merge", "lib/rdoc/discover.rb", "lib/rdoc/generator/template/merge/index.rhtml", "lib/rdoc/generator/template/rails/_context.rhtml", "lib/rdoc/generator/template/rails/_head.rhtml", "lib/rdoc/generator/template/rails/class.rhtml", "lib/rdoc/generator/template/rails/file.rhtml", "lib/rdoc/generator/template/rails/index.rhtml", "lib/rdoc/generator/template/rails/resources/apple-touch-icon.png", "lib/rdoc/generator/template/rails/resources/css/github.css", "lib/rdoc/generator/template/rails/resources/css/main.css", "lib/rdoc/generator/template/rails/resources/css/panel.css", "lib/rdoc/generator/template/rails/resources/css/reset.css", "lib/rdoc/generator/template/rails/resources/favicon.ico", "lib/rdoc/generator/template/rails/resources/i/arrows.png", "lib/rdoc/generator/template/rails/resources/i/results_bg.png", "lib/rdoc/generator/template/rails/resources/i/tree_bg.png", "li
 b/rdoc/generator/template/rails/resources/js/highlight.pack.js", "lib/rdoc/generator/template/rails/resources/js/jquery-1.3.2.min.js", "lib/rdoc/generator/template/rails/resources/js/jquery-effect.js", "lib/rdoc/generator/template/rails/resources/js/main.js", "lib/rdoc/generator/template/rails/resources/js/searchdoc.js", "lib/rdoc/generator/template/rails/resources/panel/index.html", "lib/rdoc/generator/template/rails/se_index.rhtml", "lib/rdoc/generator/template/sdoc/_context.rhtml", "lib/rdoc/generator/template/sdoc/_head.rhtml", "lib/rdoc/generator/template/sdoc/class.rhtml", "lib/rdoc/generator/template/sdoc/file.rhtml", "lib/rdoc/generator/template/sdoc/index.rhtml", "lib/rdoc/generator/template/sdoc/resources/apple-touch-icon.png", "lib/rdoc/generator/template/sdoc/resources/css/github.css", "lib/rdoc/generator/template/sdoc/resources/css/main.css", "lib/rdoc/generator/template/sdoc/resources/css/panel.css", "lib/rdoc/generator/template/sdoc/resources/css/reset.css", "
 lib/rdoc/generator/template/sdoc/resources/favicon.ico", "lib/rdoc/generator/template/sdoc/resources/i/arrows.png", "lib/rdoc/generator/template/sdoc/resources/i/results_bg.png", "lib/rdoc/generator/template/sdoc/resources/i/tree_bg.png", "lib/rdoc/generator/template/sdoc/resources/js/highlight.pack.js", "lib/rdoc/generator/template/sdoc/resources/js/jquery-1.3.2.min.js", "lib/rdoc/generator/template/sdoc/resources/js/jquery-effect.js", "lib/rdoc/generator/template/sdoc/resources/js/main.js", "lib/rdoc/generator/template/sdoc/resources/js/searchdoc.js", "lib/rdoc/generator/template/sdoc/resources/panel/index.html", "lib/rdoc/generator/template/sdoc/se_index.rhtml", "lib/sdoc.rb", "lib/sdoc/generator.rb", "lib/sdoc/github.rb", "lib/sdoc/helpers.rb", "lib/sdoc/merge.rb", "lib/sdoc/templatable.rb", "sdoc.gemspec"]
++  s.files = [".gitignore", ".rake_tasks~", "LICENSE", "README.md", "Rakefile", "bin/sdoc", "bin/sdoc-merge", "lib/rdoc/discover.rb", "lib/rdoc/generator/template/merge/index.rhtml", "lib/rdoc/generator/template/rails/_context.rhtml", "lib/rdoc/generator/template/rails/_head.rhtml", "lib/rdoc/generator/template/rails/class.rhtml", "lib/rdoc/generator/template/rails/file.rhtml", "lib/rdoc/generator/template/rails/index.rhtml", "lib/rdoc/generator/template/rails/resources/apple-touch-icon.png", "lib/rdoc/generator/template/rails/resources/css/github.css", "lib/rdoc/generator/template/rails/resources/css/main.css", "lib/rdoc/generator/template/rails/resources/css/panel.css", "lib/rdoc/generator/template/rails/resources/css/reset.css", "lib/rdoc/generator/template/rails/resources/favicon.ico", "lib/rdoc/generator/template/rails/resources/i/arrows.png", "lib/rdoc/generator/template/rails/resources/i/results_bg.png", "lib/rdoc/generator/template/rails/resources/i/tree_bg.png", "li
 b/rdoc/generator/template/rails/resources/js/highlight.pack.js", "lib/rdoc/generator/template/rails/resources/js/jquery-1.3.2.min.js", "lib/rdoc/generator/template/rails/resources/js/jquery-effect.js", "lib/rdoc/generator/template/rails/resources/js/main.js", "lib/rdoc/generator/template/rails/resources/js/searchdoc.js", "lib/rdoc/generator/template/rails/resources/panel/index.html", "lib/rdoc/generator/template/rails/search_index.rhtml", "lib/rdoc/generator/template/sdoc/_context.rhtml", "lib/rdoc/generator/template/sdoc/_head.rhtml", "lib/rdoc/generator/template/sdoc/class.rhtml", "lib/rdoc/generator/template/sdoc/file.rhtml", "lib/rdoc/generator/template/sdoc/index.rhtml", "lib/rdoc/generator/template/sdoc/resources/apple-touch-icon.png", "lib/rdoc/generator/template/sdoc/resources/css/github.css", "lib/rdoc/generator/template/sdoc/resources/css/main.css", "lib/rdoc/generator/template/sdoc/resources/css/panel.css", "lib/rdoc/generator/template/sdoc/resources/css/reset.css
 ", "lib/rdoc/generator/template/sdoc/resources/favicon.ico", "lib/rdoc/generator/template/sdoc/resources/i/arrows.png", "lib/rdoc/generator/template/sdoc/resources/i/results_bg.png", "lib/rdoc/generator/template/sdoc/resources/i/tree_bg.png", "lib/rdoc/generator/template/sdoc/resources/js/highlight.pack.js", "lib/rdoc/generator/template/sdoc/resources/js/jquery-1.3.2.min.js", "lib/rdoc/generator/template/sdoc/resources/js/jquery-effect.js", "lib/rdoc/generator/template/sdoc/resources/js/main.js", "lib/rdoc/generator/template/sdoc/resources/js/searchdoc.js", "lib/rdoc/generator/template/sdoc/resources/panel/index.html", "lib/rdoc/generator/template/sdoc/search_index.rhtml", "lib/sdoc.rb", "lib/sdoc/generator.rb", "lib/sdoc/github.rb", "lib/sdoc/helpers.rb", "lib/sdoc/merge.rb", "lib/sdoc/templatable.rb", "sdoc.gemspec", "Gemfile"]
+   s.homepage = "http://github.com/voloko/sdoc"
+   s.rdoc_options = ["--charset=UTF-8"]
+   s.require_paths = ["lib"]
+@@ -23,14 +23,14 @@ Gem::Specification.new do |s|
+     s.specification_version = 3
+ 
+     if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
+-      s.add_runtime_dependency(%q<rdoc>, ["~> 3.10"])
++      s.add_runtime_dependency(%q<rdoc>, ["~> 4.0"])
+       s.add_runtime_dependency(%q<json>, [">= 1.1.3"])
+     else
+-      s.add_dependency(%q<rdoc>, ["~> 3.10"])
++      s.add_dependency(%q<rdoc>, ["~> 4.0"])
+       s.add_dependency(%q<json>, [">= 1.1.3"])
+     end
+   else
+-    s.add_dependency(%q<rdoc>, ["~> 3.10"])
++    s.add_dependency(%q<rdoc>, ["~> 4.0"])
+     s.add_dependency(%q<json>, [">= 1.1.3"])
+   end
+ end
diff --git a/rubygem-sdoc-version-option-fix.patch b/rubygem-sdoc-version-option-fix.patch
new file mode 100644
index 0000000..8bf3b1c
--- /dev/null
+++ b/rubygem-sdoc-version-option-fix.patch
@@ -0,0 +1,32 @@
+diff --git a/bin/sdoc b/bin/sdoc
+index 78640fe..0ba391d 100755
+--- a/bin/sdoc
++++ b/bin/sdoc
+@@ -1,6 +1,11 @@
+ #!/usr/bin/env ruby -KU
+ require 'sdoc'
+ 
++if (ARGV[0] == '--version')
++  puts "sdoc #{SDoc::VERSION}"
++  exit 0
++end
++
+ begin
+   ARGV.push('--format=sdoc') if ARGV.grep(/\A(-f|--fmt|--format|-r|-R|--ri|--ri-site)\b/).empty?
+   r = RDoc::RDoc.new
+
+diff --git a/lib/sdoc.rb b/lib/sdoc.rb
+index daf080e..dab6e9f 100644
+--- a/lib/sdoc.rb
++++ b/lib/sdoc.rb
+@@ -2,6 +2,8 @@ $:.unshift File.dirname(__FILE__)
+ require "rubygems"
+ gem 'rdoc', '~> 4.0.0'
+ 
+-module SDoc end
++module SDoc
++  VERSION = '0.4.0.rc1'
++end
+ 
+ require 'sdoc/generator'
+
diff --git a/rubygem-sdoc.spec b/rubygem-sdoc.spec
new file mode 100644
index 0000000..6d20acf
--- /dev/null
+++ b/rubygem-sdoc.spec
@@ -0,0 +1,124 @@
+# Generated from sdoc-0.3.20.gem by gem2rpm -*- rpm-spec -*-
+%global gem_name sdoc
+
+%global mainver 0.4.0
+%global prever .rc1
+%global release 2
+%{?prever:
+%global gem_instdir %{gem_dir}/gems/%{gem_name}-%{mainver}%{?prever}
+%global gem_docdir %{gem_dir}/doc/%{gem_name}-%{mainver}%{?prever}
+%global gem_cache %{gem_dir}/cache/%{gem_name}-%{mainver}%{?prever}.gem
+%global gem_spec %{gem_dir}/specifications/%{gem_name}-%{mainver}%{?prever}.gemspec
+}
+
+Name: rubygem-%{gem_name}
+Version: %{mainver}
+Release: %{?prever:0.}%{release}%{?prever}%{?dist}
+Summary: RDoc generator to build searchable HTML documentation for Ruby code
+Group: Development/Languages
+# License needs to take RDoc and Darkfish into account apparantly
+# https://github.com/voloko/sdoc/issues/27
+# SDoc itself is MIT, RDoc part is GPLv2 and Darkfish is BSD
+License: MIT and GPLv2 and BSD
+URL: http://github.com/voloko/sdoc
+# Let's build the gem on the latest stable release to avoid confusion
+Source0: https://rubygems.org/gems/%{gem_name}-0.3.20.gem
+# Man pages
+# https://github.com/voloko/sdoc/pull/49
+Source1: sdoc.1
+Source2: sdoc-merge.1
+# Work with RDoc 4.0; this makes it a 0.4.0 pre-release
+# Patches taken from zzak's sdoc rdoc4 branch including my fixes
+# https://github.com/voloko/sdoc/pull/48
+# https://github.com/zzak/sdoc/blob/rdoc-4/
+Patch0: rubygem-sdoc-rdoc-4.0-support.patch
+# Fix sdoc --version to return the correct version
+Patch1: rubygem-sdoc-version-option-fix.patch
+Requires: ruby(release)
+Requires: ruby(rubygems)
+Requires: rubygem(rdoc) => 4.0
+Requires: rubygem(rdoc) < 4.1
+Requires: rubygem(json) >= 1.1.3
+BuildRequires: ruby(release)
+BuildRequires: rubygems-devel
+BuildRequires: ruby 
+BuildArch: noarch
+Provides: rubygem(%{gem_name}) = %{version}-%{release}
+
+%description
+SDoc is simply a wrapper for the rdoc command line tool.
+
+
+%package doc
+Summary: Documentation for %{name}
+Group: Documentation
+Requires: %{name} = %{version}-%{release}
+BuildArch: noarch
+
+%description doc
+Documentation for %{name}.
+
+%prep
+gem unpack %{SOURCE0}
+
+%setup -q -D -T -n  %{gem_name}-0.3.20
+
+gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
+
+%patch0 -p1
+%patch1 -p1
+
+%build
+gem build %{gem_name}.gemspec
+%gem_install -n %{gem_name}-%{version}%{prever}.gem
+
+%install
+mkdir -p %{buildroot}%{gem_dir}
+cp -pa .%{gem_dir}/* \
+        %{buildroot}%{gem_dir}/
+
+mkdir -p %{buildroot}%{_bindir}
+cp -pa .%{_bindir}/* \
+        %{buildroot}%{_bindir}/
+
+# Install man pages into appropriate place.
+mkdir -p %{buildroot}%{_mandir}/man1
+mv %{SOURCE1} %{buildroot}%{_mandir}/man1
+mv %{SOURCE2} %{buildroot}%{_mandir}/man1
+
+find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
+find %{buildroot}%{gem_instdir}/lib/rdoc/generator/template -type f | xargs chmod a-x
+
+%files
+%dir %{gem_instdir}
+%{_bindir}/sdoc
+%{_bindir}/sdoc-merge
+%{gem_instdir}/bin
+%{gem_libdir}
+%exclude %{gem_cache}
+%exclude %{gem_instdir}/.rake_tasks~
+%exclude %{gem_instdir}/.gitignore
+%{gem_spec}
+%doc %{gem_instdir}/LICENSE
+%doc %{_mandir}/man1/sdoc-merge.1*
+%doc %{_mandir}/man1/sdoc.1*
+
+%files doc
+%doc %{gem_docdir}
+%doc %{gem_instdir}/README.md
+%{gem_instdir}/Gemfile
+%{gem_instdir}/%{gem_name}.gemspec
+%{gem_instdir}/Rakefile
+
+%changelog
+* Mon Nov 25 2013 Josef Stribny <jstribny at redhat.com> - 0.4.0-2
+- sdoc 0.4.0 git pre-release to support RDoc 4.0
+
+* Wed Nov 06 2013 Josef Stribny <jstribny at redhat.com> - 0.4.0-1
+- sdoc 0.4.0 git pre-release to support RDoc 4.0
+
+* Tue Aug 06 2013 Josef Stribny <jstribny at redhat.com> - 0.3.20-2
+- Add man pages
+
+* Tue Jul 30 2013 Josef Stribny <jstribny at redhat.com> - 0.3.20-1
+- Initial package
diff --git a/sdoc-merge.1 b/sdoc-merge.1
new file mode 100644
index 0000000..b9f5605
--- /dev/null
+++ b/sdoc-merge.1
@@ -0,0 +1,57 @@
+'\" t
+.\"     Title: sdoc-merge
+.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
+.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
+.\"      Date: 08/06/2013
+.\"    Manual: \ \&
+.\"    Source: \ \&
+.\"  Language: English
+.\"
+.TH "SDOC\-MERGE" "1" "08/06/2013" "\ \&" "\ \&"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+sdoc-merge \- a command line tool to merge multiple sdoc folders into a single documentation site
+.SH "SYNOPSIS"
+.sp
+\fBsdoc\-merge\fR [\fIOPTIONS\fR] \fIDIRECTORIES\fR
+.SH "DESCRIPTION"
+.sp
+sdoc\-merge is a command line tool to merge multiple sdoc folders into a single documentation site\&. It\(cqs part of SDoc, see "man sdoc" for more details\&.
+.sp
+Example:
+.sp
+sdoc\-merge \-\-title "Ruby v1\&.9, Rails v2\&.3\&.2\&.1" \-\-op merged \-\-names "Ruby,Rails" ruby\-v1\&.9 rails\-v2\&.3\&.2\&.1
+.SH "OPTIONS"
+.PP
+\fB\-n, \-\-names\fR \fI[NAMES]\fR
+.RS 4
+Set the output directory
+.RE
+.PP
+\fB\-o, \-\-op\fR \fI[DIRECTORY]\fR
+.RS 4
+Set the output directory
+.RE
+.PP
+\fB\-t, \-\-title\fR \fI[TITLE]\fR
+.RS 4
+Set the title of merged file
+.RE
diff --git a/sdoc.1 b/sdoc.1
new file mode 100644
index 0000000..44a01d0
--- /dev/null
+++ b/sdoc.1
@@ -0,0 +1,44 @@
+'\" t
+.\"     Title: sdoc
+.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
+.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
+.\"      Date: 08/06/2013
+.\"    Manual: \ \&
+.\"    Source: \ \&
+.\"  Language: English
+.\"
+.TH "SDOC" "1" "08/06/2013" "\ \&" "\ \&"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+sdoc \- RDoc generator to build searchable HTML documentation for Ruby code
+.SH "SYNOPSIS"
+.sp
+\fBsdoc\fR [\fIOPTIONS\fR] \fIPROJECTDIR\fR
+.SH "DESCRIPTION"
+.sp
+SDoc is simply a wrapper for the rdoc command line tool\&. See "sdoc \-\-help" for more details\&. \fI\-\-fmt\fR is set to shtml by default\&. The default template \fI\-T\fR is shtml, but you can also use the direct template\&.
+.sp
+Example:
+.sp
+sdoc \-o doc/rails \-T direct rails
+.SH "OPTIONS"
+.sp
+See "sdoc \-\-help" to see all the available options\&.
diff --git a/sources b/sources
index e69de29..58e09cc 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+93e0c7376f58f85097f260f79db73601  sdoc-0.3.20.gem


More information about the scm-commits mailing list