public
Rubygem
Description: This gem set the autotest (ZenTest) to send messages to software as Growl, LibNotify, and Snarl, displaying a window with the results.
Homepage: http://www.nomedojogo.com/
Clone URL: git://github.com/carlosbrando/autotest-notification.git
Refactoring an-install.
carlosbrando (author)
Wed Jun 18 11:43:08 -0700 2008
commit  15c9fd083111d8359c70d1f720fa27bd5cd1d793
tree    a842b6d3ec0b45bb7058c80c8bfce7af0efb944c
parent  b6c52575366cc34e5ccf502aac4a2446750e6768
...
55
56
57
58
59
60
61
62
 
 
 
 
 
63
64
65
 
66
67
68
69
70
 
71
72
73
...
55
56
57
 
 
 
 
 
58
59
60
61
62
63
64
 
65
66
67
68
69
70
71
72
73
74
0
@@ -55,18 +55,19 @@ end
0
 
0
 path = OPTIONS[:path]
0
 
0
-fp = File.expand_path(path)
0
-if File.exists?(fp + "/.autotest")
0
- FileUtils.cp fp + "/.autotest", fp + '/.autotest.backup'
0
- puts ""
0
- puts "You Already have a .autotest file, copying to " + path + "/.autotest.backup"
0
+autotest_path = File.expand_path(path)
0
+
0
+if File.exists?("#{autotest_path}/.autotest")
0
+ puts "\nYou Already have a .autotest file, renamed to .autotest.backup"
0
+ FileUtils.cp "#{autotest_path}/.autotest", "#{autotest_path}/.autotest.backup"
0
 end
0
 
0
-f = File.new(File.expand_path(path) + "/.autotest", "w")
0
+f = File.new("#{autotest_path}/.autotest", "w")
0
 f.write "# ~.autotest\n"
0
 f.write "require 'autotest_notification'\n"
0
 f.write("SPEAKING = #{OPTIONS[:speaking]}\n")
0
 f.write("DOOM_EDITION = #{OPTIONS[:doom]}\n")
0
 f.close
0
+
0
 puts "\nAs from now all tests will be notified automatically."
0
 puts "" # a blank line
0
\ No newline at end of file

Comments

    No one has commented yet.