carlosbrando-autotest-notification 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,4 +1,8 @@
1
- == 0.2.1 2008-05-13
1
+ == 0.2.2 2008-05-13
2
+ * Validating presence of KDialog; Fixing some identations.
3
+ * Adding some tests.
4
+
5
+ * 0.2.1 2008-05-13
2
6
  * Starting to add tests.
3
7
 
4
8
  * 0.2.0 2008-05-13
data/README.txt CHANGED
@@ -1,4 +1,4 @@
1
- = The Autotest Notification Gem
1
+ = THE AUTOTEST NOTIFICATION GEM
2
2
 
3
3
  * http://github.com/carlosbrando/autotest-notification/
4
4
 
@@ -78,7 +78,7 @@ To turn off the notifier:
78
78
  $ an-uninstall
79
79
 
80
80
 
81
- == Contributors
81
+ == CONTRIBUTORS:
82
82
 
83
83
  * carlosbrando [http://www.nomedojogo.com]
84
84
  * simpsomboy [http://alexandredasilva.wordpress.com]
@@ -111,4 +111,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
111
111
  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
112
112
  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
113
113
  TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
114
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
114
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,12 +1,12 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{autotest-notification}
3
- s.version = "0.2.1"
3
+ s.version = "0.2.2"
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
8
  s.authors = ["Carlos Brando", "Rodrigo Urubatan", "Alexandre da Silva", "Carlos J\303\272nior", "Davis Zanetti Cabral", "Marcos Tapaj\303\263s"]
9
- s.date = %q{2008-05-13}
9
+ s.date = %q{2008-05-14}
10
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
11
  s.email = ["eduardobrando@gmail.com"]
12
12
  s.executables = ["an-install", "an-uninstall"]
@@ -26,8 +26,10 @@ To turn off:
26
26
  }
27
27
  s.rdoc_options = ["--main", "README.txt"]
28
28
  s.require_paths = ["lib"]
29
- s.rubyforge_project = %q{}
29
+ s.rubyforge_project = %q{autotest-notification}
30
30
  s.rubygems_version = %q{1.1.1}
31
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
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"])
33
35
  end
data/config/hoe.rb CHANGED
@@ -4,10 +4,12 @@ AUTHOR = "Carlos Brando, Rodrigo Urubatan, Alexandre da Silva, Carlos Júnior, D
4
4
  EMAIL = "eduardobrando@gmail.com"
5
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
6
  GEM_NAME = 'autotest-notification' # what ppl will type to install your gem
7
- RUBYFORGE_PROJECT = '' # The unix name for your project
7
+ RUBYFORGE_PROJECT = nil # 'autotestnotific' # The unix name for your project
8
8
  HOMEPATH = "http://github.com/carlosbrando/autotest-notification/"
9
9
  DOWNLOAD_PATH = "http://github.com/carlosbrando/autotest-notification/tarball/master"
10
+
10
11
  EXTRA_DEPENDENCIES = [
12
+ ['ZenTest', '>= 3.9.2']
11
13
  # ['activesupport', '>= 1.3.1']
12
14
  ] # An array of rubygem dependencies [name, version]
13
15
 
@@ -61,7 +63,7 @@ $hoe = Hoe.new(GEM_NAME, VERS) do |p|
61
63
 
62
64
  # == Optional
63
65
  p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
64
- #p.extra_deps = EXTRA_DEPENDENCIES
66
+ p.extra_deps = EXTRA_DEPENDENCIES
65
67
 
66
68
  #p.spec_extras = {} # A hash of extra values to set in the gemspec.
67
69
  end
@@ -4,11 +4,12 @@ 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)
9
- else
7
+ elsif has_zenity?
8
+ zenity(title, msg, img)
9
+ elsif has_kdialog?
10
10
  kdialog(title, msg, img)
11
11
  end
12
+ true # true, cause we did everything we could
12
13
  end
13
14
 
14
15
  protected
@@ -20,9 +21,9 @@ module AutotestNotification
20
21
  system "kdialog --title '#{title}' --passivepopup '#{msg}' #{EXPIRATION_IN_SECONDS}"
21
22
  end
22
23
 
23
- def zenity(title, msg, img)
24
- system "zenity --info --text='#{msg}' --title='#{title}'"
25
- end
24
+ def zenity(title, msg, img)
25
+ system "zenity --info --text='#{msg}' --title='#{title}'"
26
+ end
26
27
 
27
28
  def has_zenity?
28
29
  system "which zenity 2> /dev/null"
@@ -31,6 +32,10 @@ module AutotestNotification
31
32
  def has_notify?
32
33
  system "which notify-send 2> /dev/null"
33
34
  end
35
+
36
+ def has_kdialog?
37
+ system "which kdialog 2> /dev/null"
38
+ end
34
39
  end
35
40
  end
36
41
  end
@@ -2,7 +2,7 @@ module AutotestNotification #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 2
5
- TINY = 1
5
+ TINY = 2
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -20,6 +20,7 @@ class TestLinux < Test::Unit::TestCase
20
20
  def test_notify_when_use_kdialog
21
21
  AutotestNotification::Linux.expects(:has_notify?).returns(false)
22
22
  AutotestNotification::Linux.expects(:has_zenity?).returns(false)
23
+ AutotestNotification::Linux.expects(:has_kdialog?).returns(true)
23
24
  verify_notify(:kdialog)
24
25
  end
25
26
 
@@ -47,6 +48,11 @@ class TestLinux < Test::Unit::TestCase
47
48
  AutotestNotification::Linux.expects(:system).with('which notify-send 2> /dev/null')
48
49
  AutotestNotification::Linux.has_notify?
49
50
  end
51
+
52
+ def test_has_kdialog?
53
+ AutotestNotification::Linux.expects(:system).with('which kdialog 2> /dev/null')
54
+ AutotestNotification::Linux.has_kdialog?
55
+ end
50
56
 
51
57
  private
52
58
 
@@ -4,9 +4,9 @@ class TestAutotestNotification < Test::Unit::TestCase
4
4
 
5
5
  def setup
6
6
  @title = "title"
7
- @msg = "message"
7
+ @msg = "message"
8
8
  @image = "image"
9
- @pri = 1
9
+ @pri = 1
10
10
  end
11
11
 
12
12
  def test_notify_when_os_is_cygwin
data/test/test_helper.rb CHANGED
@@ -23,6 +23,3 @@ class Test::Unit::TestCase
23
23
  end
24
24
  end
25
25
  end
26
-
27
-
28
-
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.2.1</a>
36
+ <a href="http://rubyforge.org/projects/autotest_notification" class="numbers">0.2.2</a>
37
37
  </div>
38
38
  <h1>&#x2192; &#8216;autotest_notification&#8217;</h1>
39
39
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carlosbrando-autotest-notification
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carlos Brando
@@ -14,10 +14,18 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2008-05-13 00:00:00 -07:00
17
+ date: 2008-05-14 00:00:00 -07:00
18
18
  default_executable:
19
- dependencies: []
20
-
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: ZenTest
22
+ version_requirement:
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ version: 3.9.2
28
+ version:
21
29
  description: This gem set the autotest (ZenTest) to send messages to software as Growl, LibNotify, and Snarl, displaying a window with the results.
22
30
  email:
23
31
  - eduardobrando@gmail.com
@@ -103,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
111
  version:
104
112
  requirements: []
105
113
 
106
- rubyforge_project: ""
114
+ rubyforge_project: autotest-notification
107
115
  rubygems_version: 1.0.1
108
116
  signing_key:
109
117
  specification_version: 2