gruff 0.14.0-java → 0.15.0-java

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: 49e695ac5551cf4ec68c09c9d272219433df913f0871cf108373fabffc73492f
4
- data.tar.gz: 7724a089b1d53c511511301cb184af87a2fbe6ce92a9836fc053df5e7c39005a
3
+ metadata.gz: e1c88e4164e9a9900a250668c3cfcaea50dbca718f1cb6f3a9a34e97829a88cc
4
+ data.tar.gz: e3fe64fdaef26e276756c0101173ba8a61c8c628d9b5318ea78bbb01a8232958
5
5
  SHA512:
6
- metadata.gz: ba0f075b7a210e181b7a503bc1701cd43b618ba043dc44d2ef9c24d7db212687a840b8e92083c9e92d9d69d50f83d34d7b02ea4d2d0c33d1705abca2a18566d9
7
- data.tar.gz: ce4e553a52dd6a1c85bf5fbcca5f37bebe4c9961627c213f96c10be08e611551a7c2927f3422a733208fd33363cd2767b8b0eab042d9de4707e2b4e8d82644d4
6
+ metadata.gz: cde5be79069863980f8235108c1b16457295ff0743615a85eb73246ead279de1de8742d832a3c48ececf430de61454edff0340fd4f57d2b5f3216aac4eac2cc1
7
+ data.tar.gz: 62c09da6e860e0ae555a9d27dccae050e4cc817b3cf1be0918f5a303f824d7524b5bab1a6e40b69fb1c5b42f5ed72732b1aa9473cb3778574c2593b9248fabb5
@@ -12,13 +12,13 @@ jobs:
12
12
  timeout-minutes: 20
13
13
  name: Lint
14
14
  steps:
15
- - uses: actions/checkout@v2
15
+ - uses: actions/checkout@v3
16
16
  with:
17
17
  ref: ${{ github.event.pull_request.head.sha }}
18
- - name: Set up Ruby 2.4
18
+ - name: Set up Ruby 2.5
19
19
  uses: ruby/setup-ruby@master
20
20
  with:
21
- ruby-version: '2.4'
21
+ ruby-version: '2.5'
22
22
  bundler-cache: true
23
23
  - name: Install dependencies
24
24
  run: bundle install --path=vendor/bundle --jobs 4 --retry 3
@@ -32,10 +32,10 @@ jobs:
32
32
  timeout-minutes: 20
33
33
  strategy:
34
34
  matrix:
35
- ruby-version: ['2.4', '2.5', '2.6', '2.7', '3.0']
35
+ ruby-version: ['2.5', '2.6', '2.7', '3.0', '3.1']
36
36
  name: Ruby ${{ matrix.ruby-version }}
37
37
  steps:
38
- - uses: actions/checkout@v2
38
+ - uses: actions/checkout@v3
39
39
  - name: Set up Ruby
40
40
  uses: ruby/setup-ruby@master
41
41
  with:
@@ -51,10 +51,10 @@ jobs:
51
51
  timeout-minutes: 20
52
52
  strategy:
53
53
  matrix:
54
- ruby-version: ['9.2.19.0']
54
+ ruby-version: ['9.2.20.1', '9.3.4.0']
55
55
  name: JRuby ${{ matrix.ruby-version }}
56
56
  steps:
57
- - uses: actions/checkout@v2
57
+ - uses: actions/checkout@v3
58
58
  - name: Set up Ruby
59
59
  uses: ruby/setup-ruby@master
60
60
  with:
data/.rubocop.yml CHANGED
@@ -1,15 +1,17 @@
1
- inherit_from: .rubocop_todo.yml
2
1
  require:
3
2
  - rubocop-performance
4
3
  - rubocop-rake
5
4
 
6
5
  AllCops:
7
6
  EnabledByDefault: true
8
- TargetRubyVersion: 2.4
7
+ TargetRubyVersion: 2.5
9
8
  Exclude:
10
9
  - 'vendor/bundle/**/*'
11
10
  - 'rails_generators/gruff/**/*'
12
11
 
12
+ Metrics:
13
+ Enabled: false
14
+
13
15
  Gemspec/OrderedDependencies:
14
16
  Enabled: false
15
17
 
@@ -34,25 +36,37 @@ Layout/MultilineMethodArgumentLineBreaks:
34
36
  Layout/MultilineAssignmentLayout:
35
37
  EnforcedStyle: same_line
36
38
 
37
- Lint/AssignmentInCondition:
39
+ Layout/RedundantLineBreak:
40
+ Enabled: false
41
+
42
+ Layout/SingleLineBlockChain:
43
+ Enabled: false
44
+
45
+ Lint/AmbiguousOperatorPrecedence:
38
46
  Enabled: false
39
47
 
40
48
  Lint/ConstantResolution:
41
49
  Enabled: false
42
50
 
51
+ Lint/FloatComparison:
52
+ Enabled: false
53
+
43
54
  Lint/NumberConversion:
44
55
  Enabled: false
45
56
 
57
+ Naming/MemoizedInstanceVariableName:
58
+ Enabled: false
59
+
46
60
  Naming/MethodParameterName:
47
61
  Enabled: false
48
62
 
49
- Style/AccessorGrouping:
63
+ Naming/VariableNumber:
50
64
  Enabled: false
51
65
 
52
- Style/ClassAndModuleChildren:
66
+ Style/AccessorGrouping:
53
67
  Enabled: false
54
68
 
55
- Style/ConditionalAssignment:
69
+ Style/ClassAndModuleChildren:
56
70
  Enabled: false
57
71
 
58
72
  Style/ConstantVisibility:
@@ -64,12 +78,15 @@ Style/Copyright:
64
78
  Style/Documentation:
65
79
  Enabled: true
66
80
 
67
- Style/FormatString:
68
- EnforcedStyle: sprintf
81
+ Style/DocumentationMethod:
82
+ Enabled: false
69
83
 
70
- Style/FormatStringToken:
84
+ Style/DocumentDynamicEvalDefinition:
71
85
  Enabled: false
72
86
 
87
+ Style/FormatString:
88
+ EnforcedStyle: sprintf
89
+
73
90
  Style/GuardClause:
74
91
  Enabled: false
75
92
 
@@ -94,9 +111,6 @@ Style/MissingElse:
94
111
  Style/Next:
95
112
  Enabled: false
96
113
 
97
- Style/NumericLiterals:
98
- Enabled: false
99
-
100
114
  Style/NumericPredicate:
101
115
  Enabled: false
102
116
 
@@ -109,17 +123,11 @@ Style/RedundantBegin:
109
123
  Style/SingleLineBlockParams:
110
124
  Enabled: false
111
125
 
112
- Style/SpecialGlobalVars:
113
- Enabled: false
114
-
115
126
  Style/StructInheritance:
116
127
  Enabled: false
117
128
 
118
- Style/SymbolArray:
119
- Enabled: false
120
-
121
- Style/TernaryParentheses:
129
+ Performance/ChainArrayAllocation:
122
130
  Enabled: false
123
131
 
124
- Performance/ChainArrayAllocation:
132
+ Performance/StringReplacement:
125
133
  Enabled: false
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Change Log
2
2
 
3
+ ## 0.15.0
4
+ - Fix SideStackedBar which bars overlap on the coordinate axes if data contains 0 (#558)
5
+ - Lazy loading library to reduce memory usage (#556)
6
+ - Drop Ruby 2.4 support (#554)
7
+ - Fix sort drawing in Gruff::Line (#553)
8
+ - Fix color value handling in Line#dataxy method (#552)
9
+
3
10
  ## 0.14.0
4
11
  - Update rails template (#547)
5
12
  - Remove singleton in order to support multi-thread processing (#546)
data/gruff.gemspec CHANGED
@@ -11,9 +11,7 @@ Gem::Specification.new do |s|
11
11
  s.authors = ['Geoffrey Grosenbach', 'Uwe Kubosch']
12
12
  s.description = 'Beautiful graphs for one or multiple datasets. Can be used on websites or in documents.'
13
13
  s.email = 'boss@topfunky.com'
14
- s.files = `git ls-files`.split.reject do |f|
15
- f =~ /^test|^docker|^Rakefile/i
16
- end
14
+ s.files = `git ls-files`.split.grep_v(/^test|^docker|^Rakefile/i)
17
15
  s.homepage = 'https://github.com/topfunky/gruff'
18
16
  s.require_paths = %w[lib]
19
17
  s.summary = 'Beautiful graphs for one or multiple datasets.'
@@ -26,16 +24,18 @@ Gem::Specification.new do |s|
26
24
  s.platform = 'java'
27
25
  s.add_dependency 'rmagick4j'
28
26
  else
29
- s.add_dependency 'rmagick'
30
- s.add_development_dependency 'rubocop', '~> 1.12.1'
31
- s.add_development_dependency 'rubocop-performance', '~> 1.10.2'
32
- s.add_development_dependency 'rubocop-rake', '~> 0.5.1'
27
+ s.add_dependency 'rmagick', '>= 4.2'
28
+ s.add_development_dependency 'rubocop', '~> 1.27.0'
29
+ s.add_development_dependency 'rubocop-performance', '~> 1.13.3'
30
+ s.add_development_dependency 'rubocop-rake', '~> 0.6.0'
33
31
  end
34
32
  s.add_dependency 'histogram'
35
- s.required_ruby_version = '>= 2.4.0'
33
+ s.required_ruby_version = '>= 2.5.0'
36
34
 
37
35
  s.add_development_dependency 'rake'
38
36
  s.add_development_dependency 'minitest-reporters'
39
37
  s.add_development_dependency 'simplecov'
40
38
  s.add_development_dependency 'yard', '~> 0.9.25'
39
+
40
+ s.metadata['rubygems_mfa_required'] = 'true'
41
41
  end
data/lib/gruff/base.rb CHANGED
@@ -722,7 +722,7 @@ module Gruff
722
722
 
723
723
  # TESTME
724
724
  # FIXME: Consider chart types other than bar
725
- # TODO: See if index.odd? is the best stragegy
725
+ # TODO: See if index.odd? is the best strategy
726
726
  y_offset += @label_stagger_height if index.odd?
727
727
 
728
728
  if x_offset >= @graph_left && x_offset <= @graph_right
@@ -783,7 +783,7 @@ module Gruff
783
783
  end
784
784
 
785
785
  def clip_value_if_greater_than(value, max_value) # :nodoc:
786
- (value > max_value) ? max_value : value
786
+ value > max_value ? max_value : value
787
787
  end
788
788
 
789
789
  def significant(i) # :nodoc:
@@ -849,7 +849,7 @@ module Gruff
849
849
  # Make space for half the width of the rightmost column label.
850
850
  # Might be greater than the number of columns if between-style bar markers are used.
851
851
  last_label = @labels.keys.max.to_i
852
- (last_label >= (column_count - 1) && @center_labels_over_point) ? calculate_width(@marker_font, @labels[last_label]) / 2.0 : 0
852
+ last_label >= (column_count - 1) && @center_labels_over_point ? calculate_width(@marker_font, @labels[last_label]) / 2.0 : 0
853
853
  end
854
854
 
855
855
  def setup_left_margin
@@ -857,7 +857,7 @@ module Gruff
857
857
 
858
858
  text = begin
859
859
  if @has_left_labels
860
- @labels.values.reduce('') { |value, memo| (value.to_s.length > memo.to_s.length) ? value : memo }
860
+ @labels.values.reduce('') { |value, memo| value.to_s.length > memo.to_s.length ? value : memo }
861
861
  else
862
862
  y_axis_label(maximum_value.to_f, @increment)
863
863
  end
@@ -876,7 +876,7 @@ module Gruff
876
876
  # Same with @hide_legend
877
877
  @top_margin +
878
878
  (hide_title? ? @title_margin : @title_caps_height + @title_margin) +
879
- ((@hide_legend || @legend_at_bottom) ? @legend_margin : calculate_legend_height + @legend_margin)
879
+ (@hide_legend || @legend_at_bottom ? @legend_margin : calculate_legend_height + @legend_margin)
880
880
  end
881
881
 
882
882
  def setup_bottom_margin
@@ -914,7 +914,7 @@ module Gruff
914
914
  sprintf('%0.2f', value)
915
915
  elsif increment >= 0.01 || (increment * 1000) == (increment * 1000).to_i.to_f
916
916
  sprintf('%0.3f', value)
917
- elsif increment >= 0.001 || (increment * 10000) == (increment * 10000).to_i.to_f
917
+ elsif increment >= 0.001 || (increment * 10_000) == (increment * 10_000).to_i.to_f
918
918
  sprintf('%0.4f', value)
919
919
  else
920
920
  value.to_s
@@ -1019,7 +1019,7 @@ module Gruff
1019
1019
  # Try to use a number of horizontal lines that will come out even.
1020
1020
  #
1021
1021
  # TODO Do the same for larger numbers...100, 75, 50, 25
1022
- @increment = (@spread > 0 && marker_count > 0) ? significant(@spread / marker_count) : 1
1022
+ @increment = @spread > 0 && marker_count > 0 ? significant(@spread / marker_count) : 1
1023
1023
  else
1024
1024
  # TODO: Make this work for negative values
1025
1025
  self.marker_count = (@spread / @y_axis_increment).to_i
data/lib/gruff/bullet.rb CHANGED
@@ -64,7 +64,7 @@ class Gruff::Bullet < Gruff::Base
64
64
  rect_renderer = Gruff::Renderer::Rectangle.new(renderer, color: @colors[0])
65
65
  rect_renderer.render(graph_left, 0, graph_left + graph_width, graph_height)
66
66
 
67
- [:high, :low].each_with_index do |indicator, index|
67
+ %i[high low].each_with_index do |indicator, index|
68
68
  next unless @options.key?(indicator)
69
69
 
70
70
  indicator_width_x = graph_left + graph_width * (@options[indicator] / maximum_value)
@@ -18,10 +18,12 @@ module Gruff::BarValueLabel
18
18
  class Bar < Base
19
19
  def prepare_rendering(format, _bar_width = 0)
20
20
  left_x, left_y, right_x, _right_y = @coordinate
21
- if format.is_a?(Proc)
22
- val = format.call(@value)
23
- else
24
- val = sprintf(format || '%.2f', @value).commify
21
+ val = begin
22
+ if format.is_a?(Proc)
23
+ format.call(@value)
24
+ else
25
+ sprintf(format || '%.2f', @value).commify
26
+ end
25
27
  end
26
28
 
27
29
  y = @value >= 0 ? left_y - 30 : left_y + 12
@@ -33,12 +35,13 @@ module Gruff::BarValueLabel
33
35
  class SideBar < Base
34
36
  def prepare_rendering(format, bar_width = 0)
35
37
  left_x, _left_y, right_x, right_y = @coordinate
36
- if format.is_a?(Proc)
37
- val = format.call(@value)
38
- else
39
- val = sprintf(format || '%.2f', @value).commify
38
+ val = begin
39
+ if format.is_a?(Proc)
40
+ format.call(@value)
41
+ else
42
+ sprintf(format || '%.2f', @value).commify
43
+ end
40
44
  end
41
-
42
45
  x = @value >= 0 ? right_x + 40 : left_x - 40
43
46
  yield x, right_y - bar_width / 2, val
44
47
  end
data/lib/gruff/line.rb CHANGED
@@ -118,12 +118,14 @@ class Gruff::Line < Gruff::Base
118
118
  def dataxy(name, x_data_points = [], y_data_points = [], color = nil)
119
119
  # make sure it's an array
120
120
  x_data_points = Array(x_data_points)
121
- y_data_points = Array(y_data_points)
122
121
 
123
122
  raise ArgumentError, 'x_data_points is nil!' if x_data_points.empty?
124
123
 
125
124
  if x_data_points.all? { |p| p.is_a?(Array) && p.size == 2 }
125
+ color = y_data_points if y_data_points.is_a?(String)
126
126
  x_data_points, y_data_points = x_data_points.transpose
127
+ else
128
+ y_data_points = Array(y_data_points)
127
129
  end
128
130
 
129
131
  raise ArgumentError, 'x_data_points.length != y_data_points.length!' if x_data_points.length != y_data_points.length
@@ -174,7 +176,7 @@ private
174
176
 
175
177
  def draw_graph
176
178
  # Check to see if more than one datapoint was given. NaN can result otherwise.
177
- @x_increment = (column_count > 1) ? (@graph_width / (column_count - 1).to_f) : @graph_width
179
+ @x_increment = column_count > 1 ? (@graph_width / (column_count - 1).to_f) : @graph_width
178
180
 
179
181
  @reference_lines.each_value do |curr_reference_line|
180
182
  draw_horizontal_reference_line(curr_reference_line) if curr_reference_line.key?(:norm_value)
@@ -264,10 +266,6 @@ private
264
266
  end
265
267
  end
266
268
 
267
- def sort_norm_data
268
- super unless store.data.any?(&:x_points)
269
- end
270
-
271
269
  def draw_line_markers
272
270
  # do all of the stuff for the horizontal lines on the y-axis
273
271
  super
@@ -23,7 +23,6 @@ module Magick
23
23
  def fill=(fill)
24
24
  fill = { white: '#FFFFFF' }[fill.to_sym] || fill
25
25
  @draw.fill = Magick4J.ColorDatabase.query_default(fill)
26
- self
27
26
  end
28
27
  end
29
28
  end
@@ -44,8 +44,8 @@ module Gruff
44
44
 
45
45
  # Make a new image at the current size with a solid +color+.
46
46
  def solid_background(columns, rows, color)
47
- Magick::Image.new(columns, rows) do
48
- self.background_color = color
47
+ Magick::Image.new(columns, rows) do |img|
48
+ img.background_color = color
49
49
  end
50
50
  end
51
51
 
@@ -97,8 +97,8 @@ module Gruff
97
97
 
98
98
  # Use with a theme to make a transparent background
99
99
  def render_transparent_background(columns, rows)
100
- Magick::Image.new(columns, rows) do
101
- self.background_color = 'transparent'
100
+ Magick::Image.new(columns, rows) do |img|
101
+ img.background_color = 'transparent'
102
102
  end
103
103
  end
104
104
  end
data/lib/gruff/scatter.rb CHANGED
@@ -116,7 +116,7 @@ private
116
116
 
117
117
  def draw_graph
118
118
  # Check to see if more than one datapoint was given. NaN can result otherwise.
119
- @x_increment = (@x_spread > 1) ? (@graph_width / (@x_spread - 1).to_f) : @graph_width
119
+ @x_increment = @x_spread > 1 ? (@graph_width / (@x_spread - 1).to_f) : @graph_width
120
120
 
121
121
  store.norm_data.each do |data_row|
122
122
  data_row.coordinates.each do |x_value, y_value|
@@ -148,7 +148,7 @@ private
148
148
  super
149
149
  end
150
150
 
151
- def calculate_spread #:nodoc:
151
+ def calculate_spread
152
152
  super
153
153
  @x_spread = @maximum_x_value.to_f - @minimum_x_value.to_f
154
154
  @x_spread = @x_spread > 0 ? @x_spread : 1
@@ -176,7 +176,7 @@ private
176
176
  end
177
177
  @marker_x_count ||= 4
178
178
  end
179
- @x_increment = (@x_spread > 0) ? (@x_spread / @marker_x_count) : 1
179
+ @x_increment = @x_spread > 0 ? (@x_spread / @marker_x_count) : 1
180
180
  unless @disable_significant_rounding_x_axis
181
181
  @x_increment = significant(@x_increment)
182
182
  end
@@ -215,7 +215,7 @@ private
215
215
  end
216
216
  end
217
217
 
218
- def get_x_coord(x_data_point, width, offset) #:nodoc:
218
+ def get_x_coord(x_data_point, width, offset)
219
219
  x_data_point * width + offset
220
220
  end
221
221
  end
data/lib/gruff/scene.rb CHANGED
@@ -73,12 +73,20 @@ class Gruff::Scene < Gruff::Base
73
73
  case method_name.to_s
74
74
  when /^(\w+)_group=$/
75
75
  add_group Regexp.last_match(1), *args
76
- return
77
76
  when /^(\w+)=$/
78
77
  set_input Regexp.last_match(1), args.first
79
- return
78
+ else
79
+ super
80
+ end
81
+ end
82
+
83
+ def respond_to_missing?(method_sym, include_private)
84
+ case method_sym.to_s
85
+ when /^(\w+)_group=$/, /^(\w+)=$/
86
+ true
87
+ else
88
+ super
80
89
  end
81
- super
82
90
  end
83
91
 
84
92
  private
@@ -90,7 +98,7 @@ private
90
98
  def set_input(input_name, input_value)
91
99
  if !@groups[input_name].nil?
92
100
  @groups[input_name].send_updates(input_value)
93
- elsif chosen_layer = @layers.find { |layer| layer.name == input_name }
101
+ elsif (chosen_layer = @layers.find { |layer| layer.name == input_name })
94
102
  chosen_layer.update input_value
95
103
  end
96
104
  end
@@ -121,7 +129,7 @@ class Gruff::Layer
121
129
  def initialize(base_dir, folder_name)
122
130
  @base_dir = base_dir.to_s
123
131
  @name = folder_name.to_s
124
- @filenames = Dir.open(File.join(base_dir, folder_name)).entries.select { |file| file =~ /^[^.]+\.png$/ }.sort
132
+ @filenames = Dir.open(File.join(base_dir, folder_name)).entries.grep(/^[^.]+\.png$/).sort
125
133
  @selected_filename = select_default
126
134
  end
127
135
 
@@ -87,6 +87,7 @@ private
87
87
  height[point_index]) + 1
88
88
  temp2 = @graph_left + @graph_width - height[point_index] - 1
89
89
  difference = temp2 - temp1
90
+ difference = 0 if row_index == 0 && difference < 0
90
91
 
91
92
  left_x = length[point_index]
92
93
  left_y = @graph_top + (bar_width * point_index) + padding
data/lib/gruff/spider.rb CHANGED
@@ -107,8 +107,4 @@ private
107
107
 
108
108
  Gruff::Renderer::Polygon.new(renderer, color: color || @marker_color, opacity: 0.4).render(points)
109
109
  end
110
-
111
- def sums_for_spider
112
- store.data.sum { |data_row| data_row.points.first }
113
- end
114
110
  end
@@ -9,6 +9,8 @@ module Gruff
9
9
  super(label.to_s, Array(y_points), color, x_points)
10
10
  end
11
11
 
12
+ alias points y_points
13
+
12
14
  def x_points
13
15
  self[:x_points] || Array.new(y_points.length)
14
16
  end
data/lib/gruff/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Gruff
4
- VERSION = '0.14.0'
4
+ VERSION = '0.15.0'
5
5
  end
data/lib/gruff.rb CHANGED
@@ -1,62 +1,74 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'rmagick'
4
+
5
+ require 'gruff/patch/rmagick'
6
+ require 'gruff/patch/string'
7
+ require 'gruff/renderer/renderer'
8
+ require 'gruff/store/store'
9
+ require 'gruff/font'
10
+ require 'gruff/base'
4
11
  require 'gruff/version'
5
12
 
6
- # Extra full path added to fix loading errors on some installations.
7
-
8
- %w[
9
- patch/rmagick
10
- patch/string
11
-
12
- font
13
- base
14
-
15
- helper/bar_conversion.rb
16
- helper/stacked_mixin
17
- helper/bar_value_label
18
-
19
- themes
20
- area
21
- bar
22
- bezier
23
- bullet
24
- dot
25
- histogram
26
- line
27
- net
28
- pie
29
- scatter
30
- spider
31
- side_bar
32
- stacked_area
33
- stacked_bar
34
- side_stacked_bar
35
- accumulator_bar
36
-
37
- scene
38
-
39
- renderer/renderer
40
- renderer/rectangle
41
- renderer/circle
42
- renderer/dash_line
43
- renderer/line
44
- renderer/polyline
45
- renderer/polygon
46
- renderer/bezier
47
- renderer/ellipse
48
- renderer/dot
49
- renderer/text
50
-
51
- store/store
52
- store/basic_data
53
- store/custom_data
54
- store/xy_data
55
-
56
- mini/legend
57
- mini/bar
58
- mini/pie
59
- mini/side_bar
60
- ].each do |filename|
61
- require "gruff/#{filename}"
13
+ ##
14
+ # = Gruff. Graphs.
15
+ #
16
+ module Gruff
17
+ # @private
18
+ def self.libpath(path)
19
+ File.join(__dir__, 'gruff', path)
20
+ end
21
+
22
+ autoload :BarConversion, Gruff.libpath('helper/bar_conversion')
23
+ autoload :BarValueLabel, Gruff.libpath('helper/bar_value_label')
24
+ class Base
25
+ autoload :StackedMixin, Gruff.libpath('helper/stacked_mixin')
26
+ end
27
+
28
+ autoload :AccumulatorBar, Gruff.libpath('accumulator_bar')
29
+ autoload :Area, Gruff.libpath('area')
30
+ autoload :Bar, Gruff.libpath('bar')
31
+ autoload :Bezier, Gruff.libpath('bezier')
32
+ autoload :Bullet, Gruff.libpath('bullet')
33
+ autoload :Dot, Gruff.libpath('dot')
34
+ autoload :Histogram, Gruff.libpath('histogram')
35
+ autoload :Line, Gruff.libpath('line')
36
+ autoload :Net, Gruff.libpath('net')
37
+ autoload :Pie, Gruff.libpath('pie')
38
+ autoload :Scatter, Gruff.libpath('scatter')
39
+ autoload :Scene, Gruff.libpath('scene')
40
+ autoload :SideBar, Gruff.libpath('side_bar')
41
+ autoload :SideStackedBar, Gruff.libpath('side_stacked_bar')
42
+ autoload :Spider, Gruff.libpath('spider')
43
+ autoload :StackedArea, Gruff.libpath('stacked_area')
44
+ autoload :StackedBar, Gruff.libpath('stacked_bar')
45
+
46
+ autoload :Layer, Gruff.libpath('scene')
47
+ autoload :Themes, Gruff.libpath('themes')
48
+
49
+ class Renderer
50
+ autoload :Bezier, Gruff.libpath('renderer/bezier')
51
+ autoload :Circle, Gruff.libpath('renderer/circle')
52
+ autoload :DashLine, Gruff.libpath('renderer/dash_line')
53
+ autoload :Dot, Gruff.libpath('renderer/dot')
54
+ autoload :Ellipse, Gruff.libpath('renderer/ellipse')
55
+ autoload :Line, Gruff.libpath('renderer/line')
56
+ autoload :Polygon, Gruff.libpath('renderer/polygon')
57
+ autoload :Polyline, Gruff.libpath('renderer/polyline')
58
+ autoload :Rectangle, Gruff.libpath('renderer/rectangle')
59
+ autoload :Text, Gruff.libpath('renderer/text')
60
+ end
61
+
62
+ class Store
63
+ autoload :BasicData, Gruff.libpath('store/basic_data')
64
+ autoload :CustomData, Gruff.libpath('store/custom_data')
65
+ autoload :XYData, Gruff.libpath('store/xy_data')
66
+ end
67
+
68
+ module Mini
69
+ autoload :Bar, Gruff.libpath('mini/bar')
70
+ autoload :Legend, Gruff.libpath('mini/legend')
71
+ autoload :Pie, Gruff.libpath('mini/pie')
72
+ autoload :SideBar, Gruff.libpath('mini/side_bar')
73
+ end
62
74
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gruff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.15.0
5
5
  platform: java
6
6
  authors:
7
7
  - Geoffrey Grosenbach
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-07-11 00:00:00.000000000 Z
12
+ date: 2022-04-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  requirement: !ruby/object:Gem::Requirement
@@ -18,8 +18,8 @@ dependencies:
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  name: rmagick4j
21
- type: :runtime
22
21
  prerelease: false
22
+ type: :runtime
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - ">="
@@ -32,8 +32,8 @@ dependencies:
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  name: histogram
35
- type: :runtime
36
35
  prerelease: false
36
+ type: :runtime
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - ">="
@@ -46,8 +46,8 @@ dependencies:
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  name: rake
49
- type: :development
50
49
  prerelease: false
50
+ type: :development
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - ">="
@@ -60,8 +60,8 @@ dependencies:
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  name: minitest-reporters
63
- type: :development
64
63
  prerelease: false
64
+ type: :development
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - ">="
@@ -74,8 +74,8 @@ dependencies:
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  name: simplecov
77
- type: :development
78
77
  prerelease: false
78
+ type: :development
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
81
  - - ">="
@@ -88,8 +88,8 @@ dependencies:
88
88
  - !ruby/object:Gem::Version
89
89
  version: 0.9.25
90
90
  name: yard
91
- type: :development
92
91
  prerelease: false
92
+ type: :development
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
95
  - - "~>"
@@ -107,7 +107,6 @@ files:
107
107
  - ".github/workflows/ci.yml"
108
108
  - ".gitignore"
109
109
  - ".rubocop.yml"
110
- - ".rubocop_todo.yml"
111
110
  - ".yardopts"
112
111
  - CHANGELOG.md
113
112
  - Gemfile
@@ -170,7 +169,8 @@ files:
170
169
  homepage: https://github.com/topfunky/gruff
171
170
  licenses:
172
171
  - MIT
173
- metadata: {}
172
+ metadata:
173
+ rubygems_mfa_required: 'true'
174
174
  post_install_message:
175
175
  rdoc_options: []
176
176
  require_paths:
@@ -179,14 +179,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
179
179
  requirements:
180
180
  - - ">="
181
181
  - !ruby/object:Gem::Version
182
- version: 2.4.0
182
+ version: 2.5.0
183
183
  required_rubygems_version: !ruby/object:Gem::Requirement
184
184
  requirements:
185
185
  - - ">="
186
186
  - !ruby/object:Gem::Version
187
187
  version: '0'
188
188
  requirements: []
189
- rubygems_version: 3.0.6
189
+ rubygems_version: 3.2.29
190
190
  signing_key:
191
191
  specification_version: 4
192
192
  summary: Beautiful graphs for one or multiple datasets.
data/.rubocop_todo.yml DELETED
@@ -1,116 +0,0 @@
1
- # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2021-07-11 06:52:14 UTC using RuboCop version 1.12.1.
4
- # The point is for the user to remove these configuration records
5
- # one by one as the offenses are removed from the code base.
6
- # Note that changes in the inspected code, or installation of new
7
- # versions of RuboCop, may require this file to be generated again.
8
-
9
- # Offense count: 13
10
- Lint/FloatComparison:
11
- Exclude:
12
- - 'Rakefile'
13
- - 'lib/gruff/base.rb'
14
- - 'lib/gruff/renderer/renderer.rb'
15
- - 'lib/gruff/scatter.rb'
16
-
17
- # Offense count: 1
18
- # Configuration parameters: CheckForMethodsWithNoSideEffects.
19
- Lint/Void:
20
- Exclude:
21
- - 'lib/gruff/patch/rmagick.rb'
22
-
23
- # Offense count: 57
24
- # Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
25
- Metrics/AbcSize:
26
- Max: 66
27
-
28
- # Offense count: 3
29
- # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
30
- # IgnoredMethods: refine
31
- Metrics/BlockLength:
32
- Max: 32
33
-
34
- # Offense count: 14
35
- # Configuration parameters: CountComments, CountAsOne.
36
- Metrics/ClassLength:
37
- Max: 683
38
-
39
- # Offense count: 8
40
- # Configuration parameters: IgnoredMethods.
41
- Metrics/CyclomaticComplexity:
42
- Max: 17
43
-
44
- # Offense count: 134
45
- # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
46
- Metrics/MethodLength:
47
- Max: 81
48
-
49
- # Offense count: 3
50
- # Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
51
- Metrics/ParameterLists:
52
- Max: 7
53
-
54
- # Offense count: 6
55
- # Configuration parameters: IgnoredMethods.
56
- Metrics/PerceivedComplexity:
57
- Max: 19
58
-
59
- # Offense count: 1
60
- # Configuration parameters: EnforcedStyleForLeadingUnderscores.
61
- # SupportedStylesForLeadingUnderscores: disallowed, required, optional
62
- Naming/MemoizedInstanceVariableName:
63
- Exclude:
64
- - 'lib/gruff/scene.rb'
65
-
66
- # Offense count: 6
67
- # Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers.
68
- # SupportedStyles: snake_case, normalcase, non_integer
69
- # AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339
70
- Naming/VariableNumber:
71
- Exclude:
72
- - 'test/test_bar.rb'
73
- - 'test/test_bezier.rb'
74
- - 'test/test_line.rb'
75
-
76
- # Offense count: 2
77
- # Cop supports --auto-correct.
78
- Performance/StringReplacement:
79
- Exclude:
80
- - 'lib/gruff/scene.rb'
81
-
82
- # Offense count: 1
83
- Rake/Desc:
84
- Exclude:
85
- - 'Rakefile'
86
-
87
- # Offense count: 1
88
- Security/Eval:
89
- Exclude:
90
- - 'test/gruff_test_case.rb'
91
-
92
- # Offense count: 1
93
- Style/CombinableLoops:
94
- Exclude:
95
- - 'test/test_line.rb'
96
-
97
- # Offense count: 2
98
- Style/DocumentDynamicEvalDefinition:
99
- Exclude:
100
- - 'test/gruff_test_case.rb'
101
-
102
- # Offense count: 97
103
- # Configuration parameters: RequireForNonPublicMethods.
104
- Style/DocumentationMethod:
105
- Enabled: false
106
-
107
- # Offense count: 1
108
- Style/MissingRespondToMissing:
109
- Exclude:
110
- - 'lib/gruff/scene.rb'
111
-
112
- # Offense count: 2
113
- # Cop supports --auto-correct.
114
- Style/StringConcatenation:
115
- Exclude:
116
- - 'test/gruff_test_case.rb'