image_optim_pack 0.3.0.20160905 → 0.3.0.20160927

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- YjE4NjY2NmU1MjY1ZDE3YjIyYTAwMmFkZTY2ZDRlY2U1MzBiNDU5ZA==
5
- data.tar.gz: !binary |-
6
- NTJhYzY3MGU4NDUzYjZlZWE0MTY5NGYxY2RiNzU2MTc4NWY1NTJmYw==
2
+ SHA1:
3
+ metadata.gz: fdaa81aba3ea85d78162e6efb392bee1f6ec3bee
4
+ data.tar.gz: e924ac254159bed43d7fee6e195a1536b71145c2
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- ZWM2MzgzNjM2NDVjNmJkMGQ1NjBkMTBmMmE2MDUzZmJhZDU3YTg2NDNjMGY0
10
- NWFhMzc3NzkyMmVjZDQ5MjI1ZGIzM2U1OTdjNjY5MTg0MmNiZmNiNWU5NGE5
11
- NzNiMWY4YzNmZmZkYWJiNzAxNGI5ZWNhNjQ2NDgxYjkxMGYzYmU=
12
- data.tar.gz: !binary |-
13
- NDQ5ODQ1ODAyOGNhMzMyYzhhODI4OThmMzFjNDYyY2E2Y2M1NzAzNjRhYzdi
14
- NzkzNGJkMDg2ZTc5ZTUzYzAyYWUzZWFiMWZjYjY5MjI1ZjA3ODdmNDIyYmU1
15
- YWIxYTBlYWM0NjE1MmMwZjlkNmMyM2NmYTc0ODJlYTM5MDE1NWI=
6
+ metadata.gz: 4d65034b4c6d6a1e62ffbd9afc6b1f4a676ebcd5fb2932516f113977677a6c9c3ebda072b0ef59a6f03f3a35ef02334a0b36872efaf2b0979672a76d0a6c815f
7
+ data.tar.gz: d0632924fadc2a35ce81dea63cc2e108b1f4516769f7606fed6cd343b78416e195ecc8daa2ca1389e8a316b6fb42aa88596f809e52eafec862b17deac90b85e6
data/Makefile CHANGED
@@ -12,7 +12,7 @@ LIBMOZJPEG_VER := 3.1
12
12
  LIBPNG_VER := 1.6.25
13
13
  LIBZ_VER := 1.2.8
14
14
  OPTIPNG_VER := 0.7.6
15
- PNGCRUSH_VER := 1.8.6
15
+ PNGCRUSH_VER := 1.8.7
16
16
  PNGQUANT_VER := 2.7.1
17
17
 
18
18
  # ====== CONSTANTS ======
@@ -34,6 +34,11 @@ BUILD_DIR := $(BUILD_ROOT_DIR)/$(OS)-$(ARCH)
34
34
  OUTPUT_ROOT_DIR := $(CURDIR)/vendor
35
35
  OUTPUT_DIR := $(OUTPUT_ROOT_DIR)/$(OS)-$(ARCH)
36
36
 
37
+ ERROR_COLOUR=\033[31m
38
+ GREEN_COLOUR=\033[32m
39
+ MAGENTA_COLOUR=\033[35m
40
+ RESET_COLOUR=\033[0m
41
+
37
42
  # ====== HELPERS ======
38
43
 
39
44
  downcase = $(shell echo $1 | tr A-Z a-z)
@@ -144,22 +149,20 @@ download-tidy-up :
144
149
  build : $(foreach product,$(PRODUCTS),$($(product)_TARGET))
145
150
 
146
151
  define check_bin
147
- @printf "$1: "
148
- @test -f $(OUTPUT_DIR)/$1 || (echo "no $1"; false)
149
- @# if bin exists check architecture
150
- @test ! -f $(OUTPUT_DIR)/$1 || \
151
- file -b $(OUTPUT_DIR)/$1 | grep -q '$(ARCH_STRING)' || \
152
- (echo "Expected $(ARCH_STRING), got $$(file -b $(OUTPUT_DIR)/$1)"; false)
153
- @# if bin exists check and output version
154
- @test ! -f $(OUTPUT_DIR)/$1 || \
155
- $(OUTPUT_DIR)/$1 $2 | fgrep -o $3 || \
156
- (echo "Expected $3, got $$($(OUTPUT_DIR)/$1 $2)"; false)
152
+ @test -f $(OUTPUT_DIR)/$1 || \
153
+ { printf "$(ERROR_COLOUR)no $1 found$(RESET_COLOUR)\n"; exit 1; }
154
+ @printf "$1: "; \
155
+ VERSION=$$($(OUTPUT_DIR)/$1 $2 | fgrep -o $3) || \
156
+ { printf "$(ERROR_COLOUR)Expected $3, got $$($(OUTPUT_DIR)/$1 $2)$(RESET_COLOUR)\n"; exit 1; }; \
157
+ ARCH=$$(file -b $(OUTPUT_DIR)/$1 | fgrep -o '$(ARCH_STRING)') || \
158
+ { printf "$(ERROR_COLOUR)Expected $(ARCH_STRING), got $$(file -b $(OUTPUT_DIR)/$1)$(RESET_COLOUR)\n"; exit 1; }; \
159
+ printf "$(GREEN_COLOUR)$$VERSION$(RESET_COLOUR) / $(MAGENTA_COLOUR)$$ARCH$(RESET_COLOUR)\n"
157
160
  endef
158
161
 
159
162
  ifdef IS_DARWIN
160
163
  test : ARCH_STRING := $(ARCH)
161
164
  else ifeq (i386,$(ARCH:i686=i386))
162
- test : ARCH_STRING := Intel 80386
165
+ test : ARCH_STRING := 80386
163
166
  else ifeq (amd64,$(ARCH:x86_64=amd64))
164
167
  test : ARCH_STRING := x86-64
165
168
  endif
@@ -67,6 +67,7 @@ Boxes for vagrant are built using [veewee](https://github.com/jedi4ever/veewee),
67
67
  ```sh
68
68
  script/run # Build and test all for all oses and architectures
69
69
  script/run NO_HALT=1 # Don't halt VMs after building
70
+ script/run darwin 64 # Build only platforms matching darwin or 64
70
71
 
71
72
  make # Build all tools and copy them to vendor/OS-ARCH for current OS and ARCH, then test
72
73
  make all # same
@@ -4,6 +4,14 @@ Vagrant.configure('2') do |config|
4
4
  # don't mess with keys
5
5
  config.ssh.insert_key = false
6
6
 
7
+ # doesn't make sense to check updates for local boxes
8
+ config.vm.box_check_update = false
9
+
10
+ # there are no guest additions
11
+ config.vm.provider 'virtualbox' do |vb|
12
+ vb.check_guest_additions = false
13
+ end
14
+
7
15
  # handle manually using rsync
8
16
  config.vm.synced_folder '.', '/vagrant', disabled: true
9
17
 
@@ -3,6 +3,9 @@ inherit_from: ../.rubocop.yml
3
3
  Lint/Eval:
4
4
  Exclude: [Rakefile]
5
5
 
6
+ Lint/UnneededSplatExpansion:
7
+ Enabled: false
8
+
6
9
  Metrics/LineLength:
7
10
  Enabled: false
8
11
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'image_optim_pack'
5
- s.version = '0.3.0.20160905'
5
+ s.version = '0.3.0.20160927'
6
6
  s.summary = %q{Precompiled binaries for image_optim: advpng, gifsicle, jhead, jpeg-recompress, jpegoptim, jpegtran, optipng, pngcrush, pngquant}
7
7
  s.homepage = "http://github.com/toy/#{s.name}"
8
8
  s.authors = ['Ivan Kuchin']
data/script/run CHANGED
@@ -2,26 +2,44 @@
2
2
 
3
3
  # Build tools on Mac OS X host and in all vms
4
4
 
5
- set -ex
5
+ set -e
6
6
 
7
7
  MAKE_TASK='all -j'
8
8
 
9
+ filters=()
9
10
  for arg in "$@"; do
10
11
  if [[ "$arg" =~ ^([A-Z_]+)=(.*)$ ]]; then
11
12
  eval "$(printf %q=%q "${BASH_REMATCH[1]}" "${BASH_REMATCH[2]}")"
13
+ else
14
+ filters+=($arg)
12
15
  fi
13
16
  done
17
+ filters=$(IFS='|'; echo "${filters[*]}")
14
18
 
15
- if [ `uname -s` != 'Darwin' ]; then
19
+ passes-filter() {
20
+ [[ '' = "$filters" ]] || [[ "$1" =~ $filters ]]
21
+ }
22
+
23
+ header() {
24
+ printf '\033[1;7m######## %s ########\033[0m\n' "$1"
25
+ }
26
+
27
+ if [[ `uname -s` != 'Darwin' ]]; then
16
28
  echo 'expected to run on Mac OS X'
17
29
  exit 1
18
30
  fi
19
31
 
20
32
  for arch in i386 x86_64; do
33
+ passes-filter "darwin-$arch" || continue
34
+ header "darwin-$arch"
35
+
21
36
  make $MAKE_TASK ARCH=$arch
22
37
  done
23
38
 
24
- for vm in $(vagrant status --machine-readable | cut -d, -f2 | sort -u); do
39
+ for vm in $(perl -pe "s/.*?'(.+?-.+?)'.*|.*/\$1/" Vagrantfile | sort -u); do
40
+ passes-filter "$vm" || continue
41
+ header "$vm"
42
+
25
43
  vagrant up $vm
26
44
 
27
45
  # create ssh config
@@ -33,8 +51,9 @@ for vm in $(vagrant status --machine-readable | cut -d, -f2 | sort -u); do
33
51
  rsync -e "ssh -F $ssh_config" -aR --del Makefile download vendor/$vm $vm:/vagrant
34
52
 
35
53
  # sync time and run make
36
- vagrant ssh $vm -c "
37
- set -ex
54
+ ssh -F $ssh_config $vm "
55
+ set -e
56
+
38
57
  sudo ntpdate pool.ntp.org
39
58
 
40
59
  cd /vagrant
@@ -48,5 +67,5 @@ for vm in $(vagrant status --machine-readable | cut -d, -f2 | sort -u); do
48
67
  # rsync files in vendor from the box
49
68
  rsync -e "ssh -F $ssh_config" -aR --del $vm:/vagrant/./vendor/$vm .
50
69
 
51
- [ -n "$NO_HALT" ] || vagrant halt $vm
70
+ [[ -n "$NO_HALT" ]] || vagrant halt $vm
52
71
  done
Binary file
Binary file
Binary file
Binary file
Binary file
metadata CHANGED
@@ -1,72 +1,86 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: image_optim_pack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0.20160905
4
+ version: 0.3.0.20160927
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Kuchin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-05 00:00:00.000000000 Z
11
+ date: 2016-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: image_optim
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0.19'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0.19'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: fspath
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '2.1'
34
- - - <
34
+ - - "<"
35
35
  - !ruby/object:Gem::Version
36
36
  version: '4'
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
- - - ! '>='
41
+ - - ">="
42
42
  - !ruby/object:Gem::Version
43
43
  version: '2.1'
44
- - - <
44
+ - - "<"
45
45
  - !ruby/object:Gem::Version
46
46
  version: '4'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rspec
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - ~>
51
+ - - "~>"
52
52
  - !ruby/object:Gem::Version
53
53
  version: '3.0'
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - ~>
58
+ - - "~>"
59
59
  - !ruby/object:Gem::Version
60
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.36'
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '0.36'
61
75
  description:
62
76
  email:
63
77
  executables: []
64
78
  extensions: []
65
79
  extra_rdoc_files: []
66
80
  files:
67
- - .gitignore
68
- - .rubocop.yml
69
- - .travis.yml
81
+ - ".gitignore"
82
+ - ".rubocop.yml"
83
+ - ".travis.yml"
70
84
  - Gemfile
71
85
  - LICENSE.txt
72
86
  - Makefile
@@ -227,12 +241,12 @@ require_paths:
227
241
  - lib
228
242
  required_ruby_version: !ruby/object:Gem::Requirement
229
243
  requirements:
230
- - - ! '>='
244
+ - - ">="
231
245
  - !ruby/object:Gem::Version
232
246
  version: '0'
233
247
  required_rubygems_version: !ruby/object:Gem::Requirement
234
248
  requirements:
235
- - - ! '>='
249
+ - - ">="
236
250
  - !ruby/object:Gem::Version
237
251
  version: '0'
238
252
  requirements: []
@@ -240,10 +254,9 @@ rubyforge_project: image_optim_pack
240
254
  rubygems_version: 2.6.4
241
255
  signing_key:
242
256
  specification_version: 4
243
- summary: ! 'Precompiled binaries for image_optim: advpng, gifsicle, jhead, jpeg-recompress,
257
+ summary: 'Precompiled binaries for image_optim: advpng, gifsicle, jhead, jpeg-recompress,
244
258
  jpegoptim, jpegtran, optipng, pngcrush, pngquant'
245
259
  test_files:
246
260
  - spec/image_optim/pack_spec.rb
247
261
  - spec/image_optim_spec.rb
248
262
  - spec/spec_helper.rb
249
- has_rdoc: