speedy_gcm 0.9.2 → 0.9.3
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/.gitignore +4 -1
- data/lib/speedy_gcm.rb +4 -2
- data/lib/speedy_gcm/version.rb +1 -1
- metadata +2 -2
data/.gitignore
CHANGED
data/lib/speedy_gcm.rb
CHANGED
@@ -83,9 +83,11 @@ module SpeedyGCM
|
|
83
83
|
raise ArgumentError, "registration_ids must contain at least 1 and at most 1000 registration IDs"
|
84
84
|
end
|
85
85
|
|
86
|
-
|
86
|
+
# create a new hash without the registration_ids, and use that to test bytesize
|
87
|
+
# not using .except(:key) here since that's Rails specific
|
88
|
+
message_opts_except_reg_ids = message_opts.clone.tap { |hs| hs.delete(:registration_ids) }
|
87
89
|
|
88
|
-
if
|
90
|
+
if message_opts_except_reg_ids.to_json.to_s.bytesize > 4096
|
89
91
|
# data must be less than 4kb in length
|
90
92
|
raise StandardError, "the size of the message is over 4kb"
|
91
93
|
end
|
data/lib/speedy_gcm/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: speedy_gcm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-08-08 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Speedy GCM efficiently sends push notifications to Android devices via
|
15
15
|
GCM (Google Cloud Messaging).
|