gifme 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/Rakefile +1 -1
  2. data/bin/gifme +8 -2
  3. data/gifme.gemspec +1 -1
  4. metadata +3 -3
data/Rakefile CHANGED
@@ -13,7 +13,7 @@ def name
13
13
  end
14
14
 
15
15
  def version
16
- "0.0.1"
16
+ "0.0.2"
17
17
  end
18
18
 
19
19
  def date
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"
@@ -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.1'
16
+ s.version = '0.0.2'
17
17
  s.date = '2011-05-23'
18
18
  s.rubyforge_project = 'gifme'
19
19
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gifme
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Zach Holman