gifme 0.0.1 → 0.0.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/Rakefile +1 -1
- data/bin/gifme +8 -2
- data/gifme.gemspec +1 -1
- metadata +3 -3
data/Rakefile
CHANGED
data/bin/gifme
CHANGED
@@ -2,6 +2,12 @@
|
|
2
2
|
|
3
3
|
require 'optparse'
|
4
4
|
|
5
|
+
def escape(str)
|
6
|
+
String(str).gsub(/(?=[^a-zA-Z0-9_.\/\-\x7F-\xFF\n])/n, '\\').
|
7
|
+
gsub(/\n/,"'\n'").
|
8
|
+
sub(/^$/,"''")
|
9
|
+
end
|
10
|
+
|
5
11
|
options = {
|
6
12
|
:output => "#{ENV['HOME']}/Desktop/animated.gif",
|
7
13
|
:reverse => false,
|
@@ -32,7 +38,7 @@ parser = OptionParser.new do |opts|
|
|
32
38
|
options[:delay] = delay
|
33
39
|
end
|
34
40
|
|
35
|
-
opts.on("--noresize", "Don't resize the final animation (set to 500px wide") do |nrs|
|
41
|
+
opts.on("--noresize", "Don't resize the final animation (set to 500px wide)") do |nrs|
|
36
42
|
options[:resize] = false
|
37
43
|
end
|
38
44
|
|
@@ -43,7 +49,7 @@ parser = OptionParser.new do |opts|
|
|
43
49
|
end
|
44
50
|
|
45
51
|
parser.parse!
|
46
|
-
args = *ARGV.join(" ")
|
52
|
+
args = *ARGV.collect{|a| escape a}.join(" ")
|
47
53
|
|
48
54
|
unless system("which convert 2>&1 > /dev/null")
|
49
55
|
puts "You need to install ImageMagick first.\n\n"
|
data/gifme.gemspec
CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
|
|
13
13
|
## If your rubyforge_project name is different, then edit it and comment out
|
14
14
|
## the sub! line in the Rakefile
|
15
15
|
s.name = 'gifme'
|
16
|
-
s.version = '0.0.
|
16
|
+
s.version = '0.0.2'
|
17
17
|
s.date = '2011-05-23'
|
18
18
|
s.rubyforge_project = 'gifme'
|
19
19
|
|
metadata
CHANGED