Skip to content

Instantly share code, notes, and snippets.

@jhsu
Created January 6, 2010 15:18
Show Gist options
  • Select an option

  • Save jhsu/270328 to your computer and use it in GitHub Desktop.

Select an option

Save jhsu/270328 to your computer and use it in GitHub Desktop.
diff --git a/app/models/rubygem.rb b/app/models/rubygem.rb
index 95feba0..d097715 100644
--- a/app/models/rubygem.rb
+++ b/app/models/rubygem.rb
@@ -77,13 +77,14 @@ class Rubygem < ActiveRecord::Base
def payload(version = versions.latest, host_with_port = HOST)
{
- :name => name,
- :downloads => downloads,
- :version => version.number,
- :authors => version.authors,
- :info => version.info,
- 'project_uri' => "http://#{host_with_port}/gems/#{name}",
- 'gem_uri' => "http://#{host_with_port}/gems/#{version.full_name}.gem"
+ :name => name,
+ :downloads => downloads,
+ :version => version.number,
+ :version_downloads => version.downloads_count,
+ :authors => version.authors,
+ :info => version.info,
+ 'project_uri' => "http://#{host_with_port}/gems/#{name}",
+ 'gem_uri' => "http://#{host_with_port}/gems/#{version.full_name}.gem"
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment