mojo_magick 0.6.6 → 0.6.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +24 -0
- data/Gemfile +7 -0
- data/Gemfile.lock +27 -25
- data/README.md +4 -0
- data/lib/mojo_magick/commands.rb +3 -3
- data/lib/mojo_magick/opt_builder.rb +1 -1
- data/lib/mojo_magick/util/parser.rb +6 -6
- data/lib/mojo_magick/version.rb +1 -1
- data/lib/mojo_magick.rb +8 -8
- data/mojo_magick.gemspec +1 -7
- data/test/mojo_magick_test.rb +1 -1
- metadata +8 -99
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3795cf2f596475d0105c5553bd1cc094a7b37247789b2ae9ee2d5fa2569f779a
|
4
|
+
data.tar.gz: eb8a37ea28e26efa3ef855bc1d8c4074e334397ffc2a8c8661d24816ad00470e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da03f006040f0dbda4842174cbb2461c62c19701ea815d3b9eb3dfc3513d630455688738c2c41f8a6f4604e1b511af708756e3377a86a2c257f840623ae82039
|
7
|
+
data.tar.gz: 6f9ffa7deabfc0b198e7b3db05b6884fe20cea53b09080de87d12ece39dcab4a6c3f3858227071c4e84d40bfa3508b2c25bdc8e4bf2ecf066a9a713ffa502ef5
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub. They are
|
2
|
+
# provided by a third-party and are governed by separate terms of service,
|
3
|
+
# privacy policy, and support documentation.
|
4
|
+
#
|
5
|
+
# This workflow will install a prebuilt Ruby version, install dependencies, and
|
6
|
+
# run tests and linters.
|
7
|
+
name: "Ruby CI"
|
8
|
+
on:
|
9
|
+
push:
|
10
|
+
branches: [ '**' ]
|
11
|
+
jobs:
|
12
|
+
ruby-test:
|
13
|
+
runs-on: ubuntu-latest
|
14
|
+
steps:
|
15
|
+
- name: Checkout code
|
16
|
+
uses: actions/checkout@v3
|
17
|
+
- name: Ruby setup
|
18
|
+
uses: ruby/setup-ruby@v1
|
19
|
+
with:
|
20
|
+
bundler-cache: true
|
21
|
+
- name: Lint
|
22
|
+
run: bundle exec rubocop
|
23
|
+
- name: Test
|
24
|
+
run: bundle exec rake test
|
data/Gemfile
CHANGED
@@ -3,6 +3,13 @@ source "https://rubygems.org"
|
|
3
3
|
group :test, :development do
|
4
4
|
gem "irb", require: false
|
5
5
|
gem "simplecov", require: false
|
6
|
+
|
7
|
+
gem "bundle-audit"
|
8
|
+
gem "bundler"
|
9
|
+
gem "minitest"
|
10
|
+
gem "rake"
|
11
|
+
gem "rubocop"
|
12
|
+
gem "rubocop-performance"
|
6
13
|
end
|
7
14
|
|
8
15
|
gemspec
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
mojo_magick (0.6.
|
4
|
+
mojo_magick (0.6.8)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -9,46 +9,48 @@ GEM
|
|
9
9
|
ast (2.4.2)
|
10
10
|
bundle-audit (0.1.0)
|
11
11
|
bundler-audit
|
12
|
-
bundler-audit (0.
|
12
|
+
bundler-audit (0.9.1)
|
13
13
|
bundler (>= 1.2.0, < 3)
|
14
14
|
thor (~> 1.0)
|
15
|
-
docile (1.
|
16
|
-
io-console (0.
|
17
|
-
irb (1.3
|
18
|
-
reline (>= 0.
|
19
|
-
|
20
|
-
|
21
|
-
|
15
|
+
docile (1.4.0)
|
16
|
+
io-console (0.6.0)
|
17
|
+
irb (1.6.3)
|
18
|
+
reline (>= 0.3.0)
|
19
|
+
json (2.6.3)
|
20
|
+
minitest (5.18.0)
|
21
|
+
parallel (1.23.0)
|
22
|
+
parser (3.2.2.0)
|
22
23
|
ast (~> 2.4.1)
|
23
|
-
rainbow (3.
|
24
|
+
rainbow (3.1.1)
|
24
25
|
rake (13.0.6)
|
25
|
-
regexp_parser (2.
|
26
|
-
reline (0.
|
26
|
+
regexp_parser (2.8.0)
|
27
|
+
reline (0.3.3)
|
27
28
|
io-console (~> 0.5)
|
28
29
|
rexml (3.2.5)
|
29
|
-
rubocop (1.
|
30
|
+
rubocop (1.50.2)
|
31
|
+
json (~> 2.3)
|
30
32
|
parallel (~> 1.10)
|
31
|
-
parser (>= 3.
|
33
|
+
parser (>= 3.2.0.0)
|
32
34
|
rainbow (>= 2.2.2, < 4.0)
|
33
35
|
regexp_parser (>= 1.8, < 3.0)
|
34
|
-
rexml
|
35
|
-
rubocop-ast (>= 1.
|
36
|
+
rexml (>= 3.2.5, < 4.0)
|
37
|
+
rubocop-ast (>= 1.28.0, < 2.0)
|
36
38
|
ruby-progressbar (~> 1.7)
|
37
|
-
unicode-display_width (>=
|
38
|
-
rubocop-ast (1.
|
39
|
-
parser (>= 3.
|
40
|
-
rubocop-performance (1.
|
39
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
40
|
+
rubocop-ast (1.28.0)
|
41
|
+
parser (>= 3.2.1.0)
|
42
|
+
rubocop-performance (1.17.1)
|
41
43
|
rubocop (>= 1.7.0, < 2.0)
|
42
44
|
rubocop-ast (>= 0.4.0)
|
43
|
-
ruby-progressbar (1.
|
44
|
-
simplecov (0.
|
45
|
+
ruby-progressbar (1.13.0)
|
46
|
+
simplecov (0.22.0)
|
45
47
|
docile (~> 1.1)
|
46
48
|
simplecov-html (~> 0.11)
|
47
49
|
simplecov_json_formatter (~> 0.1)
|
48
50
|
simplecov-html (0.12.3)
|
49
|
-
simplecov_json_formatter (0.1.
|
50
|
-
thor (1.1
|
51
|
-
unicode-display_width (2.
|
51
|
+
simplecov_json_formatter (0.1.4)
|
52
|
+
thor (1.2.1)
|
53
|
+
unicode-display_width (2.4.2)
|
52
54
|
|
53
55
|
PLATFORMS
|
54
56
|
ruby
|
data/README.md
CHANGED
data/lib/mojo_magick/commands.rb
CHANGED
@@ -21,9 +21,9 @@ module MojoMagick
|
|
21
21
|
status = execute(command, *args)
|
22
22
|
unless status.success?
|
23
23
|
err_msg = "MojoMagick command failed: #{command}."
|
24
|
-
raise(MojoFailed, "#{err_msg} (Exit status: #{status.exit_code})\n" \
|
25
|
-
"
|
26
|
-
"
|
24
|
+
raise(MojoFailed, "#{err_msg} (Exit status: #{status.exit_code})\n " \
|
25
|
+
"Command: #{status.command}\n " \
|
26
|
+
"Error: #{status.error}")
|
27
27
|
end
|
28
28
|
status.return_value
|
29
29
|
end
|
@@ -5,15 +5,15 @@ module MojoMagick
|
|
5
5
|
attr_reader :raw_fonts
|
6
6
|
|
7
7
|
def initialize
|
8
|
-
warn "DEPRECATION WARNING: This class has been deprecated and will be removed with"\
|
9
|
-
"
|
10
|
-
"
|
8
|
+
warn "DEPRECATION WARNING: This class has been deprecated and will be removed with " \
|
9
|
+
"the next minor version release. " \
|
10
|
+
"Please use `MojoMagick::Util::FontParser` instead"
|
11
11
|
end
|
12
12
|
|
13
13
|
def parse_fonts(fonts)
|
14
|
-
warn "DEPRECATION WARNING: #{__method__} has been deprecated and will be removed with"\
|
15
|
-
"
|
16
|
-
"
|
14
|
+
warn "DEPRECATION WARNING: #{__method__} has been deprecated and will be removed with " \
|
15
|
+
"the next minor version release. " \
|
16
|
+
"Please use `MojoMagick::Util::FontParser#parse` instead"
|
17
17
|
FontParser.new(fonts).parse
|
18
18
|
end
|
19
19
|
end
|
data/lib/mojo_magick/version.rb
CHANGED
data/lib/mojo_magick.rb
CHANGED
@@ -62,28 +62,28 @@ require_relative "./mojo_magick/font"
|
|
62
62
|
module MojoMagickDeprecations
|
63
63
|
# rubocop:disable Naming/AccessorMethodName
|
64
64
|
def get_fonts
|
65
|
-
warn "DEPRECATION WARNING: #{__method__} is deprecated and will be removed with the next minor version release."\
|
66
|
-
"
|
65
|
+
warn "DEPRECATION WARNING: #{__method__} is deprecated and will be removed with the next minor version release. " \
|
66
|
+
"Please use `available_fonts` instead"
|
67
67
|
MojoMagick.available_fonts
|
68
68
|
end
|
69
69
|
|
70
70
|
# rubocop:enable Naming/AccessorMethodName
|
71
71
|
### Moved to `Commands`
|
72
72
|
def execute!(*args)
|
73
|
-
warn "DEPRECATION WARNING: #{__method__} is deprecated and will be removed with the next minor version release."\
|
74
|
-
"
|
73
|
+
warn "DEPRECATION WARNING: #{__method__} is deprecated and will be removed with the next minor version release. " \
|
74
|
+
"Please use `MojoMagick::Commands.execute!` instead"
|
75
75
|
MojoMagick::Commands.send(:execute!, *args)
|
76
76
|
end
|
77
77
|
|
78
78
|
def execute(*args)
|
79
|
-
warn "DEPRECATION WARNING: #{__method__} is deprecated and will be removed with the next minor version release."\
|
80
|
-
"
|
79
|
+
warn "DEPRECATION WARNING: #{__method__} is deprecated and will be removed with the next minor version release. " \
|
80
|
+
"Please use `MojoMagick::Commands.execute!` instead"
|
81
81
|
MojoMagick::Commands.send(:execute, *args)
|
82
82
|
end
|
83
83
|
|
84
84
|
def raw_command(*args)
|
85
|
-
warn "DEPRECATION WARNING: #{__method__} is deprecated and will be removed with the next minor version release."\
|
86
|
-
"
|
85
|
+
warn "DEPRECATION WARNING: #{__method__} is deprecated and will be removed with the next minor version release. " \
|
86
|
+
"Please use `MojoMagick::Commands.execute!` instead"
|
87
87
|
MojoMagick::Commands.raw_command(*args)
|
88
88
|
end
|
89
89
|
end
|
data/mojo_magick.gemspec
CHANGED
@@ -27,15 +27,9 @@ Gem::Specification.new do |s|
|
|
27
27
|
s.rubyforge_project = "mojo_magick"
|
28
28
|
|
29
29
|
s.files = `git ls-files`.split("\n")
|
30
|
-
s.test_files = `git ls-files -- {test,features}/*`.split("\n")
|
31
30
|
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
32
31
|
s.require_paths = ["lib"]
|
33
|
-
s.add_development_dependency("bundle-audit")
|
34
|
-
s.add_development_dependency("bundler")
|
35
|
-
s.add_development_dependency("minitest")
|
36
|
-
s.add_development_dependency("rake")
|
37
|
-
s.add_development_dependency("rubocop")
|
38
|
-
s.add_development_dependency("rubocop-performance")
|
39
32
|
|
40
33
|
s.post_install_message = post_install_message
|
34
|
+
s.metadata["rubygems_mfa_required"] = "true"
|
41
35
|
end
|
data/test/mojo_magick_test.rb
CHANGED
@@ -193,7 +193,7 @@ class MojoMagickTest < MiniTest::Test
|
|
193
193
|
end
|
194
194
|
|
195
195
|
def test_blob_rgb
|
196
|
-
data = (Array.new(16) { [rand > 0.5 ? 0 : 255] * 3 }).flatten
|
196
|
+
data = (Array.new(16) { [(rand > 0.5) ? 0 : 255] * 3 }).flatten
|
197
197
|
bdata = data.pack "C" * data.size
|
198
198
|
out = "out.png"
|
199
199
|
MojoMagick.convert(nil, "png:#{out}") do |c|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mojo_magick
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Midgley
|
@@ -10,92 +10,8 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
14
|
-
dependencies:
|
15
|
-
- !ruby/object:Gem::Dependency
|
16
|
-
name: bundle-audit
|
17
|
-
requirement: !ruby/object:Gem::Requirement
|
18
|
-
requirements:
|
19
|
-
- - ">="
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: '0'
|
22
|
-
type: :development
|
23
|
-
prerelease: false
|
24
|
-
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
requirements:
|
26
|
-
- - ">="
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
version: '0'
|
29
|
-
- !ruby/object:Gem::Dependency
|
30
|
-
name: bundler
|
31
|
-
requirement: !ruby/object:Gem::Requirement
|
32
|
-
requirements:
|
33
|
-
- - ">="
|
34
|
-
- !ruby/object:Gem::Version
|
35
|
-
version: '0'
|
36
|
-
type: :development
|
37
|
-
prerelease: false
|
38
|
-
version_requirements: !ruby/object:Gem::Requirement
|
39
|
-
requirements:
|
40
|
-
- - ">="
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
version: '0'
|
43
|
-
- !ruby/object:Gem::Dependency
|
44
|
-
name: minitest
|
45
|
-
requirement: !ruby/object:Gem::Requirement
|
46
|
-
requirements:
|
47
|
-
- - ">="
|
48
|
-
- !ruby/object:Gem::Version
|
49
|
-
version: '0'
|
50
|
-
type: :development
|
51
|
-
prerelease: false
|
52
|
-
version_requirements: !ruby/object:Gem::Requirement
|
53
|
-
requirements:
|
54
|
-
- - ">="
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
version: '0'
|
57
|
-
- !ruby/object:Gem::Dependency
|
58
|
-
name: rake
|
59
|
-
requirement: !ruby/object:Gem::Requirement
|
60
|
-
requirements:
|
61
|
-
- - ">="
|
62
|
-
- !ruby/object:Gem::Version
|
63
|
-
version: '0'
|
64
|
-
type: :development
|
65
|
-
prerelease: false
|
66
|
-
version_requirements: !ruby/object:Gem::Requirement
|
67
|
-
requirements:
|
68
|
-
- - ">="
|
69
|
-
- !ruby/object:Gem::Version
|
70
|
-
version: '0'
|
71
|
-
- !ruby/object:Gem::Dependency
|
72
|
-
name: rubocop
|
73
|
-
requirement: !ruby/object:Gem::Requirement
|
74
|
-
requirements:
|
75
|
-
- - ">="
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version: '0'
|
78
|
-
type: :development
|
79
|
-
prerelease: false
|
80
|
-
version_requirements: !ruby/object:Gem::Requirement
|
81
|
-
requirements:
|
82
|
-
- - ">="
|
83
|
-
- !ruby/object:Gem::Version
|
84
|
-
version: '0'
|
85
|
-
- !ruby/object:Gem::Dependency
|
86
|
-
name: rubocop-performance
|
87
|
-
requirement: !ruby/object:Gem::Requirement
|
88
|
-
requirements:
|
89
|
-
- - ">="
|
90
|
-
- !ruby/object:Gem::Version
|
91
|
-
version: '0'
|
92
|
-
type: :development
|
93
|
-
prerelease: false
|
94
|
-
version_requirements: !ruby/object:Gem::Requirement
|
95
|
-
requirements:
|
96
|
-
- - ">="
|
97
|
-
- !ruby/object:Gem::Version
|
98
|
-
version: '0'
|
13
|
+
date: 2023-04-23 00:00:00.000000000 Z
|
14
|
+
dependencies: []
|
99
15
|
description: Simple Ruby stateless module interface to imagemagick.
|
100
16
|
email:
|
101
17
|
- science@misuse.org
|
@@ -106,6 +22,7 @@ extra_rdoc_files: []
|
|
106
22
|
files:
|
107
23
|
- ".circleci/config.yml"
|
108
24
|
- ".github/dependabot.yml"
|
25
|
+
- ".github/workflows/ruby.yml"
|
109
26
|
- ".gitignore"
|
110
27
|
- ".rubocop-common.yml"
|
111
28
|
- ".rubocop-performance.yml"
|
@@ -142,7 +59,8 @@ files:
|
|
142
59
|
homepage: http://github.com/rcode5/mojo_magick
|
143
60
|
licenses:
|
144
61
|
- MIT
|
145
|
-
metadata:
|
62
|
+
metadata:
|
63
|
+
rubygems_mfa_required: 'true'
|
146
64
|
post_install_message: |2+
|
147
65
|
|
148
66
|
Thanks for installing MojoMagick - keepin it simple!
|
@@ -169,15 +87,6 @@ requirements: []
|
|
169
87
|
rubygems_version: 3.0.3
|
170
88
|
signing_key:
|
171
89
|
specification_version: 4
|
172
|
-
summary: mojo_magick-0.6.
|
173
|
-
test_files:
|
174
|
-
- test/fixtures/5742.jpg
|
175
|
-
- test/fixtures/not_an_image.jpg
|
176
|
-
- test/fixtures/roll with it.jpg
|
177
|
-
- test/fixtures/zero_byte_image.jpg
|
178
|
-
- test/font_parser_test.rb
|
179
|
-
- test/font_test.rb
|
180
|
-
- test/mojo_magick_test.rb
|
181
|
-
- test/opt_builder_test.rb
|
182
|
-
- test/test_helper.rb
|
90
|
+
summary: mojo_magick-0.6.8
|
91
|
+
test_files: []
|
183
92
|
...
|