public
Description: Some utility scripts (the stuff I keep in ~/bin)
Clone URL: git://github.com/foca/utility_scripts.git
Fixed bug in rake method, thx ReinH :)
foca (author)
Mon Mar 24 14:45:16 -0700 2008
commit  9cbd966a1703b9c7c6fde512676303ce47be23ad
tree    15c197193122e383c36bb1deebd808320a482be0
parent  f8cb62c13e825058984eeeec7968dbeed772e81e
...
8
9
10
 
 
11
12
13
14
 
15
16
17
...
40
41
42
43
44
45
 
46
47
48
...
8
9
10
11
12
13
14
15
 
16
17
18
19
...
42
43
44
 
 
 
45
46
47
48
0
@@ -8,10 +8,12 @@
0
 # See http://github.com/foca/utility_scripts/ for the latest version
0
 # Released under a WTFP license (http://sam.zoy.org/wtfpl/)
0
 
0
+`export COLUMNS`
0
+
0
 RAILS_SVN_CHECKOUT = '/Users/foca/Rails/_rails'
0
 
0
 module Helpers
0
- LINE = 80
0
+ LINE = ENV["COLUMNS"] || 80
0
 
0
   def announcing(msg)
0
     print msg
0
@@ -40,9 +42,7 @@ module Helpers
0
   end
0
 
0
   def rake(task, args={})
0
- args = args.inject("") do |list, (name, value)|
0
- list << "#{name.to_s.upcase}=#{value}"
0
- end
0
+ args = args.map {|name,value| "#{name.to_s.upcase}=#{value}"}.join(" ")
0
     silent "rake #{task} #{args}"
0
   end
0
 end

Comments

    No one has commented yet.