Push supporter space to 10GB, BW to 2TB

This commit is contained in:
Kyle Drake 2015-03-12 13:00:55 -05:00
parent 5450ab4e83
commit 0f958023d0
3 changed files with 7 additions and 7 deletions

View file

@ -12,9 +12,9 @@ class Numeric
def to_bytes_pretty def to_bytes_pretty
space = (self.to_f / ONE_MEGABYTE).round(2) space = (self.to_f / ONE_MEGABYTE).round(2)
space = space.to_i if space.denominator == 1 space = space.to_i if space.denominator == 1
if space >= 1000000 # if space >= 1000000
"#{space/1000000} TB" # "#{space/1000000} TB"
elsif space >= 1000 if space >= 1000
"#{space/1000} GB" "#{space/1000} GB"
else else
"#{space} MB" "#{space} MB"
@ -54,4 +54,4 @@ class Numeric
def to_space_pretty def to_space_pretty
to_bytes_pretty to_bytes_pretty
end end
end end

View file

@ -90,8 +90,8 @@ class Site < Sequel::Model
PLAN_FEATURES[:supporter] = { PLAN_FEATURES[:supporter] = {
name: 'Supporter', name: 'Supporter',
space: Filesize.from('5GB').to_i, space: Filesize.from('10GB').to_i,
bandwidth: Filesize.from('1TB').to_i, bandwidth: Filesize.from('2TB').to_i,
price: 5, price: 5,
unlimited_site_creation: true, unlimited_site_creation: true,
custom_ssl_certificates: true, custom_ssl_certificates: true,

View file

@ -110,7 +110,7 @@
<% end %> <% end %>
<ul> <ul>
<li><strong><%= Site::PLAN_FEATURES[:supporter][:space].to_space_pretty %></strong> storage</li> <li><strong><%= Site::PLAN_FEATURES[:supporter][:space].to_space_pretty %></strong> storage</li>
<li><strong>1000 GB</strong> bandwidth</li> <li><strong><%= Site::PLAN_FEATURES[:supporter][:bandwidth].to_space_pretty %></strong> bandwidth</li>
</ul> </ul>
<ul> <ul>
<li>Lots of Web Space</li> <li>Lots of Web Space</li>