Permalink
Browse files

Respect prerelease gemspecs for listing

  • Loading branch information...
1 parent 58856cb commit 973a6255ba318b6a6458700e568e8c3e092248c9 @railsbros-dirk railsbros-dirk committed with May 16, 2010
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/geminabox.rb
View
@@ -16,7 +16,9 @@ class Geminabox < Sinatra::Base
get '/' do
begin
- @gems = Marshal.load(Gem.gunzip(Gem.read_binary( File.join(options.data, "specs.#{Gem.marshal_version}.gz")) ))
+ @gems = %w(latest_specs prerelease_specs).inject([]){|gems, spec|
+ gems + Marshal.load(Gem.gunzip(Gem.read_binary( File.join(options.data, "#{spec}.#{Gem.marshal_version}.gz")) ))
+ }
rescue
@gems = []
end

0 comments on commit 973a625

Please sign in to comment.