image_optim_pack 0.5.0-x86-openbsd
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +8 -0
- data/.rubocop.yml +79 -0
- data/.travis.yml +35 -0
- data/CHANGELOG.markdown +210 -0
- data/Gemfile +7 -0
- data/LICENSE.txt +27 -0
- data/Makefile +393 -0
- data/README.markdown +93 -0
- data/Vagrantfile +60 -0
- data/acknowledgements/7z.txt +56 -0
- data/acknowledgements/advancecomp.txt +674 -0
- data/acknowledgements/bmp2png.txt +8 -0
- data/acknowledgements/cexcept.txt +8 -0
- data/acknowledgements/gifread.txt +14 -0
- data/acknowledgements/gifsicle.txt +343 -0
- data/acknowledgements/iqa.txt +30 -0
- data/acknowledgements/jhead.txt +12 -0
- data/acknowledgements/jpeg-archive.txt +20 -0
- data/acknowledgements/jpegoptim.txt +339 -0
- data/acknowledgements/libjpeg-turbo.txt +27 -0
- data/acknowledgements/libjpeg-x86-simd.txt +17 -0
- data/acknowledgements/libjpeg.txt +64 -0
- data/acknowledgements/libpng.txt +90 -0
- data/acknowledgements/mozjpeg.txt +7 -0
- data/acknowledgements/optipng-authors.txt +26 -0
- data/acknowledgements/optipng.txt +21 -0
- data/acknowledgements/pngcrush.txt +35 -0
- data/acknowledgements/pngquant.txt +56 -0
- data/acknowledgements/smallfry.txt +13 -0
- data/acknowledgements/zlib.txt +34 -0
- data/acknowledgements/zopfli-contributors.txt +6 -0
- data/acknowledgements/zopfli.txt +201 -0
- data/boxes/.gitignore +3 -0
- data/boxes/.rubocop.yml +13 -0
- data/boxes/Gemfile +11 -0
- data/boxes/Rakefile +144 -0
- data/boxes/definitions/freebsd-amd64/definition.rb +38 -0
- data/boxes/definitions/freebsd-amd64/install.sh +66 -0
- data/boxes/definitions/freebsd-i386/definition.rb +38 -0
- data/boxes/definitions/freebsd-i386/install.sh +66 -0
- data/boxes/definitions/freebsd-postinstall.sh +38 -0
- data/boxes/definitions/openbsd-amd64/definition.rb +71 -0
- data/boxes/definitions/openbsd-i386/definition.rb +71 -0
- data/boxes/definitions/openbsd-postinstall.sh +29 -0
- data/image_optim_pack-darwin-x86.gemspec +3 -0
- data/image_optim_pack-darwin-x86_64.gemspec +3 -0
- data/image_optim_pack-freebsd-amd64.gemspec +3 -0
- data/image_optim_pack-freebsd-x86.gemspec +3 -0
- data/image_optim_pack-linux-x86.gemspec +3 -0
- data/image_optim_pack-linux-x86_64.gemspec +3 -0
- data/image_optim_pack-openbsd-x86.gemspec +3 -0
- data/image_optim_pack-openbsd-x86_64.gemspec +3 -0
- data/image_optim_pack.gemspec +41 -0
- data/lib/image_optim/pack.rb +117 -0
- data/lib/image_optim_pack.rb +1 -0
- data/script/livecheck +116 -0
- data/script/run +71 -0
- data/script/update_versions +22 -0
- data/spec/image_optim/pack_spec.rb +114 -0
- data/spec/image_optim_spec.rb +39 -0
- data/spec/spec_helper.rb +8 -0
- data/vendor/openbsd-i386/advpng +0 -0
- data/vendor/openbsd-i386/gifsicle +0 -0
- data/vendor/openbsd-i386/jhead +0 -0
- data/vendor/openbsd-i386/jpeg-recompress +0 -0
- data/vendor/openbsd-i386/jpegoptim +0 -0
- data/vendor/openbsd-i386/jpegtran +0 -0
- data/vendor/openbsd-i386/libjpeg.so +0 -0
- data/vendor/openbsd-i386/libpng.so +0 -0
- data/vendor/openbsd-i386/libz.so +0 -0
- data/vendor/openbsd-i386/optipng +0 -0
- data/vendor/openbsd-i386/pngcrush +0 -0
- data/vendor/openbsd-i386/pngquant +0 -0
- metadata +182 -0
@@ -0,0 +1,22 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# Feed Makefile to this script to set all variables XXX_VER to latest versions
|
4
|
+
|
5
|
+
ARGF.map do |line|
|
6
|
+
if (name = line[/^([A-Z]+)_VER *:= *.*/, 1])
|
7
|
+
Thread.new do
|
8
|
+
version = `script/livecheck --bare #{name}`.strip
|
9
|
+
abort unless $?.success?
|
10
|
+
"#{name}_VER := #{version}\n"
|
11
|
+
end
|
12
|
+
else
|
13
|
+
line
|
14
|
+
end
|
15
|
+
end.each do |out|
|
16
|
+
if out.respond_to?(:value)
|
17
|
+
$stderr << out.value unless $stdout.tty?
|
18
|
+
$stdout << out.value
|
19
|
+
else
|
20
|
+
$stdout << out
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,114 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'image_optim/pack'
|
3
|
+
|
4
|
+
describe ImageOptim::Pack do
|
5
|
+
before do
|
6
|
+
stub_const('Pack', ImageOptim::Pack)
|
7
|
+
stub_const('Path', Pack::Path)
|
8
|
+
end
|
9
|
+
|
10
|
+
describe :path do
|
11
|
+
it 'returns path' do
|
12
|
+
expect(Pack.path).to be
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'returns instance of Path' do
|
16
|
+
expect(Pack.path).to be_an(Path)
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'yields debug messages' do
|
20
|
+
expect{ |block| Pack.path(&block) }.
|
21
|
+
to yield_with_args(/^image_optim_pack: all bins .* worked$/)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
describe ImageOptim::Pack::Path do
|
26
|
+
describe :path do
|
27
|
+
it 'returns FSPath with path' do
|
28
|
+
expect(Path.new('path').path).to eq(FSPath('path'))
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
describe :to_s do
|
33
|
+
it 'returns stringified path' do
|
34
|
+
expect(Path.new(Pathname('path')).to_s).to eq('path')
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
describe :os do
|
39
|
+
it 'returns last but one part of path' do
|
40
|
+
expect(Path.new('path/futureos-K-qbit').os).to eq('futureos')
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
describe :arch do
|
45
|
+
it 'returns last but one part of path' do
|
46
|
+
expect(Path.new('path/futureos-K-qbit').arch).to eq('K-qbit')
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
describe :bins do
|
51
|
+
subject{ Pack.path.bins }
|
52
|
+
|
53
|
+
define :be_non_libraries do
|
54
|
+
match do |bin|
|
55
|
+
bin.name !~ /^lib/
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
it{ should be_an(Array) }
|
60
|
+
|
61
|
+
it{ should_not be_empty }
|
62
|
+
|
63
|
+
it{ should all(be_an(ImageOptim::BinResolver::Bin)) }
|
64
|
+
|
65
|
+
it{ should all(have_attributes(:version => be)) }
|
66
|
+
|
67
|
+
it{ should all(be_non_libraries) }
|
68
|
+
end
|
69
|
+
|
70
|
+
describe 'bin helpers' do
|
71
|
+
def bins_with_versions(*versions)
|
72
|
+
versions.map do |version|
|
73
|
+
double(:version => version, :inspect => version ? 'good' : 'bad')
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
def path_with_bins(*bins)
|
78
|
+
path = Path.new('path')
|
79
|
+
allow(path).to receive(:bins).and_return(bins)
|
80
|
+
path
|
81
|
+
end
|
82
|
+
|
83
|
+
describe 'all good bins' do
|
84
|
+
let(:bins){ bins_with_versions('1.3', '6.1.6') }
|
85
|
+
subject{ path_with_bins(*bins) }
|
86
|
+
|
87
|
+
it{ should be_all_bins_working }
|
88
|
+
it{ should_not be_all_bins_failing }
|
89
|
+
it{ should have_attributes(:working_bins => eq(bins)) }
|
90
|
+
it{ should have_attributes(:failing_bins => be_empty) }
|
91
|
+
end
|
92
|
+
|
93
|
+
describe 'mixed good/bad bins' do
|
94
|
+
let(:bins){ bins_with_versions('1.3', nil, '6.1.6', nil) }
|
95
|
+
subject{ path_with_bins(*bins) }
|
96
|
+
|
97
|
+
it{ should_not be_all_bins_working }
|
98
|
+
it{ should_not be_all_bins_failing }
|
99
|
+
it{ should have_attributes(:working_bins => bins.select(&:version)) }
|
100
|
+
it{ should have_attributes(:failing_bins => bins.reject(&:version)) }
|
101
|
+
end
|
102
|
+
|
103
|
+
describe 'all bad bins' do
|
104
|
+
let(:bins){ bins_with_versions(nil, nil) }
|
105
|
+
subject{ path_with_bins(*bins) }
|
106
|
+
|
107
|
+
it{ should_not be_all_bins_working }
|
108
|
+
it{ should be_all_bins_failing }
|
109
|
+
it{ should have_attributes(:working_bins => be_empty) }
|
110
|
+
it{ should have_attributes(:failing_bins => eq(bins)) }
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'image_optim'
|
3
|
+
require 'image_optim/cmd'
|
4
|
+
require 'tempfile'
|
5
|
+
|
6
|
+
describe ImageOptim do
|
7
|
+
before do
|
8
|
+
stub_const('Cmd', ImageOptim::Cmd)
|
9
|
+
end
|
10
|
+
|
11
|
+
# grab images from image_optim gem
|
12
|
+
image_optim_root = Gem.loaded_specs['image_optim'].gem_dir
|
13
|
+
images_dir = FSPath.new(image_optim_root) / 'spec/images'
|
14
|
+
test_images = images_dir.glob('**/*.*')
|
15
|
+
|
16
|
+
isolated_options_base = {:skip_missing_workers => false}
|
17
|
+
ImageOptim::Worker.klasses.each do |klass|
|
18
|
+
isolated_options_base[klass.bin_sym] = false
|
19
|
+
end
|
20
|
+
|
21
|
+
ImageOptim::Worker.klasses.each do |worker_klass|
|
22
|
+
next if [:pngout, :svgo].include?(worker_klass.bin_sym)
|
23
|
+
|
24
|
+
describe "#{worker_klass.bin_sym} worker" do
|
25
|
+
it 'optimizes at least one test image' do
|
26
|
+
options = isolated_options_base.merge(worker_klass.bin_sym => true)
|
27
|
+
|
28
|
+
image_optim = ImageOptim.new(options)
|
29
|
+
if Array(worker_klass.init(image_optim)).empty?
|
30
|
+
image_optim = ImageOptim.new(options.merge(:allow_lossy => true))
|
31
|
+
end
|
32
|
+
|
33
|
+
expect(test_images.any? do |original|
|
34
|
+
image_optim.optimize_image(original)
|
35
|
+
end).to be true
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
data/spec/spec_helper.rb
ADDED
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
ADDED
@@ -0,0 +1,182 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: image_optim_pack
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.5.0
|
5
|
+
platform: x86-openbsd
|
6
|
+
authors:
|
7
|
+
- Ivan Kuchin
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-05-06 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: image_optim
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.19'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.19'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: fspath
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '2.1'
|
34
|
+
- - "<"
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '4'
|
37
|
+
type: :runtime
|
38
|
+
prerelease: false
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '2.1'
|
44
|
+
- - "<"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '4'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: rspec
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '3.0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '3.0'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: rubocop
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0.47'
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0.47'
|
75
|
+
description:
|
76
|
+
email:
|
77
|
+
executables: []
|
78
|
+
extensions: []
|
79
|
+
extra_rdoc_files: []
|
80
|
+
files:
|
81
|
+
- ".gitignore"
|
82
|
+
- ".rubocop.yml"
|
83
|
+
- ".travis.yml"
|
84
|
+
- CHANGELOG.markdown
|
85
|
+
- Gemfile
|
86
|
+
- LICENSE.txt
|
87
|
+
- Makefile
|
88
|
+
- README.markdown
|
89
|
+
- Vagrantfile
|
90
|
+
- acknowledgements/7z.txt
|
91
|
+
- acknowledgements/advancecomp.txt
|
92
|
+
- acknowledgements/bmp2png.txt
|
93
|
+
- acknowledgements/cexcept.txt
|
94
|
+
- acknowledgements/gifread.txt
|
95
|
+
- acknowledgements/gifsicle.txt
|
96
|
+
- acknowledgements/iqa.txt
|
97
|
+
- acknowledgements/jhead.txt
|
98
|
+
- acknowledgements/jpeg-archive.txt
|
99
|
+
- acknowledgements/jpegoptim.txt
|
100
|
+
- acknowledgements/libjpeg-turbo.txt
|
101
|
+
- acknowledgements/libjpeg-x86-simd.txt
|
102
|
+
- acknowledgements/libjpeg.txt
|
103
|
+
- acknowledgements/libpng.txt
|
104
|
+
- acknowledgements/mozjpeg.txt
|
105
|
+
- acknowledgements/optipng-authors.txt
|
106
|
+
- acknowledgements/optipng.txt
|
107
|
+
- acknowledgements/pngcrush.txt
|
108
|
+
- acknowledgements/pngquant.txt
|
109
|
+
- acknowledgements/smallfry.txt
|
110
|
+
- acknowledgements/zlib.txt
|
111
|
+
- acknowledgements/zopfli-contributors.txt
|
112
|
+
- acknowledgements/zopfli.txt
|
113
|
+
- boxes/.gitignore
|
114
|
+
- boxes/.rubocop.yml
|
115
|
+
- boxes/Gemfile
|
116
|
+
- boxes/Rakefile
|
117
|
+
- boxes/definitions/freebsd-amd64/definition.rb
|
118
|
+
- boxes/definitions/freebsd-amd64/install.sh
|
119
|
+
- boxes/definitions/freebsd-i386/definition.rb
|
120
|
+
- boxes/definitions/freebsd-i386/install.sh
|
121
|
+
- boxes/definitions/freebsd-postinstall.sh
|
122
|
+
- boxes/definitions/openbsd-amd64/definition.rb
|
123
|
+
- boxes/definitions/openbsd-i386/definition.rb
|
124
|
+
- boxes/definitions/openbsd-postinstall.sh
|
125
|
+
- image_optim_pack-darwin-x86.gemspec
|
126
|
+
- image_optim_pack-darwin-x86_64.gemspec
|
127
|
+
- image_optim_pack-freebsd-amd64.gemspec
|
128
|
+
- image_optim_pack-freebsd-x86.gemspec
|
129
|
+
- image_optim_pack-linux-x86.gemspec
|
130
|
+
- image_optim_pack-linux-x86_64.gemspec
|
131
|
+
- image_optim_pack-openbsd-x86.gemspec
|
132
|
+
- image_optim_pack-openbsd-x86_64.gemspec
|
133
|
+
- image_optim_pack.gemspec
|
134
|
+
- lib/image_optim/pack.rb
|
135
|
+
- lib/image_optim_pack.rb
|
136
|
+
- script/livecheck
|
137
|
+
- script/run
|
138
|
+
- script/update_versions
|
139
|
+
- spec/image_optim/pack_spec.rb
|
140
|
+
- spec/image_optim_spec.rb
|
141
|
+
- spec/spec_helper.rb
|
142
|
+
- vendor/openbsd-i386/advpng
|
143
|
+
- vendor/openbsd-i386/gifsicle
|
144
|
+
- vendor/openbsd-i386/jhead
|
145
|
+
- vendor/openbsd-i386/jpeg-recompress
|
146
|
+
- vendor/openbsd-i386/jpegoptim
|
147
|
+
- vendor/openbsd-i386/jpegtran
|
148
|
+
- vendor/openbsd-i386/libjpeg.so
|
149
|
+
- vendor/openbsd-i386/libpng.so
|
150
|
+
- vendor/openbsd-i386/libz.so
|
151
|
+
- vendor/openbsd-i386/optipng
|
152
|
+
- vendor/openbsd-i386/pngcrush
|
153
|
+
- vendor/openbsd-i386/pngquant
|
154
|
+
homepage: http://github.com/toy/image_optim_pack
|
155
|
+
licenses:
|
156
|
+
- MIT
|
157
|
+
metadata: {}
|
158
|
+
post_install_message:
|
159
|
+
rdoc_options: []
|
160
|
+
require_paths:
|
161
|
+
- lib
|
162
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
168
|
+
requirements:
|
169
|
+
- - ">="
|
170
|
+
- !ruby/object:Gem::Version
|
171
|
+
version: '0'
|
172
|
+
requirements: []
|
173
|
+
rubyforge_project: image_optim_pack
|
174
|
+
rubygems_version: 2.6.11
|
175
|
+
signing_key:
|
176
|
+
specification_version: 4
|
177
|
+
summary: 'Precompiled binaries for image_optim: advpng, gifsicle, jhead, jpeg-recompress,
|
178
|
+
jpegoptim, jpegtran, optipng, pngcrush, pngquant'
|
179
|
+
test_files:
|
180
|
+
- spec/image_optim/pack_spec.rb
|
181
|
+
- spec/image_optim_spec.rb
|
182
|
+
- spec/spec_helper.rb
|