Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Support for all rubygems versions #13

Closed
wants to merge 1 commit into from

3 participants

chaffeqa Gustavo Delfino Ryan Davis
chaffeqa

Added regression support for rubygems <1.8.

Removed rubygems version require from hoe.

Added rdoc and minitest development dependencies to hoe

Note: Its tough to write tests for... but I simply made another rvm gemset on ruby 1.8.7, rubygems version: 1.4.2 and the tests all passed. (had to install rdoc and minitest gems, hence the development dependencies)

Perhaps those development dependencies need to be runtime?

chaffeqa Added regression support for rubygems <1.8. Removed rubygems version …
…require from hoe. added rdoc and minitest development dependecies to hoe
172c6c6
Gustavo Delfino

+1

Ryan Davis
Owner

Added regression support for rubygems <1.8.
Removed rubygems version require from hoe.

No case has been made as to why I'd want to support more complex code. Instead, I clarified in the readme that rubygems 1.8+ is required per @agrimm's issue #18.

Added rdoc and minitest development dependencies to hoe

The dependencies are already there by virtue of hoe plugins:

  s.add_development_dependency(%q<minitest>, [">= 2.0.2"])
  s.add_development_dependency(%q<hoe>, [">= 2.9.1"])
Ryan Davis zenspider closed this June 07, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Nov 19, 2011
chaffeqa Added regression support for rubygems <1.8. Removed rubygems version …
…require from hoe. added rdoc and minitest development dependecies to hoe
172c6c6
This page is out of date. Refresh to see the latest.

Showing 2 changed files with 8 additions and 3 deletions. Show diff stats Hide diff stats

  1. 3  Rakefile
  2. 8  lib/autotest.rb
3  Rakefile
@@ -13,7 +13,8 @@ Hoe.spec "ZenTest" do
13 13
   developer 'Ryan Davis', 'ryand-ruby@zenspider.com'
14 14
   developer 'Eric Hodel', 'drbrain@segment7.net'
15 15
 
16  
-  require_rubygems_version "~> 1.8"
  16
+  dependency "rdoc", "~> 3", :development
  17
+  dependency "minitest", "~> 2", :development
17 18
 end
18 19
 
19 20
 desc "run autotest on itself"
8  lib/autotest.rb
@@ -225,8 +225,12 @@ def self.autodiscover
225 225
     # documented in multiple books.
226 226
     #
227 227
     # I'm removing this code once a sane rspec goes out.
228  
-
229  
-    hacky_discovery = Gem::Specification.any? { |s| s.name =~ /^rspec/ }
  228
+    
  229
+    hacky_discovery = case Gem::VERSION.to_f < "1.8".to_f
  230
+    when true then Gem.source_index.gems.any? { |n,_| n =~ /^rspec/ }
  231
+    else Gem::Specification.any? { |s| s.name =~ /^rspec/ }
  232
+    end
  233
+      
230 234
     $: << '.' if hacky_discovery
231 235
 
232 236
     Gem.find_files("autotest/discover").each do |f|
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.