messenger 0.3.6 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,3 @@
1
- require 'system_timer'
2
1
  require 'base64'
3
2
 
4
3
  module Messenger
@@ -12,8 +11,14 @@ module Messenger
12
11
 
13
12
  def self.deliver(url, message, options={})
14
13
  service_handler = handler(url)
15
- SystemTimer.timeout_after(options[:timeout] || 15) do
16
- service_handler.deliver(url, message, options)
14
+ if defined?(SystemTimer) && SystemTimer.respond_to?(:timeout_after)
15
+ SystemTimer.timeout_after(options[:timeout] || 15) do
16
+ service_handler.deliver(url, message, options)
17
+ end
18
+ else
19
+ Timeout.timeout(options[:timeout] || 15) do
20
+ service_handler.deliver(url, message, options)
21
+ end
17
22
  end
18
23
  end
19
24
 
@@ -1,3 +1,3 @@
1
1
  module Messenger
2
- VERSION = '0.3.6'
2
+ VERSION = '0.4.0'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: messenger
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
5
- prerelease: false
4
+ hash: 15
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
- - 3
9
- - 6
10
- version: 0.3.6
8
+ - 4
9
+ - 0
10
+ version: 0.4.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Brandon Arbini
@@ -16,11 +16,11 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-10-04 00:00:00 -05:00
19
+ date: 2011-02-18 00:00:00 -06:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
- name: SystemTimer
23
+ name: xmpp4r-simple
24
24
  prerelease: false
25
25
  requirement: &id001 !ruby/object:Gem::Requirement
26
26
  none: false
@@ -34,7 +34,7 @@ dependencies:
34
34
  type: :runtime
35
35
  version_requirements: *id001
36
36
  - !ruby/object:Gem::Dependency
37
- name: xmpp4r-simple
37
+ name: mail
38
38
  prerelease: false
39
39
  requirement: &id002 !ruby/object:Gem::Requirement
40
40
  none: false
@@ -48,7 +48,7 @@ dependencies:
48
48
  type: :runtime
49
49
  version_requirements: *id002
50
50
  - !ruby/object:Gem::Dependency
51
- name: mail
51
+ name: httparty
52
52
  prerelease: false
53
53
  requirement: &id003 !ruby/object:Gem::Requirement
54
54
  none: false
@@ -62,7 +62,7 @@ dependencies:
62
62
  type: :runtime
63
63
  version_requirements: *id003
64
64
  - !ruby/object:Gem::Dependency
65
- name: httparty
65
+ name: trollop
66
66
  prerelease: false
67
67
  requirement: &id004 !ruby/object:Gem::Requirement
68
68
  none: false
@@ -76,7 +76,7 @@ dependencies:
76
76
  type: :runtime
77
77
  version_requirements: *id004
78
78
  - !ruby/object:Gem::Dependency
79
- name: trollop
79
+ name: shoulda
80
80
  prerelease: false
81
81
  requirement: &id005 !ruby/object:Gem::Requirement
82
82
  none: false
@@ -87,10 +87,10 @@ dependencies:
87
87
  segments:
88
88
  - 0
89
89
  version: "0"
90
- type: :runtime
90
+ type: :development
91
91
  version_requirements: *id005
92
92
  - !ruby/object:Gem::Dependency
93
- name: shoulda
93
+ name: mocha
94
94
  prerelease: false
95
95
  requirement: &id006 !ruby/object:Gem::Requirement
96
96
  none: false
@@ -104,7 +104,7 @@ dependencies:
104
104
  type: :development
105
105
  version_requirements: *id006
106
106
  - !ruby/object:Gem::Dependency
107
- name: mocha
107
+ name: webmock
108
108
  prerelease: false
109
109
  requirement: &id007 !ruby/object:Gem::Requirement
110
110
  none: false
@@ -117,20 +117,6 @@ dependencies:
117
117
  version: "0"
118
118
  type: :development
119
119
  version_requirements: *id007
120
- - !ruby/object:Gem::Dependency
121
- name: webmock
122
- prerelease: false
123
- requirement: &id008 !ruby/object:Gem::Requirement
124
- none: false
125
- requirements:
126
- - - ">="
127
- - !ruby/object:Gem::Version
128
- hash: 3
129
- segments:
130
- - 0
131
- version: "0"
132
- type: :development
133
- version_requirements: *id008
134
120
  description: "Messenger: easy message sending for various protocols."
135
121
  email: brandon@zencoder.com
136
122
  executables:
@@ -185,7 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
185
171
  requirements: []
186
172
 
187
173
  rubyforge_project: messenger
188
- rubygems_version: 1.3.7
174
+ rubygems_version: 1.5.0
189
175
  signing_key:
190
176
  specification_version: 3
191
177
  summary: "Messenger: easy message sending"