From 736c76308d1930363f3b5c44d868776721818cfb Mon Sep 17 00:00:00 2001 From: George MacKerron Date: Thu, 2 Sep 2010 02:00:19 -0700 Subject: [PATCH 1/4] --- ruby-client/pyapns/lib/pyapns.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ruby-client/pyapns/lib/pyapns.rb b/ruby-client/pyapns/lib/pyapns.rb index 797a711..36a3be9 100644 --- a/ruby-client/pyapns/lib/pyapns.rb +++ b/ruby-client/pyapns/lib/pyapns.rb @@ -4,6 +4,10 @@ require 'singleton' require 'xmlrpc/client' +XMLRPC::Config.module_eval { + remove_const(:ENABLE_NIL_PARSER) # so that we're not warned about reassigning to a constant + ENABLE_NIL_PARSER = true # so that we don't get "RuntimeError: wrong/unknown XML-RPC type 'nil'" +} module PYAPNS VERSION = "0.3.0" From c07743c43807a3b0a77f86772c76246ea603c117 Mon Sep 17 00:00:00 2001 From: George MacKerron Date: Wed, 8 Sep 2010 03:17:26 -0700 Subject: [PATCH 2/4] --- ruby-client/pyapns/lib/pyapns.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ruby-client/pyapns/lib/pyapns.rb b/ruby-client/pyapns/lib/pyapns.rb index 36a3be9..37186ca 100644 --- a/ruby-client/pyapns/lib/pyapns.rb +++ b/ruby-client/pyapns/lib/pyapns.rb @@ -95,10 +95,15 @@ module PYAPNS ## to retrieve a list of device tokens it deems to be no longer in use, and the ## time it thinks they stopped being useful (the user uninstalled your app, better ## luck next time...) Sounds pretty straight forward, and it is. Apple recommends - ## you do this at least once an hour. PYAPNS will return a list of 2-element lists - ## with the date and the token: + ## you do this at least once an hour. PYAPNS will return an Array of 2-element + ## Arrays with the date and the token: ## ## feedbacks = client.feedback 'cf' + ## => [[#, 'token'], + ## [#, 'token'], ... ] + ## + ## Note that the date is an instance of XMLRPC::DateTime, which you'll probably + ## want to call #to_time on to get back a regular Time instance. ## ## Asynchronous Calls ## From c0f210ced349d23ea4af627ee1f75de0549622b7 Mon Sep 17 00:00:00 2001 From: George MacKerron Date: Wed, 8 Sep 2010 10:17:34 -0700 Subject: [PATCH 3/4] More clarifying comments on the feedback method --- ruby-client/pyapns/lib/pyapns.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ruby-client/pyapns/lib/pyapns.rb b/ruby-client/pyapns/lib/pyapns.rb index 37186ca..f5a81fc 100644 --- a/ruby-client/pyapns/lib/pyapns.rb +++ b/ruby-client/pyapns/lib/pyapns.rb @@ -103,7 +103,8 @@ module PYAPNS ## [#, 'token'], ... ] ## ## Note that the date is an instance of XMLRPC::DateTime, which you'll probably - ## want to call #to_time on to get back a regular Time instance. + ## want to call #to_time on to get back a regular Time instance. And, if you're + ## searching for or comparing the token received, note that it's _lowercase_ hex. ## ## Asynchronous Calls ## From b83767a03b23edfdeda6d0bb9462f586ae7b9144 Mon Sep 17 00:00:00 2001 From: George MacKerron Date: Wed, 8 Sep 2010 10:19:29 -0700 Subject: [PATCH 4/4] Tweak to comments --- ruby-client/pyapns/lib/pyapns.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ruby-client/pyapns/lib/pyapns.rb b/ruby-client/pyapns/lib/pyapns.rb index f5a81fc..efc152b 100644 --- a/ruby-client/pyapns/lib/pyapns.rb +++ b/ruby-client/pyapns/lib/pyapns.rb @@ -104,7 +104,8 @@ module PYAPNS ## ## Note that the date is an instance of XMLRPC::DateTime, which you'll probably ## want to call #to_time on to get back a regular Time instance. And, if you're - ## searching for or comparing the token received, note that it's _lowercase_ hex. + ## searching for or comparing the token received in the hexadecimal form returned, + ## note that it's lowercase hex. ## ## Asynchronous Calls ##