Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

release 0.1.11 -- avoid activating Hanna gem in rubygems_plugin.rb

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 #7
  • Loading branch information...
commit 740a640b3d66788b12aa412b163ecc56fe54c730 1 parent 028f2dd
@mislav authored
Showing with 10 additions and 6 deletions.
  1. +2 −2 hanna.gemspec
  2. +1 −1  lib/hanna/version.rb
  3. +7 −3 lib/rubygems_plugin.rb
View
4 hanna.gemspec
@@ -2,11 +2,11 @@
Gem::Specification.new do |s|
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.authors = ["Mislav Marohni\304\207"]
- s.date = %q{2009-09-17}
+ s.date = %q{2009-09-21}
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}
View
2  lib/hanna/version.rb
@@ -1,6 +1,6 @@
module Hanna
- VERSION = '0.1.10'
+ VERSION = '0.1.11'
# The version of RDoc that Hanna should use
RDOC_VERSION = '2.3.0'
View
10 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/requirement'
- require 'hanna/version'
+
+ # define the Hanna namespace to prevent actions of rubygems_plugin from older versions
+ module Hanna; end
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
+ require 'rubygems/requirement'
+ load File.expand_path(File.join(File.dirname(__FILE__), 'hanna', 'version.rb'))
+
Hanna::require_rdoc(false) # don't terminate if failed
# call the original method

4 comments on commit 740a640

@bquorning

I get some “already initialized constant” errors after updating from 0.1.10 to 0.1.11:

$$ sudo gem install burke-monkeysupport
Building native extensions. This could take a while...
Successfully installed burke-monkeysupport-0.1.1
1 gem installed
Installing ri documentation for burke-monkeysupport-0.1.1...
/Library/Ruby/Gems/1.8/gems/mislav-hanna-0.1.11/lib/hanna/version.rb:3: warning: already initialized constant VERSION
/Library/Ruby/Gems/1.8/gems/mislav-hanna-0.1.11/lib/hanna/version.rb:6: warning: already initialized constant RDOC_VERSION
/Library/Ruby/Gems/1.8/gems/mislav-hanna-0.1.11/lib/hanna/version.rb:7: warning: already initialized constant RDOC_VERSION_REQUIREMENT
Updating ri class cache with 2584 classes...
/Library/Ruby/Gems/1.8/gems/mislav-hanna-0.1.11/lib/hanna/version.rb:3: warning: already initialized constant VERSION
/Library/Ruby/Gems/1.8/gems/mislav-hanna-0.1.11/lib/hanna/version.rb:6: warning: already initialized constant RDOC_VERSION
/Library/Ruby/Gems/1.8/gems/mislav-hanna-0.1.11/lib/hanna/version.rb:7: warning: already initialized constant RDOC_VERSION_REQUIREMENT
Installing RDoc documentation for burke-monkeysupport-0.1.1...

@bquorning

Also, this commit adds an RDoc failure:

RDoc failure in lib/rubygems_plugin.rb at or around line 12 column 36

Before reporting this, could you check that the file

you're documenting compiles cleanly--RDoc is not a

full Ruby parser, and gets confused easily if fed

invalid programs.

The internal error was:

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rdoc/code_objects.rb:275:in add_require': undefined methodadd_require' for nil:NilClass (NoMethodError)

from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:2427:in parse_require'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:1706:in
parse_statements'

from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:1986:in `parse_method'

@mislav
Owner

Yeah, the latest release isn't perfect either. Please open up tickets for these issues and I will try to get to them asap, as they bother me too

@bquorning

Will do

Please sign in to comment.
Something went wrong with that request. Please try again.