image-optimizer 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile.lock +4 -4
- data/VERSION +1 -1
- data/image-optimizer.gemspec +3 -3
- data/lib/image-optimizer.rb +4 -3
- metadata +4 -4
data/Gemfile.lock
CHANGED
|
@@ -7,15 +7,15 @@ GEM
|
|
|
7
7
|
git (1.2.5)
|
|
8
8
|
hash-utils (0.15.0)
|
|
9
9
|
hashie (1.0.0)
|
|
10
|
-
jeweler (1.6.
|
|
11
|
-
bundler (~> 1.0
|
|
10
|
+
jeweler (1.6.2)
|
|
11
|
+
bundler (~> 1.0)
|
|
12
12
|
git (>= 1.2.5)
|
|
13
13
|
rake
|
|
14
14
|
jpegoptim (0.2.0)
|
|
15
15
|
command-builder (>= 0.1.0)
|
|
16
16
|
pipe-run (>= 0.2.0)
|
|
17
17
|
unix-whereis (>= 0.1.0)
|
|
18
|
-
jpegtran (0.1.
|
|
18
|
+
jpegtran (0.1.1)
|
|
19
19
|
command-builder (>= 0.1.0)
|
|
20
20
|
hash-utils (>= 0.15.0)
|
|
21
21
|
lookup-hash (>= 0.2.0)
|
|
@@ -33,7 +33,7 @@ GEM
|
|
|
33
33
|
pipe-run (>= 0.2.0)
|
|
34
34
|
unix-whereis (>= 0.1.0)
|
|
35
35
|
pipe-run (0.2.1)
|
|
36
|
-
rake (0.9.
|
|
36
|
+
rake (0.9.1)
|
|
37
37
|
subexec (0.0.4)
|
|
38
38
|
types (0.1.3)
|
|
39
39
|
abstract (>= 1.0.0)
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.2
|
data/image-optimizer.gemspec
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = %q{image-optimizer}
|
|
8
|
-
s.version = "0.1.
|
|
8
|
+
s.version = "0.1.2"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = [%q{Martin Kozák}]
|
|
12
|
-
s.date = %q{2011-
|
|
12
|
+
s.date = %q{2011-06-01}
|
|
13
13
|
s.email = %q{martinkozak@martinkozak.net}
|
|
14
14
|
s.executables = [%q{image-optimizer}]
|
|
15
15
|
s.extra_rdoc_files = [
|
|
@@ -31,7 +31,7 @@ Gem::Specification.new do |s|
|
|
|
31
31
|
s.homepage = %q{http://github.com/martinkozak/image-optimizer}
|
|
32
32
|
s.licenses = [%q{MIT}]
|
|
33
33
|
s.require_paths = [%q{lib}]
|
|
34
|
-
s.rubygems_version = %q{1.8.
|
|
34
|
+
s.rubygems_version = %q{1.8.5}
|
|
35
35
|
s.summary = %q{Optimizes given JPEG and PNG images or images in given folder.}
|
|
36
36
|
|
|
37
37
|
if s.respond_to? :specification_version then
|
data/lib/image-optimizer.rb
CHANGED
|
@@ -81,6 +81,8 @@ module ImageOptimizer
|
|
|
81
81
|
|
|
82
82
|
case ext
|
|
83
83
|
when ".png"
|
|
84
|
+
block.call(path.dup)
|
|
85
|
+
|
|
84
86
|
if Whereis.available? :convert
|
|
85
87
|
begin
|
|
86
88
|
image = MiniMagick::Image.open(path)
|
|
@@ -94,8 +96,9 @@ module ImageOptimizer
|
|
|
94
96
|
Optipng.optimize(path, { :level => opts[:level] })
|
|
95
97
|
end
|
|
96
98
|
|
|
97
|
-
block.call(path.dup)
|
|
98
99
|
when ".jpg"
|
|
100
|
+
block.call(path.dup)
|
|
101
|
+
|
|
99
102
|
if Jpegoptim.available?
|
|
100
103
|
Jpegoptim.optimize(path, opts[:strip].true? ? { :strip => :all } : { })
|
|
101
104
|
end
|
|
@@ -103,8 +106,6 @@ module ImageOptimizer
|
|
|
103
106
|
if Jpegtran.available?
|
|
104
107
|
Jpegtran.optimize(path, { :optimize => true, :progressive => true })
|
|
105
108
|
end
|
|
106
|
-
|
|
107
|
-
block.call(path.dup)
|
|
108
109
|
end
|
|
109
110
|
end
|
|
110
111
|
|
metadata
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: image-optimizer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease:
|
|
5
|
-
version: 0.1.
|
|
5
|
+
version: 0.1.2
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
8
8
|
- "Martin Koz\xC3\xA1k"
|
|
@@ -10,7 +10,7 @@ autorequire:
|
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
12
|
|
|
13
|
-
date: 2011-
|
|
13
|
+
date: 2011-06-01 00:00:00 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: yaop
|
|
@@ -144,7 +144,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
144
144
|
requirements:
|
|
145
145
|
- - ">="
|
|
146
146
|
- !ruby/object:Gem::Version
|
|
147
|
-
hash:
|
|
147
|
+
hash: -2310788483444750640
|
|
148
148
|
segments:
|
|
149
149
|
- 0
|
|
150
150
|
version: "0"
|
|
@@ -157,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
157
157
|
requirements: []
|
|
158
158
|
|
|
159
159
|
rubyforge_project:
|
|
160
|
-
rubygems_version: 1.8.
|
|
160
|
+
rubygems_version: 1.8.5
|
|
161
161
|
signing_key:
|
|
162
162
|
specification_version: 3
|
|
163
163
|
summary: Optimizes given JPEG and PNG images or images in given folder.
|