autotest-notification 2.3.3 → 2.3.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{autotest-notification}
5
- s.version = "2.3.3"
5
+ s.version = "2.3.4"
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"]
@@ -60,8 +60,8 @@ BANNER
60
60
  "but there are pending specs. Only for Mac.") { |pending| OPTIONS[:pending] = true }
61
61
 
62
62
  opts.on("--sticky",
63
- "Keep notification on screen in case of errros/failures or pending specs.",
64
- "Only for Mac.") { |sticky| OPTIONS[:sticky] = true }
63
+ "Keep notification on screen in case of erros/failures.",
64
+ "Only for Mac and Linux.") { |sticky| OPTIONS[:sticky] = true }
65
65
 
66
66
  opts.on("--success-sound=PATH", String,
67
67
  "Sound to play on success.",
@@ -2,9 +2,9 @@ require "autotest"
2
2
  $:.unshift(File.dirname(__FILE__))
3
3
 
4
4
  module AutotestNotification
5
-
6
- VERSION = '2.3.2'
7
-
5
+
6
+ VERSION = '2.3.4'
7
+
8
8
  class Config
9
9
 
10
10
  class << self
@@ -27,14 +27,15 @@ module AutotestNotification
27
27
  end
28
28
 
29
29
  Autotest.add_hook :ran_command do |at|
30
+ autotest = at #make it work with autotest 4.5.5
30
31
  lines = autotest.results.map { |s| s.gsub(/(\e.*?m|\n)/, '') } # remove escape sequences
31
32
  lines.reject! { |line| !line.match(/\d+\s+(seed|example|test|scenario|step)s?/) } # isolate result numbers
32
-
33
+
33
34
  lines.each do |line|
34
35
  %w{ test assertion error example pending failure }.each { |x| instance_variable_set "@#{x}s", line[/(\d+) #{x}/, 1].to_i }
35
36
  end
36
-
37
- if @tests
37
+
38
+ if @tests && (@tests != 0) #make it work with autotest 4.5.5 and RSpec 2.6.0
38
39
  code = 31 if @failures > 0 || @errors > 0
39
40
  msg = unit_test_message(@tests, @assertions, @failures, @errors)
40
41
  elsif @examples
@@ -102,6 +103,8 @@ module AutotestNotification
102
103
  Cygwin.notify(title, msg, img, total, failures)
103
104
  when /mswin/
104
105
  Windows.notify(title, msg, img)
106
+ when /mingw/
107
+ Windows.notify(title, msg, img)
105
108
  end
106
109
  end
107
110
 
@@ -31,8 +31,8 @@ module AutotestNotification
31
31
  end
32
32
 
33
33
  def notify_send(title, msg, img, priority = 0)
34
- urgency = priority > 1 ? 'critical' : priority < 0 ? 'low' : 'normal'
35
- system "notify-send -t #{Config.expiration_in_seconds * 1000} -i #{img} -u #{urgency} '#{title}' '#{msg}'"
34
+ urgency = priority < 0 ? 'low' : Config.expiration_in_seconds > 0 ? 'normal' : 'critical'
35
+ system "notify-send -h int:transient:1 -t #{Config.expiration_in_seconds * 1000} -i #{img} -u #{urgency} '#{title}' '#{msg}'"
36
36
  end
37
37
 
38
38
  def kdialog(title, msg, img)
@@ -1,4 +1,4 @@
1
- require 'snarl' if RUBY_PLATFORM =~ /mswin/
1
+ require 'snarl' if RUBY_PLATFORM =~ /mswin/ or RUBY_PLATFORM =~ /mingw/
2
2
 
3
3
  module AutotestNotification
4
4
  class Windows
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autotest-notification
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.3
4
+ version: 2.3.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,12 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-07-18 00:00:00.000000000 -03:00
13
- default_executable:
12
+ date: 2011-07-18 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: autotest-standalone
17
- requirement: &2161144580 !ruby/object:Gem::Requirement
16
+ requirement: &70277694584580 !ruby/object:Gem::Requirement
18
17
  none: false
19
18
  requirements:
20
19
  - - ~>
@@ -22,7 +21,7 @@ dependencies:
22
21
  version: '4.5'
23
22
  type: :runtime
24
23
  prerelease: false
25
- version_requirements: *2161144580
24
+ version_requirements: *70277694584580
26
25
  description: This gem set the autotest (ZenTest) to send messages to software as Growl,
27
26
  LibNotify, and Snarl, displaying a window with the results.
28
27
  email:
@@ -95,7 +94,6 @@ files:
95
94
  - website/javascripts/rounded_corners_lite.inc.js
96
95
  - website/stylesheets/screen.css
97
96
  - website/template.html.erb
98
- has_rdoc: true
99
97
  homepage: http://github.com/carlosbrando/autotest-notification/
100
98
  licenses: []
101
99
  post_install_message: PostInstall.txt
@@ -118,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
116
  version: '0'
119
117
  requirements: []
120
118
  rubyforge_project: autotest-notification
121
- rubygems_version: 1.6.2
119
+ rubygems_version: 1.8.15
122
120
  signing_key:
123
121
  specification_version: 3
124
122
  summary: This gem set the autotest (ZenTest) to send messages to software as Growl,