Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Commit

Permalink
release 0.1.11 -- avoid activating Hanna gem in rubygems_plugin.rb
Browse files Browse the repository at this point in the history
This is critical. The version of rubygems_plugin from Hanna v0.1.10
always required "hanna/version", which activated Hanna and Haml gems
and made using the newer Haml versions impossible.

References mislav#7
  • Loading branch information
mislav committed Sep 21, 2009
1 parent 028f2dd commit 740a640
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions hanna.gemspec
Expand Up @@ -2,11 +2,11 @@


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


s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Mislav Marohni\304\207"] s.authors = ["Mislav Marohni\304\207"]
s.date = %q{2009-09-17} s.date = %q{2009-09-21}
s.default_executable = %q{hanna} 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.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.email = %q{mislav.marohnic@gmail.com}
Expand Down
2 changes: 1 addition & 1 deletion lib/hanna/version.rb
@@ -1,6 +1,6 @@
module Hanna module Hanna


VERSION = '0.1.10' VERSION = '0.1.11'


# The version of RDoc that Hanna should use # The version of RDoc that Hanna should use
RDOC_VERSION = '2.3.0' RDOC_VERSION = '2.3.0'
Expand Down
10 changes: 7 additions & 3 deletions lib/rubygems_plugin.rb
@@ -1,13 +1,17 @@
unless defined?(Hanna) or defined?(RDoc) unless defined?(::Hanna) or defined?(::RDoc)
require 'rubygems/doc_manager' require 'rubygems/doc_manager'
require 'rubygems/requirement'
require 'hanna/version' # define the Hanna namespace to prevent actions of rubygems_plugin from older versions
module Hanna; end


class << Gem::DocManager class << Gem::DocManager
alias load_rdoc_without_version_constraint load_rdoc alias load_rdoc_without_version_constraint load_rdoc


# overwrite load_rdoc to load the exact version of RDoc that Hanna works with # overwrite load_rdoc to load the exact version of RDoc that Hanna works with
def load_rdoc def load_rdoc
require 'rubygems/requirement'
load File.expand_path(File.join(File.dirname(__FILE__), 'hanna', 'version.rb'))

Hanna::require_rdoc(false) # don't terminate if failed Hanna::require_rdoc(false) # don't terminate if failed


# call the original method # call the original method
Expand Down

0 comments on commit 740a640

Please sign in to comment.