jirapong-apn_on_rails 0.4.8 → 0.4.9

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.
@@ -80,7 +80,8 @@ class APN::Notification < APN::Base
80
80
  # Creates the binary message needed to send to Apple.
81
81
  def message_for_sending
82
82
  json = self.to_apple_json
83
- message = "\0\0 #{self.device.to_hexa.encode('UTF-8')}\0#{json.length.chr.encode('UTF-8')}#{json.encode('UTF-8')}"
83
+ c = "\0".encode('UTF-8')
84
+ message = "#{c}#{c} #{self.device.to_hexa.encode('UTF-8')}#{c}#{json.length.chr.encode('UTF-8')}#{json.encode('UTF-8')}"
84
85
  raise APN::Errors::ExceededMessageSizeError.new(message) if message.size.to_i > 256
85
86
  message
86
87
  end
@@ -1,3 +1,3 @@
1
1
  module ApnOnRails
2
- VERSION = "0.4.8"
2
+ VERSION = "0.4.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jirapong-apn_on_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.8
4
+ version: 0.4.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: