maia 1.1.2 → 2.0.0

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
  SHA1:
3
- metadata.gz: a6e4d9927100654f8e6994968d35e4171a96e1f3
4
- data.tar.gz: c9dd8d9fcb76549343a431da47bf32e3126a5e1f
3
+ metadata.gz: 0200a5ab7f43a82c921bc7a3dbadbece312e129b
4
+ data.tar.gz: 5dd079e1820935f9de05e4ce9ab7e8907058e280
5
5
  SHA512:
6
- metadata.gz: 1a13f66bae05548a6e95795caf9e6a839be185b135d85c3d55707445cfbc067520155e7c1fa916803656c4c4645e83a9347934e8c2c0551cedaa5e0d0576996a
7
- data.tar.gz: faabf2238fd955c321f0ee6e8a323d199bd106ec248a8dc4f2032958be6282d491608205fa8da9cce7b4543129aa03352c9d82044f9bf980dcde43174f5c09a3
6
+ metadata.gz: 5ac7fbcdb52b2db18d12021a946c4343bd645576587cdc5095a81c9dc7bc869e99245ad18ea7c6e3ce5c4ebeda6e49f116d8b688205054a2c07834649f1d364c
7
+ data.tar.gz: f4f06d7362e26f54fbf548ad342424daa98594c992b8aa8e4516ecc1bec642200ee4262627bec2f1417d9d416781e700ef006855b33b505d04116dede020538a
@@ -0,0 +1,5 @@
1
+ module Maia
2
+ class ApplicationRecord < ActiveRecord::Base
3
+ self.abstract_class = true
4
+ end
5
+ end
@@ -1,5 +1,5 @@
1
1
  module Maia
2
- class Device < ActiveRecord::Base
2
+ class Device < ApplicationRecord
3
3
  belongs_to :pushable, polymorphic: true
4
4
 
5
5
  validates :token, presence: true, uniqueness: { scope: :pushable }
@@ -29,11 +29,13 @@ module Maia
29
29
  def handle_failed_tokens(results)
30
30
  results.each do |result|
31
31
  device = Maia::Device.find_by(token: result.token)
32
- if device && device_unrecoverable?(result.error)
33
- log_error "Destroying device #{device.id}", result, device
34
- device.destroy
35
- else
36
- log_error "Push to device #{device.id} failed", result, device
32
+ if device
33
+ if device_unrecoverable?(result.error)
34
+ log_error "Destroying device #{device.id}", result, device
35
+ device.destroy
36
+ else
37
+ log_error "Push to device #{device.id} failed", result, device
38
+ end
37
39
  end
38
40
  end
39
41
  end
data/lib/maia/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Maia
2
- VERSION = '1.1.2'.freeze
2
+ VERSION = '2.0.0'.freeze
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: 1.1.2
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Logan Serman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-06 00:00:00.000000000 Z
11
+ date: 2017-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '4.2'
19
+ version: 5.0.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '4.2'
26
+ version: 5.0.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activejob
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '4.2'
33
+ version: 5.0.2
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '4.2'
40
+ version: 5.0.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: responders
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: 0.2.0
61
+ version: 0.2.1
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: 0.2.0
68
+ version: 0.2.1
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: sqlite3
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -161,6 +161,7 @@ files:
161
161
  - Rakefile
162
162
  - app/controllers/concerns/maia/controller.rb
163
163
  - app/models/concerns/maia/model.rb
164
+ - app/models/maia/application_record.rb
164
165
  - app/models/maia/device.rb
165
166
  - app/views/layouts/maia/application.html.erb
166
167
  - app/views/maia/messages/new.html.erb
@@ -194,7 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
194
195
  version: '0'
195
196
  requirements: []
196
197
  rubyforge_project:
197
- rubygems_version: 2.4.8
198
+ rubygems_version: 2.6.12
198
199
  signing_key:
199
200
  specification_version: 4
200
201
  summary: Manage device tokens and push messaging with Rails and Mercurius.