maia 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZDNmY2UwNzgxMGIzMWY4MTU1MTg2OGUyMDMxYWYyNjc3NmFjZjllYw==
4
+ ZmQ5OTBlMDZkNmU3NzM0NWFkYTliNDhmNDE3NDg2NWYxZDg2Y2FjYg==
5
5
  data.tar.gz: !binary |-
6
- NzIzMzg4Njg2MGJjYTk5MjQ0ODU4ODhlMjU1OWI0NDliYTFkYzIxOA==
6
+ YTFlNWU0ZjE1ODFiZWFmMDMyM2E2ODE1NWE0MzZmYjg1NDJiY2NkZQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YmYwMDYxMzFkODg1ZWEwOTg1MjYyOTY2ZGQ0YTg2YzE2NzQ4ZDk1N2JiNmEw
10
- MGEzMmNkODg2ZWM4YjIwOGJiYWM4OGE5MmM3OTcwN2U4ZDg4OTA4MDFkOGYy
11
- YjZlMzQ2ZWU2MzA4MDIzMjcxNGMwNGZhYmRiMTQyZDNjYWJlMDg=
9
+ MGY0MmM3MzQ5OWM0ODIxZjM3ZTA2ZDcwYWM1YmY0NjA1Y2RhNTg2YmY2ZmZj
10
+ MDM0ZTQ5MDZlZjU2ZjE0YmMzNmZlM2JiOTVjZjQ0ZTdlMTYyOWVjMmUwOGIx
11
+ ZWNmMjgwYjgwMTU3NmY3ODlmNzE1MmVjZTdiMGRhZTU5ZTY0ZGE=
12
12
  data.tar.gz: !binary |-
13
- ZTM2YzkxMjNkOWNmYjU1MmFiNjI4OGIxY2Q5NDBhNWQ2NGE0NzM4M2M1ZTFl
14
- MjNjOGE3OTI5OTA4MGVkZjk0Yjc0NjUxODljNGI0MmIwMmE4MGU1MmM1YzVi
15
- YTc0ZmY4NjI2NmE1MjcxZDNiOTUxMmQ0MGY2ZjFmZDE4ZGViMDQ=
13
+ ODBhOGY2NWVjZTAzODU4ODRhODliN2MzMjZmMmFhZGVkNDE1OTM4ODUzOTM4
14
+ ZGUyYjFlYWExZjM5MWE3ZDBiMGRkNGQzOWQ1YTcyYWVlMDA2OWExZWIyZjE4
15
+ OGY1NmY5NDNkODdiYWI5YTQzZGZkODM1ZDdkOGYzMTdmZmQzZWE=
@@ -25,7 +25,7 @@ module Maia
25
25
  case result.error
26
26
  when /InvalidRegistration/, /NotRegistered/
27
27
  logger.info "Invalid token #{device.token} - destroying device #{device.id}."
28
- device.destroy
28
+ device.destroy if device
29
29
  when /MessageTooBig/
30
30
  logger.info 'Message sent was too large.'
31
31
  when /Timeout/
@@ -37,6 +37,7 @@ module Maia
37
37
  def update_devices_to_use_canonical_ids(results)
38
38
  results.each do |result|
39
39
  device = Maia::Device.find_by token: result.token
40
+ next if device.nil?
40
41
  if user_already_has_token_registered?(device.pushable, result.canonical_id)
41
42
  device.destroy
42
43
  else
@@ -1,3 +1,3 @@
1
1
  module Maia
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maia
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Logan Serman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-29 00:00:00.000000000 Z
11
+ date: 2015-10-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails