rmagick 5.4.4 → 6.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.devcontainer/ImageMagick6/devcontainer.json +1 -1
- data/.devcontainer/devcontainer.json +1 -1
- data/.github/workflows/ci.yml +41 -31
- data/.gitignore +1 -0
- data/.rubocop.yml +36 -9
- data/.rubocop_todo.yml +369 -187
- data/CHANGELOG.md +77 -0
- data/Gemfile +14 -0
- data/README.md +3 -3
- data/Rakefile +12 -1
- data/before_install_linux.sh +1 -11
- data/before_install_osx.sh +5 -7
- data/ext/RMagick/extconf.rb +58 -68
- data/ext/RMagick/rmagick.h +7 -12
- data/ext/RMagick/rmdraw.cpp +10 -20
- data/ext/RMagick/rmfill.cpp +4 -4
- data/ext/RMagick/rmilist.cpp +10 -2
- data/ext/RMagick/rmimage.cpp +342 -344
- data/ext/RMagick/rminfo.cpp +22 -21
- data/ext/RMagick/rmkinfo.cpp +5 -18
- data/ext/RMagick/rmmain.cpp +42 -91
- data/ext/RMagick/rmmontage.cpp +5 -5
- data/ext/RMagick/rmpixel.cpp +3 -3
- data/ext/RMagick/rmutil.cpp +58 -89
- data/lib/rmagick/version.rb +3 -3
- data/lib/rmagick.rb +1 -1
- data/lib/rmagick_internal.rb +111 -103
- data/lib/rvg/container.rb +3 -3
- data/lib/rvg/embellishable.rb +7 -3
- data/lib/rvg/misc.rb +15 -15
- data/lib/rvg/rvg.rb +6 -6
- data/lib/rvg/stretchable.rb +2 -2
- data/lib/rvg/stylable.rb +2 -2
- data/lib/rvg/transformable.rb +1 -1
- data/lib/rvg/units.rb +1 -0
- data/rmagick.gemspec +2 -15
- data/sig/rmagick/_draw_common_methods.rbs +64 -0
- data/sig/rmagick/_image_common_methods.rbs +387 -0
- data/sig/rmagick/draw.rbs +38 -0
- data/sig/rmagick/draw_attribute.rbs +28 -0
- data/sig/rmagick/enum.rbs +820 -0
- data/sig/rmagick/error.rbs +11 -0
- data/sig/rmagick/fill.rbs +21 -0
- data/sig/rmagick/geometry.rbs +14 -0
- data/sig/rmagick/image.rbs +196 -0
- data/sig/rmagick/image_list.rbs +183 -0
- data/sig/rmagick/iptc.rbs +101 -0
- data/sig/rmagick/kernel_info.rbs +12 -0
- data/sig/rmagick/optional_method_arguments.rbs +10 -0
- data/sig/rmagick/pixel.rbs +46 -0
- data/sig/rmagick/struct.rbs +90 -0
- data/sig/rmagick.rbs +43 -0
- data/sig/rvg/clippath.rbs +34 -0
- data/sig/rvg/container.rbs +78 -0
- data/sig/rvg/deep_equal.rbs +48 -0
- data/sig/rvg/describable.rbs +30 -0
- data/sig/rvg/embellishable.rbs +226 -0
- data/sig/rvg/misc.rbs +145 -0
- data/sig/rvg/paint.rbs +55 -0
- data/sig/rvg/pathdata.rbs +77 -0
- data/sig/rvg/rvg.rbs +125 -0
- data/sig/rvg/stretchable.rbs +56 -0
- data/sig/rvg/stylable.rbs +66 -0
- data/sig/rvg/text.rbs +118 -0
- data/sig/rvg/transformable.rbs +59 -0
- data/sig/rvg/units.rbs +33 -0
- metadata +38 -134
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4002a5d6c97fb78a5f1a75b4b192cf5151a43570702da719262b34ea08f19c28
|
4
|
+
data.tar.gz: 61a03fd6de17ec92ddbf4650a03076072dfda17a6a6c9bcb5db7bb90089c5c84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd88b3a404b7dedd24bd18a71cd5245af2b4cc38df32c377b9a3e8dbcb99b1790e9bd349e6c9abc9e45a0f64c6d75fdd5b92333e4febd1e3884cd04e8a07c23a
|
7
|
+
data.tar.gz: aa9ac858769d7332a334cfa154f361028650eeb2947fb0f28dc254d71d72932e0e39a04726586847230f53ee658bb2d169fab385c6992d20e3bac2e8343c707a
|
data/.github/workflows/ci.yml
CHANGED
@@ -16,32 +16,41 @@ jobs:
|
|
16
16
|
timeout-minutes: 20
|
17
17
|
steps:
|
18
18
|
- uses: actions/checkout@v4
|
19
|
-
- name: Set up Ruby
|
19
|
+
- name: Set up Ruby 3.0
|
20
20
|
uses: ruby/setup-ruby@master
|
21
21
|
with:
|
22
|
-
ruby-version: '
|
22
|
+
ruby-version: '3.0'
|
23
|
+
bundler-cache: true
|
23
24
|
- name: Build and test with Rake
|
24
25
|
run: |
|
25
|
-
bundle install --path=vendor/bundle --jobs 4 --retry 3
|
26
26
|
STYLE_CHECKS=true bundle exec rubocop
|
27
27
|
|
28
|
+
rbs:
|
29
|
+
runs-on: ubuntu-latest
|
30
|
+
name: RBS
|
31
|
+
timeout-minutes: 20
|
32
|
+
steps:
|
33
|
+
- uses: actions/checkout@v4
|
34
|
+
- name: Set up Ruby 3.0
|
35
|
+
uses: ruby/setup-ruby@master
|
36
|
+
with:
|
37
|
+
ruby-version: '3.0'
|
38
|
+
bundler-cache: true
|
39
|
+
- name: Validate RBS signatures
|
40
|
+
run: |
|
41
|
+
bundle exec rake rbs:validate && bundle exec steep check
|
42
|
+
|
28
43
|
test-linux:
|
29
44
|
runs-on: ubuntu-latest
|
30
45
|
timeout-minutes: 20
|
31
46
|
strategy:
|
32
47
|
matrix:
|
33
|
-
ruby-version: ['
|
48
|
+
ruby-version: ['3.0', '3.1', '3.2', '3.3']
|
34
49
|
imagemagick-version:
|
35
|
-
- { full: 6.7.7-10, major-minor: '6.7' }
|
36
50
|
- { full: 6.8.9-10, major-minor: '6.8' }
|
37
|
-
- { full: 6.9.13-
|
51
|
+
- { full: 6.9.13-9, major-minor: '6.9' }
|
38
52
|
- { full: 7.0.11-14, major-minor: '7.0' }
|
39
|
-
- { full: 7.1.1-
|
40
|
-
exclude:
|
41
|
-
# Ghostscript 9.55.0 causes error with Ruby 3.3 + ImageMagick 6.7 when run Magick::Draw tests.
|
42
|
-
# It disable running tests with Ruby 3.3 + ImageMagick 6.7 because it might be difficult to support old ImageMagick.
|
43
|
-
- ruby-version: '3.3'
|
44
|
-
imagemagick-version: { major-minor: '6.7' }
|
53
|
+
- { full: 7.1.1-31, major-minor: '7.1' }
|
45
54
|
|
46
55
|
name: Linux, Ruby ${{ matrix.ruby-version }}, IM ${{ matrix.imagemagick-version.major-minor }}
|
47
56
|
steps:
|
@@ -53,17 +62,17 @@ jobs:
|
|
53
62
|
key: v1-${{ runner.os }}-imagemagick-${{ matrix.imagemagick-version.full }}
|
54
63
|
restore-keys: |
|
55
64
|
v1-${{ runner.os }}-imagemagick-${{ matrix.imagemagick-version.full }}
|
56
|
-
- name: Set up Ruby ${{ matrix.ruby-version }}
|
57
|
-
uses: ruby/setup-ruby@master
|
58
|
-
with:
|
59
|
-
ruby-version: ${{ matrix.ruby-version }}
|
60
65
|
- name: Update/Install packages
|
61
66
|
run: |
|
62
67
|
export IMAGEMAGICK_VERSION=${{ matrix.imagemagick-version.full }}
|
63
68
|
./before_install_linux.sh
|
69
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
70
|
+
uses: ruby/setup-ruby@master
|
71
|
+
with:
|
72
|
+
ruby-version: ${{ matrix.ruby-version }}
|
73
|
+
bundler-cache: true
|
64
74
|
- name: Build and test with Rake
|
65
75
|
run: |
|
66
|
-
bundle install --path=vendor/bundle --jobs 4 --retry 3
|
67
76
|
bundle exec rake
|
68
77
|
|
69
78
|
test-macos:
|
@@ -71,10 +80,10 @@ jobs:
|
|
71
80
|
timeout-minutes: 20
|
72
81
|
strategy:
|
73
82
|
matrix:
|
74
|
-
ruby-version: ['
|
83
|
+
ruby-version: ['3.0', '3.1', '3.2', '3.3']
|
75
84
|
imagemagick-version:
|
76
|
-
- { full: 6.9.13-
|
77
|
-
- { full: 7.1.1-
|
85
|
+
- { full: 6.9.13-9, major-minor: '6.9' }
|
86
|
+
- { full: 7.1.1-31, major-minor: '7.1' }
|
78
87
|
|
79
88
|
name: macOS, Ruby ${{ matrix.ruby-version }}, IM ${{ matrix.imagemagick-version.major-minor }}
|
80
89
|
steps:
|
@@ -86,16 +95,16 @@ jobs:
|
|
86
95
|
key: v1-${{ runner.os }}-imagemagick-${{ matrix.imagemagick-version.full }}
|
87
96
|
restore-keys: |
|
88
97
|
v1-${{ runner.os }}-imagemagick-${{ matrix.imagemagick-version.full }}
|
98
|
+
- name: Update/Install packages
|
99
|
+
run: |
|
100
|
+
IMAGEMAGICK_VERSION=${{ matrix.imagemagick-version.full }} ./before_install_osx.sh
|
89
101
|
- name: Set up Ruby ${{ matrix.ruby-version }}
|
90
102
|
uses: ruby/setup-ruby@master
|
91
103
|
with:
|
92
104
|
ruby-version: ${{ matrix.ruby-version }}
|
93
|
-
|
94
|
-
run: |
|
95
|
-
IMAGEMAGICK_VERSION=${{ matrix.imagemagick-version.full }} ./before_install_osx.sh
|
105
|
+
bundler-cache: true
|
96
106
|
- name: Build and test with Rake
|
97
107
|
run: |
|
98
|
-
bundle install --path=vendor/bundle --jobs 4 --retry 3
|
99
108
|
bundle exec rake
|
100
109
|
|
101
110
|
test-windows:
|
@@ -105,8 +114,8 @@ jobs:
|
|
105
114
|
matrix:
|
106
115
|
ruby-version: ['3.3']
|
107
116
|
imagemagick-version:
|
108
|
-
- { full: 6.9.13-
|
109
|
-
- { full: 7.1.1-
|
117
|
+
- { full: 6.9.13-9, major-minor: '6.9' }
|
118
|
+
- { full: 7.1.1-31, major-minor: '7.1' }
|
110
119
|
env:
|
111
120
|
bundled_im_dir: C:\Program Files\ImageMagick-7.1.1-Q16-HDRI
|
112
121
|
install_im_dir: D:\ImageMagick
|
@@ -122,10 +131,6 @@ jobs:
|
|
122
131
|
# Bundled ImageMagick does not have C/C++ library and dll which required by rmagick.
|
123
132
|
run: |
|
124
133
|
Start-Process -FilePath "${{ env.bundled_im_dir }}\unins000.exe" -ArgumentList "/VERYSILENT /NORESTART"
|
125
|
-
- name: Set up Ruby ${{ matrix.ruby-version }}
|
126
|
-
uses: ruby/setup-ruby@master
|
127
|
-
with:
|
128
|
-
ruby-version: ${{ matrix.ruby-version }}
|
129
134
|
- name: Install ghostscript
|
130
135
|
run: |
|
131
136
|
choco install ghostscript
|
@@ -137,6 +142,11 @@ jobs:
|
|
137
142
|
$url = "https://github.com/rmagick/ImageMagick-binaries/raw/main/$($installer_name)"
|
138
143
|
Invoke-WebRequest -Uri $url -OutFile $installer_name
|
139
144
|
Start-Process -FilePath $installer_name -ArgumentList "/DIR=${{ env.install_im_dir }} /VERYSILENT /NORESTART /TASKS=install_Devel"
|
145
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
146
|
+
uses: ruby/setup-ruby@master
|
147
|
+
with:
|
148
|
+
ruby-version: ${{ matrix.ruby-version }}
|
149
|
+
bundler-cache: true
|
140
150
|
- name: Build and test with Rake
|
141
151
|
run: |
|
142
|
-
cmd.exe /D /S /C "bundle
|
152
|
+
cmd.exe /D /S /C "bundle exec rake"
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -3,11 +3,12 @@ inherit_from:
|
|
3
3
|
|
4
4
|
require:
|
5
5
|
- rubocop-rspec
|
6
|
+
- rubocop-performance
|
6
7
|
|
7
8
|
AllCops:
|
8
9
|
DefaultFormatter: fuubar
|
9
10
|
EnabledByDefault: true
|
10
|
-
TargetRubyVersion:
|
11
|
+
TargetRubyVersion: 3.0
|
11
12
|
Exclude:
|
12
13
|
- 'vendor/bundle/**/*'
|
13
14
|
- '**/*\.spec'
|
@@ -18,14 +19,34 @@ AllCops:
|
|
18
19
|
#
|
19
20
|
################################################################################
|
20
21
|
|
21
|
-
Layout/MultilineAssignmentLayout:
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
Layout/MultilineAssignmentLayout:
|
23
|
+
EnforcedStyle: same_line
|
24
|
+
|
25
|
+
RSpec/FilePath:
|
26
|
+
CustomTransform: { Magick: rmagick }
|
27
|
+
|
28
|
+
Style/FormatString:
|
29
|
+
EnforcedStyle: sprintf
|
30
|
+
|
31
|
+
Style/GuardClause:
|
32
|
+
MinBodyLength: 3
|
33
|
+
|
25
34
|
# we may not need this after finishing RSpec conversion
|
26
35
|
# seems like `rubocop-rspec` already excludes the `spec/` directory
|
27
|
-
Style/MethodCalledOnDoEndBlock:
|
28
|
-
|
36
|
+
Style/MethodCalledOnDoEndBlock:
|
37
|
+
Exclude: [spec/**/*.rb]
|
38
|
+
|
39
|
+
Style/NumericLiterals:
|
40
|
+
MinDigits: 6
|
41
|
+
|
42
|
+
Style/TopLevelMethodDefinition:
|
43
|
+
Exclude: [doc/**/*.rb, examples/**/*.rb, spec/**/*.rb]
|
44
|
+
|
45
|
+
RSpec/BeNil:
|
46
|
+
EnforcedStyle: be
|
47
|
+
|
48
|
+
RSpec/ClassCheck:
|
49
|
+
EnforcedStyle: be_kind_of
|
29
50
|
|
30
51
|
################################################################################
|
31
52
|
#
|
@@ -33,5 +54,11 @@ Style/NumericLiterals: { MinDigits: 6 }
|
|
33
54
|
#
|
34
55
|
################################################################################
|
35
56
|
|
36
|
-
RSpec/AlignLeftLetBrace:
|
37
|
-
|
57
|
+
RSpec/AlignLeftLetBrace:
|
58
|
+
Enabled: false
|
59
|
+
|
60
|
+
RSpec/AlignRightLetBrace:
|
61
|
+
Enabled: false
|
62
|
+
|
63
|
+
Style/Copyright:
|
64
|
+
Enabled: false
|