maia 5.0.0 → 5.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/maia/fcm/credentials.rb +7 -4
- data/lib/maia/fcm/gateway.rb +1 -1
- data/lib/maia/version.rb +1 -1
- metadata +24 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd847af46e04883a303f52791ab7cd991153526ffa93d75a3c5136a48a404e3f
|
4
|
+
data.tar.gz: b9e71d912ed9e123abda8d93ea9d3c88ecb52331e8ca00939c1dbefc9da37f74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56560e192f501bfe22ce815e62f846c7554834affe9b4a267f6ce4887b6c69d2655a297c66097b59ef85c6782f4de38f7c060f3f77ffcc25726bae82a54d1a6c
|
7
|
+
data.tar.gz: e09d173ba69d1f2714e6f912880e49ff78ec20b9d21556ca55311f6c01a22b7c149b28589d7002f56d5cac66da990788201f4e8048a6167ee209f3b192159c5f
|
data/lib/maia/fcm/credentials.rb
CHANGED
@@ -5,16 +5,19 @@ module Maia
|
|
5
5
|
class Credentials
|
6
6
|
SCOPE = 'https://www.googleapis.com/auth/firebase.messaging'.freeze
|
7
7
|
|
8
|
-
def initialize(path = ENV['GOOGLE_APPLICATION_CREDENTIALS'])
|
9
|
-
@path
|
8
|
+
def initialize(path = ENV['GOOGLE_APPLICATION_CREDENTIALS'], cache: Rails.cache)
|
9
|
+
@path = path
|
10
|
+
@cache = cache
|
10
11
|
end
|
11
12
|
|
12
13
|
def project
|
13
|
-
to_h['project_id']
|
14
|
+
@project ||= to_h['project_id']
|
14
15
|
end
|
15
16
|
|
16
17
|
def token
|
17
|
-
|
18
|
+
@cache.fetch('maia-fcm-token', expires_in: 1.hour) do
|
19
|
+
credentials.fetch_access_token!['access_token']
|
20
|
+
end
|
18
21
|
end
|
19
22
|
|
20
23
|
def to_h
|
data/lib/maia/fcm/gateway.rb
CHANGED
data/lib/maia/version.rb
CHANGED
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: 5.
|
4
|
+
version: 5.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Logan Serman
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '5'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '9'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '5'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '9'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: activejob
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
version: '5'
|
40
40
|
- - "<"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '
|
42
|
+
version: '9'
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -49,7 +49,7 @@ dependencies:
|
|
49
49
|
version: '5'
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: '
|
52
|
+
version: '9'
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: responders
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -120,6 +120,20 @@ dependencies:
|
|
120
120
|
- - ">="
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: '0'
|
123
|
+
- !ruby/object:Gem::Dependency
|
124
|
+
name: pry
|
125
|
+
requirement: !ruby/object:Gem::Requirement
|
126
|
+
requirements:
|
127
|
+
- - ">="
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: '0'
|
130
|
+
type: :development
|
131
|
+
prerelease: false
|
132
|
+
version_requirements: !ruby/object:Gem::Requirement
|
133
|
+
requirements:
|
134
|
+
- - ">="
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: '0'
|
123
137
|
description: Manage device tokens and push messaging with Rails and FCM.
|
124
138
|
email:
|
125
139
|
- loganserman@gmail.com
|
@@ -164,7 +178,7 @@ homepage: https://github.com/lserman/maia
|
|
164
178
|
licenses:
|
165
179
|
- MIT
|
166
180
|
metadata: {}
|
167
|
-
post_install_message:
|
181
|
+
post_install_message:
|
168
182
|
rdoc_options: []
|
169
183
|
require_paths:
|
170
184
|
- lib
|
@@ -179,9 +193,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
179
193
|
- !ruby/object:Gem::Version
|
180
194
|
version: '0'
|
181
195
|
requirements: []
|
182
|
-
|
183
|
-
|
184
|
-
signing_key:
|
196
|
+
rubygems_version: 3.3.27
|
197
|
+
signing_key:
|
185
198
|
specification_version: 4
|
186
199
|
summary: Manage device tokens and push messaging with Rails and FCM.
|
187
200
|
test_files: []
|