New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add size to versions #484

Merged
merged 7 commits into from Jul 12, 2013

size_in_kilobytes -> number_to_human_size

  • Loading branch information...
cmeiklejohn authored and gnarg committed Jul 13, 2011
commit a963feb82c3571ddf7eb0927092e5d47710b151f
View
@@ -132,6 +132,10 @@ def yanked?
!indexed
end
def sized?
size?
end
def info
[ description, summary, "This rubygem does not have a description or summary." ].detect(&:present?)
end
@@ -4,6 +4,9 @@
<% if version.platformed? %>
<span class="platform"><%= version.platform %></span>
<% end %>
<% if version.sized? %>
<span class="size">(<%= number_to_human_size(version.size) %>)</span>

This comment has been minimized.

@adkron

adkron Nov 6, 2012

Contributor

Can we get rid of the if and make version.size return "NA" if there is no size? It would follow tell don't ask, and make the view more consistant on how it looks?

@adkron

adkron Nov 6, 2012

Contributor

Can we get rid of the if and make version.size return "NA" if there is no size? It would follow tell don't ask, and make the view more consistant on how it looks?

This comment has been minimized.

@qrush

qrush Nov 7, 2012

Member

I'm fine with this approach. N/A sounds fine to me!

@qrush

qrush Nov 7, 2012

Member

I'm fine with this approach. N/A sounds fine to me!

<% end %>
<% if version.yanked? -%>
<span class="yanked"><%= t '.yanked' %></span>
<% end -%>
View
@@ -11,6 +11,7 @@ Feature: Push Gems
And I visit the gem page for "RGem"
Then I should see "RGem"
And I should see "1.2.3"
And I should see "(3 KB)"
Scenario: User pushes existing version of existing gem
Given I am signed up as "email@person.com"
ProTip! Use n and p to navigate between commits in a pull request.