Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added regression support for rubygems <1.8. Removed rubygems version …

…require from hoe. added rdoc and minitest development dependecies to hoe
  • Loading branch information...
commit 172c6c6b79e64761ae9a47f166a5d9b8ec861c87 1 parent 8cbc2a6
@chaffeqa authored
Showing with 8 additions and 3 deletions.
  1. +2 −1  Rakefile
  2. +6 −2 lib/autotest.rb
View
3  Rakefile
@@ -13,7 +13,8 @@ Hoe.spec "ZenTest" do
developer 'Ryan Davis', 'ryand-ruby@zenspider.com'
developer 'Eric Hodel', 'drbrain@segment7.net'
- require_rubygems_version "~> 1.8"
+ dependency "rdoc", "~> 3", :development
+ dependency "minitest", "~> 2", :development
end
desc "run autotest on itself"
View
8 lib/autotest.rb
@@ -225,8 +225,12 @@ def self.autodiscover
# documented in multiple books.
#
# I'm removing this code once a sane rspec goes out.
-
- hacky_discovery = Gem::Specification.any? { |s| s.name =~ /^rspec/ }
+
+ hacky_discovery = case Gem::VERSION.to_f < "1.8".to_f
+ when true then Gem.source_index.gems.any? { |n,_| n =~ /^rspec/ }
+ else Gem::Specification.any? { |s| s.name =~ /^rspec/ }
+ end
+
$: << '.' if hacky_discovery
Gem.find_files("autotest/discover").each do |f|
Please sign in to comment.
Something went wrong with that request. Please try again.