Permalink
Browse files

change application name for growl

  • Loading branch information...
jugyo committed Dec 15, 2009
1 parent db7bf4f commit 968ec4c2294de7a9949dc4db50bec6f3ab8d0060
Showing with 6 additions and 6 deletions.
  1. +3 −3 lib/g.rb
  2. +3 −3 spec/g_spec.rb
View
@@ -8,18 +8,18 @@
module Kernel
def g(*args, &block)
- growl = Growl.new $g_host, $0, ["Kernel.g"]
+ growl = Growl.new $g_host, 'g', [$0]
args.push(block) if block
messages =
if args.empty?
- [nil.pretty_inspect]
+ ['g!']
else
args.map { |i| i.pretty_inspect }
end
- messages.each { |i| growl.notify "Kernel.g", $0, i, $g_priority, $g_sticky }
+ messages.each { |i| growl.notify $0, 'g', i, $g_priority, $g_sticky }
if args.empty?
nil
View
@@ -8,13 +8,13 @@
end
it 'calls with a arg' do
- @g.should_receive(:notify).with("Kernel.g", $0, 'foo'.pretty_inspect, 0, true)
+ @g.should_receive(:notify).with($0, "g", 'foo'.pretty_inspect, 0, true)
g('foo').should == 'foo'
end
it 'calls with block' do
block = Proc.new {}
- @g.should_receive(:notify).with("Kernel.g", $0, block.pretty_inspect, 0, true)
+ @g.should_receive(:notify).with($0, "g", block.pretty_inspect, 0, true)
g(&block).should == block
end
@@ -25,7 +25,7 @@
end
it 'calls without args' do
- @g.should_receive(:notify).with("Kernel.g", $0, nil.pretty_inspect, 0, true)
+ @g.should_receive(:notify).with($0, "g", "g!", 0, true)
g.should == nil
end
end

0 comments on commit 968ec4c

Please sign in to comment.