expo-server-sdk 0.1.0 → 0.1.1
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.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/README.md +1 -9
- data/lib/expo/server/sdk/version.rb +1 -1
- data/lib/push/client.rb +4 -3
- data/lib/push/receipts.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 455383d798813f99c1b89e47deb13b9d438bab8ebb1a4086c21174f9938c7ee7
|
4
|
+
data.tar.gz: b622a54688dbd730bf69eaf7f9557bb97d5d2d006a7b8931edcd015737000904
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b442eb3b165ba954762d7234ddf678d200d7216c9e59364bde0171d95ae114816c0ca7a93e018070465ecde8d69c4228d7500e2adbbfe6abf7bc4d94ed24794f
|
7
|
+
data.tar.gz: 6b4d4abc5fc3ee9a08fd3869deeb07d771de3864adb3dd545b5b4809a0f5b08ea1cea40f20ffa21ce2a9fd4c4a579146ec432c9c635df64ba55cb94f874cb714
|
data/.gitignore
CHANGED
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/
|
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
|
-
```
|
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|
|
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 =
|
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
|
-
|
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.
|
90
|
+
requested_ids - results.map(&:receipt_id)
|
91
91
|
end
|
92
92
|
|
93
93
|
private
|