Fixed Rubygems deprecation messages

This commit is contained in:
Thibaud Guillaume-Gentil 2011-05-06 21:23:30 +02:00
parent f7e9e42dce
commit 2da724f5e9
2 changed files with 2 additions and 2 deletions

View File

@ -93,7 +93,7 @@ module Guard
end end
def locate_guard(name) def locate_guard(name)
Gem.source_index.find_name("guard-#{name}").last.full_gem_path Gem::Specification.find_by_name("guard-#{name}").full_gem_path
rescue rescue
UI.error "Could not find 'guard-#{name}' gem path." UI.error "Could not find 'guard-#{name}' gem path."
end end

View File

@ -111,7 +111,7 @@ describe Guard do
describe ".locate_guard" do describe ".locate_guard" do
it "returns the path of the guard gem" do it "returns the path of the guard gem" do
Guard.locate_guard('rspec').should == Gem.source_index.find_name("guard-rspec").last.full_gem_path Guard.locate_guard('rspec').should == Gem::Specification.find_by_name("guard-rspec").full_gem_path
end end
end end
end end