gruff 0.25.0 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.editorconfig +2 -2
- data/.github/ISSUE_TEMPLATE/report.yml +41 -0
- data/.github/workflows/ci.yml +25 -9
- data/.rubocop.yml +2 -1
- data/CHANGELOG.md +4 -0
- data/Gemfile +3 -3
- data/README.md +2 -2
- data/lib/gruff/base.rb +13 -4
- data/lib/gruff/version.rb +1 -1
- metadata +4 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3c04a6fc48f83e530a5a26a084a1f79993cbb7781e7b6b06ad7208ee205a787
|
4
|
+
data.tar.gz: 52cd0e2ef0f9f4f6a433e65a9c65cba9c7fb4420203ece2ccd461b876ad43042
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b41c3bcd833b9bbbf2e36541552015c0a714e51b79f168c8875e891ad7d51db5bc1b03438f1ce419c55fcc4b3299274c24f4e817d681b748a649222a8c92db88
|
7
|
+
data.tar.gz: f9c017e0264b608160d779526f3ddcd1a9daf129dbd55dbb0eb96193aa2902e5a6cd1c439cdd101c43686fac6fad4130bf0eab2d2ec226439a05df13e12ec07a
|
data/.editorconfig
CHANGED
@@ -0,0 +1,41 @@
|
|
1
|
+
name: Report
|
2
|
+
description: Create a report.
|
3
|
+
body:
|
4
|
+
- type: textarea
|
5
|
+
id: description
|
6
|
+
attributes:
|
7
|
+
label: Description
|
8
|
+
description: A description of the bug or feature.
|
9
|
+
validations:
|
10
|
+
required: true
|
11
|
+
- type: textarea
|
12
|
+
id: reproduce
|
13
|
+
attributes:
|
14
|
+
label: Steps to Reproduce
|
15
|
+
description: |
|
16
|
+
List of steps, sample code, failing test or link to a project that reproduces the behavior.
|
17
|
+
Make sure you place a stack trace inside a code (```) block to avoid linking unrelated issues.
|
18
|
+
validations:
|
19
|
+
required: true
|
20
|
+
- type: textarea
|
21
|
+
id: environment
|
22
|
+
attributes:
|
23
|
+
label: System Configuration
|
24
|
+
description: Tell us about the environment where you are experiencing the bug.
|
25
|
+
value: |
|
26
|
+
- ImageMagick version:
|
27
|
+
- RMagick version:
|
28
|
+
- Gruff version:
|
29
|
+
- Ruby version:
|
30
|
+
- Environment (Operating system, version and so on):
|
31
|
+
- Additional information:
|
32
|
+
render: markdown
|
33
|
+
validations:
|
34
|
+
required: true
|
35
|
+
- type: textarea
|
36
|
+
id: addtional-context
|
37
|
+
attributes:
|
38
|
+
label: Additional context
|
39
|
+
description: Add any other context about the problem here.
|
40
|
+
validations:
|
41
|
+
required: false
|
data/.github/workflows/ci.yml
CHANGED
@@ -11,17 +11,33 @@ permissions:
|
|
11
11
|
|
12
12
|
jobs:
|
13
13
|
lint:
|
14
|
-
runs-on: ubuntu-
|
14
|
+
runs-on: ubuntu-24.04
|
15
15
|
timeout-minutes: 20
|
16
|
-
|
16
|
+
strategy:
|
17
|
+
matrix:
|
18
|
+
ruby-version: ['3.0']
|
19
|
+
imagemagick-version:
|
20
|
+
- { full: 7.1.1-33, major-minor: '7.1' }
|
21
|
+
name: Lint (Ruby ${{ matrix.ruby-version }}, ImageMagick ${{ matrix.imagemagick-version.major-minor }})
|
17
22
|
steps:
|
18
23
|
- uses: actions/checkout@v4
|
19
24
|
with:
|
20
25
|
ref: ${{ github.event.pull_request.head.sha }}
|
21
|
-
- name:
|
26
|
+
- name: Cache ImageMagick
|
27
|
+
uses: actions/cache@v4
|
28
|
+
with:
|
29
|
+
path: ./build-ImageMagick
|
30
|
+
key: v1-linux-imagemagick-${{ matrix.imagemagick-version.full }}
|
31
|
+
restore-keys: |
|
32
|
+
v1-linux-imagemagick-${{ matrix.imagemagick-version.full }}
|
33
|
+
- name: Install ImageMagick ${{ matrix.imagemagick-version.full }}
|
34
|
+
run: |
|
35
|
+
export IMAGEMAGICK_VERSION=${{ matrix.imagemagick-version.full }}
|
36
|
+
./before_install_linux.sh
|
37
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
22
38
|
uses: ruby/setup-ruby@master
|
23
39
|
with:
|
24
|
-
ruby-version:
|
40
|
+
ruby-version: ${{ matrix.ruby-version }}
|
25
41
|
bundler-cache: true
|
26
42
|
- name: Install dependencies
|
27
43
|
run: bundle install --path=vendor/bundle --jobs 4 --retry 3
|
@@ -31,13 +47,13 @@ jobs:
|
|
31
47
|
run: bundle exec rubocop
|
32
48
|
|
33
49
|
test-ruby:
|
34
|
-
runs-on: ubuntu-
|
50
|
+
runs-on: ubuntu-24.04
|
35
51
|
timeout-minutes: 20
|
36
52
|
strategy:
|
37
53
|
matrix:
|
38
|
-
ruby-version: ['3.0', '3.1', '3.2', '3.3']
|
54
|
+
ruby-version: ['3.0', '3.1', '3.2', '3.3', '3.4']
|
39
55
|
imagemagick-version:
|
40
|
-
- { full: 7.1.1-
|
56
|
+
- { full: 7.1.1-33, major-minor: '7.1' }
|
41
57
|
name: Ruby ${{ matrix.ruby-version }}
|
42
58
|
steps:
|
43
59
|
- uses: actions/checkout@v4
|
@@ -63,11 +79,11 @@ jobs:
|
|
63
79
|
run: bundle exec rake
|
64
80
|
|
65
81
|
test-jruby:
|
66
|
-
runs-on: ubuntu-
|
82
|
+
runs-on: ubuntu-24.04
|
67
83
|
timeout-minutes: 20
|
68
84
|
strategy:
|
69
85
|
matrix:
|
70
|
-
ruby-version: ['9.4.
|
86
|
+
ruby-version: ['9.4.7.0']
|
71
87
|
name: JRuby ${{ matrix.ruby-version }}
|
72
88
|
steps:
|
73
89
|
- uses: actions/checkout@v4
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
@@ -6,10 +6,10 @@ source 'https://rubygems.org'
|
|
6
6
|
gemspec
|
7
7
|
|
8
8
|
unless defined? JRUBY_VERSION
|
9
|
-
gem 'rubocop', '~> 1.
|
10
|
-
gem 'rubocop-minitest', '~> 0.
|
9
|
+
gem 'rubocop', '~> 1.66'
|
10
|
+
gem 'rubocop-minitest', '~> 0.36'
|
11
11
|
gem 'rubocop-performance', '~> 1.21'
|
12
|
-
gem 'rubocop-rake', '~> 0.6
|
12
|
+
gem 'rubocop-rake', '~> 0.6'
|
13
13
|
end
|
14
14
|
|
15
15
|
gem 'minitest-reporters'
|
data/README.md
CHANGED
data/lib/gruff/base.rb
CHANGED
@@ -182,6 +182,7 @@ module Gruff
|
|
182
182
|
@title_font = Gruff::Font.new(size: 36.0, bold: true)
|
183
183
|
@marker_font = Gruff::Font.new(size: 21.0)
|
184
184
|
@legend_font = Gruff::Font.new(size: 20.0)
|
185
|
+
@no_data_font = Gruff::Font.new(size: 80.0)
|
185
186
|
|
186
187
|
@label_margin = LABEL_MARGIN
|
187
188
|
@top_margin = @bottom_margin = @left_margin = @right_margin = DEFAULT_MARGIN
|
@@ -283,6 +284,7 @@ module Gruff
|
|
283
284
|
@title_font.path = font_path unless @title_font.path
|
284
285
|
@marker_font.path = font_path
|
285
286
|
@legend_font.path = font_path
|
287
|
+
@no_data_font.path = font_path
|
286
288
|
end
|
287
289
|
|
288
290
|
# Same as {#font=} but for the title.
|
@@ -320,6 +322,14 @@ module Gruff
|
|
320
322
|
@legend_font.size = value
|
321
323
|
end
|
322
324
|
|
325
|
+
# Set the font size of the no data message. Default is +80+.
|
326
|
+
#
|
327
|
+
# @param value [Numeric] no data font size
|
328
|
+
#
|
329
|
+
def no_data_font_size=(value)
|
330
|
+
@no_data_font.size = value
|
331
|
+
end
|
332
|
+
|
323
333
|
# Specifies whether to draw the title bolded or not. Default is +true+.
|
324
334
|
#
|
325
335
|
# @param value [Boolean] specifies whether to draw the title bolded or not.
|
@@ -336,6 +346,7 @@ module Gruff
|
|
336
346
|
@title_font.color = value
|
337
347
|
@marker_font.color = value
|
338
348
|
@legend_font.color = value
|
349
|
+
@no_data_font.color = value
|
339
350
|
end
|
340
351
|
|
341
352
|
# Add a color to the list of available colors for lines.
|
@@ -791,7 +802,7 @@ module Gruff
|
|
791
802
|
# Draws column labels below graph, centered over x
|
792
803
|
def draw_label(x, index, gravity = Magick::NorthGravity, &block)
|
793
804
|
draw_unique_label(index) do
|
794
|
-
if x
|
805
|
+
if x.between?(@graph_left, @graph_right)
|
795
806
|
y = @graph_bottom
|
796
807
|
x_offset, y_offset = calculate_label_offset(@marker_font, @labels[index], @label_margin, @label_rotation)
|
797
808
|
|
@@ -826,9 +837,7 @@ module Gruff
|
|
826
837
|
|
827
838
|
# Shows an error message because you have no data.
|
828
839
|
def draw_no_data
|
829
|
-
font = @
|
830
|
-
font.size = 80
|
831
|
-
font.bold = false
|
840
|
+
font = @no_data_font
|
832
841
|
text_renderer = Gruff::Renderer::Text.new(renderer, @no_data_message, font: font)
|
833
842
|
text_renderer.render(@raw_columns, @raw_rows, 0, 0, Magick::CenterGravity)
|
834
843
|
end
|
data/lib/gruff/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gruff
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.26.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Geoffrey Grosenbach
|
8
8
|
- Uwe Kubosch
|
9
|
-
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rmagick
|
@@ -63,6 +62,7 @@ files:
|
|
63
62
|
- ".devcontainer/devcontainer.json"
|
64
63
|
- ".editorconfig"
|
65
64
|
- ".github/ISSUE_TEMPLATE.md"
|
65
|
+
- ".github/ISSUE_TEMPLATE/report.yml"
|
66
66
|
- ".github/workflows/ci.yml"
|
67
67
|
- ".gitignore"
|
68
68
|
- ".rubocop.yml"
|
@@ -135,7 +135,6 @@ metadata:
|
|
135
135
|
bug_tracker_uri: https://github.com/topfunky/gruff/issues
|
136
136
|
changelog_uri: https://github.com/topfunky/gruff/blob/master/CHANGELOG.md
|
137
137
|
rubygems_mfa_required: 'true'
|
138
|
-
post_install_message:
|
139
138
|
rdoc_options: []
|
140
139
|
require_paths:
|
141
140
|
- lib
|
@@ -150,8 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
150
149
|
- !ruby/object:Gem::Version
|
151
150
|
version: '0'
|
152
151
|
requirements: []
|
153
|
-
rubygems_version: 3.
|
154
|
-
signing_key:
|
152
|
+
rubygems_version: 3.6.7
|
155
153
|
specification_version: 4
|
156
154
|
summary: Beautiful graphs for one or multiple datasets.
|
157
155
|
test_files: []
|