carlosbrando-autotest-notification 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,4 +1,9 @@
1
- == 0.1.0 2008-05-13
1
+ == 0.2.0 2008-05-13
2
+ * Added support to Gnome at linux.rb (zenity).
3
+ * Changed filename windows.rb to cygwin.rb and added a new windows.rb file that uses Snarl to show the messages.
4
+ * README.txt updated with windows and linux dependencies.
5
+
6
+ * 0.1.0 2008-05-13
2
7
  * Separated each operating system into a different file to facilitate maintenance. It's necessary to conduct more tests in each scene.
3
8
 
4
9
  * 0.0.9:
data/Manifest.txt CHANGED
@@ -11,6 +11,7 @@ lib/autotest_notification/version.rb
11
11
  lib/autotest_notification/linux.rb
12
12
  lib/autotest_notification/mac.rb
13
13
  lib/autotest_notification/windows.rb
14
+ lib/autotest_notification/cygwin.rb
14
15
  script/console
15
16
  script/destroy
16
17
  script/generate
data/README.txt CHANGED
@@ -2,33 +2,81 @@
2
2
 
3
3
  * http://github.com/carlosbrando/autotest-notification/
4
4
 
5
+
5
6
  == DESCRIPTION:
6
7
 
7
8
  This gem set the autotest (ZenTest) to send messages to software as Growl, LibNotify, and Snarl, displaying a window with the results.
8
9
 
10
+
9
11
  == REQUIREMENTS:
10
12
 
13
+ Independent of operating system you are using, you must install the ZenTest:
14
+
15
+ $ gem install ZenTest
16
+
17
+
11
18
  * If you're using a Mac:
12
- You need to have Growl and growlnotify installed on your machine.
13
-
14
- Download the Growl [http://growl.info/index.php] and install it like any other application on your Mac
15
-
16
- Then you must install the growlnotify.
17
-
18
- In your shell, cd to the directory on the Growl disk image containing growlnotify, and type ./install.sh.
19
- That script will install growlnotify to /usr/local/bin and the manpage to /usr/local/man.
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
+
29
+ * If you're using Windows (with cygwin):
30
+ You need to have Snarl and sncmd installed on your machine.
31
+
32
+ Download Snarl [http://www.fullphat.net/] and install it like any other application on your machine.
33
+
34
+ Then download sncmd [http://www.k23productions.com/download.php?view.105] open the zip file and place
35
+ the executable from the zip in any directory in windows PATH (for example c:\windows).
36
+
37
+
38
+ * If you're using Windows (without cygwin):
39
+ You need to have Snarl, diffutils and ruby-snarl installed on your machine.
40
+
41
+ Download Snarl [http://www.fullphat.net/] and install it like any other application on your machine.
42
+
43
+ Download DiffUtils for Windows [http://gnuwin32.sourceforge.net/packages/diffutils.htm] and follow the installation instructions on the site.
44
+
45
+ Run in the command prompt:
46
+
47
+ $ gem install ruby-snarl
48
+
49
+ After all that. You must update the environment variable PATH with the path to the bin of diffutils.
50
+ It's the price that was paid for using Windows (try cygwin).
51
+
52
+
53
+ * If you're using Linux:
54
+ You need to have libnotify binaries installed.
55
+
56
+ For ubuntu this means: sudo apt-get install libnotify-bin
57
+
58
+ Other distributions may package it with other names, do a search for libnotify using your distribution package manager.
59
+
60
+ If you use KDE and do not have libnotify-bin installed, it will try to use kdialog wich is part of KDE.
61
+ It also works if you have zenity installed.
62
+
20
63
 
21
64
  == INSTALL:
22
65
 
23
- $ sudo gem install carlosbrando-autotest-notification --source=http://gems.github.com
24
-
66
+ $ sudo gem install carlosbrando-autotest-notification --source=http://gems.github.com
67
+
25
68
  Run it to let the notifier in automatic mode:
26
69
 
27
- $ an-install
70
+ $ an-install
71
+
72
+ In Windows without cygwin, it's necessary to install in the directory of the project:
73
+
74
+ $ an-install -p C:\projects\my_project
28
75
 
29
76
  To turn off the notifier:
30
-
31
- $ an-uninstall
77
+
78
+ $ an-uninstall
79
+
32
80
 
33
81
  == Contributors
34
82
 
@@ -36,6 +84,8 @@ To turn off the notifier:
36
84
  * simpsomboy [http://alexandredasilva.wordpress.com/]
37
85
  * urubatan [http://www.urubatan.info/]
38
86
  * chjunior [http://tas.milk-it.net/]
87
+ * daviscabral [http://blog.impactmedia.com.br/]
88
+
39
89
 
40
90
  == LICENSE:
41
91
 
@@ -1,17 +1,17 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{autotest-notification}
3
- s.version = "0.1.0"
3
+ s.version = "0.2.0"
4
4
 
5
5
  s.specification_version = 2 if s.respond_to? :specification_version=
6
6
 
7
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"]
8
+ s.authors = ["Carlos Brando", "Rodrigo Urubatan", "Alexandre da Silva", "Carlos J\303\272nior", "Davis Zanetti Cabral"]
9
9
  s.date = %q{2008-05-13}
10
10
  s.description = %q{Set the autotest to display messages on the operating system using software such as Growl and LibNotify.}
11
11
  s.email = ["eduardobrando@gmail.com"]
12
12
  s.executables = ["an-install", "an-uninstall"]
13
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/mac.rb", "lib/autotest_notification/windows.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", "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", "images/pass.png", "images/fail.png", "autotest-notification.gemspec"]
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/mac.rb", "lib/autotest_notification/windows.rb", "lib/autotest_notification/cygwin.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", "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", "images/pass.png", "images/fail.png", "autotest-notification.gemspec"]
15
15
  s.has_rdoc = true
16
16
  s.homepage = %q{http://github.com/carlosbrando/autotest-notification/}
17
17
  s.post_install_message = %q{
data/config/hoe.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require 'autotest_notification/version'
2
2
 
3
- AUTHOR = "Carlos Brando, Rodrigo Urubatan, Alexandre da Silva, Carlos Júnior"
3
+ AUTHOR = "Carlos Brando, Rodrigo Urubatan, Alexandre da Silva, Carlos Júnior, Davis Zanetti Cabral"
4
4
  EMAIL = "eduardobrando@gmail.com"
5
5
  DESCRIPTION = "Set the autotest to display messages on the operating system using software such as Growl and LibNotify."
6
6
  GEM_NAME = 'autotest-notification' # what ppl will type to install your gem
@@ -0,0 +1,12 @@
1
+ module AutotestNotification
2
+ class Cygwin
3
+ class << self
4
+ def notify(title, msg, img)
5
+ img = `cygpath -m #{img}` if RUBY_PLATFORM =~ /cygwin/
6
+ img.strip!
7
+
8
+ system "sncmd /m '#{title}' '#{msg}' '#{img}' /t #{EXPIRATION_IN_SECONDS}"
9
+ end
10
+ end
11
+ end
12
+ end
@@ -4,6 +4,8 @@ module AutotestNotification
4
4
  def notify(title, msg, img)
5
5
  if has_notify?
6
6
  notify_send(title, msg, img)
7
+ elsif has_zenity?
8
+ zenity(title, msg, img)
7
9
  else
8
10
  kdialog(title, msg, img)
9
11
  end
@@ -18,6 +20,14 @@ module AutotestNotification
18
20
  system "kdialog --title '#{title}' --passivepopup '#{msg}' #{EXPIRATION_IN_SECONDS}"
19
21
  end
20
22
 
23
+ def zenity(title, msg, img)
24
+ system "zenity --info --text='#{msg}' --title='#{title}'"
25
+ end
26
+
27
+ def has_zenity?
28
+ system "which zenity 2> /dev/null"
29
+ end
30
+
21
31
  def has_notify?
22
32
  system "which notify-send 2> /dev/null"
23
33
  end
@@ -1,7 +1,7 @@
1
1
  module AutotestNotification #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
- MINOR = 1
4
+ MINOR = 2
5
5
  TINY = 0
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
@@ -1,11 +1,10 @@
1
+ require 'snarl' if RUBY_PLATFORM =~ /mswin/
2
+
1
3
  module AutotestNotification
2
4
  class Windows
3
5
  class << self
4
6
  def notify(title, msg, img)
5
- img = `cygpath -m #{img}` if RUBY_PLATFORM =~ /cygwin/
6
- img.strip!
7
-
8
- system "sncmd /m '#{title}' '#{msg}' '#{img}' /t #{EXPIRATION_IN_SECONDS}"
7
+ Snarl.show_message(title, msg, img)
9
8
  end
10
9
  end
11
10
  end
@@ -2,6 +2,7 @@ $:.unshift(File.dirname(__FILE__))
2
2
  require 'autotest_notification/linux'
3
3
  require 'autotest_notification/mac'
4
4
  require 'autotest_notification/windows'
5
+ require 'autotest_notification/cygwin'
5
6
 
6
7
  module AutotestNotification
7
8
  FAIL = -1
@@ -58,7 +59,9 @@ module AutotestNotification
58
59
  Linux.notify(title, msg, img)
59
60
  when /darwin/
60
61
  Mac.notify(title, msg, img, pri)
61
- when /mswin|cygwin/
62
+ when /cygwin/
63
+ Cygwin.notify(title, msg, img)
64
+ when /mswin/
62
65
  Windows.notify(title, msg, img)
63
66
  end
64
67
  end
data/website/index.html CHANGED
@@ -33,7 +33,7 @@
33
33
  <h1>autotest_notification</h1>
34
34
  <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/autotest_notification"; return false'>
35
35
  <p>Get Version</p>
36
- <a href="http://rubyforge.org/projects/autotest_notification" class="numbers">0.1.0</a>
36
+ <a href="http://rubyforge.org/projects/autotest_notification" class="numbers">0.2.0</a>
37
37
  </div>
38
38
  <h1>&#x2192; &#8216;autotest_notification&#8217;</h1>
39
39
 
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carlosbrando-autotest-notification
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carlos Brando
8
8
  - Rodrigo Urubatan
9
9
  - Alexandre da Silva
10
10
  - "Carlos J\xC3\xBAnior"
11
+ - Davis Zanetti Cabral
11
12
  autorequire:
12
13
  bindir: bin
13
14
  cert_chain: []
@@ -45,6 +46,7 @@ files:
45
46
  - lib/autotest_notification/linux.rb
46
47
  - lib/autotest_notification/mac.rb
47
48
  - lib/autotest_notification/windows.rb
49
+ - lib/autotest_notification/cygwin.rb
48
50
  - script/console
49
51
  - script/destroy
50
52
  - script/generate