google_visualr 2.1.3 → 2.1.4

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/.rvmrc CHANGED
@@ -1 +1 @@
1
- rvm use ruby-1.9.2-p180@google_visualr --create
1
+ rvm use ruby-1.9.3-p194@google_visualr --create
data/Gemfile.lock CHANGED
@@ -1,91 +1,102 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- google_visualr (2.1.3)
4
+ google_visualr (2.1.4)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
8
8
  specs:
9
- abstract (1.0.0)
10
- actionmailer (3.0.9)
11
- actionpack (= 3.0.9)
12
- mail (~> 2.2.19)
13
- actionpack (3.0.9)
14
- activemodel (= 3.0.9)
15
- activesupport (= 3.0.9)
16
- builder (~> 2.1.2)
17
- erubis (~> 2.6.6)
18
- i18n (~> 0.5.0)
19
- rack (~> 1.2.1)
20
- rack-mount (~> 0.6.14)
21
- rack-test (~> 0.5.7)
22
- tzinfo (~> 0.3.23)
23
- activemodel (3.0.9)
24
- activesupport (= 3.0.9)
25
- builder (~> 2.1.2)
26
- i18n (~> 0.5.0)
27
- activerecord (3.0.9)
28
- activemodel (= 3.0.9)
29
- activesupport (= 3.0.9)
30
- arel (~> 2.0.10)
31
- tzinfo (~> 0.3.23)
32
- activeresource (3.0.9)
33
- activemodel (= 3.0.9)
34
- activesupport (= 3.0.9)
35
- activesupport (3.0.9)
36
- arel (2.0.10)
37
- builder (2.1.2)
38
- diff-lcs (1.1.2)
39
- erubis (2.6.6)
40
- abstract (>= 1.0.0)
41
- i18n (0.5.0)
42
- mail (2.2.19)
43
- activesupport (>= 2.3.6)
9
+ actionmailer (3.2.8)
10
+ actionpack (= 3.2.8)
11
+ mail (~> 2.4.4)
12
+ actionpack (3.2.8)
13
+ activemodel (= 3.2.8)
14
+ activesupport (= 3.2.8)
15
+ builder (~> 3.0.0)
16
+ erubis (~> 2.7.0)
17
+ journey (~> 1.0.4)
18
+ rack (~> 1.4.0)
19
+ rack-cache (~> 1.2)
20
+ rack-test (~> 0.6.1)
21
+ sprockets (~> 2.1.3)
22
+ activemodel (3.2.8)
23
+ activesupport (= 3.2.8)
24
+ builder (~> 3.0.0)
25
+ activerecord (3.2.8)
26
+ activemodel (= 3.2.8)
27
+ activesupport (= 3.2.8)
28
+ arel (~> 3.0.2)
29
+ tzinfo (~> 0.3.29)
30
+ activeresource (3.2.8)
31
+ activemodel (= 3.2.8)
32
+ activesupport (= 3.2.8)
33
+ activesupport (3.2.8)
34
+ i18n (~> 0.6)
35
+ multi_json (~> 1.0)
36
+ arel (3.0.2)
37
+ builder (3.0.3)
38
+ diff-lcs (1.1.3)
39
+ erubis (2.7.0)
40
+ hike (1.2.1)
41
+ i18n (0.6.1)
42
+ journey (1.0.4)
43
+ json (1.7.5)
44
+ mail (2.4.4)
44
45
  i18n (>= 0.4.0)
45
46
  mime-types (~> 1.16)
46
47
  treetop (~> 1.4.8)
47
- mime-types (1.16)
48
- polyglot (0.3.2)
49
- rack (1.2.3)
50
- rack-mount (0.6.14)
51
- rack (>= 1.0.0)
52
- rack-test (0.5.7)
48
+ mime-types (1.19)
49
+ multi_json (1.3.6)
50
+ polyglot (0.3.3)
51
+ rack (1.4.1)
52
+ rack-cache (1.2)
53
+ rack (>= 0.4)
54
+ rack-ssl (1.3.2)
55
+ rack
56
+ rack-test (0.6.2)
53
57
  rack (>= 1.0)
54
- rails (3.0.9)
55
- actionmailer (= 3.0.9)
56
- actionpack (= 3.0.9)
57
- activerecord (= 3.0.9)
58
- activeresource (= 3.0.9)
59
- activesupport (= 3.0.9)
58
+ rails (3.2.8)
59
+ actionmailer (= 3.2.8)
60
+ actionpack (= 3.2.8)
61
+ activerecord (= 3.2.8)
62
+ activeresource (= 3.2.8)
63
+ activesupport (= 3.2.8)
60
64
  bundler (~> 1.0)
61
- railties (= 3.0.9)
62
- railties (3.0.9)
63
- actionpack (= 3.0.9)
64
- activesupport (= 3.0.9)
65
+ railties (= 3.2.8)
66
+ railties (3.2.8)
67
+ actionpack (= 3.2.8)
68
+ activesupport (= 3.2.8)
69
+ rack-ssl (~> 1.3.2)
65
70
  rake (>= 0.8.7)
66
71
  rdoc (~> 3.4)
67
- thor (~> 0.14.4)
68
- rake (0.9.2)
69
- rdoc (3.9.2)
70
- rspec (2.6.0)
71
- rspec-core (~> 2.6.0)
72
- rspec-expectations (~> 2.6.0)
73
- rspec-mocks (~> 2.6.0)
74
- rspec-core (2.6.4)
75
- rspec-expectations (2.6.0)
76
- diff-lcs (~> 1.1.2)
77
- rspec-mocks (2.6.0)
78
- thor (0.14.6)
79
- treetop (1.4.10)
72
+ thor (>= 0.14.6, < 2.0)
73
+ rake (0.9.2.2)
74
+ rdoc (3.12)
75
+ json (~> 1.4)
76
+ rspec (2.11.0)
77
+ rspec-core (~> 2.11.0)
78
+ rspec-expectations (~> 2.11.0)
79
+ rspec-mocks (~> 2.11.0)
80
+ rspec-core (2.11.1)
81
+ rspec-expectations (2.11.3)
82
+ diff-lcs (~> 1.1.3)
83
+ rspec-mocks (2.11.3)
84
+ sprockets (2.1.3)
85
+ hike (~> 1.2)
86
+ rack (~> 1.0)
87
+ tilt (~> 1.1, != 1.3.0)
88
+ thor (0.16.0)
89
+ tilt (1.3.3)
90
+ treetop (1.4.11)
80
91
  polyglot
81
92
  polyglot (>= 0.3.1)
82
- tzinfo (0.3.29)
93
+ tzinfo (0.3.33)
83
94
 
84
95
  PLATFORMS
85
96
  ruby
86
97
 
87
98
  DEPENDENCIES
88
- bundler (>= 1.0.15)
99
+ bundler (>= 1.2.1)
89
100
  google_visualr!
90
- rails (>= 3.0.9)
91
- rspec (>= 2.6.0)
101
+ rails (>= 3.2.8)
102
+ rspec (>= 2.11.0)
data/README.rdoc CHANGED
@@ -96,6 +96,10 @@ Please submit all feedback, bugs and feature-requests to {GitHub Issues Tracker}
96
96
 
97
97
  = Change Log
98
98
 
99
+ <em>Version 2.1.4</em>
100
+ * {Pull Request 39}[https://github.com/winston/google_visualr/pull/39] Added ability to use Listeners.
101
+ * {Pull Request 40}[https://github.com/winston/google_visualr/pull/40] Allowed decoupling of class name and chart name.
102
+
99
103
  <em>Version 2.1.3</em>
100
104
  * Added support for Bubble Chart.
101
105
  * {Pull Request 37}[https://github.com/winston/google_visualr/pull/37] Added support for Stepped Area Chart.
@@ -118,4 +122,4 @@ Who is Winston Teo? {You should follow Winston on Twitter}[http://www.twitter.co
118
122
 
119
123
  = License
120
124
 
121
- Copyright © 2011 Winston Teo Yong Wei. Free software, released under the MIT license.
125
+ Copyright © 2012 Winston Teo Yong Wei. Free software, released under the MIT license.
@@ -15,9 +15,9 @@ Gem::Specification.new do |s|
15
15
  s.required_rubygems_version = ">= 1.3.6"
16
16
  s.rubyforge_project = "google_visualr"
17
17
 
18
- s.add_development_dependency "bundler", ">= 1.0.15"
19
- s.add_development_dependency "rspec" , ">= 2.6.0"
20
- s.add_development_dependency "rails" , ">= 3.0.9"
18
+ s.add_development_dependency "bundler", ">= 1.2.1"
19
+ s.add_development_dependency "rspec" , ">= 2.11.0"
20
+ s.add_development_dependency "rails" , ">= 3.2.8"
21
21
 
22
22
  s.files = `git ls-files`.split("\n")
23
23
  s.executables = `git ls-files`.split("\n").map{|f| f =~ /^bin\/(.*)/ ? $1 : nil}.compact
@@ -4,11 +4,16 @@ module GoogleVisualr
4
4
  include GoogleVisualr::Packages
5
5
  include GoogleVisualr::ParamHelpers
6
6
 
7
- attr_accessor :data_table
7
+ attr_accessor :data_table, :listeners
8
8
 
9
9
  def initialize(data_table, options={})
10
10
  @data_table = data_table
11
11
  send(:options=, options)
12
+ @listeners = []
13
+ end
14
+
15
+ def chart_name
16
+ class_name
12
17
  end
13
18
 
14
19
  def options
@@ -19,6 +24,10 @@ module GoogleVisualr
19
24
  @options = stringify_keys!(options)
20
25
  end
21
26
 
27
+ def add_listener(event, callback)
28
+ @listeners << { :event => event.to_s, :callback => callback }
29
+ end
30
+
22
31
  # Generates JavaScript and renders the Google Chart in the final HTML output.
23
32
  #
24
33
  # Parameters:
@@ -27,14 +36,16 @@ module GoogleVisualr
27
36
  js = "\n<script type='text/javascript'>"
28
37
  js << "\n google.load('visualization','1', {packages: ['#{package_name}'], callback: function() {"
29
38
  js << "\n #{@data_table.to_js}"
30
- js << "\n var chart = new google.visualization.#{class_name}(document.getElementById('#{element_id}'));"
39
+ js << "\n var chart = new google.visualization.#{chart_name}(document.getElementById('#{element_id}'));"
31
40
  js << "\n chart.draw(data_table, #{js_parameters(@options)});"
41
+ @listeners.each do |listener|
42
+ js << "\n google.visualization.events.addListener(chart, '#{listener[:event]}', #{listener[:callback]});"
43
+ end
32
44
  js << "\n }});"
33
45
  js << "\n</script>"
34
-
35
46
  js
36
47
  end
37
48
 
38
49
  end
39
50
 
40
- end
51
+ end
@@ -1,3 +1,3 @@
1
1
  module GoogleVisualr
2
- VERSION = "2.1.3"
2
+ VERSION = "2.1.4"
3
3
  end
@@ -21,11 +21,25 @@ describe GoogleVisualr::BaseChart do
21
21
  end
22
22
  end
23
23
 
24
+ describe "#add_listener" do
25
+ it "adds to listeners array" do
26
+ @chart.add_listener("select", "function() {test_event(chart);}")
27
+ @chart.listeners.should == [{ :event => "select", :callback => "function() {test_event(chart);}" }]
28
+ end
29
+ end
30
+
24
31
  describe "#to_js" do
25
32
  it "generates JS" do
26
33
  js = @chart.to_js("body")
27
34
  js.should == base_chart_js("body")
28
35
  end
36
+
37
+ it "generates JS with listeners" do
38
+ @chart.add_listener("select", "function() {test_event(chart);}")
39
+
40
+ js = @chart.to_js("body")
41
+ js.should == base_chart_with_listener_js("body")
42
+ end
29
43
  end
30
44
 
31
45
  end
@@ -1,65 +1,127 @@
1
1
  require 'spec_helper'
2
2
 
3
+ # Warning..
4
+ # Image Charts are deprecated as iof 20 Apr 2012, but supported till 2015.
5
+ # We might remove these soon
6
+
7
+ shared_examples_for "image chart" do
8
+ it "generates correct URI" do
9
+ CGI.parse(chart.uri.query).should == CGI.parse(uri.query)
10
+ end
11
+ end
12
+
3
13
  describe GoogleVisualr::Image::PieChart do
4
- describe "#uri" do
5
- let(:chart){ GoogleVisualr::Image::PieChart.new( data_table, {} )}
6
- image_pie_options.each_with_index do |opts, i|
7
- context "#{opts.inspect}" do
8
- it "generates correct URI" do
9
- chart.options = opts
10
- uri = chart.uri
11
- #puts uri.to_s
12
- CGI.parse(uri.query).should == CGI.parse(image_pie_chart_uris[i].query)
13
- end
14
- end
15
- end
14
+ let(:chart) { GoogleVisualr::Image::PieChart.new( data_table, options ) }
15
+
16
+ it_should_behave_like "image chart" do
17
+ let(:options) { { :title => "Favorite Desserts", :is3D => false, :labels => "none" } }
18
+ let(:uri) { URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chdl=2004%7C2005%7C2006%7C2007&chs=400x200&cht=p&chtt=Favorite+Desserts&chl=&chd=t%3A1000%2C1200%2C1500%2C800&chds=a") }
19
+ end
20
+
21
+ it_should_behave_like "image chart" do
22
+ let(:options) { { :title => "Favorite Desserts", :is3D => false, :labels => "name", :backgroundColor => "#EFEFEF", :legend => "left" } }
23
+ let(:uri) { URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chf=bg%2Cs%2CEFEFEF&chdl=2004%7C2005%7C2006%7C2007&chs=400x200&cht=p&chdlp=l&chtt=Favorite+Desserts&chl=2004%7C2005%7C2006%7C2007&chd=t%3A1000%2C1200%2C1500%2C800&chds=a") }
24
+ end
25
+
26
+ it_should_behave_like "image chart" do
27
+ let(:options) { { :title => "Favorite Desserts", :width => 650, :height => 300, :is3D => true, :labels => "value", :backgroundColor => "#FFFFFF", :legend => "bottom" } }
28
+ let(:uri) { URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chf=bg%2Cs%2CFFFFFF&chdl=2004%7C2005%7C2006%7C2007&chs=650x300&cht=p3&chdlp=b&chtt=Favorite+Desserts&chl=1000%7C1200%7C1500%7C800&chd=t%3A1000%2C1200%2C1500%2C800&chds=a") }
29
+ end
30
+
31
+ it_should_behave_like "image chart" do
32
+ let(:options) { { :title => "Favorite Desserts", :width => 650, :height => 300, :is3D => false, :labels => "none", :backgroundColor => "#FFFFFF", :color => "#444D92", :legend => "top" } }
33
+ let(:uri) { URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chf=bg%2Cs%2CFFFFFF&chdl=2004%7C2005%7C2006%7C2007&chs=650x300&cht=p&chdlp=t&chtt=Favorite+Desserts&chco=444D92&chl=&chd=t%3A1000%2C1200%2C1500%2C800&chds=a") }
34
+ end
35
+
36
+ it_should_behave_like "image chart" do
37
+ let(:options) { { :title => "Favorite Desserts", :width => 650, :height => 300, :is3D => true, :labels => "none", :backgroundColor => "#FFFFFF", :colors => %w(#444D92 #4c56a2 #5E67AB #7078B5 #8289BE #949AC7 #A6AAD0 #B7BBDA #C9CCE3 #DBDDEC #EDEEF6), :legend => "none" } }
38
+ let(:uri) { URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chf=bg%2Cs%2CFFFFFF&chdl=2004%7C2005%7C2006%7C2007&chs=650x300&cht=p3&chtt=Favorite+Desserts&chco=444D92%7C4c56a2%7C5E67AB%7C7078B5%7C8289BE%7C949AC7%7CA6AAD0%7CB7BBDA%7CC9CCE3%7CDBDDEC%7CEDEEF6&chl=&chd=t%3A1000%2C1200%2C1500%2C800&chds=a") }
16
39
  end
17
40
  end
18
41
 
19
42
  describe GoogleVisualr::Image::LineChart do
20
- describe "#uri" do
21
- let(:chart){ GoogleVisualr::Image::LineChart.new( data_table, {} )}
22
- image_line_options.each_with_index do |opts, i|
23
- context "#{opts.inspect}" do
24
- it "generates correct URI" do
25
- chart.options = opts
26
- uri = chart.uri
27
- #puts uri.to_s
28
- CGI.parse(uri.query).should == CGI.parse(image_line_chart_uris[i].query)
29
- end
30
- end
31
- end
43
+ let(:chart) { GoogleVisualr::Image::LineChart.new( data_table, options ) }
44
+
45
+ it_should_behave_like "image chart" do
46
+ let(:options) { { :title => "Test1 Line Chart", :colors => ['#437E9D', '#E6A65A'], :legend => "left", :backgroundColor => "#EFEFEF", :showCategoryLabels => true, :showValueLabels => false } }
47
+ let(:uri) { URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chf=bg%2Cs%2CEFEFEF&chdl=Sales%7CExpenses&chs=400x200&chxl=0%3A%7C2004%7C2005%7C2006%7C2007%7C1%3A%7C%7C&cht=lc&chdlp=l&chtt=Test1+Line+Chart&chco=437E9D%2CE6A65A&chd=t%3A1000%2C1200%2C1500%2C800%7C400%2C450%2C600%2C500&chds=a") }
48
+ end
49
+
50
+ it_should_behave_like "image chart" do
51
+ let(:options) { { :title => "Test2 Line Chart", :width => 500, :height => 200, :color => '#437E9D', :legend => "right", :backgroundColor => "#FFFFFF", :showCategoryLabels => false, :showValueLabels => true } }
52
+ let(:uri) { URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chf=bg%2Cs%2CFFFFFF&chdl=Sales%7CExpenses&chs=500x200&chxl=0%3A%7C%7C&cht=lc&chdlp=r&chtt=Test2+Line+Chart&chco=437E9D&chds=a&chd=t%3A1000%2C1200%2C1500%2C800%7C400%2C450%2C600%2C500") }
53
+ end
54
+
55
+ it_should_behave_like "image chart" do
56
+ let(:options) { { :title => "Test3 Line Chart", :width => 500, :height => 200, :colors => ['#437E9D', '#E6A65A'], :legend => "top", :showCategoryLabels => false, :showValueLabels => false, :showAxisLines => false } }
57
+ let(:uri) { URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chdl=Sales%7CExpenses&chs=500x200&chxl=0%3A%7C%7C1%3A%7C%7C&cht=lc%3Anda&chdlp=t&chtt=Test3+Line+Chart&chco=437E9D%2CE6A65A&chds=a&chd=t%3A1000%2C1200%2C1500%2C800%7C400%2C450%2C600%2C500") }
58
+ end
59
+
60
+ it_should_behave_like "image chart" do
61
+ let(:options) { { :title => "Test4 Line Chart", :width => 500, :height => 200, :color => '#437E9D', :legend => "bottom", :showCategoryLabels => true, :showValueLabels => true, :showAxisLines => true } }
62
+ let(:uri) { URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chdl=Sales%7CExpenses&chs=500x200&chxl=0%3A%7C2004%7C2005%7C2006%7C2007%7C&cht=lc&chdlp=b&chtt=Test4+Line+Chart&chco=437E9D&chd=t%3A1000%2C1200%2C1500%2C800%7C400%2C450%2C600%2C500&chds=a") }
63
+ end
64
+
65
+ it_should_behave_like "image chart" do
66
+ let(:options) { { :title => "Test5 Line Chart", :width => 500, :height => 200, :color => '#437E9D', :legend => "none", :showCategoryLabels => true, :showValueLabels => true, :min => 200, :max => 2000, :valueLabelsInterval => 200 } }
67
+ let(:uri) { URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chs=500x200&chxl=0%3A%7C2004%7C2005%7C2006%7C2007%7C&cht=lc&chtt=Test5+Line+Chart&chco=437E9D&chd=t%3A1000%2C1200%2C1500%2C800%7C400%2C450%2C600%2C500&chxr=1%2C200%2C2000%2C200&chds=200%2C2000") }
32
68
  end
33
69
  end
34
70
 
35
71
  describe GoogleVisualr::Image::BarChart do
36
- describe "#uri" do
37
- let(:chart){ GoogleVisualr::Image::BarChart.new( data_table, {} )}
38
- image_bar_options.each_with_index do |opts, i|
39
- context "#{opts.inspect}" do
40
- it "generates correct URI" do
41
- chart.options = opts
42
- uri = chart.uri
43
- #puts uri.to_s
44
- CGI.parse(uri.query).should == CGI.parse(image_bar_chart_uris[i].query)
45
- end
46
- end
47
- end
72
+ let(:chart) { GoogleVisualr::Image::BarChart.new( data_table, options ) }
73
+
74
+ it_should_behave_like "image chart" do
75
+ let(:options) { { :title => "Test1 Bar Chart", :colors => ['#437E9D', '#E6A65A'], :legend => "left", :backgroundColor => "#EFEFEF", :showCategoryLabels => true, :showValueLabels => false } }
76
+ let(:uri) { URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chf=bg%2Cs%2CEFEFEF&chdl=Sales%7CExpenses&chs=400x200&chxl=1%3A%7C2004%7C2005%7C2006%7C2007%7C0%3A%7C%7C&cht=bhs&chdlp=l&chtt=Test1+Bar+Chart&chco=437E9D%2CE6A65A&chd=t%3A1000%2C1200%2C1500%2C800%7C400%2C450%2C600%2C500&chds=a") }
77
+ end
78
+
79
+ it_should_behave_like "image chart" do
80
+ let(:options) { { :title => "Test2 Bar Chart", :width => 500, :height => 200, :color => '#437E9D', :legend => "right", :backgroundColor => "#FFFFFF", :showCategoryLabels => false, :showValueLabels => true } }
81
+ let(:uri) { URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chf=bg%2Cs%2CFFFFFF&chdl=Sales%7CExpenses&chs=500x200&chxl=1%3A%7C%7C&cht=bhs&chdlp=r&chtt=Test2+Bar+Chart&chco=437E9D&chds=a&chd=t%3A1000%2C1200%2C1500%2C800%7C400%2C450%2C600%2C500") }
82
+ end
83
+
84
+ it_should_behave_like "image chart" do
85
+ let(:options) { { :title => "Test3 Bar Chart", :width => 500, :height => 200, :colors => ['#437E9D', '#E6A65A'], :legend => "top", :showCategoryLabels => false, :showValueLabels => false } }
86
+ let(:uri) { URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chdl=Sales%7CExpenses&chs=500x200&chxl=1%3A%7C%7C0%3A%7C%7C&cht=bhs&chdlp=t&chtt=Test3+Bar+Chart&chco=437E9D%2CE6A65A&chds=a&chd=t%3A1000%2C1200%2C1500%2C800%7C400%2C450%2C600%2C500") }
87
+ end
88
+
89
+ it_should_behave_like "image chart" do
90
+ let(:options) { { :title => "Test4 Bar Chart", :width => 500, :height => 200, :colors => ['#437E9D', '#E6A65A'], :legend => "bottom", :showCategoryLabels => true, :showValueLabels => true, :isStacked => false, :isVertical => true } }
91
+ let(:uri) { URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chdl=Sales%7CExpenses&chs=500x200&chxl=0%3A%7C2004%7C2005%7C2006%7C2007%7C&cht=bvg&chdlp=b&chtt=Test4+Bar+Chart&chco=437E9D%2CE6A65A&chd=t%3A1000%2C1200%2C1500%2C800%7C400%2C450%2C600%2C500&chds=a") }
92
+ end
93
+
94
+ it_should_behave_like "image chart" do
95
+ let(:options) { { :title => "Test5 Bar Chart", :width => 500, :height => 200, :colors => ['#437E9D', '#E6A65A'], :legend => "none", :isStacked => true, :isVertical => true, :min => 200, :max => 2000, :valueLabelsInterval => 200 } }
96
+ let(:uri) { URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chs=500x200&chxl=0%3A%7C2004%7C2005%7C2006%7C2007%7C&cht=bvs&chtt=Test5+Bar+Chart&chco=437E9D%2CE6A65A&chd=t%3A1000%2C1200%2C1500%2C800%7C400%2C450%2C600%2C500&chxr=1%2C200%2C2000%2C200&chds=200%2C2000") }
48
97
  end
49
98
  end
50
99
 
51
100
  describe GoogleVisualr::Image::SparkLine do
52
- describe "#uri" do
53
- let(:chart){ GoogleVisualr::Image::SparkLine.new( data_table, {} )}
54
- sparkline_options.each_with_index do |opts, i|
55
- context "#{opts.inspect}" do
56
- it "generates correct URI" do
57
- chart.options = opts
58
- uri = chart.uri
59
- #puts uri.to_s
60
- CGI.parse(uri.query).should == CGI.parse(sparkline_uris[i].query)
61
- end
62
- end
63
- end
64
- end
65
- end
101
+ let(:chart) { GoogleVisualr::Image::SparkLine.new( data_table, options ) }
102
+
103
+ it_should_behave_like "image chart" do
104
+ let(:options) { { :title => "Test1 Sparkline", :colors => ['#437E9D', '#E6A65A'], :legend => "left", :backgroundColor => "#EFEFEF", :showAxisLines => false } }
105
+ let(:uri) { URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chf=bg%2Cs%2CEFEFEF&chdl=Sales%7CExpenses&chs=400x200&chxl=0%3A%7C%7C1%3A%7C%7C&cht=ls&chdlp=l&chtt=Test1+Sparkline&chco=437E9D%2CE6A65A&chd=t%3A1000%2C1200%2C1500%2C800%7C400%2C450%2C600%2C500&chds=a") }
106
+ end
107
+
108
+ it_should_behave_like "image chart" do
109
+ let(:options) { { :title => "Test2 Sparkline", :width => 500, :height => 200, :color => '#437E9D', :legend => "right", :backgroundColor => "#FFFFFF", :showAxisLines => true } }
110
+ let(:uri) { URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chf=bg%2Cs%2CFFFFFF&chdl=Sales%7CExpenses&chs=500x200&chxl=0%3A%7C%7C&cht=ls&chdlp=r&chtt=Test2+Sparkline&chco=437E9D&chd=t%3A1000%2C1200%2C1500%2C800%7C400%2C450%2C600%2C500&chds=a") }
111
+ end
112
+
113
+ it_should_behave_like "image chart" do
114
+ let(:options) { { :title => "Test3 Sparkline", :width => 500, :height => 200, :colors => ['#437E9D', '#E6A65A'], :legend => "top", :showAxisLines => false } }
115
+ let(:uri) { URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chdl=Sales%7CExpenses&chs=500x200&chxl=0%3A%7C%7C1%3A%7C%7C&cht=ls&chdlp=t&chtt=Test3+Sparkline&chco=437E9D%2CE6A65A&chd=t%3A1000%2C1200%2C1500%2C800%7C400%2C450%2C600%2C500&chds=a") }
116
+ end
117
+
118
+ it_should_behave_like "image chart" do
119
+ let(:options) { { :title => "Test4 Sparkline", :width => 500, :height => 200, :color => '#437E9D', :legend => "bottom", :showAxisLines => false } }
120
+ let(:uri) { URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chdl=Sales%7CExpenses&chs=500x200&chxl=0%3A%7C%7C1%3A%7C%7C&cht=ls&chdlp=b&chtt=Test4+Sparkline&chco=437E9D&chd=t%3A1000%2C1200%2C1500%2C800%7C400%2C450%2C600%2C500&chds=a") }
121
+ end
122
+
123
+ it_should_behave_like "image chart" do
124
+ let(:options) { { :title => "Test5 Sparkline", :width => 500, :height => 200, :colors => ['#437E9D', '#E6A65A'], :legend => "none", :showAxisLines => false } }
125
+ let(:uri) { URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chs=500x200&chxl=0%3A%7C%7C1%3A%7C%7C&cht=ls&chtt=Test5+Sparkline&chco=437E9D%2CE6A65A&chd=t%3A1000%2C1200%2C1500%2C800%7C400%2C450%2C600%2C500&chds=a") }
126
+ end
127
+ end
@@ -1,146 +1,37 @@
1
1
  def data_table
2
-
3
2
  @cols = [
4
- { :type => "string", :label => "Year" },
5
- { :type => "number", :label => "Sales" },
6
- { :type => "number", :label => "Expenses" }
7
- ]
3
+ { :type => "string", :label => "Year" },
4
+ { :type => "number", :label => "Sales" },
5
+ { :type => "number", :label => "Expenses" }
6
+ ]
8
7
  @rows = [
9
- { :c => [ {:v => "2004"}, {:v => 1000}, {:v => 400} ] },
10
- { :c => [ {:v => "2005"}, {:v => 1200}, {:v => 450} ] },
11
- { :c => [ {:v => "2006"}, {:v => 1500}, {:v => 600} ] },
12
- { :c => [ {:v => "2007"}, {:v => 800 }, {:v => 500} ] }
13
- ]
8
+ { :c => [{ :v => "2004" }, { :v => 1000 }, { :v => 400 }] },
9
+ { :c => [{ :v => "2005" }, { :v => 1200 }, { :v => 450 }] },
10
+ { :c => [{ :v => "2006" }, { :v => 1500 }, { :v => 600 }] },
11
+ { :c => [{ :v => "2007" }, { :v => 800 }, { :v => 500 }] }
12
+ ]
14
13
  GoogleVisualr::DataTable.new(:cols => @cols, :rows => @rows)
15
-
16
14
  end
17
15
 
18
16
  def base_chart(data_table=data_table)
19
-
20
- GoogleVisualr::BaseChart.new( data_table, { :legend => "Test Chart", :width => 800, :is3D => true } )
21
-
17
+ GoogleVisualr::BaseChart.new(data_table, { :legend => "Test Chart", :width => 800, :is3D => true })
22
18
  end
23
19
 
24
20
  def base_chart_js(div_class="div_class")
25
-
26
21
  js = "\n<script type='text/javascript'>"
27
22
  js << "\n google.load('visualization','1', {packages: ['basechart'], callback: function() {"
28
23
  js << "\n var data_table = new google.visualization.DataTable();data_table.addColumn('string', 'Year');data_table.addColumn('number', 'Sales');data_table.addColumn('number', 'Expenses');data_table.addRow([{v: '2004'}, {v: 1000}, {v: 400}]);data_table.addRow([{v: '2005'}, {v: 1200}, {v: 450}]);data_table.addRow([{v: '2006'}, {v: 1500}, {v: 600}]);data_table.addRow([{v: '2007'}, {v: 800}, {v: 500}]);\n var chart = new google.visualization.BaseChart(document.getElementById('#{div_class}'));"
29
24
  js << "\n chart.draw(data_table, {legend: 'Test Chart', width: 800, is3D: true});"
30
25
  js << "\n }});"
31
26
  js << "\n</script>"
32
-
33
27
  end
34
28
 
35
- # Helpers for image chart specs
36
-
37
- def pie_data_table
38
- @cols = [
39
- { :type => "string", :label => "Favorite Dessert" },
40
- { :type => "number", :label => "Count" }
41
- ]
42
- @rows = [
43
- { :c => [ {:v => "Pie"}, {:v => 100} ] },
44
- { :c => [ {:v => "Cake"}, {:v => 120} ] },
45
- { :c => [ {:v => "Ice Cream"}, {:v => 150} ] },
46
- { :c => [ {:v => "Cookies"}, {:v => 80 } ] }
47
- ]
48
- GoogleVisualr::DataTable.new(:cols => @cols, :rows => @rows)
49
- end
50
-
51
- def image_pie_options
52
- [
53
- { :title => "Favorite Desserts", :is3D => false, :labels => "name", :backgroundColor => "#EFEFEF", :legend => "left" },
54
- { :title => "Favorite Desserts", :width => 650, :height => 300, :is3D => true, :labels => "value", :backgroundColor => "#FFFFFF",
55
- :legend => "bottom" },
56
- { :title => "Favorite Desserts", :width => 650, :height => 300, :is3D => false, :labels => "none", :backgroundColor => "#FFFFFF",
57
- :color => "#444D92", :legend => "top" },
58
- { :title => "Favorite Desserts", :width => 650, :height => 300, :is3D => true, :labels => "none", :backgroundColor => "#FFFFFF",
59
- :colors => ['#444D92', '#4c56a2', '#5E67AB', '#7078B5', '#8289BE', '#949AC7',
60
- '#A6AAD0', '#B7BBDA', '#C9CCE3', '#DBDDEC', '#EDEEF6'], :legend => "none" }
61
- ]
62
- end
63
-
64
- def image_pie_chart_uris
65
- [
66
- URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chf=bg%2Cs%2CEFEFEF&chdl=2004%7C2005%7C2006%7C2007&chs=400x200&cht=p&chdlp=l&chtt=Favorite+Desserts&chl=2004%7C2005%7C2006%7C2007&chd=t%3A1000%2C1200%2C1500%2C800&chds=a"),
67
- URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chf=bg%2Cs%2CFFFFFF&chdl=2004%7C2005%7C2006%7C2007&chs=650x300&cht=p3&chdlp=b&chtt=Favorite+Desserts&chl=1000%7C1200%7C1500%7C800&chd=t%3A1000%2C1200%2C1500%2C800&chds=a"),
68
- URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chf=bg%2Cs%2CFFFFFF&chdl=2004%7C2005%7C2006%7C2007&chs=650x300&cht=p&chdlp=t&chtt=Favorite+Desserts&chco=444D92&chl=&chd=t%3A1000%2C1200%2C1500%2C800&chds=a"),
69
- URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chf=bg%2Cs%2CFFFFFF&chdl=2004%7C2005%7C2006%7C2007&chs=650x300&cht=p3&chtt=Favorite+Desserts&chco=444D92%7C4c56a2%7C5E67AB%7C7078B5%7C8289BE%7C949AC7%7CA6AAD0%7CB7BBDA%7CC9CCE3%7CDBDDEC%7CEDEEF6&chl=&chd=t%3A1000%2C1200%2C1500%2C800&chds=a")
70
- ]
71
- end
72
-
73
- def image_line_options
74
- [
75
- { :title => "Test1 Line Chart", :colors => ['#437E9D', '#E6A65A'], :legend => "left",
76
- :backgroundColor => "#EFEFEF", :showCategoryLabels => true, :showValueLabels => false },
77
- { :title => "Test2 Line Chart", :width => 500, :height => 200, :color => '#437E9D', :legend => "right",
78
- :backgroundColor => "#FFFFFF", :showCategoryLabels => false, :showValueLabels => true },
79
- { :title => "Test3 Line Chart", :width => 500, :height => 200, :colors => ['#437E9D', '#E6A65A'], :legend => "top",
80
- :showCategoryLabels => false, :showValueLabels => false, :showAxisLines => false },
81
- { :title => "Test4 Line Chart", :width => 500, :height => 200, :color => '#437E9D', :legend => "bottom",
82
- :showCategoryLabels => true, :showValueLabels => true, :showAxisLines => true },
83
- { :title => "Test5 Line Chart", :width => 500, :height => 200, :color => '#437E9D', :legend => "none",
84
- :showCategoryLabels => true, :showValueLabels => true, :min => 200, :max => 2000, :valueLabelsInterval => 200 }
85
- ]
86
- end
87
-
88
- def image_line_chart_uris
89
- [
90
- URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chf=bg%2Cs%2CEFEFEF&chdl=Sales%7CExpenses&chs=400x200&chxl=0%3A%7C2004%7C2005%7C2006%7C2007%7C1%3A%7C%7C&cht=lc&chdlp=l&chtt=Test1+Line+Chart&chco=437E9D%2CE6A65A&chd=t%3A1000%2C1200%2C1500%2C800%7C400%2C450%2C600%2C500&chds=a"),
91
- URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chf=bg%2Cs%2CFFFFFF&chdl=Sales%7CExpenses&chs=500x200&chxl=0%3A%7C%7C&cht=lc&chdlp=r&chtt=Test2+Line+Chart&chco=437E9D&chds=a&chd=t%3A1000%2C1200%2C1500%2C800%7C400%2C450%2C600%2C500"),
92
- URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chdl=Sales%7CExpenses&chs=500x200&chxl=0%3A%7C%7C1%3A%7C%7C&cht=lc%3Anda&chdlp=t&chtt=Test3+Line+Chart&chco=437E9D%2CE6A65A&chds=a&chd=t%3A1000%2C1200%2C1500%2C800%7C400%2C450%2C600%2C500"),
93
- URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chdl=Sales%7CExpenses&chs=500x200&chxl=0%3A%7C2004%7C2005%7C2006%7C2007%7C&cht=lc&chdlp=b&chtt=Test4+Line+Chart&chco=437E9D&chd=t%3A1000%2C1200%2C1500%2C800%7C400%2C450%2C600%2C500&chds=a"),
94
- URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chs=500x200&chxl=0%3A%7C2004%7C2005%7C2006%7C2007%7C&cht=lc&chtt=Test5+Line+Chart&chco=437E9D&chd=t%3A1000%2C1200%2C1500%2C800%7C400%2C450%2C600%2C500&chxr=1%2C200%2C2000%2C200&chds=200%2C2000")
95
- ]
96
- end
97
-
98
- def image_bar_options
99
- [
100
- { :title => "Test1 Bar Chart", :colors => ['#437E9D', '#E6A65A'], :legend => "left",
101
- :backgroundColor => "#EFEFEF", :showCategoryLabels => true, :showValueLabels => false },
102
- { :title => "Test2 Bar Chart", :width => 500, :height => 200, :color => '#437E9D', :legend => "right",
103
- :backgroundColor => "#FFFFFF", :showCategoryLabels => false, :showValueLabels => true },
104
- { :title => "Test3 Bar Chart", :width => 500, :height => 200, :colors => ['#437E9D', '#E6A65A'], :legend => "top",
105
- :showCategoryLabels => false, :showValueLabels => false },
106
- { :title => "Test4 Bar Chart", :width => 500, :height => 200, :colors => ['#437E9D', '#E6A65A'], :legend => "bottom",
107
- :showCategoryLabels => true, :showValueLabels => true, :isStacked => false, :isVertical => true },
108
- { :title => "Test5 Bar Chart", :width => 500, :height => 200, :colors => ['#437E9D', '#E6A65A'], :legend => "none",
109
- :isStacked => true, :isVertical => true, :min => 200, :max => 2000, :valueLabelsInterval => 200 }
110
- ]
111
- end
112
-
113
- def image_bar_chart_uris
114
- [
115
- URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chf=bg%2Cs%2CEFEFEF&chdl=Sales%7CExpenses&chs=400x200&chxl=1%3A%7C2004%7C2005%7C2006%7C2007%7C0%3A%7C%7C&cht=bhs&chdlp=l&chtt=Test1+Bar+Chart&chco=437E9D%2CE6A65A&chd=t%3A1000%2C1200%2C1500%2C800%7C400%2C450%2C600%2C500&chds=a"),
116
- URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chf=bg%2Cs%2CFFFFFF&chdl=Sales%7CExpenses&chs=500x200&chxl=1%3A%7C%7C&cht=bhs&chdlp=r&chtt=Test2+Bar+Chart&chco=437E9D&chds=a&chd=t%3A1000%2C1200%2C1500%2C800%7C400%2C450%2C600%2C500"),
117
- URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chdl=Sales%7CExpenses&chs=500x200&chxl=1%3A%7C%7C0%3A%7C%7C&cht=bhs&chdlp=t&chtt=Test3+Bar+Chart&chco=437E9D%2CE6A65A&chds=a&chd=t%3A1000%2C1200%2C1500%2C800%7C400%2C450%2C600%2C500"),
118
- URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chdl=Sales%7CExpenses&chs=500x200&chxl=0%3A%7C2004%7C2005%7C2006%7C2007%7C&cht=bvg&chdlp=b&chtt=Test4+Bar+Chart&chco=437E9D%2CE6A65A&chd=t%3A1000%2C1200%2C1500%2C800%7C400%2C450%2C600%2C500&chds=a"),
119
- URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chs=500x200&chxl=0%3A%7C2004%7C2005%7C2006%7C2007%7C&cht=bvs&chtt=Test5+Bar+Chart&chco=437E9D%2CE6A65A&chd=t%3A1000%2C1200%2C1500%2C800%7C400%2C450%2C600%2C500&chxr=1%2C200%2C2000%2C200&chds=200%2C2000")
120
- ]
121
- end
122
-
123
- def sparkline_options
124
- [
125
- { :title => "Test1 Sparkline", :colors => ['#437E9D', '#E6A65A'], :legend => "left",
126
- :backgroundColor => "#EFEFEF", :showAxisLines => false },
127
- { :title => "Test2 Sparkline", :width => 500, :height => 200, :color => '#437E9D', :legend => "right",
128
- :backgroundColor => "#FFFFFF", :showAxisLines => true },
129
- { :title => "Test3 Sparkline", :width => 500, :height => 200, :colors => ['#437E9D', '#E6A65A'], :legend => "top",
130
- :showAxisLines => false },
131
- { :title => "Test4 Sparkline", :width => 500, :height => 200, :color => '#437E9D', :legend => "bottom",
132
- :showAxisLines => false },
133
- { :title => "Test5 Sparkline", :width => 500, :height => 200, :colors => ['#437E9D', '#E6A65A'], :legend => "none",
134
- :showAxisLines => false }
135
- ]
29
+ def base_chart_with_listener_js(div_class="div_class")
30
+ js = "\n<script type='text/javascript'>"
31
+ js << "\n google.load('visualization','1', {packages: ['basechart'], callback: function() {"
32
+ js << "\n var data_table = new google.visualization.DataTable();data_table.addColumn('string', 'Year');data_table.addColumn('number', 'Sales');data_table.addColumn('number', 'Expenses');data_table.addRow([{v: '2004'}, {v: 1000}, {v: 400}]);data_table.addRow([{v: '2005'}, {v: 1200}, {v: 450}]);data_table.addRow([{v: '2006'}, {v: 1500}, {v: 600}]);data_table.addRow([{v: '2007'}, {v: 800}, {v: 500}]);\n var chart = new google.visualization.BaseChart(document.getElementById('#{div_class}'));"
33
+ js << "\n chart.draw(data_table, {legend: 'Test Chart', width: 800, is3D: true});"
34
+ js << "\n google.visualization.events.addListener(chart, 'select', function() {test_event(chart);});"
35
+ js << "\n }});"
36
+ js << "\n</script>"
136
37
  end
137
-
138
- def sparkline_uris
139
- [
140
- URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chf=bg%2Cs%2CEFEFEF&chdl=Sales%7CExpenses&chs=400x200&chxl=0%3A%7C%7C1%3A%7C%7C&cht=ls&chdlp=l&chtt=Test1+Sparkline&chco=437E9D%2CE6A65A&chd=t%3A1000%2C1200%2C1500%2C800%7C400%2C450%2C600%2C500&chds=a"),
141
- URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chf=bg%2Cs%2CFFFFFF&chdl=Sales%7CExpenses&chs=500x200&chxl=0%3A%7C%7C&cht=ls&chdlp=r&chtt=Test2+Sparkline&chco=437E9D&chd=t%3A1000%2C1200%2C1500%2C800%7C400%2C450%2C600%2C500&chds=a"),
142
- URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chdl=Sales%7CExpenses&chs=500x200&chxl=0%3A%7C%7C1%3A%7C%7C&cht=ls&chdlp=t&chtt=Test3+Sparkline&chco=437E9D%2CE6A65A&chd=t%3A1000%2C1200%2C1500%2C800%7C400%2C450%2C600%2C500&chds=a"),
143
- URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chdl=Sales%7CExpenses&chs=500x200&chxl=0%3A%7C%7C1%3A%7C%7C&cht=ls&chdlp=b&chtt=Test4+Sparkline&chco=437E9D&chd=t%3A1000%2C1200%2C1500%2C800%7C400%2C450%2C600%2C500&chds=a"),
144
- URI.parse("https://chart.googleapis.com/chart?chxt=x%2Cy&chs=500x200&chxl=0%3A%7C%7C1%3A%7C%7C&cht=ls&chtt=Test5+Sparkline&chco=437E9D%2CE6A65A&chd=t%3A1000%2C1200%2C1500%2C800%7C400%2C450%2C600%2C500&chds=a")
145
- ]
146
- end
metadata CHANGED
@@ -1,60 +1,74 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: google_visualr
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.1.4
4
5
  prerelease:
5
- version: 2.1.3
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Winston Teo
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2012-07-30 00:00:00 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
12
+ date: 2012-10-16 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
16
15
  name: bundler
17
- prerelease: false
18
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
19
17
  none: false
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
23
- version: 1.0.15
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: 1.2.1
24
22
  type: :development
25
- version_requirements: *id001
26
- - !ruby/object:Gem::Dependency
27
- name: rspec
28
23
  prerelease: false
29
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
30
25
  none: false
31
- requirements:
32
- - - ">="
33
- - !ruby/object:Gem::Version
34
- version: 2.6.0
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 1.2.1
30
+ - !ruby/object:Gem::Dependency
31
+ name: rspec
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: 2.11.0
35
38
  type: :development
36
- version_requirements: *id002
37
- - !ruby/object:Gem::Dependency
38
- name: rails
39
39
  prerelease: false
40
- requirement: &id003 !ruby/object:Gem::Requirement
40
+ version_requirements: !ruby/object:Gem::Requirement
41
41
  none: false
42
- requirements:
43
- - - ">="
44
- - !ruby/object:Gem::Version
45
- version: 3.0.9
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 2.11.0
46
+ - !ruby/object:Gem::Dependency
47
+ name: rails
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: 3.2.8
46
54
  type: :development
47
- version_requirements: *id003
48
- description: This Ruby gem, GoogleVisualr, is a wrapper around the Google Chart Tools that allows anyone to create the same beautiful charts with just Ruby; you don't have to write any JavaScript at all.
49
- email:
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: 3.2.8
62
+ description: This Ruby gem, GoogleVisualr, is a wrapper around the Google Chart Tools
63
+ that allows anyone to create the same beautiful charts with just Ruby; you don't
64
+ have to write any JavaScript at all.
65
+ email:
50
66
  - winston.yongwei+google_visualr@gmail.com
51
67
  executables: []
52
-
53
68
  extensions: []
54
-
55
- extra_rdoc_files:
69
+ extra_rdoc_files:
56
70
  - README.rdoc
57
- files:
71
+ files:
58
72
  - .gitignore
59
73
  - .rspec
60
74
  - .rvmrc
@@ -155,30 +169,27 @@ files:
155
169
  - spec/support/common.rb
156
170
  homepage: https://github.com/winston/google_visualr
157
171
  licenses: []
158
-
159
172
  post_install_message:
160
173
  rdoc_options: []
161
-
162
- require_paths:
174
+ require_paths:
163
175
  - lib
164
- required_ruby_version: !ruby/object:Gem::Requirement
176
+ required_ruby_version: !ruby/object:Gem::Requirement
165
177
  none: false
166
- requirements:
167
- - - ">="
168
- - !ruby/object:Gem::Version
169
- version: "0"
170
- required_rubygems_version: !ruby/object:Gem::Requirement
178
+ requirements:
179
+ - - ! '>='
180
+ - !ruby/object:Gem::Version
181
+ version: '0'
182
+ required_rubygems_version: !ruby/object:Gem::Requirement
171
183
  none: false
172
- requirements:
173
- - - ">="
174
- - !ruby/object:Gem::Version
184
+ requirements:
185
+ - - ! '>='
186
+ - !ruby/object:Gem::Version
175
187
  version: 1.3.6
176
188
  requirements: []
177
-
178
189
  rubyforge_project: google_visualr
179
- rubygems_version: 1.8.13
190
+ rubygems_version: 1.8.24
180
191
  signing_key:
181
192
  specification_version: 3
182
- summary: A Ruby wrapper around the Google Chart Tools that allows anyone to create the same beautiful charts with just plain Ruby.
193
+ summary: A Ruby wrapper around the Google Chart Tools that allows anyone to create
194
+ the same beautiful charts with just plain Ruby.
183
195
  test_files: []
184
-