diff --git a/.gitignore b/.gitignore index 97123b0..cd9970a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /sdoc-0.3.20.gem +/sdoc-0.4.0.gem diff --git a/rubygem-sdoc-0.4.0-relax-json-dep.patch b/rubygem-sdoc-0.4.0-relax-json-dep.patch new file mode 100644 index 0000000..0edbe63 --- /dev/null +++ b/rubygem-sdoc-0.4.0-relax-json-dep.patch @@ -0,0 +1,28 @@ +diff --git a/sdoc.gemspec b/sdoc.gemspec +index 45b2d54..19ffaf7 100644 +--- a/sdoc.gemspec ++++ b/sdoc.gemspec +@@ -26,20 +26,20 @@ Gem::Specification.new do |s| + + if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then + s.add_runtime_dependency(%q, ["< 5.0", "~> 4.0"]) +- s.add_runtime_dependency(%q, ["~> 1.8"]) ++ s.add_runtime_dependency(%q, [">= 1.7.7"]) + s.add_development_dependency(%q, ["~> 1.3"]) + s.add_development_dependency(%q, [">= 0"]) + s.add_development_dependency(%q, ["~> 4.0"]) + else + s.add_dependency(%q, ["< 5.0", "~> 4.0"]) +- s.add_dependency(%q, ["~> 1.8"]) ++ s.add_dependency(%q, [">= 1.7.7"]) + s.add_dependency(%q, ["~> 1.3"]) + s.add_dependency(%q, [">= 0"]) + s.add_dependency(%q, ["~> 4.0"]) + end + else + s.add_dependency(%q, ["< 5.0", "~> 4.0"]) +- s.add_dependency(%q, ["~> 1.8"]) ++ s.add_dependency(%q, [">= 1.7.7"]) + s.add_dependency(%q, ["~> 1.3"]) + s.add_dependency(%q, [">= 0"]) + s.add_dependency(%q, ["~> 4.0"]) diff --git a/rubygem-sdoc-rdoc-4.0-support.patch b/rubygem-sdoc-rdoc-4.0-support.patch deleted file mode 100644 index f86fdb3..0000000 --- a/rubygem-sdoc-rdoc-4.0-support.patch +++ /dev/null @@ -1,650 +0,0 @@ -From e581d620378362d48c8f13a966be633b5da45414 Mon Sep 17 00:00:00 2001 -From: Yuichiro Suzuki -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 -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