From 371f8ec4651f72845e9fb9273e942db826998cd0 Mon Sep 17 00:00:00 2001 From: Kyle Drake Date: Sat, 3 Jun 2017 18:08:35 -0700 Subject: [PATCH] comparison to gcs and aws prices --- ext/numeric.rb | 8 ++++++++ views/supporter/_compare.erb | 28 ++++++++++++++++++++++++---- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/ext/numeric.rb b/ext/numeric.rb index 67ebda68..f9377066 100644 --- a/ext/numeric.rb +++ b/ext/numeric.rb @@ -30,6 +30,14 @@ class Numeric "#{computed} #{unit}" end + def to_gigabytes_pretty + self.to_gigabytes.to_s + ' GB' + end + + def to_gigabytes + self / (1000**3) + end + def to_comma_separated self.to_i.to_s.chars.to_a.reverse.each_slice(3).map(&:join).join(",").reverse end diff --git a/views/supporter/_compare.erb b/views/supporter/_compare.erb index aef7a1cd..c91d327d 100644 --- a/views/supporter/_compare.erb +++ b/views/supporter/_compare.erb @@ -13,15 +13,15 @@ Storage - <%= Site::PLAN_FEATURES[:free][:space].to_bytes_pretty %> - <%= (Site::PLAN_FEATURES[:supporter][:space] / (10**6)).to_comma_separated %> MB + <%= Site::PLAN_FEATURES[:free][:space].to_gigabytes_pretty %> + <%= (Site::PLAN_FEATURES[:supporter][:space]).to_gigabytes_pretty %> Bandwidth - <%= Site::PLAN_FEATURES[:free][:bandwidth].to_bytes_pretty %> - <%= Site::PLAN_FEATURES[:supporter][:bandwidth].to_bytes_pretty %> + <%= Site::PLAN_FEATURES[:free][:bandwidth].to_gigabytes_pretty %> + <%= Site::PLAN_FEATURES[:supporter][:bandwidth].to_gigabytes_pretty %> @@ -156,8 +156,28 @@ + + + + Cost Savings vs AWS * + + $37.50/mo + $482.84/mo + + + + + Cost Savings vs GCS * + + $16.03/mo + $155.00/mo + +

+ * AWS and GCS price estimates only include storage and CDN bandwidth, it does not include cost of HTTP requests or cache purging/reloading. Actual costs would be much higher. +

+