chartkick 4.2.1 → 5.0.1

Sign up to get free protection for your applications and to get access to all the features.
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: 4.2.1
4
+ version: 5.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-02 00:00:00.000000000 Z
11
+ date: 2023-01-19 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: andrew@ankane.org
@@ -20,15 +20,17 @@ files:
20
20
  - LICENSE.txt
21
21
  - README.md
22
22
  - lib/chartkick.rb
23
+ - lib/chartkick/core_ext.rb
23
24
  - lib/chartkick/engine.rb
24
- - lib/chartkick/enumerable.rb
25
25
  - lib/chartkick/helper.rb
26
26
  - lib/chartkick/sinatra.rb
27
+ - lib/chartkick/utils.rb
27
28
  - lib/chartkick/version.rb
28
29
  - licenses/LICENSE-chart.js.txt
29
30
  - licenses/LICENSE-chartjs-adapter-date-fns.txt
30
31
  - licenses/LICENSE-chartkick.js.txt
31
32
  - licenses/LICENSE-date-fns.txt
33
+ - licenses/LICENSE-kurkle-color.txt
32
34
  - vendor/assets/javascripts/Chart.bundle.js
33
35
  - vendor/assets/javascripts/chartkick.js
34
36
  homepage: https://chartkick.com
@@ -43,14 +45,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
43
45
  requirements:
44
46
  - - ">="
45
47
  - !ruby/object:Gem::Version
46
- version: '2.6'
48
+ version: '2.7'
47
49
  required_rubygems_version: !ruby/object:Gem::Requirement
48
50
  requirements:
49
51
  - - ">="
50
52
  - !ruby/object:Gem::Version
51
53
  version: '0'
52
54
  requirements: []
53
- rubygems_version: 3.3.7
55
+ rubygems_version: 3.4.1
54
56
  signing_key:
55
57
  specification_version: 4
56
58
  summary: Create beautiful JavaScript charts with one line of Ruby
@@ -1,25 +0,0 @@
1
- # for both multiple series and
2
- # making sure hash order is preserved in JavaScript
3
- module Enumerable
4
- def chart_json
5
- if is_a?(Hash)
6
- if (key = keys.first) && key.is_a?(Array) && key.size == 2
7
- group_by { |k, _v| k[0] }.map do |name, data|
8
- {name: name, data: data.map { |k, v| [k[1], v] }}
9
- end
10
- else
11
- to_a
12
- end
13
- elsif is_a?(Array)
14
- map do |v|
15
- if v.is_a?(Hash) && v[:data].is_a?(Hash)
16
- v = v.dup
17
- v[:data] = v[:data].to_a
18
- end
19
- v
20
- end
21
- else
22
- self
23
- end.to_json
24
- end
25
- end