imobile 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +2 -0
- data/imobile.gemspec +2 -2
- data/lib/imobile/push_notification.rb +14 -1
- metadata +2 -2
data/CHANGELOG
CHANGED
data/imobile.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{imobile}
|
5
|
-
s.version = "0.0.
|
5
|
+
s.version = "0.0.8"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Victor Costan"]
|
9
|
-
s.date = %q{2009-07-
|
9
|
+
s.date = %q{2009-07-29}
|
10
10
|
s.description = %q{Library for servers backing iPhone applications.}
|
11
11
|
s.email = %q{victor@zergling.net}
|
12
12
|
s.extra_rdoc_files = ["CHANGELOG", "lib/imobile/crypto_app_fprint.rb", "lib/imobile/push_notification.rb", "lib/imobile/validate_receipt.rb", "lib/imobile.rb", "LICENSE", "README.textile"]
|
@@ -104,9 +104,21 @@ class PushNotificationsContext
|
|
104
104
|
@closed = false
|
105
105
|
end
|
106
106
|
|
107
|
+
# Forces a flush of all the buffered data across the APNs connection.
|
108
|
+
#
|
109
|
+
# This should be called at the end of a batch of notifications. If flush is
|
110
|
+
# not called, notifications may be stalled indefinitely.
|
111
|
+
def flush
|
112
|
+
raise "The context's APNs connection was closed" if @closed
|
113
|
+
@socket.flush
|
114
|
+
end
|
115
|
+
|
107
116
|
# Closes the APNs connection. The context is unusable afterwards.
|
108
117
|
def close
|
109
|
-
|
118
|
+
unless @closed
|
119
|
+
@socket.flush
|
120
|
+
@socket.close
|
121
|
+
end
|
110
122
|
@closed = true
|
111
123
|
end
|
112
124
|
|
@@ -295,6 +307,7 @@ module PushNotifications
|
|
295
307
|
notifications.each { |notification| context.push notification }
|
296
308
|
end
|
297
309
|
end
|
310
|
+
context.flush
|
298
311
|
context.close
|
299
312
|
end
|
300
313
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: imobile
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Victor Costan
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-07-
|
12
|
+
date: 2009-07-29 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|