Navigation Menu

Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

Commit

Permalink
release 0.1.9 -- force rubygems to use the correct version of RDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav committed Sep 16, 2009
1 parent 6f20d92 commit 5e88f3b
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Expand Up @@ -2,7 +2,7 @@ require 'echoe'
require 'lib/hanna/rdoc_version'

Echoe.new('hanna') do |p|
p.version = '0.1.8'
p.version = '0.1.9'

p.summary = "An RDoc template that scales"
p.description = "Hanna is an RDoc implemented in Haml, making its source clean and maintainable. It's built with simplicity, beauty and ease of browsing in mind."
Expand Down
8 changes: 4 additions & 4 deletions hanna.gemspec
Expand Up @@ -2,17 +2,17 @@

Gem::Specification.new do |s|
s.name = %q{hanna}
s.version = "0.1.8"
s.version = "0.1.9"

s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
s.authors = ["Mislav Marohni\304\207"]
s.date = %q{2009-08-21}
s.date = %q{2009-09-16}
s.default_executable = %q{hanna}
s.description = %q{Hanna is an RDoc implemented in Haml, making its source clean and maintainable. It's built with simplicity, beauty and ease of browsing in mind.}
s.email = %q{mislav.marohnic@gmail.com}
s.executables = ["hanna"]
s.extra_rdoc_files = ["bin/hanna", "lib/hanna/hanna.rb", "lib/hanna/rdoc_version.rb", "lib/hanna/rdoctask.rb", "lib/hanna/template_files/class_index.haml", "lib/hanna/template_files/file_index.haml", "lib/hanna/template_files/index.haml", "lib/hanna/template_files/layout.haml", "lib/hanna/template_files/method_index.haml", "lib/hanna/template_files/method_list.haml", "lib/hanna/template_files/method_search.js", "lib/hanna/template_files/page.haml", "lib/hanna/template_files/prototype-1.6.0.3.js", "lib/hanna/template_files/sections.haml", "lib/hanna/template_files/styles.sass", "lib/hanna/template_helpers.rb", "lib/hanna/template_page_patch.rb", "lib/hanna.rb", "README.markdown"]
s.files = ["bin/hanna", "hanna.gemspec", "lib/hanna/hanna.rb", "lib/hanna/rdoc_version.rb", "lib/hanna/rdoctask.rb", "lib/hanna/template_files/class_index.haml", "lib/hanna/template_files/file_index.haml", "lib/hanna/template_files/index.haml", "lib/hanna/template_files/layout.haml", "lib/hanna/template_files/method_index.haml", "lib/hanna/template_files/method_list.haml", "lib/hanna/template_files/method_search.js", "lib/hanna/template_files/page.haml", "lib/hanna/template_files/prototype-1.6.0.3.js", "lib/hanna/template_files/sections.haml", "lib/hanna/template_files/styles.sass", "lib/hanna/template_helpers.rb", "lib/hanna/template_page_patch.rb", "lib/hanna.rb", "Manifest", "Rakefile", "README.markdown"]
s.extra_rdoc_files = ["README.markdown", "bin/hanna", "lib/hanna.rb", "lib/hanna/hanna.rb", "lib/hanna/rdoc_version.rb", "lib/hanna/rdoctask.rb", "lib/hanna/template_files/class_index.haml", "lib/hanna/template_files/file_index.haml", "lib/hanna/template_files/index.haml", "lib/hanna/template_files/layout.haml", "lib/hanna/template_files/method_index.haml", "lib/hanna/template_files/method_list.haml", "lib/hanna/template_files/method_search.js", "lib/hanna/template_files/page.haml", "lib/hanna/template_files/prototype-1.6.0.3.js", "lib/hanna/template_files/sections.haml", "lib/hanna/template_files/styles.sass", "lib/hanna/template_helpers.rb", "lib/hanna/template_page_patch.rb", "lib/rubygems_plugin.rb"]
s.files = ["Manifest", "README.markdown", "Rakefile", "bin/hanna", "hanna.gemspec", "lib/hanna.rb", "lib/hanna/hanna.rb", "lib/hanna/rdoc_version.rb", "lib/hanna/rdoctask.rb", "lib/hanna/template_files/class_index.haml", "lib/hanna/template_files/file_index.haml", "lib/hanna/template_files/index.haml", "lib/hanna/template_files/layout.haml", "lib/hanna/template_files/method_index.haml", "lib/hanna/template_files/method_list.haml", "lib/hanna/template_files/method_search.js", "lib/hanna/template_files/page.haml", "lib/hanna/template_files/prototype-1.6.0.3.js", "lib/hanna/template_files/sections.haml", "lib/hanna/template_files/styles.sass", "lib/hanna/template_helpers.rb", "lib/hanna/template_page_patch.rb", "lib/rubygems_plugin.rb", "sample/output/classes/MockProject.html", "sample/output/classes/MockProject/EnterpriseProtocol.html", "sample/output/classes/MockProject/FunkyClass.html", "sample/output/created.rid", "sample/output/files/sample/source/LICENSE.html", "sample/output/index.html", "sample/output/styles.css"]
s.homepage = %q{http://github.com/mislav/hanna}
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Hanna", "--main", "README.markdown"]
s.require_paths = ["lib"]
Expand Down
27 changes: 27 additions & 0 deletions lib/rubygems_plugin.rb
@@ -0,0 +1,27 @@
unless defined?(Hanna) or defined?(RDoc)
require 'rubygems/doc_manager'
require 'rubygems/requirement'
require 'hanna/rdoc_version'

class << Gem::DocManager
alias load_rdoc_without_version_constraint load_rdoc

# overwrite load_rdoc to load the exact version of RDoc that Hanna works with
def load_rdoc
requirement = Gem::Requirement.create Hanna::RDOC_VERSION_REQUIREMENT

begin
gem 'rdoc', requirement.to_s
rescue Gem::LoadError
# ignore
end

# call the original method
load_rdoc_without_version_constraint

unless requirement.satisfied_by? rdoc_version
raise Gem::DocumentError, "ERROR: RDoc version #{requirement} not installed"
end
end
end
end

0 comments on commit 5e88f3b

Please sign in to comment.