Oshuma-pingfm 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ == 1.0.2 / 2009-06-10
2
+
3
+ * Patched Client#status_fail to handle responses with no error message
4
+
1
5
  == 1.0.1 / 2008-12-26
2
6
 
3
7
  * Fixed small bug in the command-line script.
data/lib/pingfm.rb CHANGED
@@ -7,7 +7,7 @@ unless defined? Pingfm
7
7
  module Pingfm
8
8
 
9
9
  # :stopdoc:
10
- VERSION = '1.0.1'
10
+ VERSION = '1.0.2'
11
11
  LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
12
12
  PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
13
13
  # :startdoc:
data/lib/pingfm/client.rb CHANGED
@@ -72,7 +72,7 @@ module Pingfm
72
72
  end
73
73
  return services
74
74
  else
75
- return status_fail(response)
75
+ return status_fail(response)
76
76
  end
77
77
  end
78
78
 
@@ -211,7 +211,13 @@ module Pingfm
211
211
 
212
212
  # Failed response.
213
213
  def status_fail(response)
214
- return {'status' => 'FAIL', 'message' => response.elements['rsp/message'].text}
214
+ if response.elements.include? 'rsp/message'
215
+ message = response.elements['rsp/message'].text
216
+ else
217
+ message = "Unknown error from Ping.fm"
218
+ end
219
+
220
+ return {'status' => 'FAIL', 'message' => message}
215
221
  end
216
222
 
217
223
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Oshuma-pingfm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Krunoslav Husak