google_visualr 2.0.3 → 2.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -26,7 +26,7 @@ require "#{lib_path}/google_visualr/interactive/line_chart"
26
26
  require "#{lib_path}/google_visualr/interactive/pie_chart"
27
27
  require "#{lib_path}/google_visualr/interactive/scatter_chart"
28
28
  require "#{lib_path}/google_visualr/interactive/table"
29
- require "#{lib_path}/google_visualr/interactive/treemap"
29
+ require "#{lib_path}/google_visualr/interactive/tree_map"
30
30
 
31
31
  ## Additional
32
32
  require "#{lib_path}/google_visualr/interactive/annotated_time_line"
@@ -232,6 +232,8 @@ module GoogleVisualr
232
232
  v = value.is_a?(Hash) ? value[:v] : value
233
233
 
234
234
  case
235
+ when v.nil?
236
+ return
235
237
  when type == "string"
236
238
  raise ArgumentError, "cell value '#{v}' is not a String", caller unless v.is_a?(String)
237
239
  when type == "number"
@@ -2,7 +2,7 @@ module GoogleVisualr
2
2
  module Interactive
3
3
 
4
4
  # http://code.google.com/apis/chart/interactive/docs/gallery/treemap.html
5
- class Treemap < BaseChart
5
+ class TreeMap < BaseChart
6
6
  # For Configuration Options, please refer to:
7
7
  # http://code.google.com/apis/chart/interactive/docs/gallery/treemap.html#Configuration_Options
8
8
  end
@@ -1,3 +1,3 @@
1
1
  module GoogleVisualr
2
- VERSION = "2.0.3"
2
+ VERSION = "2.0.4"
3
3
  end
@@ -187,6 +187,16 @@ describe GoogleVisualr::DataTable do
187
187
  @dt.set_cell(0, 1, 1234)
188
188
  }.to raise_exception(ArgumentError)
189
189
  end
190
+
191
+ it "accepts 'nil' for all column types" do
192
+ expect {
193
+ @dt.set_cell(0, 0, nil)
194
+ }.to_not raise_exception(ArgumentError)
195
+
196
+ expect {
197
+ @dt.set_cell(0, 1, nil)
198
+ }.to_not raise_exception(ArgumentError)
199
+ end
190
200
  end
191
201
 
192
202
  describe "#get_cell" do
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: google_visualr
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 2.0.3
5
+ version: 2.0.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Winston Teo
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-07-04 00:00:00 Z
13
+ date: 2011-07-06 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
@@ -76,7 +76,7 @@ files:
76
76
  - lib/google_visualr/interactive/pie_chart.rb
77
77
  - lib/google_visualr/interactive/scatter_chart.rb
78
78
  - lib/google_visualr/interactive/table.rb
79
- - lib/google_visualr/interactive/treemap.rb
79
+ - lib/google_visualr/interactive/tree_map.rb
80
80
  - lib/google_visualr/packages.rb
81
81
  - lib/google_visualr/param_helpers.rb
82
82
  - lib/google_visualr/version.rb