expo-server-sdk 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0870d677aad54e5517e91013161aedada958f24ad0437e9acda0b315b7746e80'
4
- data.tar.gz: cc9ef8fd683e4e386b028dd966b108ec5f242ed8985721858103b01f53974703
3
+ metadata.gz: 455383d798813f99c1b89e47deb13b9d438bab8ebb1a4086c21174f9938c7ee7
4
+ data.tar.gz: b622a54688dbd730bf69eaf7f9557bb97d5d2d006a7b8931edcd015737000904
5
5
  SHA512:
6
- metadata.gz: a160681a4b6f96cc776d657a732ef104138da93f77bf9f3d4c6faf773b69deb5231d263202a04b4ddb858436ac1c62a8672de3afabff038714493bcda7f22bfc
7
- data.tar.gz: b0b47c52921e099ef1b0cf0f434e1c1454f2398b551d85c46058c35bd06269046d3591e9df1503f3e58bc4e12c241234d0468445707c9e7763b7936a6bb323e9
6
+ metadata.gz: b442eb3b165ba954762d7234ddf678d200d7216c9e59364bde0171d95ae114816c0ca7a93e018070465ecde8d69c4228d7500e2adbbfe6abf7bc4d94ed24794f
7
+ data.tar.gz: 6b4d4abc5fc3ee9a08fd3869deeb07d771de3864adb3dd545b5b4809a0f5b08ea1cea40f20ffa21ce2a9fd4c4a579146ec432c9c635df64ba55cb94f874cb714
data/.gitignore CHANGED
@@ -6,3 +6,5 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+
10
+ /expo-server-sdk-*.gem
data/README.md CHANGED
@@ -233,7 +233,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
233
233
 
234
234
  ## Contributing
235
235
 
236
- Bug reports and pull requests are welcome on GitHub at https://github.com/SleeplessByte/expo-server-sdk. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/SleeplessByte/expo-server-sdk/blob/master/CODE_OF_CONDUCT.md).
236
+ Bug reports and pull requests are welcome on GitHub at https://github.com/SleeplessByte/expo-server-sdk-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/SleeplessByte/expo-server-sdk-ruby/blob/main/CODE_OF_CONDUCT.md).
237
237
 
238
238
  ## License
239
239
 
@@ -242,11 +242,3 @@ The gem is available as open source under the terms of the [MIT License](https:/
242
242
  ## Code of Conduct
243
243
 
244
244
  Everyone interacting in the `Expo::Server::SDK` project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/SleeplessByte/expo-server-sdk/blob/master/CODE_OF_CONDUCT.md).
245
-
246
- ```
247
-
248
- ```
249
-
250
- ```
251
-
252
- ```
@@ -3,7 +3,7 @@
3
3
  module Expo
4
4
  module Server
5
5
  module SDK
6
- VERSION = '0.1.0'
6
+ VERSION = '0.1.1'
7
7
  end
8
8
  end
9
9
 
data/lib/push/client.rb CHANGED
@@ -209,8 +209,8 @@ module Expo
209
209
 
210
210
  def send!(notifications)
211
211
  send(notifications).tap do |result|
212
- result.each_error do |error| # rubocop:disable Lint/UnreachableLoop
213
- raise error
212
+ result.each_error do |error|
213
+ raise error if error.is_a?(Error)
214
214
  end
215
215
  end
216
216
  end
@@ -228,11 +228,12 @@ module Expo
228
228
  end
229
229
 
230
230
  errors = parsed_response['errors']
231
+ data = parsed_response['data']
231
232
 
232
233
  if errors&.length&.positive?
233
234
  ReceiptsWithErrors.new(data: parsed_response, errors: errors)
234
235
  else
235
- results = parsed_response.map do |receipt_id, data|
236
+ results = data.map do |receipt_id, data|
236
237
  Receipt.new(data: data, receipt_id: receipt_id)
237
238
  end
238
239
 
data/lib/push/receipts.rb CHANGED
@@ -70,7 +70,7 @@ module Expo
70
70
  end
71
71
 
72
72
  def each
73
- receipts.each do |receipt|
73
+ results.each do |receipt|
74
74
  next unless receipt.ok?
75
75
 
76
76
  yield receipt
@@ -87,7 +87,7 @@ module Expo
87
87
  end
88
88
 
89
89
  def unresolved_ids
90
- requested_ids - results.keys
90
+ requested_ids - results.map(&:receipt_id)
91
91
  end
92
92
 
93
93
  private
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: expo-server-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derk-Jan Karrenbeld