ileitch/rapns — pull request #47 by tompesman (2012-06-19 17:03:46+00:00)
Title: Fixed packing of the array to allow the 256 byte length in big endian

If a notification is sent with payload_size == 256, the delivery fails with error_code: 4 and error_description: 'Missing payload'.

The [documentation](http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingWIthAPS/CommunicatingWIthAPS.html#//apple_ref/doc/uid/TP40008194-CH101-SW1) says: 'The payload must not exceed 256 bytes and must not be null-terminated.' There is a problem with the the `pack` method in `notification.rb`. The documentation states 2 bytes for the payload length, the pack method uses the `c` value for the payload_size which is a 8-bit signed integer. So I removed the `1` and `c`. The other `c` is replaced the `a` n which is: Integer, 16-bit unsigned, network (big-endian) byte order.