Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of git@github.com:quirkey/gembox

  • Loading branch information...
commit 3defa9dd38142fb0283146825bc5cf7a00895746 2 parents 44673f9 + 23f9b9a
@quirkey authored
Showing with 7 additions and 7 deletions.
  1. +3 −3 lib/gembox/gems.rb
  2. +4 −4 views/layout.haml
View
6 lib/gembox/gems.rb
@@ -28,8 +28,8 @@ def search(search_term, version = nil, strict = false)
def stats
num_versions = source_index.length
num_gems = local_gems.length
- oldest_gem = source_index.min {|a,b| a[1].date <=> b[1].date }.last
- {:num_versions => num_versions, :num_gems => num_gems, :oldest_gem => oldest_gem}
+ newest_gem = source_index.max {|a,b| a[1].date <=> b[1].date }.last
+ {:num_versions => num_versions, :num_gems => num_gems, :newest_gem => newest_gem}
end
protected
@@ -56,4 +56,4 @@ def reload?
end
end
-end
+end
View
8 views/layout.haml
@@ -25,10 +25,10 @@
versions of
=@stats[:num_gems]
gems.
- Your oldest gem is
- =link_to_gem(@stats[:oldest_gem])
+ Your newest gem is
+ =link_to_gem(@stats[:newest_gem])
from
- =ts(@stats[:oldest_gem].date)
+ =ts(@stats[:newest_gem].date)
#main.contained
=yield
@@ -48,4 +48,4 @@
:erb
<script type="text/javascript" charset="utf-8">
jQuery('body').data('sinatra-env', '<%= options.environment %>');
- </script>
+ </script>
Please sign in to comment.
Something went wrong with that request. Please try again.