ruby-growl 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/ruby-growl.rb +13 -1
  2. metadata +5 -3
data/lib/ruby-growl.rb CHANGED
@@ -31,10 +31,16 @@ require 'socket'
31
31
 
32
32
  class Growl
33
33
 
34
+ ##
35
+ # The Ruby that ships with Tiger has a broken #pack, so 'v' means network
36
+ # byte order instead of 'n'.
37
+
38
+ BROKEN_PACK = [1].pack("n") != "\000\001" # :nodoc:
39
+
34
40
  ##
35
41
  # ruby-growl Version
36
42
 
37
- VERSION = "1.0.0"
43
+ VERSION = "1.0.1"
38
44
 
39
45
  ##
40
46
  # Growl Network Registration Packet +pack+ Format
@@ -61,6 +67,8 @@ class Growl
61
67
 
62
68
  GNR_FORMAT = "CCnCCa*"
63
69
 
70
+ GNR_FORMAT.gsub!(/n/, 'v') if BROKEN_PACK
71
+
64
72
  ##
65
73
  # Growl Network Notification Packet +pack+ Format
66
74
  #--
@@ -89,6 +97,8 @@ class Growl
89
97
 
90
98
  GNN_FORMAT = "CCnnnnna*"
91
99
 
100
+ GNN_FORMAT.gsub!(/n/, 'v') if BROKEN_PACK
101
+
92
102
  ##
93
103
  # Growl UDP Port
94
104
 
@@ -209,6 +219,8 @@ class Growl
209
219
  data_format << "C"
210
220
  end
211
221
 
222
+ data_format.gsub!(/n/, 'v') if BROKEN_PACK
223
+
212
224
  data = data.pack data_format
213
225
 
214
226
  packet << data
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.8.3
2
+ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: ruby-growl
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.0.0
7
- date: 2004-12-13
6
+ version: 1.0.1
7
+ date: 2005-11-14 00:00:00 -08:00
8
8
  summary: Pure-Ruby Growl Notifier
9
9
  require_paths:
10
10
  - lib
@@ -30,6 +30,8 @@ required_ruby_version: !ruby/object:Gem::Version::Requirement
30
30
  version: 0.0.0
31
31
  version:
32
32
  platform: ruby
33
+ signing_key:
34
+ cert_chain:
33
35
  authors:
34
36
  - Eric Hodel
35
37
  files: