Skip to content

Commit

Permalink
Use Gem.source_index.entries instead of all_gems (Rails compatibility)
Browse files Browse the repository at this point in the history
Closes gh-36
  • Loading branch information
lsegal committed Nov 12, 2009
1 parent 9b499b9 commit 518e16e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/yard.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def self.parse_string(*args) Parser::SourceParser.parse_string(*args) end
#
# @return [true] always returns true
def self.load_plugins
Gem.source_index.all_gems.values.each do |gem|
Gem.source_index.entries.each do |pkgname, gem|
begin
if gem.name =~ /^yard[-_]/
log.debug "Loading plugin '#{gem.name}'..."
Expand Down
2 changes: 1 addition & 1 deletion spec/yard_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
v.should_receive(:name).at_least(1).times.and_return(k)
end
source_mock = mock(:source_index)
source_mock.should_receive(:all_gems).and_return(plugins)
source_mock.should_receive(:entries).and_return(plugins)
Gem.should_receive(:source_index).and_return(source_mock)
YARD.should_receive(:require).with('yard_plugin').and_return(true)
YARD.should_receive(:require).with('yard-plugin').and_return(true)
Expand Down

0 comments on commit 518e16e

Please sign in to comment.