tchandy-autotest-notification 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. data/History.txt +50 -0
  2. data/License.txt +20 -0
  3. data/Manifest.txt +54 -0
  4. data/PostInstall.txt +9 -0
  5. data/README.txt +127 -0
  6. data/Rakefile +4 -0
  7. data/autotest-notification.gemspec +35 -0
  8. data/bin/an-install +73 -0
  9. data/bin/an-uninstall +50 -0
  10. data/bin/playsound +0 -0
  11. data/config/hoe.rb +75 -0
  12. data/config/requirements.rb +15 -0
  13. data/images/doom/doom_0.png +0 -0
  14. data/images/doom/doom_1.png +0 -0
  15. data/images/doom/doom_2.png +0 -0
  16. data/images/doom/doom_3.png +0 -0
  17. data/images/doom/doom_4.png +0 -0
  18. data/images/doom/doom_5.png +0 -0
  19. data/images/doom/doom_6.png +0 -0
  20. data/images/fail.png +0 -0
  21. data/images/pass.png +0 -0
  22. data/lib/autotest_notification.rb +69 -0
  23. data/lib/autotest_notification/cygwin.rb +14 -0
  24. data/lib/autotest_notification/doom.rb +25 -0
  25. data/lib/autotest_notification/linux.rb +55 -0
  26. data/lib/autotest_notification/mac.rb +24 -0
  27. data/lib/autotest_notification/version.rb +9 -0
  28. data/lib/autotest_notification/windows.rb +11 -0
  29. data/script/console +10 -0
  30. data/script/destroy +14 -0
  31. data/script/generate +14 -0
  32. data/script/txt2html +82 -0
  33. data/setup.rb +1585 -0
  34. data/sounds/doom/0.wav +0 -0
  35. data/sounds/doom/1.wav +0 -0
  36. data/sounds/doom/2.wav +0 -0
  37. data/sounds/doom/3.wav +0 -0
  38. data/sounds/doom/4.wav +0 -0
  39. data/sounds/doom/5.wav +0 -0
  40. data/sounds/doom/6.wav +0 -0
  41. data/tasks/deployment.rake +34 -0
  42. data/tasks/environment.rake +7 -0
  43. data/tasks/website.rake +17 -0
  44. data/test/autotest_notification/test_cygwin.rb +11 -0
  45. data/test/autotest_notification/test_linux.rb +92 -0
  46. data/test/autotest_notification/test_mac.rb +19 -0
  47. data/test/autotest_notification/test_windows.rb +13 -0
  48. data/test/test_autotest_notification.rb +38 -0
  49. data/test/test_helper.rb +25 -0
  50. data/website/index.html +141 -0
  51. data/website/index.txt +83 -0
  52. data/website/javascripts/rounded_corners_lite.inc.js +285 -0
  53. data/website/stylesheets/screen.css +138 -0
  54. data/website/template.html.erb +48 -0
  55. metadata +144 -0
data/History.txt ADDED
@@ -0,0 +1,50 @@
1
+ 1.4.0 - Jun 18, 2008
2
+ * Special Doom Edition for Linux (ozsantana)
3
+
4
+ 1.3.1 - Jun 18, 2008
5
+ * Added backup to old .autotest file (tchandy)
6
+
7
+ 1.3.0 - Jun 18, 2008
8
+ * Added Doom sounds.
9
+
10
+ 1.2.0 - Jun 17, 2008
11
+ * Special Doom Edition
12
+
13
+ 1.1.2
14
+ * Refactoring code.
15
+
16
+ * 1.1.1
17
+ * Changed to speak when passing the tests after a series of failures. Only in Mac.
18
+
19
+ * 1.1.0
20
+ * Now speaking in Linux too.
21
+
22
+ * 0.3.0
23
+ * If a test failed, the computer will speak. Only for Mac.
24
+
25
+ * 0.2.2 2008-05-13
26
+ * Validating presence of KDialog; Fixing some identations.
27
+ * Adding some tests.
28
+
29
+ * 0.2.1 2008-05-13
30
+ * Starting to add tests.
31
+
32
+ * 0.2.0 2008-05-13
33
+ * Added support to Gnome at linux.rb (zenity).
34
+ * Changed filename windows.rb to cygwin.rb and added a new windows.rb file that uses Snarl to show the messages.
35
+ * README.txt updated with windows and linux dependencies.
36
+
37
+ * 0.1.0 2008-05-13
38
+ * Separated each operating system into a different file to facilitate maintenance. It's necessary to conduct more tests in each scene.
39
+
40
+ * 0.0.9:
41
+ * Adding KDE (kdialog) support.
42
+
43
+ * 0.0.7:
44
+ * Added support to Windows.
45
+
46
+ * 0.0.4:
47
+ * Added an-uninstall to remove the autotest hook.
48
+
49
+ * 1 major enhancement:
50
+ * Initial release
data/License.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2008 Carlos Brando
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Manifest.txt ADDED
@@ -0,0 +1,54 @@
1
+ History.txt
2
+ License.txt
3
+ Manifest.txt
4
+ PostInstall.txt
5
+ README.txt
6
+ Rakefile
7
+ config/hoe.rb
8
+ config/requirements.rb
9
+ lib/autotest_notification.rb
10
+ lib/autotest_notification/version.rb
11
+ lib/autotest_notification/linux.rb
12
+ lib/autotest_notification/windows.rb
13
+ lib/autotest_notification/cygwin.rb
14
+ lib/autotest_notification/mac.rb
15
+ lib/autotest_notification/doom.rb
16
+ script/console
17
+ script/destroy
18
+ script/generate
19
+ script/txt2html
20
+ setup.rb
21
+ tasks/deployment.rake
22
+ tasks/environment.rake
23
+ tasks/website.rake
24
+ test/test_autotest_notification.rb
25
+ test/test_helper.rb
26
+ test/autotest_notification/test_cygwin.rb
27
+ test/autotest_notification/test_linux.rb
28
+ test/autotest_notification/test_windows.rb
29
+ test/autotest_notification/test_mac.rb
30
+ website/index.html
31
+ website/index.txt
32
+ website/javascripts/rounded_corners_lite.inc.js
33
+ website/stylesheets/screen.css
34
+ website/template.html.erb
35
+ bin/an-install
36
+ bin/an-uninstall
37
+ bin/playsound
38
+ images/pass.png
39
+ images/fail.png
40
+ autotest-notification.gemspec
41
+ images/doom/doom_0.png
42
+ images/doom/doom_1.png
43
+ images/doom/doom_2.png
44
+ images/doom/doom_3.png
45
+ images/doom/doom_4.png
46
+ images/doom/doom_5.png
47
+ images/doom/doom_6.png
48
+ sounds/doom/0.wav
49
+ sounds/doom/1.wav
50
+ sounds/doom/2.wav
51
+ sounds/doom/3.wav
52
+ sounds/doom/4.wav
53
+ sounds/doom/5.wav
54
+ sounds/doom/6.wav
data/PostInstall.txt ADDED
@@ -0,0 +1,9 @@
1
+
2
+ For more information on autotest_notification, see http://github.com/carlosbrando/autotest-notification/
3
+
4
+ To turn on the notifier you need to run the following command:
5
+ an-install
6
+
7
+ To turn off:
8
+ an-uninstall
9
+
data/README.txt ADDED
@@ -0,0 +1,127 @@
1
+ = THE AUTOTEST NOTIFICATION GEM
2
+
3
+ * http://github.com/carlosbrando/autotest-notification/
4
+
5
+
6
+ == DESCRIPTION:
7
+
8
+ This gem set the autotest (ZenTest) to send messages to software as Growl, LibNotify, and Snarl, displaying a window with the results.
9
+
10
+
11
+ == REQUIREMENTS:
12
+
13
+ Independent of operating system you are using, you must install the ZenTest:
14
+
15
+ $ gem install ZenTest
16
+
17
+
18
+ * If you're using a Mac:
19
+ You need to have Growl and growlnotify installed on your machine.
20
+
21
+ Download the Growl [http://growl.info/index.php] and install it like any other application on your Mac
22
+
23
+ Then you must install the growlnotify.
24
+
25
+ In your shell, cd to the directory on the Growl disk image containing growlnotify, and type ./install.sh.
26
+ That script will install growlnotify to /usr/local/bin and the manpage to /usr/local/man.
27
+
28
+ If you want to be notified with voice of the test results, when running an-install, pass a "-s" switch, when you do not want voices notifications anymore, just run it again without the "-s" switch.
29
+
30
+
31
+ * If you're using Windows (with cygwin):
32
+ You need to have Snarl and sncmd installed on your machine.
33
+
34
+ Download Snarl [http://www.fullphat.net/] and install it like any other application on your machine.
35
+
36
+ Then download sncmd [http://www.k23productions.com/download.php?view.105] open the zip file and place
37
+ the executable from the zip in any directory in windows PATH (for example c:\windows).
38
+
39
+
40
+ * If you're using Windows (without cygwin):
41
+ You need to have Snarl, diffutils and ruby-snarl installed on your machine.
42
+
43
+ Download Snarl [http://www.fullphat.net/] and install it like any other application on your machine.
44
+
45
+ Download DiffUtils for Windows [http://gnuwin32.sourceforge.net/packages/diffutils.htm] and follow the installation instructions on the site.
46
+
47
+ Run in the command prompt:
48
+
49
+ $ gem install ruby-snarl
50
+
51
+ After all that. You must update the environment variable PATH with the path to the bin of diffutils.
52
+ It's the price that was paid for using Windows (try cygwin).
53
+
54
+
55
+ * If you're using Linux:
56
+ You need to have libnotify binaries installed.
57
+
58
+ For ubuntu this means: sudo apt-get install libnotify-bin
59
+
60
+ Other distributions may package it with other names, do a search for libnotify using your distribution package manager.
61
+
62
+ If you use KDE and do not have libnotify-bin installed, it will try to use kdialog wich is part of KDE.
63
+ It also works if you have zenity installed.
64
+
65
+ If you want to be notified with voice of the test results, instal espeak [http://espeak.sourceforge.net/] too, it is not needed.
66
+ And when running an-install, pass a "-s" switch, when you do not want voices notifications anymore, just run it again without the "-s" switch.
67
+
68
+ To hear the sounds of Doom Edition, you need the mplayer [http://www.mplayerhq.hu/design7/dload.html] installed.
69
+
70
+
71
+ == INSTALL:
72
+
73
+ $ sudo gem install carlosbrando-autotest-notification --source=http://gems.github.com
74
+
75
+ Run it to let the notifier in automatic mode:
76
+
77
+ $ an-install
78
+
79
+ In Windows without cygwin, it's necessary to install in the directory of the project:
80
+
81
+ $ an-install --path=C:\projects\my_project
82
+
83
+ To turn off the notifier:
84
+
85
+ $ an-uninstall
86
+
87
+
88
+ == Special Doom Edition
89
+
90
+ $ an-install --doom --speaking
91
+
92
+ == CONTRIBUTORS:
93
+
94
+ * carlosbrando [http://www.nomedojogo.com]
95
+ * simpsomboy [http://alexandredasilva.wordpress.com]
96
+ * urubatan [http://www.urubatan.info]
97
+ * chjunior [http://tas.milk-it.net]
98
+ * daviscabral [http://blog.impactmedia.com.br]
99
+ * tapajos [http://www.improveit.com.br/tapajos]
100
+ * tchandy [http://tchandy.wordpress.com]
101
+ * ozsantana [http://blog.iconcreative.net/]
102
+
103
+
104
+ == LICENSE:
105
+
106
+ (The MIT License)
107
+
108
+ Copyright (c) 2008
109
+
110
+ Permission is hereby granted, free of charge, to any person obtaining
111
+ a copy of this software and associated documentation files (the
112
+ 'Software'), to deal in the Software without restriction, including
113
+ without limitation the rights to use, copy, modify, merge, publish,
114
+ distribute, sublicense, and/or sell copies of the Software, and to
115
+ permit persons to whom the Software is furnished to do so, subject to
116
+ the following conditions:
117
+
118
+ The above copyright notice and this permission notice shall be
119
+ included in all copies or substantial portions of the Software.
120
+
121
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
122
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
123
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
124
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
125
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
126
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
127
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,4 @@
1
+ require 'config/requirements'
2
+ require 'config/hoe' # setup Hoe + all gem configuration
3
+
4
+ Dir['tasks/**/*.rake'].each { |rake| load rake }
@@ -0,0 +1,35 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = %q{autotest-notification}
3
+ s.version = "1.4.0"
4
+
5
+ s.specification_version = 2 if s.respond_to? :specification_version=
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["Carlos Brando", "Rodrigo Urubatan", "Alexandre da Silva", "Carlos J\303\272nior", "Davis Zanetti Cabral", "Marcos Tapaj\303\263s", "Thiago Pradi", "Oz\303\251ias Sant'ana"]
9
+ s.date = %q{2008-06-18}
10
+ s.description = %q{This gem set the autotest (ZenTest) to send messages to software as Growl, LibNotify, and Snarl, displaying a window with the results.}
11
+ s.email = ["eduardobrando@gmail.com"]
12
+ s.executables = ["an-install", "an-uninstall", "playsound"]
13
+ s.extra_rdoc_files = ["History.txt", "License.txt", "Manifest.txt", "PostInstall.txt", "README.txt", "website/index.txt"]
14
+ s.files = ["History.txt", "License.txt", "Manifest.txt", "PostInstall.txt", "README.txt", "Rakefile", "config/hoe.rb", "config/requirements.rb", "lib/autotest_notification.rb", "lib/autotest_notification/version.rb", "lib/autotest_notification/linux.rb", "lib/autotest_notification/windows.rb", "lib/autotest_notification/cygwin.rb", "lib/autotest_notification/mac.rb", "lib/autotest_notification/doom.rb", "script/console", "script/destroy", "script/generate", "script/txt2html", "setup.rb", "tasks/deployment.rake", "tasks/environment.rake", "tasks/website.rake", "test/test_autotest_notification.rb", "test/test_helper.rb", "test/autotest_notification/test_cygwin.rb", "test/autotest_notification/test_linux.rb", "test/autotest_notification/test_windows.rb", "test/autotest_notification/test_mac.rb", "website/index.html", "website/index.txt", "website/javascripts/rounded_corners_lite.inc.js", "website/stylesheets/screen.css", "website/template.html.erb", "bin/an-install", "bin/an-uninstall", "bin/playsound", "images/pass.png", "images/fail.png", "autotest-notification.gemspec", "images/doom/doom_0.png", "images/doom/doom_1.png", "images/doom/doom_2.png", "images/doom/doom_3.png", "images/doom/doom_4.png", "images/doom/doom_5.png", "images/doom/doom_6.png", "sounds/doom/0.wav", "sounds/doom/1.wav", "sounds/doom/2.wav", "sounds/doom/3.wav", "sounds/doom/4.wav", "sounds/doom/5.wav", "sounds/doom/6.wav"]
15
+ s.has_rdoc = true
16
+ s.homepage = %q{http://github.com/carlosbrando/autotest-notification/}
17
+ s.post_install_message = %q{
18
+ For more information on autotest_notification, see http://github.com/carlosbrando/autotest-notification/
19
+
20
+ To turn on the notifier you need to run the following command:
21
+ an-install
22
+
23
+ To turn off:
24
+ an-uninstall
25
+
26
+ }
27
+ s.rdoc_options = ["--main", "README.txt"]
28
+ s.require_paths = ["lib"]
29
+ s.rubyforge_project = %q{autotest-notification}
30
+ s.rubygems_version = %q{1.1.1}
31
+ s.summary = %q{This gem set the autotest (ZenTest) to send messages to software as Growl, LibNotify, and Snarl, displaying a window with the results.}
32
+ s.test_files = ["test/autotest_notification/test_cygwin.rb", "test/autotest_notification/test_linux.rb", "test/autotest_notification/test_mac.rb", "test/autotest_notification/test_windows.rb", "test/test_autotest_notification.rb", "test/test_helper.rb"]
33
+
34
+ s.add_dependency(%q<ZenTest>, [">= 3.9.2"])
35
+ end
data/bin/an-install ADDED
@@ -0,0 +1,73 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # Created on 2008-5-11.
4
+ # Copyright (c) 2008. All rights reserved.
5
+
6
+ begin
7
+ require 'rubygems'
8
+ rescue LoadError
9
+ # no rubygems to load, so we fail silently
10
+ end
11
+
12
+ require 'optparse'
13
+ require 'ftools'
14
+
15
+ # NOTE: the option -p/--path= is given as an example, and should probably be replaced in your application.
16
+
17
+ OPTIONS = {
18
+ :path => '~',
19
+ :speaking => false,
20
+ :doom => false
21
+ }
22
+ MANDATORY_OPTIONS = %w( )
23
+
24
+ parser = OptionParser.new do |opts|
25
+ opts.banner = <<BANNER
26
+ This application is wonderful because...
27
+
28
+ Usage: #{File.basename($0)} [options]
29
+
30
+ Options are:
31
+ BANNER
32
+ opts.separator ""
33
+
34
+ opts.on("-p", "--path=PATH", String,
35
+ "The root path for selecting files",
36
+ "Default: ~") { |OPTIONS[:path]| }
37
+
38
+ opts.on("-s", "--speaking",
39
+ "If a test failed, the computer will speak.",
40
+ "For all plataforms.") { |OPTIONS[:speaking]| OPTIONS[:speaking] = true }
41
+
42
+ opts.on("-d", "--doom",
43
+ "Special Doom Edition.",
44
+ "Only for Mac.") { |OPTIONS[:doom]| OPTIONS[:doom] = true }
45
+
46
+ opts.on("-h", "--help",
47
+ "Show this help message.") { puts opts; exit }
48
+
49
+ opts.parse!(ARGV)
50
+
51
+ if MANDATORY_OPTIONS && MANDATORY_OPTIONS.find { |option| OPTIONS[option.to_sym].nil? }
52
+ puts opts; exit
53
+ end
54
+ end
55
+
56
+ path = OPTIONS[:path]
57
+
58
+ autotest_path = File.expand_path(path)
59
+
60
+ if File.exists?("#{autotest_path}/.autotest")
61
+ puts "\nYou Already have a .autotest file, renamed to .autotest.backup"
62
+ FileUtils.cp "#{autotest_path}/.autotest", "#{autotest_path}/.autotest.backup"
63
+ end
64
+
65
+ f = File.new("#{autotest_path}/.autotest", "w")
66
+ f.write "# ~.autotest\n"
67
+ f.write "require 'autotest_notification'\n"
68
+ f.write("SPEAKING = #{OPTIONS[:speaking]}\n")
69
+ f.write("DOOM_EDITION = #{OPTIONS[:doom]}\n")
70
+ f.close
71
+
72
+ puts "\nAs from now all tests will be notified automatically."
73
+ puts "" # a blank line
data/bin/an-uninstall ADDED
@@ -0,0 +1,50 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # Created on 2008-5-11.
4
+ # Copyright (c) 2008. All rights reserved.
5
+
6
+ begin
7
+ require 'rubygems'
8
+ rescue LoadError
9
+ # no rubygems to load, so we fail silently
10
+ end
11
+
12
+ require 'optparse'
13
+ require 'ftools'
14
+
15
+ # NOTE: the option -p/--path= is given as an example, and should probably be replaced in your application.
16
+
17
+ OPTIONS = {
18
+ :path => '~'
19
+ }
20
+ MANDATORY_OPTIONS = %w( )
21
+
22
+ parser = OptionParser.new do |opts|
23
+ opts.banner = <<BANNER
24
+ This application is wonderful because...
25
+
26
+ Usage: #{File.basename($0)} [options]
27
+
28
+ Options are:
29
+ BANNER
30
+ opts.separator ""
31
+ opts.on("-p", "--path=PATH", String,
32
+ "The root path for selecting files",
33
+ "Default: ~") { |OPTIONS[:path]| }
34
+ opts.on("-h", "--help",
35
+ "Show this help message.") { puts opts; exit }
36
+ opts.parse!(ARGV)
37
+
38
+ if MANDATORY_OPTIONS && MANDATORY_OPTIONS.find { |option| OPTIONS[option.to_sym].nil? }
39
+ puts opts; exit
40
+ end
41
+ end
42
+
43
+ path = OPTIONS[:path]
44
+
45
+ autotest_file = File.expand_path(path) + "/.autotest"
46
+ if File.exist?(autotest_file)
47
+ File.delete(autotest_file)
48
+ puts "\nYou no longer receive notifications of your tests."
49
+ puts "" # a blank line
50
+ end
data/bin/playsound ADDED
Binary file
data/config/hoe.rb ADDED
@@ -0,0 +1,75 @@
1
+ require 'autotest_notification/version'
2
+
3
+ AUTHOR = "Carlos Brando, Rodrigo Urubatan, Alexandre da Silva, Carlos Júnior, Davis Zanetti Cabral, Marcos Tapajós, Thiago Pradi, Ozéias Sant'ana"
4
+ EMAIL = "eduardobrando@gmail.com"
5
+ DESCRIPTION = "This gem set the autotest (ZenTest) to send messages to software as Growl, LibNotify, and Snarl, displaying a window with the results."
6
+ GEM_NAME = 'autotest-notification' # what ppl will type to install your gem
7
+ RUBYFORGE_PROJECT = nil # 'autotestnotific' # The unix name for your project
8
+ HOMEPATH = "http://github.com/carlosbrando/autotest-notification/"
9
+ DOWNLOAD_PATH = "http://github.com/carlosbrando/autotest-notification/tarball/master"
10
+
11
+ EXTRA_DEPENDENCIES = [
12
+ ['ZenTest', '>= 3.9.2']
13
+ # ['activesupport', '>= 1.3.1']
14
+ ] # An array of rubygem dependencies [name, version]
15
+
16
+ @config_file = "~/.rubyforge/user-config.yml"
17
+ @config = nil
18
+ RUBYFORGE_USERNAME = "carlosbrando"
19
+ def rubyforge_username
20
+ unless @config
21
+ begin
22
+ @config = YAML.load(File.read(File.expand_path(@config_file)))
23
+ rescue
24
+ puts <<-EOS
25
+ ERROR: No rubyforge config file found: #{@config_file}
26
+ Run 'rubyforge setup' to prepare your env for access to Rubyforge
27
+ - See http://newgem.rubyforge.org/rubyforge.html for more details
28
+ EOS
29
+ exit
30
+ end
31
+ end
32
+ RUBYFORGE_USERNAME.replace @config["username"]
33
+ end
34
+
35
+
36
+ REV = nil
37
+ # UNCOMMENT IF REQUIRED:
38
+ # REV = YAML.load(`svn info`)['Revision']
39
+ VERS = AutotestNotification::VERSION::STRING + (REV ? ".#{REV}" : "")
40
+ RDOC_OPTS = ['--quiet', '--title', 'autotest_notification documentation',
41
+ "--opname", "index.html",
42
+ "--line-numbers",
43
+ "--main", "README",
44
+ "--inline-source"]
45
+
46
+ class Hoe
47
+ def extra_deps
48
+ @extra_deps.reject! { |x| Array(x).first == 'hoe' }
49
+ @extra_deps
50
+ end
51
+ end
52
+
53
+ # Generate all the Rake tasks
54
+ # Run 'rake -T' to see list of generated tasks (from gem root directory)
55
+ $hoe = Hoe.new(GEM_NAME, VERS) do |p|
56
+ p.developer(AUTHOR, EMAIL)
57
+ p.description = DESCRIPTION
58
+ p.summary = DESCRIPTION
59
+ p.url = HOMEPATH
60
+ p.rubyforge_name = RUBYFORGE_PROJECT if RUBYFORGE_PROJECT
61
+ p.test_globs = ["test/**/test_*.rb"]
62
+ p.clean_globs |= ['**/.*.sw?', '*.gem', '.config', '**/.DS_Store'] #An array of file patterns to delete on clean.
63
+
64
+ # == Optional
65
+ p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
66
+ p.extra_deps = EXTRA_DEPENDENCIES
67
+
68
+ #p.spec_extras = {} # A hash of extra values to set in the gemspec.
69
+ end
70
+
71
+ CHANGES = $hoe.paragraphs_of('History.txt', 0..1).join("\\n\\n")
72
+ PATH = (RUBYFORGE_PROJECT == GEM_NAME) ? RUBYFORGE_PROJECT : "#{RUBYFORGE_PROJECT}/#{GEM_NAME}"
73
+ $hoe.remote_rdoc_dir = File.join(PATH.gsub(/^#{RUBYFORGE_PROJECT}\/?/,''), 'rdoc')
74
+ $hoe.rsync_args = '-av --delete --ignore-errors'
75
+ $hoe.spec.post_install_message = File.open(File.dirname(__FILE__) + "/../PostInstall.txt").read rescue ""