Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

adding a dependency on meow

  • Loading branch information...
commit 1e589d9bfff7d67a98c881b377610612e1cc9a47 1 parent 63c7234
Aaron Patterson authored June 05, 2008
7  README.rdoc
Source Rendered
@@ -5,7 +5,6 @@ Discover awesome services near you.
5 5
 == Installation
6 6
 
7 7
   sudo gem install dnssd
8  
-  sudo gem install ruby-growl
9 8
   sudo gem install aaronp-dejour --source=http://gems.github.com
10 9
   
11 10
 == Usage
@@ -14,12 +13,6 @@ Discover awesome services near you.
14 13
 
15 14
 Then watch the growl notifications fly!
16 15
 
17  
-== Setup Growl
18  
-
19  
-From ruby-growl help:
20  
-	
21  
-First you need to enable "Listen for incoming notifications" and "Allow remote application registration" on the Network tab of the Growl Preference Panel to send Growl Notifications from ruby-growl.
22  
-
23 16
 == YOU CAN HAS NOTIFICATIONS
24 17
 
25 18
 Of new services on the network.  dejour looks for pastejour, git, and
2  Rakefile
@@ -23,7 +23,7 @@ dejour_gemspec = Gem::Specification.new do |s|
23 23
   s.executables      = %w(dejour)
24 24
   
25 25
   s.add_dependency "dnssd", ">= 0.6.0"
26  
-  s.add_dependency "ruby-growl"
  26
+  s.add_dependency "aaronp-meow"
27 27
 end
28 28
 
29 29
 Rake::GemPackageTask.new(dejour_gemspec) do |pkg|
13  bin/dejour
@@ -7,16 +7,5 @@ require File.dirname(__FILE__) + '/../lib/dejour'
7 7
 
8 8
 
9 9
 service_names = Dejour::KNOWN_SERVICES.keys
10  
-password = nil
11 10
 
12  
-if File.exists?(Dejour::USER_CONFIG)
13  
-  password = YAML.load_file(Dejour::USER_CONFIG)['password']
14  
-end
15  
-
16  
-GetoptLong.new(
17  
-  ['--password', '-p', GetoptLong::REQUIRED_ARGUMENT ]
18  
-).each { |name, arg|
19  
-  password = arg if name == '--password'
20  
-}
21  
-
22  
-Dejour.find(password, *(ARGV.length > 0 ? ARGV : service_names))
  11
+Dejour.find(*(ARGV.length > 0 ? ARGV : service_names))
5  dejour.gemspec
... ...
@@ -1,12 +1,11 @@
1 1
 Gem::Specification.new do |s|
2 2
   s.name = %q{dejour}
3  
-  s.version = "1.1.1"
  3
+  s.version = "1.2.0"
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 = ["Aaron Patterson"]
9  
-  s.autorequire = %q{dejour}
10 9
   s.date = %q{2008-06-05}
11 10
   s.default_executable = %q{dejour}
12 11
   s.description = %q{Find awesome stuff}
@@ -21,5 +20,5 @@ Gem::Specification.new do |s|
21 20
   s.summary = %q{Find awesome stuff}
22 21
 
23 22
   s.add_dependency(%q<dnssd>, [">= 0.6.0"])
24  
-  s.add_dependency(%q<ruby-growl>, [">= 0"])
  23
+  s.add_dependency(%q<aaronp-meow>, [">= 0"])
25 24
 end
32  lib/dejour.rb
@@ -3,13 +3,11 @@
3 3
 
4 4
 require 'rubygems'
5 5
 require "dnssd"
6  
-require 'ruby-growl'
  6
+require 'meow'
7 7
 
8 8
 Thread.abort_on_exception = true
9 9
 
10 10
 module Dejour
11  
-  USER_CONFIG = ENV['HOME'] + "/.dejour"
12  
-
13 11
   KNOWN_SERVICES = Hash.new { |h,k|
14 12
     h[k] = lambda { |reply, rr|
15 13
       [k, k]
@@ -26,9 +24,8 @@ module Dejour
26 24
     ['gemjour', "gem server #{reply.name}"]
27 25
   }
28 26
 
29  
-  NOTIFICATION_NAME = 'ruby-growl Notification'
30  
-  def self.find(password = nil, *names)
31  
-    g = Growl.new('localhost', 'ruby-growl', [NOTIFICATION_NAME], nil, password)
  27
+  def self.find(*names)
  28
+    g = Meow.new('dejour')
32 29
     seen_services = Hash.new { |h,k| h[k] = {} }
33 30
     mutex = Mutex.new
34 31
     seen_error_msg = false
@@ -38,28 +35,7 @@ def self.find(password = nil, *names)
38 35
           mutex.synchronize {
39 36
             unless seen_services[name].key?(reply.name)
40 37
               seen_services[name][reply.name] = true
41  
-              begin
42  
-                g.notify( NOTIFICATION_NAME,
43  
-                         *KNOWN_SERVICES[name].call(reply, rr)
44  
-                        )
45  
-              rescue
46  
-                puts <<-EOS unless seen_error_msg
47  
-You may not have Growl + ruby-growl installed correctly.
48  
-
49  
-Get Growl from:
50  
-  http://growl.info/
51  
-  
52  
-Get ruby-growl from:
53  
-  sudo gem install ruby-growl
54  
-
55  
-Then (for OS X) you need to enable "Listen for incoming notifications" and 
56  
-"Allow remote application registration" on the Network tab of the 
57  
-Growl Preference Panel to send Growl Notifications from ruby-growl.
58  
-
59  
-                EOS
60  
-                seen_error_msg = true
61  
-                STDERR.puts KNOWN_SERVICES[name].call(reply, rr).join(": ")
62  
-              end
  38
+              g.notify(*KNOWN_SERVICES[name].call(reply, rr))
63 39
             end
64 40
           }
65 41
         end
2  lib/dejour/version.rb
... ...
@@ -1,3 +1,3 @@
1 1
 module Dejour
2  
-  VERSION = "1.1.1".freeze
  2
+  VERSION = "1.2.0".freeze
3 3
 end

0 notes on commit 1e589d9

Dr Nic Williams
Collaborator

Hmm, the gem is available on rubyforge as ‘meow’ so this can probably be changed to that

Dr Nic Williams
Collaborator

fixed it in next commit

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