ruby_gntp 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -42,7 +42,7 @@ class GNTP
42
42
  attr_reader :message if $DEBUG
43
43
 
44
44
  RUBY_GNTP_NAME = 'ruby_gntp'
45
- RUBY_GNTP_VERSION = '0.3.0'
45
+ RUBY_GNTP_VERSION = '0.3.1'
46
46
 
47
47
  def initialize(app_name = 'Ruby/GNTP', host = 'localhost', password = '', port = 23053)
48
48
  @app_name = app_name
@@ -244,7 +244,7 @@ class GNTP
244
244
  # get start of the GNTP header
245
245
  #
246
246
  def get_gntp_header_start(type)
247
- if @password.empty?
247
+ if !@password || @password.empty?
248
248
  "GNTP/1.0 #{type} NONE"
249
249
  else
250
250
  saltvar = Time.now.to_s
@@ -34,6 +34,7 @@ describe GNTP do
34
34
  ].each {|expected_text|
35
35
  @sended_messages.last.should include(expected_text)
36
36
  }
37
+
37
38
  end
38
39
 
39
40
  it "can register notifications to remote host" do
@@ -136,4 +137,8 @@ describe GNTP do
136
137
  }
137
138
  end
138
139
 
140
+ it "should send instantly" do
141
+ GNTP.notify :app_name => "App", :title => "title", :text => "text message"
142
+ end
143
+
139
144
  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.3.0
4
+ version: 0.3.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-09 00:00:00 +09:00
13
+ date: 2009-12-16 00:00:00 +09:00
14
14
  default_executable:
15
15
  dependencies: []
16
16