Bugs item #29171, was opened at 2011-05-06 02:30
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=29171&group_id=126

Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Bhavin Kamani (beekay)
Assigned to: Nobody (None)
Summary: spork fails to work with rubygems 1.8.0/1.8.1 but works with 1.7.2  

Initial Comment:
After doing a system upgrade spork fails to work with 1.8.0/1.8.1. It appears 
to be rubygems issue as  stacktrace (https://gist.github.com/956888) leads to a 
rubygem deprecated method "latest_load_paths". All works well when I revert 
back to 1.7.2

----------------------------------------------------------------------

Comment By: Tim Harper (timcharper)
Date: 2011-05-06 14:38

Message:
Well, I feel silly :) Should have read the docs better... find_files is a MUCH 
better method.  I ended up hacking around it by implementing my own 
latest_load_paths... but yes, find_files is much preferred.  Thank you!

----------------------------------------------------------------------

Comment By: Ryan Davis (zenspider)
Date: 2011-05-06 14:31

Message:
So you're the one! :P

I was wondering who used that call. Google codesearch came up with nothing. We 
don't have any tests on that function so it escaped the wrath of my last 
cleanup and is apparently currently (inadvertently) broken. We'll get a fix out 
for it in a bit but in the meantime, I want to address Tim's question about 
what to use.

I don't know why latest_load_paths was added to rubygems, but I wouldn't use it 
for what you're doing in the first place. Use Gem.find_files instead. It was 
intended for exactly this purpose. The rdoc for it will point you in the right 
direction. You'd probably replace your detect_and_require as well as 
other_spork_gem_load_paths entirely with something like:

    Gem.find_files('spork/test_framework/*.rb').each do |path|
      require path
    end


----------------------------------------------------------------------

Comment By: Tim Harper (timcharper)
Date: 2011-05-06 09:33

Message:
What can a gem author use in place of latest_load_paths?  I'm currently using 
the method to auto discover peer plug-ins (such as Spork-testunit) and activate 
code in them.

With latest_load_paths removed, it seems that I have to resort to scanning the 
gem paths myself? That's kind of a bummer, if you ask me.



----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=29171&group_id=126
_______________________________________________
Rubygems-developers mailing list
http://rubyforge.org/projects/rubygems
Rubygems-developers@rubyforge.org
http://rubyforge.org/mailman/listinfo/rubygems-developers

Reply via email to