grosser-smusher 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/bin/smusher +8 -7
- metadata +2 -2
data/VERSION.yml
CHANGED
data/bin/smusher
CHANGED
@@ -1,10 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'rubygems'
|
3
3
|
require 'optparse'
|
4
|
-
require 'smusher'
|
5
4
|
|
6
5
|
options = {}
|
7
|
-
path = ARGV.first
|
8
6
|
OptionParser.new do |opts|
|
9
7
|
opts.banner = <<BANNER
|
10
8
|
Optimize a single image or a whole folder in the cloud.
|
@@ -22,13 +20,16 @@ Options are:
|
|
22
20
|
BANNER
|
23
21
|
opts.on("-q", "--quiet","no output") { options[:quiet]=true }
|
24
22
|
opts.on("-c", "--convert-gifs","convert all .gif`s in the given folder") { options[:convert_gifs]=true }
|
25
|
-
opts.
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
23
|
+
opts.on("-h", "--help","Show this.") { puts opts;exit }
|
24
|
+
end.parse!
|
25
|
+
|
26
|
+
path = ARGV.first
|
27
|
+
if path.to_s.empty? or not File.exist?(path)
|
28
|
+
puts "Usage instructions: autotest --help"
|
29
|
+
exit
|
30
30
|
end
|
31
31
|
|
32
|
+
require 'smusher'
|
32
33
|
if File.directory?(path)
|
33
34
|
Smusher.optimize_images_in_folder(path,options)
|
34
35
|
else
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grosser-smusher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-03-
|
12
|
+
date: 2009-03-30 00:00:00 -07:00
|
13
13
|
default_executable: smusher
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|