Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Hard code to change native guard notifier to terminal-notifier-guard

  • Loading branch information...
commit a0fe779d0d34f5cce28e81c7a65a2c3600fd4cfa 1 parent 6222113
Rafael Uchôa authored

Showing 2 changed files with 16 additions and 12 deletions. Show diff stats Hide diff stats

  1. +5 4 guard-bacon.gemspec
  2. +11 8 lib/guard/bacon.rb
9 guard-bacon.gemspec
@@ -4,10 +4,10 @@ require File.expand_path('../lib/guard/bacon/version', __FILE__)
4 4 Gem::Specification.new do |s|
5 5 s.name = "guard-bacon"
6 6 s.version = Guard::BACON_GUARD_VERSION
7   - s.authors = ["Julien Ammous"]
8   - s.email = ["schmurfy@gmail.com"]
  7 + s.authors = ["Rafael Uchôa"]
  8 + s.email = ["rafael@overmediacast.com"]
9 9 s.homepage = ""
10   - s.summary = %q{Guard for bacon}
  10 + s.summary = %q{Guard for bacon with MacOS 10.8 Notification Center}
11 11 s.description = %q{Run your bacon specs on file change}
12 12
13 13 s.rubyforge_project = "guard-bacon"
@@ -17,6 +17,7 @@ Gem::Specification.new do |s|
17 17
18 18 s.add_runtime_dependency "guard", "~> 1.5.1"
19 19 s.add_runtime_dependency "schmurfy-bacon", "~> 1.4.2"
20   -
  20 + s.add_runtime_dependency "terminal-notifier-guard"
  21 +
21 22 s.add_development_dependency 'rake'
22 23 end
19 lib/guard/bacon.rb
@@ -2,6 +2,7 @@
2 2
3 3 require 'bacon'
4 4 require 'guard'
  5 +require 'terminal-notifier-guard'
5 6 require 'guard/guard'
6 7
7 8 require File.expand_path('../bacon/version', __FILE__)
@@ -59,15 +60,17 @@ def run_spec(path)
59 60 failed = counters[:failed].to_i + counters[:errors].to_i
60 61
61 62 if failed > 0
62   - Notifier.notify("Specs: #{failed} Failures (#{all_specs} specs)",
63   - :image => :failed,
64   - :title => File.basename(path)
65   - )
  63 + # Notifier.notify("Specs: #{failed} Failures (#{all_specs} specs)",
  64 + # :image => :failed,
  65 + # :title => File.basename(path)
  66 + # )
  67 + TerminalNotifier::Guard.failed("Specs: #{failed} Failures (#{all_specs} specs)", :title => File.basename(path))
66 68 else
67   - Notifier.notify("Specs: OK (#{all_specs} specs)",
68   - :image => :success,
69   - :title => File.basename(path)
70   - )
  69 + # Notifier.notify("Specs: OK (#{all_specs} specs)",
  70 + # :image => :success,
  71 + # :title => File.basename(path)
  72 + # )
  73 + TerminalNotifier::Guard.success("Specs: OK (#{all_specs} specs)", :title => File.basename(path))
71 74 end
72 75 end
73 76

0 comments on commit a0fe779

Please sign in to comment.
Something went wrong with that request. Please try again.