rmagick 5.5.0 → 6.0.1
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 +27 -32
- data/.rubocop.yml +39 -9
- data/.rubocop_todo.yml +333 -194
- data/CHANGELOG.md +41 -0
- data/Gemfile +9 -15
- data/README.md +6 -6
- data/Rakefile +27 -12
- data/before_install_linux.sh +1 -11
- data/before_install_osx.sh +9 -7
- data/ext/RMagick/extconf.rb +38 -64
- data/ext/RMagick/rmagick.h +6 -13
- data/ext/RMagick/rmdraw.cpp +0 -10
- data/ext/RMagick/rmimage.cpp +21 -50
- data/ext/RMagick/rmmain.cpp +12 -27
- data/ext/RMagick/rmpixel.cpp +2 -2
- data/ext/RMagick/rmutil.cpp +27 -18
- data/lib/rmagick/version.rb +3 -3
- data/lib/rmagick.rb +1 -1
- data/lib/rmagick_internal.rb +49 -46
- data/lib/rvg/container.rb +3 -3
- data/lib/rvg/embellishable.rb +1 -1
- data/lib/rvg/misc.rb +9 -9
- data/lib/rvg/rvg.rb +4 -6
- data/lib/rvg/stylable.rb +2 -2
- data/lib/rvg/units.rb +1 -0
- data/rmagick.gemspec +5 -2
- data/sig/rmagick/_image_common_methods.rbs +0 -2
- data/sig/rmagick/enum.rbs +6 -0
- data/sig/rmagick/image.rbs +2 -0
- data/sig/rmagick/image_list.rbs +2 -0
- metadata +18 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 513aba969c109a4cbaef2540e0c8c24b698bae9741340190439f689f36221dc5
|
4
|
+
data.tar.gz: b4c08a874757081e94168f3d61d648fa415a5db3bdf506fd9e1e33d23ddc4a44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b023dd20af9b18850820465beeec888783d0fd49d96ae35cb8aab30627789a7c542a575095bb15b85e4509d7194162bbe382bf9321e3b2e9f4d033c9dad44e82
|
7
|
+
data.tar.gz: 7cd836b62e7dc614fa00e5b781d096e05d8bac29a05e36c319cc57446e0ff285d91e4f7f1b0b27e38e0c36a3a190b50960470f4d0e808b1e93e61c81735e35db
|
data/.github/workflows/ci.yml
CHANGED
@@ -16,13 +16,13 @@ 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
28
|
rbs:
|
@@ -35,9 +35,9 @@ jobs:
|
|
35
35
|
uses: ruby/setup-ruby@master
|
36
36
|
with:
|
37
37
|
ruby-version: '3.0'
|
38
|
+
bundler-cache: true
|
38
39
|
- name: Validate RBS signatures
|
39
40
|
run: |
|
40
|
-
bundle install --path=vendor/bundle --jobs 4 --retry 3
|
41
41
|
bundle exec rake rbs:validate && bundle exec steep check
|
42
42
|
|
43
43
|
test-linux:
|
@@ -45,18 +45,12 @@ jobs:
|
|
45
45
|
timeout-minutes: 20
|
46
46
|
strategy:
|
47
47
|
matrix:
|
48
|
-
ruby-version: ['
|
48
|
+
ruby-version: ['3.0', '3.1', '3.2', '3.3']
|
49
49
|
imagemagick-version:
|
50
|
-
- { full: 6.7.7-10, major-minor: '6.7' }
|
51
50
|
- { full: 6.8.9-10, major-minor: '6.8' }
|
52
|
-
- { full: 6.9.13-
|
51
|
+
- { full: 6.9.13-9, major-minor: '6.9' }
|
53
52
|
- { full: 7.0.11-14, major-minor: '7.0' }
|
54
|
-
- { full: 7.1.1-
|
55
|
-
exclude:
|
56
|
-
# Ghostscript 9.55.0 causes error with Ruby 3.3 + ImageMagick 6.7 when run Magick::Draw tests.
|
57
|
-
# It disable running tests with Ruby 3.3 + ImageMagick 6.7 because it might be difficult to support old ImageMagick.
|
58
|
-
- ruby-version: '3.3'
|
59
|
-
imagemagick-version: { major-minor: '6.7' }
|
53
|
+
- { full: 7.1.1-31, major-minor: '7.1' }
|
60
54
|
|
61
55
|
name: Linux, Ruby ${{ matrix.ruby-version }}, IM ${{ matrix.imagemagick-version.major-minor }}
|
62
56
|
steps:
|
@@ -68,17 +62,17 @@ jobs:
|
|
68
62
|
key: v1-${{ runner.os }}-imagemagick-${{ matrix.imagemagick-version.full }}
|
69
63
|
restore-keys: |
|
70
64
|
v1-${{ runner.os }}-imagemagick-${{ matrix.imagemagick-version.full }}
|
71
|
-
- name: Set up Ruby ${{ matrix.ruby-version }}
|
72
|
-
uses: ruby/setup-ruby@master
|
73
|
-
with:
|
74
|
-
ruby-version: ${{ matrix.ruby-version }}
|
75
65
|
- name: Update/Install packages
|
76
66
|
run: |
|
77
67
|
export IMAGEMAGICK_VERSION=${{ matrix.imagemagick-version.full }}
|
78
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
|
79
74
|
- name: Build and test with Rake
|
80
75
|
run: |
|
81
|
-
bundle install --path=vendor/bundle --jobs 4 --retry 3
|
82
76
|
bundle exec rake
|
83
77
|
|
84
78
|
test-macos:
|
@@ -86,10 +80,10 @@ jobs:
|
|
86
80
|
timeout-minutes: 20
|
87
81
|
strategy:
|
88
82
|
matrix:
|
89
|
-
ruby-version: ['
|
83
|
+
ruby-version: ['3.0', '3.1', '3.2', '3.3']
|
90
84
|
imagemagick-version:
|
91
|
-
- { full: 6.9.13-
|
92
|
-
- { full: 7.1.1-
|
85
|
+
- { full: 6.9.13-9, major-minor: '6.9' }
|
86
|
+
- { full: 7.1.1-31, major-minor: '7.1' }
|
93
87
|
|
94
88
|
name: macOS, Ruby ${{ matrix.ruby-version }}, IM ${{ matrix.imagemagick-version.major-minor }}
|
95
89
|
steps:
|
@@ -101,16 +95,16 @@ jobs:
|
|
101
95
|
key: v1-${{ runner.os }}-imagemagick-${{ matrix.imagemagick-version.full }}
|
102
96
|
restore-keys: |
|
103
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
|
104
101
|
- name: Set up Ruby ${{ matrix.ruby-version }}
|
105
102
|
uses: ruby/setup-ruby@master
|
106
103
|
with:
|
107
104
|
ruby-version: ${{ matrix.ruby-version }}
|
108
|
-
|
109
|
-
run: |
|
110
|
-
IMAGEMAGICK_VERSION=${{ matrix.imagemagick-version.full }} ./before_install_osx.sh
|
105
|
+
bundler-cache: true
|
111
106
|
- name: Build and test with Rake
|
112
107
|
run: |
|
113
|
-
bundle install --path=vendor/bundle --jobs 4 --retry 3
|
114
108
|
bundle exec rake
|
115
109
|
|
116
110
|
test-windows:
|
@@ -120,8 +114,8 @@ jobs:
|
|
120
114
|
matrix:
|
121
115
|
ruby-version: ['3.3']
|
122
116
|
imagemagick-version:
|
123
|
-
- { full: 6.9.13-
|
124
|
-
- { full: 7.1.1-
|
117
|
+
- { full: 6.9.13-9, major-minor: '6.9' }
|
118
|
+
- { full: 7.1.1-31, major-minor: '7.1' }
|
125
119
|
env:
|
126
120
|
bundled_im_dir: C:\Program Files\ImageMagick-7.1.1-Q16-HDRI
|
127
121
|
install_im_dir: D:\ImageMagick
|
@@ -137,10 +131,6 @@ jobs:
|
|
137
131
|
# Bundled ImageMagick does not have C/C++ library and dll which required by rmagick.
|
138
132
|
run: |
|
139
133
|
Start-Process -FilePath "${{ env.bundled_im_dir }}\unins000.exe" -ArgumentList "/VERYSILENT /NORESTART"
|
140
|
-
- name: Set up Ruby ${{ matrix.ruby-version }}
|
141
|
-
uses: ruby/setup-ruby@master
|
142
|
-
with:
|
143
|
-
ruby-version: ${{ matrix.ruby-version }}
|
144
134
|
- name: Install ghostscript
|
145
135
|
run: |
|
146
136
|
choco install ghostscript
|
@@ -152,6 +142,11 @@ jobs:
|
|
152
142
|
$url = "https://github.com/rmagick/ImageMagick-binaries/raw/main/$($installer_name)"
|
153
143
|
Invoke-WebRequest -Uri $url -OutFile $installer_name
|
154
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
|
155
150
|
- name: Build and test with Rake
|
156
151
|
run: |
|
157
|
-
cmd.exe /D /S /C "bundle
|
152
|
+
cmd.exe /D /S /C "bundle exec rake"
|
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,14 @@ 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
|
65
|
+
|
66
|
+
Style/DisableCopsWithinSourceCodeDirective:
|
67
|
+
Enabled: false
|