rspec-notify-osd 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
Binary file
data/lib/notify_osd.rb CHANGED
@@ -14,6 +14,7 @@ class NotifyOsd < RSpec::Core::Formatters::BaseTextFormatter
14
14
  "\u2705 #{name}: Success"
15
15
  end
16
16
 
17
+ @failure_count = failure_count
17
18
  say title, body.join("\n")
18
19
  end
19
20
 
@@ -24,6 +25,8 @@ class NotifyOsd < RSpec::Core::Formatters::BaseTextFormatter
24
25
  private
25
26
 
26
27
  def say(title, body)
27
- `notify-send "#{body}"`
28
+ icon = @failure_count > 0 ? "failure.png" : "success.png"
29
+ icon_path = File.join(File.dirname(__FILE__), "..", "images", icon)
30
+ `notify-send -i #{icon_path} "#{body}"`
28
31
  end
29
32
  end
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |gem|
6
6
  gem.name = "rspec-notify-osd"
7
- gem.version = "0.1.0"
7
+ gem.version = "0.2.0"
8
8
  gem.authors = ["Roger Campos"]
9
9
  gem.email = ["roger@itnig.net"]
10
10
  gem.description = %q{rspec notifications for notify-osd}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-notify-osd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-12 00:00:00.000000000 Z
12
+ date: 2012-11-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -39,6 +39,8 @@ files:
39
39
  - LICENSE.txt
40
40
  - README.md
41
41
  - Rakefile
42
+ - images/failure.png
43
+ - images/success.png
42
44
  - lib/notify_osd.rb
43
45
  - rspec-notify-osd.gemspec
44
46
  homepage: https://github.com/rogercampos/rspec-notify-osd