Skip to content

Commit ca8dea7

Browse files
committed
Fix self test code and gemspec.
- Fill '' to passwd by default - Refer RUBY_GNTP_NAME and RUBY_GNTP_VERSION constants in gemspec
1 parent eb3f13e commit ca8dea7

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

lib/ruby_gntp.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class GNTP
4141
attr_reader :message if $DEBUG
4242

4343
RUBY_GNTP_NAME = 'ruby_gntp'
44-
RUBY_GNTP_VERSION = '0.1.3.1'
44+
RUBY_GNTP_VERSION = '0.2.1'
4545

4646
def initialize(app_name = 'Ruby/GNTP', host = 'localhost', password = '', port = 23053)
4747
@app_name = app_name
@@ -269,7 +269,7 @@ def output_binary(binary)
269269
# self test code
270270
if __FILE__ == $0
271271
host = ARGV[0] || 'loaclhost'
272-
passwd = host && ARGV[1]
272+
passwd = ARGV[1] || ''
273273

274274
#--- Use standard notification method ('register' first then 'notify')
275275
growl = GNTP.new("Ruby/GNTP self test", host, passwd)

ruby_gntp.gemspec

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
require 'lib/ruby_gntp'
2+
13
Gem::Specification.new do |s|
2-
s.name = "ruby_gntp"
3-
s.version = "0.2.0"
4+
s.name = GNTP::RUBY_GNTP_NAME
5+
s.version = GNTP::RUBY_GNTP_VERSION
46
s.summary = "Ruby library for GNTP(Growl Notification Transport Protocol) client"
57
s.authors = ["snaka", "David Hayward (spidah)"]
68

0 commit comments

Comments
 (0)