chartkick 2.3.5 → 3.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +110 -42
- data/LICENSE.txt +1 -1
- data/README.md +196 -55
- data/lib/chartkick.rb +12 -16
- data/lib/chartkick/engine.rb +1 -16
- data/lib/chartkick/enumerable.rb +25 -0
- data/lib/chartkick/helper.rb +85 -24
- data/lib/chartkick/version.rb +1 -1
- data/licenses/LICENSE-chart.js.txt +9 -0
- data/licenses/LICENSE-chartkick.js.txt +22 -0
- data/licenses/LICENSE-moment.txt +22 -0
- data/vendor/assets/javascripts/Chart.bundle.js +19601 -17744
- data/vendor/assets/javascripts/chartkick.js +530 -256
- metadata +11 -21
- data/.github/ISSUE_TEMPLATE.md +0 -7
- data/.github/stale.yml +0 -16
- data/.gitignore +0 -17
- data/CONTRIBUTING.md +0 -43
- data/Gemfile +0 -4
- data/Rakefile +0 -8
- data/chartkick.gemspec +0 -23
- data/lib/chartkick/rails.rb +0 -5
- data/test/chartkick_test.rb +0 -43
- data/test/test_helper.rb +0 -4
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
|
+
version: 3.4.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:
|
11
|
+
date: 2020-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -53,33 +53,26 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
description:
|
56
|
-
email:
|
57
|
-
- andrew@chartkick.com
|
56
|
+
email: andrew@chartkick.com
|
58
57
|
executables: []
|
59
58
|
extensions: []
|
60
59
|
extra_rdoc_files: []
|
61
60
|
files:
|
62
|
-
- ".github/ISSUE_TEMPLATE.md"
|
63
|
-
- ".github/stale.yml"
|
64
|
-
- ".gitignore"
|
65
61
|
- CHANGELOG.md
|
66
|
-
- CONTRIBUTING.md
|
67
|
-
- Gemfile
|
68
62
|
- LICENSE.txt
|
69
63
|
- README.md
|
70
|
-
- Rakefile
|
71
|
-
- chartkick.gemspec
|
72
64
|
- lib/chartkick.rb
|
73
65
|
- lib/chartkick/engine.rb
|
66
|
+
- lib/chartkick/enumerable.rb
|
74
67
|
- lib/chartkick/helper.rb
|
75
|
-
- lib/chartkick/rails.rb
|
76
68
|
- lib/chartkick/sinatra.rb
|
77
69
|
- lib/chartkick/version.rb
|
78
|
-
-
|
79
|
-
-
|
70
|
+
- licenses/LICENSE-chart.js.txt
|
71
|
+
- licenses/LICENSE-chartkick.js.txt
|
72
|
+
- licenses/LICENSE-moment.txt
|
80
73
|
- vendor/assets/javascripts/Chart.bundle.js
|
81
74
|
- vendor/assets/javascripts/chartkick.js
|
82
|
-
homepage: https://
|
75
|
+
homepage: https://chartkick.com
|
83
76
|
licenses:
|
84
77
|
- MIT
|
85
78
|
metadata: {}
|
@@ -91,18 +84,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
91
84
|
requirements:
|
92
85
|
- - ">="
|
93
86
|
- !ruby/object:Gem::Version
|
94
|
-
version: '
|
87
|
+
version: '2.2'
|
95
88
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
96
89
|
requirements:
|
97
90
|
- - ">="
|
98
91
|
- !ruby/object:Gem::Version
|
99
92
|
version: '0'
|
100
93
|
requirements: []
|
101
|
-
|
102
|
-
rubygems_version: 2.7.6
|
94
|
+
rubygems_version: 3.1.2
|
103
95
|
signing_key:
|
104
96
|
specification_version: 4
|
105
97
|
summary: Create beautiful JavaScript charts with one line of Ruby
|
106
|
-
test_files:
|
107
|
-
- test/chartkick_test.rb
|
108
|
-
- test/test_helper.rb
|
98
|
+
test_files: []
|
data/.github/ISSUE_TEMPLATE.md
DELETED
data/.github/stale.yml
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
# Number of days of inactivity before an issue becomes stale
|
2
|
-
daysUntilStale: 7
|
3
|
-
# Number of days of inactivity before a stale issue is closed
|
4
|
-
daysUntilClose: 7
|
5
|
-
# Issues with these labels will never be considered stale
|
6
|
-
exemptLabels:
|
7
|
-
- enhancement
|
8
|
-
# Label to use when marking an issue as stale
|
9
|
-
staleLabel: stale
|
10
|
-
# Comment to post when marking an issue as stale. Set to `false` to disable
|
11
|
-
markComment: >
|
12
|
-
This issue has been automatically marked as stale because it has not had
|
13
|
-
recent activity. It will be closed if no further activity occurs. Thank you
|
14
|
-
for your contributions.
|
15
|
-
# Comment to post when closing a stale issue. Set to `false` to disable
|
16
|
-
closeComment: true
|
data/.gitignore
DELETED
data/CONTRIBUTING.md
DELETED
@@ -1,43 +0,0 @@
|
|
1
|
-
# Contributing
|
2
|
-
|
3
|
-
First, thanks for wanting to contribute. You’re awesome! :heart:
|
4
|
-
|
5
|
-
## Questions
|
6
|
-
|
7
|
-
Use [Stack Overflow](https://stackoverflow.com/) with the tag `chartkick`.
|
8
|
-
|
9
|
-
## Feature Requests
|
10
|
-
|
11
|
-
Create an issue. Start the title with `[Idea]`.
|
12
|
-
|
13
|
-
## Issues
|
14
|
-
|
15
|
-
Think you’ve discovered an issue?
|
16
|
-
|
17
|
-
1. Search existing issues to see if it’s been reported.
|
18
|
-
2. Try the `master` branch to make sure it hasn’t been fixed.
|
19
|
-
|
20
|
-
```rb
|
21
|
-
gem "chartkick", github: "ankane/chartkick"
|
22
|
-
```
|
23
|
-
|
24
|
-
If the above steps don’t help, create an issue. Include:
|
25
|
-
|
26
|
-
- Detailed steps to reproduce
|
27
|
-
- JavaScript rendered by Chartkick
|
28
|
-
- Complete backtraces for exceptions
|
29
|
-
|
30
|
-
## Pull Requests
|
31
|
-
|
32
|
-
Fork the project and create a pull request. A few tips:
|
33
|
-
|
34
|
-
- Keep changes to a minimum. If you have multiple features or fixes, submit multiple pull requests.
|
35
|
-
- Follow the existing style. The code should read like it’s written by a single person.
|
36
|
-
|
37
|
-
Feel free to open an issue to get feedback on your idea before spending too much time on it.
|
38
|
-
|
39
|
-
Also, note that we aren’t currently accepting new chart types.
|
40
|
-
|
41
|
-
---
|
42
|
-
|
43
|
-
This contributing guide is released under [CCO](https://creativecommons.org/publicdomain/zero/1.0/) (public domain). Use it for your own project without attribution.
|
data/Gemfile
DELETED
data/Rakefile
DELETED
data/chartkick.gemspec
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path("../lib", __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require "chartkick/version"
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "chartkick"
|
8
|
-
spec.version = Chartkick::VERSION
|
9
|
-
spec.authors = ["Andrew Kane"]
|
10
|
-
spec.email = ["andrew@chartkick.com"]
|
11
|
-
spec.summary = "Create beautiful JavaScript charts with one line of Ruby"
|
12
|
-
spec.homepage = "https://www.chartkick.com"
|
13
|
-
spec.license = "MIT"
|
14
|
-
|
15
|
-
spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
|
16
|
-
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
|
-
spec.require_paths = ["lib"]
|
19
|
-
|
20
|
-
spec.add_development_dependency "bundler"
|
21
|
-
spec.add_development_dependency "rake"
|
22
|
-
spec.add_development_dependency "minitest"
|
23
|
-
end
|
data/lib/chartkick/rails.rb
DELETED
data/test/chartkick_test.rb
DELETED
@@ -1,43 +0,0 @@
|
|
1
|
-
require "test_helper"
|
2
|
-
|
3
|
-
class TestChartkick < Minitest::Test
|
4
|
-
include Chartkick::Helper
|
5
|
-
|
6
|
-
# TODO actual tests
|
7
|
-
|
8
|
-
def setup
|
9
|
-
@data = [[34, 42], [56, 49]]
|
10
|
-
end
|
11
|
-
|
12
|
-
def test_line_chart
|
13
|
-
assert line_chart(@data)
|
14
|
-
end
|
15
|
-
|
16
|
-
def test_pie_chart
|
17
|
-
assert pie_chart(@data)
|
18
|
-
end
|
19
|
-
|
20
|
-
def test_column_chart
|
21
|
-
assert column_chart(@data)
|
22
|
-
end
|
23
|
-
|
24
|
-
def test_options_not_mutated
|
25
|
-
options = {id: "boom"}
|
26
|
-
line_chart @data, options
|
27
|
-
assert_equal "boom", options[:id]
|
28
|
-
end
|
29
|
-
|
30
|
-
def test_chartkick_deep_merge_different_inner_key
|
31
|
-
global_option = {library: {backgroundColor: "#eee"}}
|
32
|
-
local_option = {library: {title: "test"}}
|
33
|
-
correct_merge = {library: {backgroundColor: "#eee", title: "test"}}
|
34
|
-
assert_equal chartkick_deep_merge(global_option, local_option), correct_merge
|
35
|
-
end
|
36
|
-
|
37
|
-
def test_chartkick_deep_merge_same_inner_key
|
38
|
-
global_option = {library: {backgroundColor: "#eee"}}
|
39
|
-
local_option = {library: {backgroundColor: "#fff"}}
|
40
|
-
correct_merge = {library: {backgroundColor: "#fff"}}
|
41
|
-
assert_equal chartkick_deep_merge(global_option, local_option), correct_merge
|
42
|
-
end
|
43
|
-
end
|
data/test/test_helper.rb
DELETED