ruby-growl 3.0 → 4.0
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/.autotest +16 -0
- data/.gemtest +0 -0
- data/History.txt +15 -0
- data/Manifest.txt +7 -1
- data/README.txt +15 -11
- data/Rakefile +4 -1
- data/bin/growl +1 -1
- data/lib/ruby-growl.rb +136 -262
- data/lib/ruby-growl/gntp.rb +553 -0
- data/lib/ruby-growl/ruby_logo.rb +3769 -0
- data/lib/ruby-growl/udp.rb +266 -0
- data/lib/uri/x_growl_resource.rb +76 -0
- data/test/test_growl_gntp.rb +1238 -0
- data/test/{test_ruby_growl.rb → test_growl_udp.rb} +30 -21
- metadata +86 -55
- metadata.gz.sig +0 -0
@@ -1,16 +1,15 @@
|
|
1
|
-
require 'rubygems'
|
2
1
|
require 'minitest/autorun'
|
3
2
|
require 'ruby-growl'
|
4
3
|
|
5
|
-
class
|
4
|
+
class TestGrowlUDP < MiniTest::Unit::TestCase
|
6
5
|
|
7
6
|
def setup
|
8
|
-
@growl = Growl.new "localhost", "ruby-growl test",
|
9
|
-
|
7
|
+
@growl = Growl::UDP.new "localhost", "ruby-growl test",
|
8
|
+
["ruby-growl Test Notification"]
|
10
9
|
end
|
11
10
|
|
12
11
|
def test_notify_priority
|
13
|
-
assert_raises
|
12
|
+
assert_raises Growl::Error do
|
14
13
|
@growl.notify "ruby-growl Test Notification", "", "", -3
|
15
14
|
end
|
16
15
|
|
@@ -23,24 +22,34 @@ class TestGrowl < MiniTest::Unit::TestCase
|
|
23
22
|
assert_raises RuntimeError do
|
24
23
|
@growl.notify "ruby-growl Test Notification", "", "", 3
|
25
24
|
end
|
25
|
+
|
26
|
+
rescue SystemCallError => e
|
27
|
+
skip "#{e.class}: #{e.message}"
|
26
28
|
end
|
27
29
|
|
28
30
|
def test_notify_notify_type
|
29
|
-
assert_raises
|
31
|
+
assert_raises Growl::Error do
|
30
32
|
@growl.notify "bad notify type", "", ""
|
31
33
|
end
|
32
34
|
|
33
|
-
@growl.notify "ruby-growl Test Notification", "Empty",
|
35
|
+
@growl.notify "ruby-growl Test Notification", "Empty",
|
36
|
+
"This notification is empty."
|
37
|
+
|
38
|
+
rescue SystemCallError => e
|
39
|
+
skip "#{e.class}: #{e.message}"
|
34
40
|
end
|
35
41
|
|
36
42
|
def test_notify_sticky
|
37
43
|
@growl.notify "ruby-growl Test Notification", "Sticky",
|
38
44
|
"This notification should be sticky.", 0, true
|
45
|
+
|
46
|
+
rescue SystemCallError => e
|
47
|
+
skip "#{e.class}: #{e.message}"
|
39
48
|
end
|
40
49
|
|
41
50
|
def test_registration_packet
|
42
|
-
@growl = Growl.new "localhost", "growlnotify",
|
43
|
-
|
51
|
+
@growl = Growl::UDP.new "localhost", "growlnotify",
|
52
|
+
["Command-Line Growl Notification"]
|
44
53
|
|
45
54
|
expected = [
|
46
55
|
"01", "00", "00", "0b", "01", "01", "67", "72", # ......gr
|
@@ -60,8 +69,8 @@ class TestGrowl < MiniTest::Unit::TestCase
|
|
60
69
|
end
|
61
70
|
|
62
71
|
def test_notification_packet
|
63
|
-
@growl = Growl.new "localhost", "growlnotify",
|
64
|
-
|
72
|
+
@growl = Growl::UDP.new "localhost", "growlnotify",
|
73
|
+
["Command-Line Growl Notification"]
|
65
74
|
|
66
75
|
expected = [
|
67
76
|
"01", "01", "00", "00", "00", "1f", "00", "00", # ........
|
@@ -82,8 +91,8 @@ class TestGrowl < MiniTest::Unit::TestCase
|
|
82
91
|
end
|
83
92
|
|
84
93
|
def test_notification_packet_priority_negative_2
|
85
|
-
@growl = Growl.new "localhost", "growlnotify",
|
86
|
-
|
94
|
+
@growl = Growl::UDP.new "localhost", "growlnotify",
|
95
|
+
["Command-Line Growl Notification"]
|
87
96
|
|
88
97
|
expected = [
|
89
98
|
"01", "01", "0c", "00", "00", "1f", "00", "00", # ........
|
@@ -104,8 +113,8 @@ class TestGrowl < MiniTest::Unit::TestCase
|
|
104
113
|
end
|
105
114
|
|
106
115
|
def test_notification_packet_priority_negative_1
|
107
|
-
@growl = Growl.new "localhost", "growlnotify",
|
108
|
-
|
116
|
+
@growl = Growl::UDP.new "localhost", "growlnotify",
|
117
|
+
["Command-Line Growl Notification"]
|
109
118
|
|
110
119
|
expected = [
|
111
120
|
"01", "01", "0e", "00", "00", "1f", "00", "00", # ........
|
@@ -126,8 +135,8 @@ class TestGrowl < MiniTest::Unit::TestCase
|
|
126
135
|
end
|
127
136
|
|
128
137
|
def test_notification_packet_priority_1
|
129
|
-
@growl = Growl.new "localhost", "growlnotify",
|
130
|
-
|
138
|
+
@growl = Growl::UDP.new "localhost", "growlnotify",
|
139
|
+
["Command-Line Growl Notification"]
|
131
140
|
|
132
141
|
expected = [
|
133
142
|
"01", "01", "02", "00", "00", "1f", "00", "00", # ........
|
@@ -150,8 +159,8 @@ class TestGrowl < MiniTest::Unit::TestCase
|
|
150
159
|
end
|
151
160
|
|
152
161
|
def test_notification_packet_priority_2
|
153
|
-
@growl = Growl.new "localhost", "growlnotify",
|
154
|
-
|
162
|
+
@growl = Growl::UDP.new "localhost", "growlnotify",
|
163
|
+
["Command-Line Growl Notification"]
|
155
164
|
|
156
165
|
expected = [
|
157
166
|
"01", "01", "04", "00", "00", "1f", "00", "00", # ........
|
@@ -172,8 +181,8 @@ class TestGrowl < MiniTest::Unit::TestCase
|
|
172
181
|
end
|
173
182
|
|
174
183
|
def test_notification_packet_priority_sticky
|
175
|
-
@growl = Growl.new "localhost", "growlnotify",
|
176
|
-
|
184
|
+
@growl = Growl::UDP.new "localhost", "growlnotify",
|
185
|
+
["Command-Line Growl Notification"]
|
177
186
|
|
178
187
|
expected = [
|
179
188
|
"01", "01", "01", "00", "00", "1f", "00", "00", # ........
|
metadata
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-growl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 27
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
|
-
-
|
7
|
+
- 4
|
8
8
|
- 0
|
9
|
-
version: "
|
9
|
+
version: "4.0"
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Eric Hodel
|
@@ -15,9 +15,9 @@ bindir: bin
|
|
15
15
|
cert_chain:
|
16
16
|
- |
|
17
17
|
-----BEGIN CERTIFICATE-----
|
18
|
-
|
18
|
+
MIIDeDCCAmCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBBMRAwDgYDVQQDDAdkcmJy
|
19
19
|
YWluMRgwFgYKCZImiZPyLGQBGRYIc2VnbWVudDcxEzARBgoJkiaJk/IsZAEZFgNu
|
20
|
-
|
20
|
+
ZXQwHhcNMTIwMjI4MTc1NDI1WhcNMTMwMjI3MTc1NDI1WjBBMRAwDgYDVQQDDAdk
|
21
21
|
cmJyYWluMRgwFgYKCZImiZPyLGQBGRYIc2VnbWVudDcxEzARBgoJkiaJk/IsZAEZ
|
22
22
|
FgNuZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCbbgLrGLGIDE76
|
23
23
|
LV/cvxdEzCuYuS3oG9PrSZnuDweySUfdp/so0cDq+j8bqy6OzZSw07gdjwFMSd6J
|
@@ -25,34 +25,41 @@ cert_chain:
|
|
25
25
|
Gj/okWrQl0NjYOYBpDi+9PPmaH2RmLJu0dB/NylsDnW5j6yN1BEI8MfJRR+HRKZY
|
26
26
|
mUtgzBwF1V4KIZQ8EuL6I/nHVu07i6IkrpAgxpXUfdJQJi0oZAqXurAV3yTxkFwd
|
27
27
|
g62YrrW26mDe+pZBzR6bpLE+PmXCzz7UxUq3AE0gPHbiMXie3EFE0oxnsU3lIduh
|
28
|
-
|
29
|
-
BBS5k4Z75VSpdM0AclG2UvzFA/
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
28
|
+
sCANiQ8BAgMBAAGjezB5MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQW
|
29
|
+
BBS5k4Z75VSpdM0AclG2UvzFA/VW5DAfBgNVHREEGDAWgRRkcmJyYWluQHNlZ21l
|
30
|
+
bnQ3Lm5ldDAfBgNVHRIEGDAWgRRkcmJyYWluQHNlZ21lbnQ3Lm5ldDANBgkqhkiG
|
31
|
+
9w0BAQUFAAOCAQEAPeWzFnrcvC6eVzdlhmjUub2s6qieBkongKRDHQz5MEeQv4LS
|
32
|
+
SARnoHY+uCAVL/1xGAhmpzqQ3fJGWK9eBacW/e8E5GF9xQcV3mE1bA0WNaiDlX5j
|
33
|
+
U2aI+ZGSblqvHUCxKBHR1s7UMHsbz1saOmgdRTyPx0juJs68ocbUTeYBLWu9V4KP
|
34
|
+
zdGAG2JXO2gONg3b4tYDvpBLbry+KOX27iAJulUaH9TiTOULL4ITJVFsK0mYVqmR
|
35
|
+
Q8Tno9S3e4XGGP1ZWfLrTWEJbavFfhGHut2iMRwfC7s/YILAHNATopaJdH9DNpd1
|
36
|
+
U81zGHMUBOvz/VGT6wJwYJ3emS2nfA2NOHFfgA==
|
36
37
|
-----END CERTIFICATE-----
|
37
38
|
|
38
|
-
date:
|
39
|
-
default_executable:
|
39
|
+
date: 2012-04-05 00:00:00 Z
|
40
40
|
dependencies:
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: uuid
|
43
43
|
prerelease: false
|
44
44
|
requirement: &id001 !ruby/object:Gem::Requirement
|
45
45
|
none: false
|
46
46
|
requirements:
|
47
|
+
- - ~>
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
hash: 5
|
50
|
+
segments:
|
51
|
+
- 2
|
52
|
+
- 3
|
53
|
+
version: "2.3"
|
47
54
|
- - ">="
|
48
55
|
- !ruby/object:Gem::Version
|
49
|
-
hash:
|
56
|
+
hash: 9
|
50
57
|
segments:
|
51
58
|
- 2
|
52
|
-
-
|
53
|
-
-
|
54
|
-
version: 2.
|
55
|
-
type: :
|
59
|
+
- 3
|
60
|
+
- 5
|
61
|
+
version: 2.3.5
|
62
|
+
type: :runtime
|
56
63
|
version_requirements: *id001
|
57
64
|
- !ruby/object:Gem::Dependency
|
58
65
|
name: minitest
|
@@ -60,46 +67,63 @@ dependencies:
|
|
60
67
|
requirement: &id002 !ruby/object:Gem::Requirement
|
61
68
|
none: false
|
62
69
|
requirements:
|
63
|
-
- -
|
70
|
+
- - ~>
|
64
71
|
- !ruby/object:Gem::Version
|
65
|
-
hash:
|
72
|
+
hash: 21
|
66
73
|
segments:
|
67
|
-
-
|
68
|
-
-
|
69
|
-
|
70
|
-
version: 1.5.0
|
74
|
+
- 2
|
75
|
+
- 11
|
76
|
+
version: "2.11"
|
71
77
|
type: :development
|
72
78
|
version_requirements: *id002
|
73
79
|
- !ruby/object:Gem::Dependency
|
74
|
-
name:
|
80
|
+
name: rdoc
|
75
81
|
prerelease: false
|
76
82
|
requirement: &id003 !ruby/object:Gem::Requirement
|
77
83
|
none: false
|
78
84
|
requirements:
|
79
|
-
- -
|
85
|
+
- - ~>
|
80
86
|
- !ruby/object:Gem::Version
|
81
|
-
hash:
|
87
|
+
hash: 19
|
82
88
|
segments:
|
83
|
-
-
|
84
|
-
-
|
85
|
-
|
86
|
-
version: 2.6.1
|
89
|
+
- 3
|
90
|
+
- 10
|
91
|
+
version: "3.10"
|
87
92
|
type: :development
|
88
93
|
version_requirements: *id003
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: hoe
|
96
|
+
prerelease: false
|
97
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
98
|
+
none: false
|
99
|
+
requirements:
|
100
|
+
- - ~>
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
hash: 35
|
103
|
+
segments:
|
104
|
+
- 2
|
105
|
+
- 16
|
106
|
+
version: "2.16"
|
107
|
+
type: :development
|
108
|
+
version_requirements: *id004
|
89
109
|
description: |-
|
90
|
-
A pure-ruby growl notifier. ruby-growl
|
91
|
-
|
92
|
-
non-OSX machines).
|
110
|
+
A pure-ruby growl notifier for UDP and GNTP growl protocols. ruby-growl
|
111
|
+
allows you to perform Growl notifications from machines without growl
|
112
|
+
installed (for example, non-OSX machines).
|
113
|
+
|
114
|
+
What is growl? Growl is a really cool "global notification system originally
|
115
|
+
for Mac OS X".
|
93
116
|
|
94
|
-
|
95
|
-
|
117
|
+
You can receive Growl notifications on various platforms and send them from
|
118
|
+
any machine that runs Ruby.
|
96
119
|
|
97
|
-
|
98
|
-
http://
|
120
|
+
OS X: http://growl.info
|
121
|
+
Windows: http://www.growlforwindows.com/gfw/
|
122
|
+
Linux: http://github.com/mattn/growl-for-linux
|
99
123
|
|
100
|
-
ruby-growl also contains a command-line notification tool named 'growl'.
|
101
|
-
|
102
|
-
|
124
|
+
ruby-growl also contains a command-line notification tool named 'growl'. It
|
125
|
+
is almost completely option-compatible with growlnotify. (All except for -p
|
126
|
+
is supported, use --priority instead.)
|
103
127
|
email:
|
104
128
|
- drbrain@segment7.net
|
105
129
|
executables:
|
@@ -111,14 +135,20 @@ extra_rdoc_files:
|
|
111
135
|
- Manifest.txt
|
112
136
|
- README.txt
|
113
137
|
files:
|
138
|
+
- .autotest
|
114
139
|
- History.txt
|
115
140
|
- Manifest.txt
|
116
141
|
- README.txt
|
117
142
|
- Rakefile
|
118
143
|
- bin/growl
|
119
144
|
- lib/ruby-growl.rb
|
120
|
-
-
|
121
|
-
|
145
|
+
- lib/ruby-growl/gntp.rb
|
146
|
+
- lib/ruby-growl/ruby_logo.rb
|
147
|
+
- lib/ruby-growl/udp.rb
|
148
|
+
- lib/uri/x_growl_resource.rb
|
149
|
+
- test/test_growl_gntp.rb
|
150
|
+
- test/test_growl_udp.rb
|
151
|
+
- .gemtest
|
122
152
|
homepage: http://ruby-growl.rubyforge.org/ruby-growl
|
123
153
|
licenses: []
|
124
154
|
|
@@ -131,14 +161,14 @@ require_paths:
|
|
131
161
|
required_ruby_version: !ruby/object:Gem::Requirement
|
132
162
|
none: false
|
133
163
|
requirements:
|
134
|
-
- - "
|
164
|
+
- - ">="
|
135
165
|
- !ruby/object:Gem::Version
|
136
|
-
hash:
|
166
|
+
hash: 55
|
137
167
|
segments:
|
138
168
|
- 1
|
139
|
-
-
|
140
|
-
-
|
141
|
-
version: 1.
|
169
|
+
- 9
|
170
|
+
- 2
|
171
|
+
version: 1.9.2
|
142
172
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
143
173
|
none: false
|
144
174
|
requirements:
|
@@ -151,9 +181,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
151
181
|
requirements: []
|
152
182
|
|
153
183
|
rubyforge_project: ruby-growl
|
154
|
-
rubygems_version: 1.
|
184
|
+
rubygems_version: 1.8.21
|
155
185
|
signing_key:
|
156
186
|
specification_version: 3
|
157
|
-
summary: A pure-ruby growl notifier
|
187
|
+
summary: A pure-ruby growl notifier for UDP and GNTP growl protocols
|
158
188
|
test_files:
|
159
|
-
- test/
|
189
|
+
- test/test_growl_gntp.rb
|
190
|
+
- test/test_growl_udp.rb
|
metadata.gz.sig
CHANGED
Binary file
|