rubyvis_charts 0.1.3 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8ab10c1ecb4e36e42957a92277495cf52c4d34cec83bfcaeb7f41f8d1a0b3cf8
4
- data.tar.gz: c7a2e9ad58d70b470aeb8226602986db39d38298cfe1ce5aa762dd518f63c893
3
+ metadata.gz: 5bd2de2877bd88adbfa8ee7b74a75c7275488c6af995b6f243f2dd2e3b7ca42c
4
+ data.tar.gz: b7ba12834cc7fcf6eef64535f75ee797b8341520d9dcaf9bff5c7666c322aed0
5
5
  SHA512:
6
- metadata.gz: f23866ff285257a60dae96cd59c9ebe7458cc1add747e657446d53a4fadd9ef56d550aead92c22be218d2c0d2e45acb5e0ee1bc6a624b8f000baadcc093283f2
7
- data.tar.gz: d0b3fa6838b46e20bfff83bd7a6f3c8a84a9de77feb4db4f5fedda1e582c81ec52c1a5501d72eece5cca6d761485ea67d91e5ac2c4390cc35bd4913d17c5d303
6
+ metadata.gz: 0c4d050f06e28094dae338a02964656ea4828dac0b3f0b7f7596a02dcd04924ca676ac18bf4eb8af2cd660c2235096fc30fccd965005c2e28ca300adc94d4faa
7
+ data.tar.gz: 1214ce976fcb23e80ab96ccf61c50502e509ae7f8d78e36a3623b8ddf166b7e8a24d0f376c100089e62e0385e91c8f59c96228f01907473ed98c7713adeb27a4
@@ -0,0 +1,44 @@
1
+ name: build_and_publish
2
+ on:
3
+ push:
4
+ tags:
5
+ - 'v*.*.*'
6
+ jobs:
7
+ build:
8
+ strategy:
9
+ fail-fast: true
10
+ name: build and publish gem
11
+ runs-on: ubuntu-latest
12
+ permissions:
13
+ packages: write
14
+ contents: read
15
+ steps:
16
+ - uses: actions/checkout@v2
17
+
18
+ - name: setup ruby
19
+ uses: ruby/setup-ruby@v1
20
+ with:
21
+ ruby-version: 2.7
22
+ bundler-cache: true
23
+
24
+ - name: install gems
25
+ run: bundle install
26
+
27
+ - name: version check
28
+ run: |
29
+ export GEM_VERSION=$(ruby -e "require 'rubygems'; puts Gem::Specification::load('${{github.event.repository.name}}.gemspec').version")
30
+ if [ "v$GEM_VERSION" != "${{github.ref_name}}" ] ; then
31
+ echo "Pushed git tag '${{github.ref_name}}' does not match gem version 'v{gem_version}', expected: 'v$GEM_VERSION'"
32
+ exit 1
33
+ fi
34
+
35
+ - name: publish to rubygems
36
+ run: |
37
+ mkdir -p $HOME/.gem
38
+ touch $HOME/.gem/credentials
39
+ chmod 0600 $HOME/.gem/credentials
40
+ printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
41
+ gem build *.gemspec
42
+ gem push *.gem
43
+ env:
44
+ GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
@@ -0,0 +1,18 @@
1
+ name: rspec_build
2
+ on:
3
+ pull_request:
4
+ branches:
5
+ - master
6
+ jobs:
7
+ test:
8
+ strategy:
9
+ fail-fast: false
10
+ name: Run rspec
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v2
14
+ - uses: ruby/setup-ruby@v1
15
+ with:
16
+ ruby-version: 2.7 # Not needed with a .ruby-version file
17
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
18
+ - run: bundle exec rspec
data/Gemfile.lock CHANGED
@@ -1,28 +1,30 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rubyvis_charts (0.1.3)
4
+ rubyvis_charts (0.1.6)
5
5
  activesupport
6
6
  rubyvis (~> 0.6.1)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activesupport (5.2.2)
11
+ activesupport (7.0.3)
12
12
  concurrent-ruby (~> 1.0, >= 1.0.2)
13
- i18n (>= 0.7, < 2)
14
- minitest (~> 5.1)
15
- tzinfo (~> 1.1)
13
+ i18n (>= 1.6, < 2)
14
+ minitest (>= 5.1)
15
+ tzinfo (~> 2.0)
16
16
  byebug (10.0.2)
17
- concurrent-ruby (1.1.4)
17
+ concurrent-ruby (1.1.10)
18
18
  diff-lcs (1.3)
19
- i18n (1.2.0)
19
+ i18n (1.10.0)
20
20
  concurrent-ruby (~> 1.0)
21
- mini_portile2 (2.3.0)
22
- minitest (5.11.3)
23
- nokogiri (1.8.4)
24
- mini_portile2 (~> 2.3.0)
25
- rake (10.5.0)
21
+ mini_portile2 (2.8.0)
22
+ minitest (5.16.1)
23
+ nokogiri (1.13.6)
24
+ mini_portile2 (~> 2.8.0)
25
+ racc (~> 1.4)
26
+ racc (1.6.0)
27
+ rake (13.0.1)
26
28
  rspec (3.7.0)
27
29
  rspec-core (~> 3.7.0)
28
30
  rspec-expectations (~> 3.7.0)
@@ -37,9 +39,8 @@ GEM
37
39
  rspec-support (~> 3.7.0)
38
40
  rspec-support (3.7.1)
39
41
  rubyvis (0.6.1)
40
- thread_safe (0.3.6)
41
- tzinfo (1.2.5)
42
- thread_safe (~> 0.1)
42
+ tzinfo (2.0.4)
43
+ concurrent-ruby (~> 1.0)
43
44
 
44
45
  PLATFORMS
45
46
  ruby
@@ -47,10 +48,10 @@ PLATFORMS
47
48
  DEPENDENCIES
48
49
  bundler (~> 1.16)
49
50
  byebug (~> 10.0)
50
- nokogiri (~> 1.8)
51
- rake (~> 10.0)
51
+ nokogiri (~> 1.13.6)
52
+ rake (~> 13.0)
52
53
  rspec (~> 3.0)
53
54
  rubyvis_charts!
54
55
 
55
56
  BUNDLED WITH
56
- 1.16.5
57
+ 1.17.2
data/README.md CHANGED
@@ -21,7 +21,7 @@ Or install it yourself as:
21
21
  ## Usage
22
22
 
23
23
  ### BarTimelineChart
24
- ```
24
+ ```ruby
25
25
  data = {
26
26
  :legend_titles => ["Value1", "Value2"],
27
27
  :values => [81000, 67000, 287000, 174000, 217000, 185000, 280000, 230000, 219000, 138000, 93000, 74000, 89000, 67000],
@@ -41,12 +41,12 @@ RubyvisCharts::BarTimelineChart.new(data).render
41
41
  ```
42
42
 
43
43
  <p align="center">
44
- <img src ="/images/BarTimelineChart.png" width="300"/>
44
+ <img src ="/images/BarTimelineChart.png" width="450"/>
45
45
  </p>
46
46
 
47
47
 
48
48
  ### GroupedBarTimelineChart
49
- ```
49
+ ```ruby
50
50
  data = {
51
51
  :legend_titles => ["Value1", "Value2"],
52
52
  :values => [81000, 67000, 287000, 174000, 217000, 185000, 280000, 230000, 219000, 138000, 93000, 74000, 89000, 67000],
@@ -65,11 +65,11 @@ data = {
65
65
  RubyvisCharts::GroupedBarTimelineChart.new(data).render
66
66
  ```
67
67
  <p align="center">
68
- <img src ="/images/GroupedBarTimelineChart.png" width="300"/>
68
+ <img src ="/images/GroupedBarTimelineChart.png" width="450"/>
69
69
  </p>
70
70
 
71
71
  ### StackedBarTimelineChart
72
- ```
72
+ ```ruby
73
73
  data = {
74
74
  :legend_titles=>["Value1", "Value2"],
75
75
  :values=>[[5310, 2000, 9760, 2100, 7700, 6140, 9070], [106, 700, 41, 249, 800, 700, 44]],
@@ -88,11 +88,11 @@ data = {
88
88
  RubyvisCharts::StackedBarTimelineChart.new(data).render
89
89
  ```
90
90
  <p align="center">
91
- <img src ="/images/StackedBarTimelineChart.png" width="300"/>
91
+ <img src ="/images/StackedBarTimelineChart.png" width="450"/>
92
92
  </p>
93
93
 
94
94
  ### LineTimelineChart
95
- ```
95
+ ```ruby
96
96
  data = {
97
97
  :legend_titles=>["Value"],
98
98
  :legend_colors=>["#83c9e9"],
@@ -108,11 +108,11 @@ data = {
108
108
  RubyvisCharts::LineTimelineChart.new(data).render
109
109
  ```
110
110
  <p align="center">
111
- <img src ="/images/LineTimelineChart.png" width="300"/>
111
+ <img src ="/images/LineTimelineChart.png" width="450"/>
112
112
  </p>
113
113
 
114
114
  ### AreaTimelineChart
115
- ```
115
+ ```ruby
116
116
  data = {
117
117
  :areas_colors=>["#8CB2D4", "#14a792"],
118
118
  :dates_height_ratio=>0.1,
@@ -128,14 +128,14 @@ data = {
128
128
  RubyvisCharts::AreaTimelineChart.new(data).render
129
129
  ```
130
130
  <p align="center">
131
- <img src ="/images/AreaTimelineChart.png" width="300"/>
131
+ <img src ="/images/AreaTimelineChart.png" width="450"/>
132
132
  </p>
133
133
 
134
134
  You can use keys dates, marks, y_scale_max, numbers_formatter, numbers_color, numbers_font, title_text, title_color, title_font, dates_formatter, dates_color, dates_font, marks_color, rules_color, rules_count, weekend_bar_color, timeline_width_ratio, dates_height_ratio, marks_height_ratio, legend_titles, legend_colors, legend_text_color, legend_font, legend_shape, legend_chars, custom_legend_offset, threshold_number, threshold_color, threshold_width, threshold_caption
135
135
  for all timeline charts
136
136
 
137
137
  ### DonutChart
138
- ```
138
+ ```ruby
139
139
  data = {
140
140
  :values=>[{percentage: 0.18906606},
141
141
  {percentage: 0.05694761},
@@ -153,7 +153,7 @@ data = {
153
153
  RubyvisCharts::DonutChart.new(data).render
154
154
  ```
155
155
  <p align="center">
156
- <img src ="/images/DonutChart.png" width="150"/>
156
+ <img src ="/images/DonutChart.png" width="200"/>
157
157
  </p>
158
158
 
159
159
 
@@ -84,7 +84,7 @@ module RubyvisCharts
84
84
  threshold_caption: DefaultArguments::THRESHOLD_CAPTION,
85
85
  **other
86
86
  )
87
- super(other)
87
+ super(**other)
88
88
 
89
89
  @dates = dates
90
90
  @marks = marks
@@ -13,7 +13,7 @@ module RubyvisCharts
13
13
  areas_colors: DefaultArguments::AREAS_COLORS,
14
14
  **other
15
15
  )
16
- super(other)
16
+ super(**other)
17
17
 
18
18
  @areas_colors = areas_colors
19
19
 
@@ -12,7 +12,7 @@ module RubyvisCharts
12
12
  bars_colors: DefaultArguments::BARS_COLORS,
13
13
  **other
14
14
  )
15
- super(other)
15
+ super(**other)
16
16
 
17
17
  @bars_padding = bars_padding
18
18
  @bars_colors = bars_colors
@@ -15,7 +15,7 @@ module RubyvisCharts
15
15
  percentage_key: :percentage,
16
16
  **other
17
17
  )
18
- super(other)
18
+ super(**other)
19
19
  @outer_radius = outer_radius
20
20
  @inner_radius = inner_radius
21
21
  @cones_colors = cones_colors
@@ -14,7 +14,7 @@ module RubyvisCharts
14
14
  bars_colors: DefaultArguments::BARS_COLORS,
15
15
  **other
16
16
  )
17
- super(other)
17
+ super(**other)
18
18
 
19
19
  @bars_padding = bars_padding
20
20
  @bars_colors = bars_colors
@@ -13,7 +13,7 @@ module RubyvisCharts
13
13
  lines_colors: DefaultArguments::LINES_COLORS,
14
14
  **other
15
15
  )
16
- super(other)
16
+ super(**other)
17
17
  @lines_colors = lines_colors
18
18
  initialize_lines!
19
19
  end
@@ -12,7 +12,7 @@ module RubyvisCharts
12
12
  bars_colors: DefaultArguments::BARS_COLORS,
13
13
  **other
14
14
  )
15
- super(other)
15
+ super(**other)
16
16
 
17
17
  @bars_padding = bars_padding
18
18
  @bars_colors = bars_colors
@@ -1,3 +1,3 @@
1
1
  module RubyvisCharts
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.6"
3
3
  end
@@ -1,4 +1,5 @@
1
1
  require 'active_support/time'
2
+ require 'securerandom'
2
3
  require 'rubyvis'
3
4
  require 'nokogiri'
4
5
  require "rubyvis_charts/version"
@@ -30,8 +30,8 @@ Gem::Specification.new do |spec|
30
30
  spec.add_dependency 'activesupport'
31
31
 
32
32
  spec.add_development_dependency "bundler", "~> 1.16"
33
- spec.add_development_dependency "rake", "~> 10.0"
33
+ spec.add_development_dependency "rake", "~> 13.0"
34
34
  spec.add_development_dependency "rspec", "~> 3.0"
35
- spec.add_development_dependency "nokogiri", "~> 1.8"
35
+ spec.add_development_dependency "nokogiri", "~> 1.13.6"
36
36
  spec.add_development_dependency "byebug", "~> 10.0"
37
37
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubyvis_charts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andriy Solonyna
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-01-04 00:00:00.000000000 Z
11
+ date: 2023-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyvis
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '10.0'
61
+ version: '13.0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '10.0'
68
+ version: '13.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '1.8'
89
+ version: 1.13.6
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '1.8'
96
+ version: 1.13.6
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: byebug
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -115,6 +115,8 @@ executables: []
115
115
  extensions: []
116
116
  extra_rdoc_files: []
117
117
  files:
118
+ - ".github/workflows/build_and_publish.yml"
119
+ - ".github/workflows/rspec_build.yml"
118
120
  - ".gitignore"
119
121
  - ".rspec"
120
122
  - ".travis.yml"
@@ -163,8 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
163
165
  - !ruby/object:Gem::Version
164
166
  version: '0'
165
167
  requirements: []
166
- rubyforge_project:
167
- rubygems_version: 2.7.7
168
+ rubygems_version: 3.3.22
168
169
  signing_key:
169
170
  specification_version: 4
170
171
  summary: Rubyvis charts