ruby_gntp 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ruby_gntp.rb +2 -2
- data/test/ruby_gntp_spec.rb +8 -0
- metadata +3 -3
data/lib/ruby_gntp.rb
CHANGED
@@ -41,7 +41,7 @@ class GNTP
|
|
41
41
|
attr_reader :message if $DEBUG
|
42
42
|
|
43
43
|
RUBY_GNTP_NAME = 'ruby_gntp'
|
44
|
-
RUBY_GNTP_VERSION = '0.
|
44
|
+
RUBY_GNTP_VERSION = '0.2.1'
|
45
45
|
|
46
46
|
def initialize(app_name = 'Ruby/GNTP', host = 'localhost', password = '', port = 23053)
|
47
47
|
@app_name = app_name
|
@@ -269,7 +269,7 @@ end
|
|
269
269
|
# self test code
|
270
270
|
if __FILE__ == $0
|
271
271
|
host = ARGV[0] || 'loaclhost'
|
272
|
-
passwd =
|
272
|
+
passwd = ARGV[1] || ''
|
273
273
|
|
274
274
|
#--- Use standard notification method ('register' first then 'notify')
|
275
275
|
growl = GNTP.new("Ruby/GNTP self test", host, passwd)
|
data/test/ruby_gntp_spec.rb
CHANGED
@@ -71,4 +71,12 @@ describe GNTP do
|
|
71
71
|
}
|
72
72
|
end
|
73
73
|
|
74
|
+
it "should callback when notify clicked" do
|
75
|
+
@gntp = GNTP.new
|
76
|
+
@gntp.register :notifications => [{:name => NOTIFICATION_NAME}]
|
77
|
+
@gntp.notify(:name => NOTIFICATION_NAME) do |context|
|
78
|
+
context.should_not_nil
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
74
82
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_gntp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- snaka
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2009-11-
|
13
|
+
date: 2009-11-06 00:00:00 +09:00
|
14
14
|
default_executable:
|
15
15
|
dependencies: []
|
16
16
|
|
@@ -57,7 +57,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
57
57
|
requirements: []
|
58
58
|
|
59
59
|
rubyforge_project:
|
60
|
-
rubygems_version: 1.3.
|
60
|
+
rubygems_version: 1.3.5
|
61
61
|
signing_key:
|
62
62
|
specification_version: 3
|
63
63
|
summary: Ruby library for GNTP(Growl Notification Transport Protocol) client
|