chartkick 1.3.1 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of chartkick might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f267372477ee8ee07e58cfd1d8aa238f46852804
4
- data.tar.gz: 9d72a752e72eb9cbc2cbdc5b9a78864f1d889e5b
3
+ metadata.gz: ca23cf2a483dec9fdb551db05a0026cebaffb654
4
+ data.tar.gz: 787086c3fa0287b611c5895c1fe5c43902347b05
5
5
  SHA512:
6
- metadata.gz: 3dded5fa96105623a3e52cfc18c6ad73cca64698583388da68df0bf30a2239f0c382c724ffd2a95acdae2207c5bb5db357c8cf8cba54aba88e37a5475efe2fe5
7
- data.tar.gz: a71a15aa62707face8f1a3f84ee826e923ba6f6a8f59582e00d921daf0e9fda4930405b0ec214cdd20f3a1a1e9bb2f4e4115db793e65cfad5f537b2d284c0adc
6
+ metadata.gz: 6a4dcfde3aeb6f4068cda287772d4d36d3280eb88bbc9b64172b8d678f34319ffc89ab55e50b7e88ae38bd3041e9f56c26826ca151ad6880c9cbefba6518d96c
7
+ data.tar.gz: 2a3ee87316b2aa0c8faef093a042c8a7126d13b8b96adacec8623cb331465e8b26dc10a22c5c2a0cf546c0236d3dbba0e2ea49d7517fc0d28a46e8706df0f370
@@ -1,3 +1,7 @@
1
+ ## 1.3.2
2
+
3
+ - Fixed `except` error when not using Rails
4
+
1
5
  ## 1.3.1
2
6
 
3
7
  - Fixed blank screen bug
@@ -37,16 +37,16 @@ module Chartkick
37
37
  def chartkick_chart(klass, data_source, options, &block)
38
38
  @chartkick_chart_id ||= 0
39
39
  options = chartkick_deep_merge(Chartkick.options, options)
40
- element_id = options[:id] || "chart-#{@chartkick_chart_id += 1}"
41
- height = options[:height] || "300px"
40
+ element_id = options.delete(:id) || "chart-#{@chartkick_chart_id += 1}"
41
+ height = options.delete(:height) || "300px"
42
42
  # content_for: nil must override default
43
43
  content_for = options.has_key?(:content_for) ? options.delete(:content_for) : Chartkick.content_for
44
44
 
45
- html = (options[:html] || %[<div id="%{id}" style="height: %{height}; text-align: center; color: #999; line-height: %{height}; font-size: 14px; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, Arial, Helvetica, sans-serif;">Loading...</div>]) % {id: ERB::Util.html_escape(element_id), height: ERB::Util.html_escape(height)}
45
+ html = (options.delete(:html) || %[<div id="%{id}" style="height: %{height}; text-align: center; color: #999; line-height: %{height}; font-size: 14px; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, Arial, Helvetica, sans-serif;">Loading...</div>]) % {id: ERB::Util.html_escape(element_id), height: ERB::Util.html_escape(height)}
46
46
 
47
47
  js = <<JS
48
48
  <script type="text/javascript">
49
- new Chartkick.#{klass}(#{element_id.to_json}, #{data_source.respond_to?(:chart_json) ? data_source.chart_json : data_source.to_json}, #{options.except(:id, :height, :html).to_json});
49
+ new Chartkick.#{klass}(#{element_id.to_json}, #{data_source.respond_to?(:chart_json) ? data_source.chart_json : data_source.to_json}, #{options.to_json});
50
50
  </script>
51
51
  JS
52
52
  if content_for
@@ -1,3 +1,3 @@
1
1
  module Chartkick
2
- VERSION = "1.3.1"
2
+ VERSION = "1.3.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chartkick
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-30 00:00:00.000000000 Z
11
+ date: 2014-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler