Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

adding a dependency on meow

  • Loading branch information...
commit 1e589d9bfff7d67a98c881b377610612e1cc9a47 1 parent 63c7234
@tenderlove authored
View
7 README.rdoc
@@ -5,7 +5,6 @@ Discover awesome services near you.
== Installation
sudo gem install dnssd
- sudo gem install ruby-growl
sudo gem install aaronp-dejour --source=http://gems.github.com
== Usage
@@ -14,12 +13,6 @@ Discover awesome services near you.
Then watch the growl notifications fly!
-== Setup Growl
-
-From ruby-growl help:
-
-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.
-
== YOU CAN HAS NOTIFICATIONS
Of new services on the network. dejour looks for pastejour, git, and
View
2  Rakefile
@@ -23,7 +23,7 @@ dejour_gemspec = Gem::Specification.new do |s|
s.executables = %w(dejour)
s.add_dependency "dnssd", ">= 0.6.0"
- s.add_dependency "ruby-growl"
+ s.add_dependency "aaronp-meow"
end
Rake::GemPackageTask.new(dejour_gemspec) do |pkg|
View
13 bin/dejour
@@ -7,16 +7,5 @@ require File.dirname(__FILE__) + '/../lib/dejour'
service_names = Dejour::KNOWN_SERVICES.keys
-password = nil
-if File.exists?(Dejour::USER_CONFIG)
- password = YAML.load_file(Dejour::USER_CONFIG)['password']
-end
-
-GetoptLong.new(
- ['--password', '-p', GetoptLong::REQUIRED_ARGUMENT ]
-).each { |name, arg|
- password = arg if name == '--password'
-}
-
-Dejour.find(password, *(ARGV.length > 0 ? ARGV : service_names))
+Dejour.find(*(ARGV.length > 0 ? ARGV : service_names))
View
5 dejour.gemspec
@@ -1,12 +1,11 @@
Gem::Specification.new do |s|
s.name = %q{dejour}
- s.version = "1.1.1"
+ s.version = "1.2.0"
s.specification_version = 2 if s.respond_to? :specification_version=
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Aaron Patterson"]
- s.autorequire = %q{dejour}
s.date = %q{2008-06-05}
s.default_executable = %q{dejour}
s.description = %q{Find awesome stuff}
@@ -21,5 +20,5 @@ Gem::Specification.new do |s|
s.summary = %q{Find awesome stuff}
s.add_dependency(%q<dnssd>, [">= 0.6.0"])
- s.add_dependency(%q<ruby-growl>, [">= 0"])
+ s.add_dependency(%q<aaronp-meow>, [">= 0"])
@drnic Collaborator
drnic added a note

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

@drnic Collaborator
drnic added a note

fixed it in next commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
end
View
32 lib/dejour.rb
@@ -3,13 +3,11 @@
require 'rubygems'
require "dnssd"
-require 'ruby-growl'
+require 'meow'
Thread.abort_on_exception = true
module Dejour
- USER_CONFIG = ENV['HOME'] + "/.dejour"
-
KNOWN_SERVICES = Hash.new { |h,k|
h[k] = lambda { |reply, rr|
[k, k]
@@ -26,9 +24,8 @@ module Dejour
['gemjour', "gem server #{reply.name}"]
}
- NOTIFICATION_NAME = 'ruby-growl Notification'
- def self.find(password = nil, *names)
- g = Growl.new('localhost', 'ruby-growl', [NOTIFICATION_NAME], nil, password)
+ def self.find(*names)
+ g = Meow.new('dejour')
seen_services = Hash.new { |h,k| h[k] = {} }
mutex = Mutex.new
seen_error_msg = false
@@ -38,28 +35,7 @@ def self.find(password = nil, *names)
mutex.synchronize {
unless seen_services[name].key?(reply.name)
seen_services[name][reply.name] = true
- begin
- g.notify( NOTIFICATION_NAME,
- *KNOWN_SERVICES[name].call(reply, rr)
- )
- rescue
- puts <<-EOS unless seen_error_msg
-You may not have Growl + ruby-growl installed correctly.
-
-Get Growl from:
- http://growl.info/
-
-Get ruby-growl from:
- sudo gem install ruby-growl
-
-Then (for OS X) 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.
-
- EOS
- seen_error_msg = true
- STDERR.puts KNOWN_SERVICES[name].call(reply, rr).join(": ")
- end
+ g.notify(*KNOWN_SERVICES[name].call(reply, rr))
end
}
end
View
2  lib/dejour/version.rb
@@ -1,3 +1,3 @@
module Dejour
- VERSION = "1.1.1".freeze
+ VERSION = "1.2.0".freeze
end
Please sign in to comment.
Something went wrong with that request. Please try again.