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 CHANGED
@@ -1,4 +1,7 @@
1
1
  .DS_Store
2
+ .ruby-gemset
3
+ .ruby-version
2
4
  .rvmrc
3
5
  Gemfile.lock
4
- *.gem
6
+ *.gem
7
+ .idea/
@@ -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
- message_opts_json = message_opts.except(:registration_ids).to_json
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 (message_opts_json.to_s.bytesize > 4096)
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
@@ -1,3 +1,3 @@
1
1
  module SpeedyGCM
2
- VERSION = "0.9.2"
2
+ VERSION = "0.9.3"
3
3
  end
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.2
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-06-21 00:00:00.000000000 Z
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).