googlecharts 1.6.6 → 1.6.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,6 @@
1
+ == 1.6.7
2
+ * changed url for ssl connection
3
+
1
4
  == 1.6.6
2
5
  * added ssl support
3
6
  * refactored code
@@ -12,7 +12,7 @@ class Gchart
12
12
 
13
13
  def self.url(use_ssl = false)
14
14
  if use_ssl
15
- 'https://www.google.com/chart?'
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
@@ -1,3 +1,3 @@
1
1
  module GchartInfo #:nodoc:
2
- VERSION = "1.6.6"
2
+ VERSION = "1.6.7"
3
3
  end
@@ -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://www.google.com/chart?')
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
- version: 1.6.6
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.6.2
81
+ rubygems_version: 1.5.2
71
82
  signing_key:
72
83
  specification_version: 3
73
84
  summary: Generate charts using Google API & Ruby