googlecharts 1.6.6 → 1.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +3 -0
- data/lib/gchart.rb +2 -1
- data/lib/gchart/version.rb +1 -1
- data/spec/gchart_spec.rb +1 -2
- metadata +13 -2
data/History.txt
CHANGED
data/lib/gchart.rb
CHANGED
@@ -12,7 +12,7 @@ class Gchart
|
|
12
12
|
|
13
13
|
def self.url(use_ssl = false)
|
14
14
|
if use_ssl
|
15
|
-
'https://
|
15
|
+
'https://chart.googleapis.com/chart?'
|
16
16
|
else
|
17
17
|
'http://chart.apis.google.com/chart?'
|
18
18
|
end
|
@@ -266,6 +266,7 @@ class Gchart
|
|
266
266
|
req.body = query_builder
|
267
267
|
req.content_type = 'application/x-www-form-urlencoded'
|
268
268
|
http = Net::HTTP.new(url.host, url.port)
|
269
|
+
http.verify_mode = OpenSSL::SSL::VERIFY_PEER if use_ssl
|
269
270
|
http.use_ssl = use_ssl
|
270
271
|
http.start {|resp| resp.request(req) }.body
|
271
272
|
end
|
data/lib/gchart/version.rb
CHANGED
data/spec/gchart_spec.rb
CHANGED
@@ -398,7 +398,6 @@ describe "a line chart" do
|
|
398
398
|
legend = ['first data & set label', 'n data set label']
|
399
399
|
|
400
400
|
chart = Gchart.line(:title => title, :legend => legend, :legend_position => :bottom_vertical)
|
401
|
-
puts chart.inspect
|
402
401
|
chart.include?("chdlp=bv").should be_true
|
403
402
|
|
404
403
|
chart = Gchart.line(:title => title, :legend => legend, :legend_position => 'r')
|
@@ -666,7 +665,7 @@ end
|
|
666
665
|
|
667
666
|
describe 'SSL support' do
|
668
667
|
it 'should change url if is presented' do
|
669
|
-
Gchart.line(:use_ssl => true).should include('https://
|
668
|
+
Gchart.line(:use_ssl => true).should include('https://chart.googleapis.com/chart?')
|
670
669
|
end
|
671
670
|
|
672
671
|
it "should be available as a file" do
|
metadata
CHANGED
@@ -1,8 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: googlecharts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 1
|
4
5
|
prerelease:
|
5
|
-
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 6
|
9
|
+
- 7
|
10
|
+
version: 1.6.7
|
6
11
|
platform: ruby
|
7
12
|
authors:
|
8
13
|
- Matt Aimonetti
|
@@ -57,17 +62,23 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
57
62
|
requirements:
|
58
63
|
- - ">="
|
59
64
|
- !ruby/object:Gem::Version
|
65
|
+
hash: 3
|
66
|
+
segments:
|
67
|
+
- 0
|
60
68
|
version: "0"
|
61
69
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
62
70
|
none: false
|
63
71
|
requirements:
|
64
72
|
- - ">="
|
65
73
|
- !ruby/object:Gem::Version
|
74
|
+
hash: 3
|
75
|
+
segments:
|
76
|
+
- 0
|
66
77
|
version: "0"
|
67
78
|
requirements: []
|
68
79
|
|
69
80
|
rubyforge_project:
|
70
|
-
rubygems_version: 1.
|
81
|
+
rubygems_version: 1.5.2
|
71
82
|
signing_key:
|
72
83
|
specification_version: 3
|
73
84
|
summary: Generate charts using Google API & Ruby
|