image-optimizer 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +7 -7
- data/Gemfile.lock +28 -37
- data/LICENSE.txt +1 -1
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/image-optimizer.gemspec +32 -32
- data/lib/image-optimizer.rb +6 -6
- metadata +89 -94
data/Gemfile
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
source "http://rubygems.org"
|
2
2
|
# Add dependencies required to use your gem here.
|
3
3
|
# Example:
|
4
|
-
gem "yaop"
|
5
|
-
gem "jpegtran"
|
4
|
+
gem "yaop"
|
5
|
+
gem "jpegtran"
|
6
6
|
gem "optipng", ">= 0.2.0"
|
7
7
|
gem "jpegoptim", ">= 0.2.0"
|
8
|
-
gem "
|
9
|
-
gem "
|
10
|
-
gem "
|
8
|
+
gem "unix-whereis"
|
9
|
+
gem "options-hash"
|
10
|
+
gem "command-builder"
|
11
11
|
|
12
12
|
# Add dependencies to develop your gem here.
|
13
13
|
# Include everything needed to run rake, tests, features, etc.
|
14
14
|
group :development do
|
15
|
-
gem "bundler", "
|
16
|
-
gem "
|
15
|
+
gem "bundler", ">= 1.0.14"
|
16
|
+
gem "jeweler2", ">= 2.0.0"
|
17
17
|
end
|
data/Gemfile.lock
CHANGED
@@ -2,46 +2,37 @@ GEM
|
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
4
|
abstract (1.0.0)
|
5
|
-
command-builder (0.
|
6
|
-
hash-utils (>= 0.
|
5
|
+
command-builder (0.2.2)
|
6
|
+
hash-utils (>= 0.18.0)
|
7
|
+
pipe-run (>= 0.2.1)
|
7
8
|
git (1.2.5)
|
8
|
-
hash-utils (
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
hash-utils (1.1.0)
|
10
|
+
ruby-version
|
11
|
+
hashie (1.2.0)
|
12
|
+
jeweler2 (2.0.9)
|
12
13
|
git (>= 1.2.5)
|
13
|
-
|
14
|
-
|
15
|
-
command-builder (>= 0.1.0)
|
16
|
-
pipe-run (>= 0.2.0)
|
14
|
+
jpegoptim (0.2.1)
|
15
|
+
command-builder (>= 0.2.0)
|
17
16
|
unix-whereis (>= 0.1.0)
|
18
|
-
jpegtran (0.1.
|
19
|
-
command-builder (>= 0.
|
20
|
-
hash-utils (>= 0.
|
21
|
-
lookup-hash (>= 0.2.0)
|
22
|
-
pipe-run (>= 0.2.1)
|
17
|
+
jpegtran (0.1.3)
|
18
|
+
command-builder (>= 0.2.0)
|
19
|
+
hash-utils (>= 0.18.0)
|
23
20
|
unix-whereis (>= 0.1.0)
|
24
|
-
|
25
|
-
hash-utils (>= 0.
|
26
|
-
mini_magick (3.2.1)
|
27
|
-
subexec (~> 0.0.4)
|
28
|
-
multitype-introspection (0.1.2)
|
21
|
+
multitype-introspection (0.2.0)
|
22
|
+
hash-utils (>= 0.16.0)
|
29
23
|
options-hash (0.1.0)
|
30
24
|
hashie (>= 1.0.0)
|
31
|
-
optipng (0.2.
|
32
|
-
command-builder (>= 0.
|
33
|
-
pipe-run (>= 0.2.0)
|
25
|
+
optipng (0.2.1)
|
26
|
+
command-builder (>= 0.2.0)
|
34
27
|
unix-whereis (>= 0.1.0)
|
35
|
-
pipe-run (0.
|
36
|
-
|
37
|
-
subexec (0.0.4)
|
28
|
+
pipe-run (0.3.0)
|
29
|
+
ruby-version (0.3.1)
|
38
30
|
types (0.1.3)
|
39
31
|
abstract (>= 1.0.0)
|
40
32
|
multitype-introspection (>= 0.1.0)
|
41
|
-
unix-whereis (0.1.
|
42
|
-
command-builder (>= 0.
|
43
|
-
hash-utils (>= 0.
|
44
|
-
pipe-run (>= 0.1.0)
|
33
|
+
unix-whereis (0.1.1)
|
34
|
+
command-builder (>= 0.2.0)
|
35
|
+
hash-utils (>= 0.18.0)
|
45
36
|
yaop (0.1.0)
|
46
37
|
hash-utils (>= 0.1.0)
|
47
38
|
types (>= 0.1.0)
|
@@ -50,12 +41,12 @@ PLATFORMS
|
|
50
41
|
ruby
|
51
42
|
|
52
43
|
DEPENDENCIES
|
53
|
-
bundler (
|
54
|
-
|
44
|
+
bundler (>= 1.0.14)
|
45
|
+
command-builder
|
46
|
+
jeweler2 (>= 2.0.0)
|
55
47
|
jpegoptim (>= 0.2.0)
|
56
|
-
jpegtran
|
57
|
-
|
58
|
-
options-hash (>= 0.1.0)
|
48
|
+
jpegtran
|
49
|
+
options-hash
|
59
50
|
optipng (>= 0.2.0)
|
60
|
-
unix-whereis
|
61
|
-
yaop
|
51
|
+
unix-whereis
|
52
|
+
yaop
|
data/LICENSE.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright (c) 2011 Martin Kozák (martinkozak@martinkozak.net)
|
1
|
+
Copyright (c) 2011 - 2012 Martin Kozák (martinkozak@martinkozak.net)
|
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/Rakefile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.3
|
data/image-optimizer.gemspec
CHANGED
@@ -4,14 +4,14 @@
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
8
|
-
s.version = "0.1.
|
7
|
+
s.name = "image-optimizer"
|
8
|
+
s.version = "0.1.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = [
|
12
|
-
s.date =
|
13
|
-
s.email =
|
14
|
-
s.executables = [
|
11
|
+
s.authors = ["Martin Koz\u{e1}k"]
|
12
|
+
s.date = "2012-01-22"
|
13
|
+
s.email = "martinkozak@martinkozak.net"
|
14
|
+
s.executables = ["image-optimizer"]
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE.txt",
|
17
17
|
"README.md"
|
@@ -28,46 +28,46 @@ Gem::Specification.new do |s|
|
|
28
28
|
"image-optimizer.gemspec",
|
29
29
|
"lib/image-optimizer.rb"
|
30
30
|
]
|
31
|
-
s.homepage =
|
32
|
-
s.licenses = [
|
33
|
-
s.require_paths = [
|
34
|
-
s.rubygems_version =
|
35
|
-
s.summary =
|
31
|
+
s.homepage = "http://github.com/martinkozak/image-optimizer"
|
32
|
+
s.licenses = ["MIT"]
|
33
|
+
s.require_paths = ["lib"]
|
34
|
+
s.rubygems_version = "1.8.15"
|
35
|
+
s.summary = "Optimizes given JPEG and PNG images or images in given folder."
|
36
36
|
|
37
37
|
if s.respond_to? :specification_version then
|
38
38
|
s.specification_version = 3
|
39
39
|
|
40
40
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
41
|
-
s.add_runtime_dependency(%q<yaop>, [">= 0
|
42
|
-
s.add_runtime_dependency(%q<jpegtran>, [">= 0
|
41
|
+
s.add_runtime_dependency(%q<yaop>, [">= 0"])
|
42
|
+
s.add_runtime_dependency(%q<jpegtran>, [">= 0"])
|
43
43
|
s.add_runtime_dependency(%q<optipng>, [">= 0.2.0"])
|
44
44
|
s.add_runtime_dependency(%q<jpegoptim>, [">= 0.2.0"])
|
45
|
-
s.add_runtime_dependency(%q<
|
46
|
-
s.add_runtime_dependency(%q<
|
47
|
-
s.add_runtime_dependency(%q<
|
48
|
-
s.add_development_dependency(%q<bundler>, ["
|
49
|
-
s.add_development_dependency(%q<
|
45
|
+
s.add_runtime_dependency(%q<unix-whereis>, [">= 0"])
|
46
|
+
s.add_runtime_dependency(%q<options-hash>, [">= 0"])
|
47
|
+
s.add_runtime_dependency(%q<command-builder>, [">= 0"])
|
48
|
+
s.add_development_dependency(%q<bundler>, [">= 1.0.14"])
|
49
|
+
s.add_development_dependency(%q<jeweler2>, [">= 2.0.0"])
|
50
50
|
else
|
51
|
-
s.add_dependency(%q<yaop>, [">= 0
|
52
|
-
s.add_dependency(%q<jpegtran>, [">= 0
|
51
|
+
s.add_dependency(%q<yaop>, [">= 0"])
|
52
|
+
s.add_dependency(%q<jpegtran>, [">= 0"])
|
53
53
|
s.add_dependency(%q<optipng>, [">= 0.2.0"])
|
54
54
|
s.add_dependency(%q<jpegoptim>, [">= 0.2.0"])
|
55
|
-
s.add_dependency(%q<
|
56
|
-
s.add_dependency(%q<
|
57
|
-
s.add_dependency(%q<
|
58
|
-
s.add_dependency(%q<bundler>, ["
|
59
|
-
s.add_dependency(%q<
|
55
|
+
s.add_dependency(%q<unix-whereis>, [">= 0"])
|
56
|
+
s.add_dependency(%q<options-hash>, [">= 0"])
|
57
|
+
s.add_dependency(%q<command-builder>, [">= 0"])
|
58
|
+
s.add_dependency(%q<bundler>, [">= 1.0.14"])
|
59
|
+
s.add_dependency(%q<jeweler2>, [">= 2.0.0"])
|
60
60
|
end
|
61
61
|
else
|
62
|
-
s.add_dependency(%q<yaop>, [">= 0
|
63
|
-
s.add_dependency(%q<jpegtran>, [">= 0
|
62
|
+
s.add_dependency(%q<yaop>, [">= 0"])
|
63
|
+
s.add_dependency(%q<jpegtran>, [">= 0"])
|
64
64
|
s.add_dependency(%q<optipng>, [">= 0.2.0"])
|
65
65
|
s.add_dependency(%q<jpegoptim>, [">= 0.2.0"])
|
66
|
-
s.add_dependency(%q<
|
67
|
-
s.add_dependency(%q<
|
68
|
-
s.add_dependency(%q<
|
69
|
-
s.add_dependency(%q<bundler>, ["
|
70
|
-
s.add_dependency(%q<
|
66
|
+
s.add_dependency(%q<unix-whereis>, [">= 0"])
|
67
|
+
s.add_dependency(%q<options-hash>, [">= 0"])
|
68
|
+
s.add_dependency(%q<command-builder>, [">= 0"])
|
69
|
+
s.add_dependency(%q<bundler>, [">= 1.0.14"])
|
70
|
+
s.add_dependency(%q<jeweler2>, [">= 2.0.0"])
|
71
71
|
end
|
72
72
|
end
|
73
73
|
|
data/lib/image-optimizer.rb
CHANGED
@@ -84,12 +84,12 @@ module ImageOptimizer
|
|
84
84
|
block.call(path.dup)
|
85
85
|
|
86
86
|
if Whereis.available? :convert
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
87
|
+
cmd = CommandBuilder::new(:convert, ["-", " ", "-", " "])
|
88
|
+
cmd << path
|
89
|
+
cmd.arg(:quality, 100)
|
90
|
+
cmd << path
|
91
|
+
|
92
|
+
cmd.execute!
|
93
93
|
end
|
94
94
|
|
95
95
|
if Optipng.available?
|
metadata
CHANGED
@@ -1,126 +1,124 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: image-optimizer
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.3
|
4
5
|
prerelease:
|
5
|
-
version: 0.1.2
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
8
|
-
-
|
7
|
+
authors:
|
8
|
+
- Martin Kozák
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-01-22 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
16
15
|
name: yaop
|
17
|
-
requirement: &
|
16
|
+
requirement: &16022320 !ruby/object:Gem::Requirement
|
18
17
|
none: false
|
19
|
-
requirements:
|
20
|
-
- -
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: 0
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
23
22
|
type: :runtime
|
24
23
|
prerelease: false
|
25
|
-
version_requirements: *
|
26
|
-
- !ruby/object:Gem::Dependency
|
24
|
+
version_requirements: *16022320
|
25
|
+
- !ruby/object:Gem::Dependency
|
27
26
|
name: jpegtran
|
28
|
-
requirement: &
|
27
|
+
requirement: &16020300 !ruby/object:Gem::Requirement
|
29
28
|
none: false
|
30
|
-
requirements:
|
31
|
-
- -
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 0
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
34
33
|
type: :runtime
|
35
34
|
prerelease: false
|
36
|
-
version_requirements: *
|
37
|
-
- !ruby/object:Gem::Dependency
|
35
|
+
version_requirements: *16020300
|
36
|
+
- !ruby/object:Gem::Dependency
|
38
37
|
name: optipng
|
39
|
-
requirement: &
|
38
|
+
requirement: &16037180 !ruby/object:Gem::Requirement
|
40
39
|
none: false
|
41
|
-
requirements:
|
42
|
-
- -
|
43
|
-
- !ruby/object:Gem::Version
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
44
43
|
version: 0.2.0
|
45
44
|
type: :runtime
|
46
45
|
prerelease: false
|
47
|
-
version_requirements: *
|
48
|
-
- !ruby/object:Gem::Dependency
|
46
|
+
version_requirements: *16037180
|
47
|
+
- !ruby/object:Gem::Dependency
|
49
48
|
name: jpegoptim
|
50
|
-
requirement: &
|
49
|
+
requirement: &16035140 !ruby/object:Gem::Requirement
|
51
50
|
none: false
|
52
|
-
requirements:
|
53
|
-
- -
|
54
|
-
- !ruby/object:Gem::Version
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
55
54
|
version: 0.2.0
|
56
55
|
type: :runtime
|
57
56
|
prerelease: false
|
58
|
-
version_requirements: *
|
59
|
-
- !ruby/object:Gem::Dependency
|
60
|
-
name:
|
61
|
-
requirement: &
|
57
|
+
version_requirements: *16035140
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: unix-whereis
|
60
|
+
requirement: &16033740 !ruby/object:Gem::Requirement
|
62
61
|
none: false
|
63
|
-
requirements:
|
64
|
-
- -
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
version:
|
62
|
+
requirements:
|
63
|
+
- - ! '>='
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0'
|
67
66
|
type: :runtime
|
68
67
|
prerelease: false
|
69
|
-
version_requirements: *
|
70
|
-
- !ruby/object:Gem::Dependency
|
71
|
-
name:
|
72
|
-
requirement: &
|
68
|
+
version_requirements: *16033740
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: options-hash
|
71
|
+
requirement: &16031340 !ruby/object:Gem::Requirement
|
73
72
|
none: false
|
74
|
-
requirements:
|
75
|
-
- -
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version: 0
|
73
|
+
requirements:
|
74
|
+
- - ! '>='
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
78
77
|
type: :runtime
|
79
78
|
prerelease: false
|
80
|
-
version_requirements: *
|
81
|
-
- !ruby/object:Gem::Dependency
|
82
|
-
name:
|
83
|
-
requirement: &
|
79
|
+
version_requirements: *16031340
|
80
|
+
- !ruby/object:Gem::Dependency
|
81
|
+
name: command-builder
|
82
|
+
requirement: &16030640 !ruby/object:Gem::Requirement
|
84
83
|
none: false
|
85
|
-
requirements:
|
86
|
-
- -
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
version: 0
|
84
|
+
requirements:
|
85
|
+
- - ! '>='
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0'
|
89
88
|
type: :runtime
|
90
89
|
prerelease: false
|
91
|
-
version_requirements: *
|
92
|
-
- !ruby/object:Gem::Dependency
|
90
|
+
version_requirements: *16030640
|
91
|
+
- !ruby/object:Gem::Dependency
|
93
92
|
name: bundler
|
94
|
-
requirement: &
|
93
|
+
requirement: &16647120 !ruby/object:Gem::Requirement
|
95
94
|
none: false
|
96
|
-
requirements:
|
97
|
-
- -
|
98
|
-
- !ruby/object:Gem::Version
|
95
|
+
requirements:
|
96
|
+
- - ! '>='
|
97
|
+
- !ruby/object:Gem::Version
|
99
98
|
version: 1.0.14
|
100
99
|
type: :development
|
101
100
|
prerelease: false
|
102
|
-
version_requirements: *
|
103
|
-
- !ruby/object:Gem::Dependency
|
104
|
-
name:
|
105
|
-
requirement: &
|
101
|
+
version_requirements: *16647120
|
102
|
+
- !ruby/object:Gem::Dependency
|
103
|
+
name: jeweler2
|
104
|
+
requirement: &16644900 !ruby/object:Gem::Requirement
|
106
105
|
none: false
|
107
|
-
requirements:
|
108
|
-
- -
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version:
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: 2.0.0
|
111
110
|
type: :development
|
112
111
|
prerelease: false
|
113
|
-
version_requirements: *
|
112
|
+
version_requirements: *16644900
|
114
113
|
description:
|
115
114
|
email: martinkozak@martinkozak.net
|
116
|
-
executables:
|
115
|
+
executables:
|
117
116
|
- image-optimizer
|
118
117
|
extensions: []
|
119
|
-
|
120
|
-
extra_rdoc_files:
|
118
|
+
extra_rdoc_files:
|
121
119
|
- LICENSE.txt
|
122
120
|
- README.md
|
123
|
-
files:
|
121
|
+
files:
|
124
122
|
- .document
|
125
123
|
- Gemfile
|
126
124
|
- Gemfile.lock
|
@@ -132,34 +130,31 @@ files:
|
|
132
130
|
- image-optimizer.gemspec
|
133
131
|
- lib/image-optimizer.rb
|
134
132
|
homepage: http://github.com/martinkozak/image-optimizer
|
135
|
-
licenses:
|
133
|
+
licenses:
|
136
134
|
- MIT
|
137
135
|
post_install_message:
|
138
136
|
rdoc_options: []
|
139
|
-
|
140
|
-
require_paths:
|
137
|
+
require_paths:
|
141
138
|
- lib
|
142
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
139
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
143
140
|
none: false
|
144
|
-
requirements:
|
145
|
-
- -
|
146
|
-
- !ruby/object:Gem::Version
|
147
|
-
|
148
|
-
segments:
|
141
|
+
requirements:
|
142
|
+
- - ! '>='
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '0'
|
145
|
+
segments:
|
149
146
|
- 0
|
150
|
-
|
151
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
147
|
+
hash: -2436871939392725205
|
148
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
152
149
|
none: false
|
153
|
-
requirements:
|
154
|
-
- -
|
155
|
-
- !ruby/object:Gem::Version
|
156
|
-
version:
|
150
|
+
requirements:
|
151
|
+
- - ! '>='
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
version: '0'
|
157
154
|
requirements: []
|
158
|
-
|
159
155
|
rubyforge_project:
|
160
|
-
rubygems_version: 1.8.
|
156
|
+
rubygems_version: 1.8.15
|
161
157
|
signing_key:
|
162
158
|
specification_version: 3
|
163
159
|
summary: Optimizes given JPEG and PNG images or images in given folder.
|
164
160
|
test_files: []
|
165
|
-
|