image_optim_pack 0.10.0.20231105 → 0.10.1.20240317

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: 77146413c46cc1b665900e666564f3e7cd6c77817ff6de9a08109b8508ea024c
4
- data.tar.gz: 1240c164a7e935e585d1115a19886ebf7c3c654f1e5daa621484a7eac16e2fd1
3
+ metadata.gz: 8d10018e951d34abf893b655ecb2bdb1eb546607922bfd8d3ec89a1f7bb94c17
4
+ data.tar.gz: 7556874b1f9470416aa0bea53a0c0776398fa9ff276e6a498fb0444f17d1da9b
5
5
  SHA512:
6
- metadata.gz: 0c2f769c5d283e1d3a7cc753b7f037a4be7f9970333f3c6b76adaba1be57c44da66a4d71f8555f088c97454f66b35806f86ed125a99729b3ed03bbf971796716
7
- data.tar.gz: 73221d01d11a712cb4d15449348ff3823412719c0119e12f8b2d92a3ec48ce8f5397b400d5184ba7349f3c7cd9f722c1ed9ecab7fc9c44e4a3e771029e46adf7
6
+ metadata.gz: 63a90f8e34e5d7a0bf533fc6f63cda80e4797886faa6d5c4ddf17134a77434b021ed83071f5c3d7aa283b80dca380f09ddbf0dd1d5745c0a8850a0a61e2f958d
7
+ data.tar.gz: ad40e4dd0d141331ae423679abb1288d030ec467222751f61ca109191e28d6f003a57a0e498f9cb07368f313b19f7efa31bc268d6e4ad55c4bfa673d91746415
@@ -13,19 +13,17 @@ jobs:
13
13
  - ubuntu-latest
14
14
  - macos-latest
15
15
  ruby:
16
- - '2.3'
17
- - '2.4'
18
- - '2.5'
19
16
  - '2.6'
20
17
  - '2.7'
21
18
  - '3.0'
22
19
  - '3.1'
23
20
  - '3.2'
21
+ - '3.3'
24
22
  - jruby-9.3
25
23
  - jruby-9.4
26
24
  fail-fast: false
27
25
  steps:
28
- - uses: actions/checkout@v3
26
+ - uses: actions/checkout@v4
29
27
  - uses: ruby/setup-ruby@v1
30
28
  with:
31
29
  ruby-version: "${{ matrix.ruby }}"
@@ -14,7 +14,7 @@ jobs:
14
14
  - DOCKER_FILE=Dockerfile.debian DOCKER_TAG_SUFFIX=-debian
15
15
  fail-fast: false
16
16
  steps:
17
- - uses: actions/checkout@v3
17
+ - uses: actions/checkout@v4
18
18
  - uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
19
19
  with:
20
20
  registry: ghcr.io
@@ -14,7 +14,7 @@ jobs:
14
14
  livecheck:
15
15
  runs-on: ubuntu-latest
16
16
  steps:
17
- - uses: actions/checkout@v3
17
+ - uses: actions/checkout@v4
18
18
  - uses: ruby/setup-ruby@v1
19
19
  with:
20
20
  ruby-version: '3'
@@ -8,7 +8,7 @@ jobs:
8
8
  rubocop:
9
9
  runs-on: ubuntu-latest
10
10
  steps:
11
- - uses: actions/checkout@v3
11
+ - uses: actions/checkout@v4
12
12
  - uses: ruby/setup-ruby@v1
13
13
  with:
14
14
  ruby-version: '3'
data/.rubocop.yml CHANGED
@@ -63,11 +63,6 @@ Style/HashConversion:
63
63
  Style/HashEachMethods:
64
64
  Enabled: true
65
65
 
66
- Style/HashSyntax:
67
- Exclude:
68
- - script/livecheck
69
- EnforcedStyle: hash_rockets
70
-
71
66
  Style/HashTransformKeys:
72
67
  Enabled: false
73
68
 
data/CHANGELOG.markdown CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  ## unreleased
4
4
 
5
+ ## v0.10.1.20240317 (2024-03-17)
6
+
7
+ * gifsicle 1.95 [@toy](https://github.com/toy)
8
+ * libpng 1.6.43, patching pngcrush to be compatible [@toy](https://github.com/toy)
9
+ * libjpeg 9f [@toy](https://github.com/toy)
10
+
11
+ ## v0.10.1 (2023-12-05)
12
+
13
+ * liblcms 2.16 [@toy](https://github.com/toy)
14
+
5
15
  ## v0.10.0.20231105 (2023-11-05)
6
16
 
7
17
  * optipng 0.7.8 [@toy](https://github.com/toy)
data/Gemfile CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  source 'https://rubygems.org'
4
4
 
5
- gemspec :name => 'image_optim_pack'
5
+ gemspec name: 'image_optim_pack'
6
6
 
7
7
  if RUBY_VERSION >= '2.1.9'
8
8
  gem 'gems', '~> 1.0'
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014-2023 Ivan Kuchin
1
+ Copyright (c) 2014-2024 Ivan Kuchin
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/Makefile CHANGED
@@ -3,14 +3,14 @@ all :
3
3
  # ====== VERSIONS ======
4
4
 
5
5
  ADVANCECOMP_VER := 2.6
6
- GIFSICLE_VER := 1.94
6
+ GIFSICLE_VER := 1.95
7
7
  JHEAD_VER := 3.04
8
8
  JPEGARCHIVE_VER := 2.2.0
9
9
  JPEGOPTIM_VER := 1.5.5
10
- LIBJPEG_VER := 9e
11
- LIBLCMS_VER := 2.15
10
+ LIBJPEG_VER := 9f
11
+ LIBLCMS_VER := 2.16
12
12
  LIBMOZJPEG_VER := 4.1.5
13
- LIBPNG_VER := 1.6.40
13
+ LIBPNG_VER := 1.6.43
14
14
  LIBZ_VER := 1.2.11
15
15
  OPTIPNG_VER := 0.7.8
16
16
  OXIPNG_VER := 9.0.0
@@ -43,6 +43,7 @@ BUILD_ROOT_DIR := $(CURDIR)/build
43
43
  BUILD_DIR := $(BUILD_ROOT_DIR)/$(OS)-$(ARCH)
44
44
  OUTPUT_ROOT_DIR := $(CURDIR)/vendor
45
45
  OUTPUT_DIR := $(OUTPUT_ROOT_DIR)/$(OS)-$(ARCH)
46
+ PATCHES_DIR := $(CURDIR)/patches
46
47
 
47
48
  ANSI_RED=\033[31m
48
49
  ANSI_GREEN=\033[32m
@@ -495,6 +496,7 @@ $(OXIPNG_TARGET) :
495
496
  $(eval $(call depend,PNGCRUSH,LIBPNG LIBZ))
496
497
  $(PNGCRUSH_TARGET) :
497
498
  cd $(DIR) && rm -f png.h pngconf.h
499
+ cd $(DIR) && patch < $(PATCHES_DIR)/pngcrush.patch
498
500
  cd $(DIR) && $(MAKE) pngcrush \
499
501
  CC="$(CC)" \
500
502
  LD="$(CC)" \
data/README.markdown CHANGED
@@ -119,4 +119,4 @@ make docker-push # will push tags created by docker-build
119
119
 
120
120
  ## Copyright
121
121
 
122
- Copyright (c) 2014-2023 Ivan Kuchin. See [LICENSE.txt](LICENSE.txt) for details.
122
+ Copyright (c) 2014-2024 Ivan Kuchin. See [LICENSE.txt](LICENSE.txt) for details.
data/Vagrantfile CHANGED
@@ -27,13 +27,13 @@ Vagrant.configure('2') do |config|
27
27
  set -ex
28
28
 
29
29
  apt-get update
30
- apt-get -y install rsync ntpdate make wget gcc g++ chrpath perl pkg-config autoconf automake libtool nasm cmake cargo
30
+ apt-get -y install rsync ntpdate make wget gcc g++ chrpath perl pkg-config autoconf automake libtool nasm cmake cargo patch
31
31
  apt-get -y remove unattended-upgrades
32
32
  else
33
33
  set -ex
34
34
 
35
35
  yum -y install epel-release
36
- yum -y install rsync ntpdate make wget gcc gcc-c++ chrpath perl pkg-config autoconf automake libtool nasm cmake cargo
36
+ yum -y install rsync ntpdate make wget gcc gcc-c++ chrpath perl pkg-config autoconf automake libtool nasm cmake cargo patch
37
37
  fi
38
38
 
39
39
  mkdir -p /vagrant
data/boxes/Rakefile CHANGED
@@ -73,10 +73,10 @@ Dir['definitions/*/definition.rb'].each do |definition_path|
73
73
  end
74
74
 
75
75
  desc 'build all boxes'
76
- task :build => box.path
76
+ task build: box.path
77
77
 
78
78
  desc 'add all boxes to vagrant'
79
- task :add => "add:#{box.name}"
79
+ task add: "add:#{box.name}"
80
80
  end
81
81
 
82
82
  desc 'remove *.box and iso dir'
@@ -85,4 +85,4 @@ task :clean do
85
85
  sh 'rm -r iso || true'
86
86
  end
87
87
 
88
- task :default => :build
88
+ task default: :build
@@ -1,32 +1,32 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  Veewee::Session.declare({
4
- :cpu_count => '1',
5
- :memory_size => '512',
6
- :disk_size => '8192',
7
- :disk_format => 'VDI',
8
- :hostiocache => 'off',
9
- :os_type_id => 'RedHat6_64',
10
- :iso_file => 'CentOS-7-x86_64-Minimal-2009.iso',
11
- :iso_src => 'http://linux.darkpenguin.net/distros/CentOS/7.9.2009/isos/x86_64/CentOS-7-x86_64-Minimal-2009.iso',
12
- :iso_sha256 => '07b94e6b1a0b0260b94c83d6bb76b26bf7a310dc78d7a9c7432809fb9bc6194a',
13
- :iso_download_timeout => '1000',
14
- :boot_wait => '10',
15
- :boot_cmd_sequence => [
4
+ cpu_count: '1',
5
+ memory_size: '512',
6
+ disk_size: '8192',
7
+ disk_format: 'VDI',
8
+ hostiocache: 'off',
9
+ os_type_id: 'RedHat6_64',
10
+ iso_file: 'CentOS-7-x86_64-Minimal-2009.iso',
11
+ iso_src: 'http://linux.darkpenguin.net/distros/CentOS/7.9.2009/isos/x86_64/CentOS-7-x86_64-Minimal-2009.iso',
12
+ iso_sha256: '07b94e6b1a0b0260b94c83d6bb76b26bf7a310dc78d7a9c7432809fb9bc6194a',
13
+ iso_download_timeout: '1000',
14
+ boot_wait: '10',
15
+ boot_cmd_sequence: [
16
16
  '<Tab> text ks=http://%IP%:%PORT%/ks.cfg<Enter>',
17
17
  ],
18
- :kickstart_port => '7122',
19
- :kickstart_timeout => '300',
20
- :kickstart_file => 'ks.cfg',
21
- :ssh_login_timeout => '10000',
22
- :ssh_user => 'veewee',
23
- :ssh_password => 'veewee',
24
- :ssh_key => '',
25
- :ssh_host_port => '7222',
26
- :ssh_guest_port => '22',
27
- :sudo_cmd => "echo '%p'|sudo -S sh '%f'",
28
- :shutdown_cmd => '/sbin/halt -h -p',
29
- :postinstall_files => %w[../centos-postinstall.sh],
30
- :postinstall_timeout => '10000',
31
- :skip_iso_transfer => true,
18
+ kickstart_port: '7122',
19
+ kickstart_timeout: '300',
20
+ kickstart_file: 'ks.cfg',
21
+ ssh_login_timeout: '10000',
22
+ ssh_user: 'veewee',
23
+ ssh_password: 'veewee',
24
+ ssh_key: '',
25
+ ssh_host_port: '7222',
26
+ ssh_guest_port: '22',
27
+ sudo_cmd: "echo '%p'|sudo -S sh '%f'",
28
+ shutdown_cmd: '/sbin/halt -h -p',
29
+ postinstall_files: %w[../centos-postinstall.sh],
30
+ postinstall_timeout: '10000',
31
+ skip_iso_transfer: true,
32
32
  })
data/checksums.mk CHANGED
@@ -1,12 +1,12 @@
1
1
  ADVANCECOMP_SHA256 := b07d77735540409771cbe1b6df165b5151c11bb9c3d8f01290be0ec88ec3498f
2
- GIFSICLE_SHA256 := 4bc97005c0789620de75f89997d3c2f70758c72c61aa0a2ef04f7a671a2ff89b
2
+ GIFSICLE_SHA256 := b2711647009fd2a13130f3be160532ed46538e762bfc0f020dea50618a7dc950
3
3
  JHEAD_SHA256 := ef89bbcf4f6c25ed88088cf242a47a6aedfff4f08cc7dc205bf3e2c0f10a03c9
4
4
  JPEGARCHIVE_SHA256 := 3da16a5abbddd925dee0379aa51d9fe0cba33da0b5703be27c13a2dda3d7ed75
5
5
  JPEGOPTIM_SHA256 := 90a309d1c092de358bb411d702281ac3039b489d03adb0bc3c4ef04cf0067d38
6
- LIBJPEG_SHA256 := 4077d6a6a75aeb01884f708919d25934c93305e49f7e3f36db9129320e6f4f3d
7
- LIBLCMS_SHA256 := b20cbcbd0f503433be2a4e81462106fa61050a35074dc24a4e356792d971ab39
6
+ LIBJPEG_SHA256 := 04705c110cb2469caa79fb71fba3d7bf834914706e9641a4589485c1f832565b
7
+ LIBLCMS_SHA256 := d873d34ad8b9b4cea010631f1a6228d2087475e4dc5e763eb81acc23d9d45a51
8
8
  LIBMOZJPEG_SHA256 := 9fcbb7171f6ac383f5b391175d6fb3acde5e64c4c4727274eade84ed0998fcc1
9
- LIBPNG_SHA256 := 8f720b363aa08683c9bf2a563236f45313af2c55d542b5481ae17dd8d183bb42
9
+ LIBPNG_SHA256 := e804e465d4b109b5ad285a8fb71f0dd3f74f0068f91ce3cdfde618180c174925
10
10
  LIBZ_SHA256 := c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1
11
11
  OPTIPNG_SHA256 := 25a3bd68481f21502ccaa0f4c13f84dcf6b20338e4c4e8c51f2cefbd8513398c
12
12
  OXIPNG_SHA256 := 534fa8f349f52b01c2ee4332cef25ce1311edca04209ac6d972e38b171550a1b
@@ -2,12 +2,14 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'image_optim_pack'
5
- s.version = '0.10.0.20231105'
5
+ s.version = '0.10.1.20240317'
6
6
  s.summary = %q{Precompiled binaries for image_optim: advpng, gifsicle, jhead, jpeg-recompress, jpegoptim, jpegtran, optipng, pngcrush, pngquant}
7
7
  s.homepage = "https://github.com/toy/#{s.name}"
8
8
  s.authors = ['Ivan Kuchin']
9
9
  s.license = 'MIT'
10
10
 
11
+ s.required_ruby_version = '>= 1.9.3'
12
+
11
13
  s.metadata = {
12
14
  'bug_tracker_uri' => "https://github.com/toy/#{s.name}/issues",
13
15
  'changelog_uri' => "https://github.com/toy/#{s.name}/blob/master/CHANGELOG.markdown",
@@ -0,0 +1,15 @@
1
+ diff --git a/pngcrush.c b/pngcrush.c
2
+ index d0c387e..ed27eff 100644
3
+ --- a/pngcrush.c
4
+ +++ b/pngcrush.c
5
+ @@ -5520,8 +5520,10 @@ int main(int argc, char *argv[])
6
+ * they were already checked in the pngcrush_measure_idat
7
+ * function
8
+ */
9
+ +# ifdef PNG_IGNORE_ADLER32
10
+ png_set_option(read_ptr, PNG_IGNORE_ADLER32,
11
+ PNG_OPTION_ON);
12
+ +# endif
13
+ png_set_crc_action(read_ptr, PNG_CRC_QUIET_USE,
14
+ PNG_CRC_QUIET_USE);
15
+ }
data/script/run CHANGED
@@ -44,7 +44,7 @@ for arch in x86_64; do
44
44
  mkdir -p '$build_dir'
45
45
  cd '$build_dir'
46
46
 
47
- ln -nsf '$PWD/Makefile' '$PWD/checksums.mk' '$PWD/download' .
47
+ ln -nsf '$PWD/Makefile' '$PWD/checksums.mk' '$PWD/download' '$PWD/patches' .
48
48
  rsync -aR --del '$PWD/./vendor/$platform' .
49
49
 
50
50
  make $MAKE_TASK ARCH=$arch
@@ -67,7 +67,7 @@ for vm in $(perl -pe "s/.*?'(.+?-.+?)'\s+=>\s+'.+?\/.+?'.*|.*/\$1/" Vagrantfile
67
67
 
68
68
  # rsync needed files to the box
69
69
  mkdir -p "vendor/$vm"
70
- rsync -e "ssh -F $ssh_config" -aR --del Makefile checksums.mk download "vendor/$vm" "$vm:/vagrant"
70
+ rsync -e "ssh -F $ssh_config" -aR --del Makefile checksums.mk download patches "vendor/$vm" "$vm:/vagrant"
71
71
 
72
72
  # sync time and run make
73
73
  ssh -F "$ssh_config" "$vm" "
@@ -64,7 +64,7 @@ describe ImageOptim::Pack do
64
64
 
65
65
  it{ should all(be_an(ImageOptim::BinResolver::Bin)) }
66
66
 
67
- it{ should all(have_attributes(:version => be)) }
67
+ it{ should all(have_attributes(version: be)) }
68
68
 
69
69
  it{ should all(be_non_libraries) }
70
70
  end
@@ -72,7 +72,7 @@ describe ImageOptim::Pack do
72
72
  describe 'bin helpers' do
73
73
  def bins_with_versions(*versions)
74
74
  versions.map do |version|
75
- double(:version => version, :inspect => version ? 'good' : 'bad')
75
+ double(version: version, inspect: version ? 'good' : 'bad')
76
76
  end
77
77
  end
78
78
 
@@ -88,8 +88,8 @@ describe ImageOptim::Pack do
88
88
 
89
89
  it{ should be_all_bins_working }
90
90
  it{ should_not be_all_bins_failing }
91
- it{ should have_attributes(:working_bins => eq(bins)) }
92
- it{ should have_attributes(:failing_bins => be_empty) }
91
+ it{ should have_attributes(working_bins: eq(bins)) }
92
+ it{ should have_attributes(failing_bins: be_empty) }
93
93
  end
94
94
 
95
95
  describe 'mixed good/bad bins' do
@@ -98,8 +98,8 @@ describe ImageOptim::Pack do
98
98
 
99
99
  it{ should_not be_all_bins_working }
100
100
  it{ should_not be_all_bins_failing }
101
- it{ should have_attributes(:working_bins => bins.select(&:version)) }
102
- it{ should have_attributes(:failing_bins => bins.reject(&:version)) }
101
+ it{ should have_attributes(working_bins: bins.select(&:version)) }
102
+ it{ should have_attributes(failing_bins: bins.reject(&:version)) }
103
103
  end
104
104
 
105
105
  describe 'all bad bins' do
@@ -108,8 +108,8 @@ describe ImageOptim::Pack do
108
108
 
109
109
  it{ should_not be_all_bins_working }
110
110
  it{ should be_all_bins_failing }
111
- it{ should have_attributes(:working_bins => be_empty) }
112
- it{ should have_attributes(:failing_bins => eq(bins)) }
111
+ it{ should have_attributes(working_bins: be_empty) }
112
+ it{ should have_attributes(failing_bins: eq(bins)) }
113
113
  end
114
114
  end
115
115
  end
@@ -19,7 +19,7 @@ describe ImageOptim do
19
19
  ImageOptim::Worker.klasses.map do |klass|
20
20
  [klass.bin_sym, false]
21
21
  end
22
- ].merge(:skip_missing_workers => false)
22
+ ].merge(skip_missing_workers: false)
23
23
 
24
24
  ImageOptim::Worker.klasses.each do |worker_klass|
25
25
  next if [:pngout, :svgo].include?(worker_klass.bin_sym)
@@ -30,7 +30,7 @@ describe ImageOptim do
30
30
 
31
31
  image_optim = ImageOptim.new(options)
32
32
  if Array(worker_klass.init(image_optim)).empty?
33
- image_optim = ImageOptim.new(options.merge(:allow_lossy => true))
33
+ image_optim = ImageOptim.new(options.merge(allow_lossy: true))
34
34
  end
35
35
 
36
36
  expect(test_images.any? do |original|
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: image_optim_pack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0.20231105
4
+ version: 0.10.1.20240317
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Kuchin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-05 00:00:00.000000000 Z
11
+ date: 2024-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: image_optim
@@ -152,6 +152,7 @@ files:
152
152
  - image_optim_pack.gemspec
153
153
  - lib/image_optim/pack.rb
154
154
  - lib/image_optim_pack.rb
155
+ - patches/pngcrush.patch
155
156
  - script/extract
156
157
  - script/livecheck
157
158
  - script/platform_downloads
@@ -195,7 +196,7 @@ licenses:
195
196
  metadata:
196
197
  bug_tracker_uri: https://github.com/toy/image_optim_pack/issues
197
198
  changelog_uri: https://github.com/toy/image_optim_pack/blob/master/CHANGELOG.markdown
198
- documentation_uri: https://www.rubydoc.info/gems/image_optim_pack/0.10.0.20231105
199
+ documentation_uri: https://www.rubydoc.info/gems/image_optim_pack/0.10.1.20240317
199
200
  source_code_uri: https://github.com/toy/image_optim_pack
200
201
  post_install_message:
201
202
  rdoc_options: []
@@ -205,14 +206,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
205
206
  requirements:
206
207
  - - ">="
207
208
  - !ruby/object:Gem::Version
208
- version: '0'
209
+ version: 1.9.3
209
210
  required_rubygems_version: !ruby/object:Gem::Requirement
210
211
  requirements:
211
212
  - - ">="
212
213
  - !ruby/object:Gem::Version
213
214
  version: '0'
214
215
  requirements: []
215
- rubygems_version: 3.4.20
216
+ rubygems_version: 3.5.5
216
217
  signing_key:
217
218
  specification_version: 4
218
219
  summary: 'Precompiled binaries for image_optim: advpng, gifsicle, jhead, jpeg-recompress,