From 5a1c9b04e239ed69677a9437f6c13ab30f56ae1f Mon Sep 17 00:00:00 2001 From: David Cornu Date: Thu, 26 May 2016 15:21:29 -0400 Subject: [PATCH] Use the HTTPS URL by default --- lib/gchart.rb | 4 ++-- spec/gchart_spec.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/gchart.rb b/lib/gchart.rb index 8b61268..62acb17 100644 --- a/lib/gchart.rb +++ b/lib/gchart.rb @@ -10,7 +10,7 @@ class Gchart include GchartInfo - def self.url(use_ssl = false) + def self.url(use_ssl = true) if use_ssl 'https://chart.googleapis.com/chart?' else @@ -88,7 +88,7 @@ def initialize(options={}) @grouped = false @overlapped = false - @use_ssl = false + @use_ssl = true @encoding = 'simple' # @max_value = 'auto' # @min_value defaults to nil meaning zero diff --git a/spec/gchart_spec.rb b/spec/gchart_spec.rb index ced8af9..2b56394 100644 --- a/spec/gchart_spec.rb +++ b/spec/gchart_spec.rb @@ -31,8 +31,8 @@ expect(@chart).to include("chtt=title\nsubtitle") end - it "should include the Google URL" do - expect(@chart).to include("http://chart.apis.google.com/chart?") + it "should include the HTTPS Google URL" do + expect(@chart).to include("https://chart.googleapis.com/chart?") end it "should have a default size" do