fcm 1.0.7 → 1.0.8

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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -0
  3. data/fcm.gemspec +14 -14
  4. data/lib/fcm.rb +2 -2
  5. metadata +12 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4dec8402da3cac0b69ca604ad13a371e4c57616cf4ce7fe9d501e08ff93a3322
4
- data.tar.gz: d21ace2c8431e769b463cfc0d9c4995751e2fce9cdb73548b0160a558e5dacb1
3
+ metadata.gz: 16615f79f5432e2a352dc3c26e42d48efed7727a86f04f2b9d2bf93cca47aae6
4
+ data.tar.gz: d2fe30204d7ef51288014fbcc2df5f211ea8d8b4dbbc28cb9af0d9fadc54d6c7
5
5
  SHA512:
6
- metadata.gz: cacba1ce61e62b1d535f1f765fb2491eae84af3fac7a579949939c4f40e3a0572aec29956c21f0194ce409283e2ddd87dff7fd483a01116cd8636579133b8197
7
- data.tar.gz: 78353f02fbdb092e01bc634e7371c57341b168ff65363382b2c6948596aedcf2fa6a39dc82ba06f853357671f10d0578f49af0d0f0158c760da06ee10d806f33
6
+ metadata.gz: 06c32340bae1ab25e1d66c06d63fa5d7276214604902218a1a9f5cf06774a60a08ab4bc700616f63ed5563a8b106227ef073168fcbfa29798348fadec2480767
7
+ data.tar.gz: ffa28e382feba7728e496318ea546237c9c5070ccc175d71a2dc83e9adf0a58efa932336a729549599978b6a2406ec01e80bd060997f779631d3a53122660b59
data/README.md CHANGED
@@ -210,6 +210,10 @@ The guide to set up an iOS app to get notifications is here: [Setting up a FCM C
210
210
 
211
211
  ## ChangeLog
212
212
 
213
+ ### 1.0.8
214
+ - caches calls to `Google::Auth::ServiceAccountCredentials` #103
215
+ - Allow `faraday` versions from 1 up to 2 #101
216
+
213
217
  ### 1.0.7
214
218
 
215
219
  - Fix passing `DEFAULT_TIMEOUT` to `faraday` [#96](https://github.com/decision-labs/fcm/pull/96)
data/fcm.gemspec CHANGED
@@ -2,23 +2,23 @@
2
2
  $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
- s.name = "fcm"
6
- s.version = "1.0.7"
7
- s.platform = Gem::Platform::RUBY
8
- s.authors = ["Kashif Rasul", "Shoaib Burq"]
9
- s.email = ["kashif@decision-labs.com", "shoaib@decision-labs.com"]
10
- s.homepage = "https://github.com/decision-labs/fcm"
11
- s.summary = %q{Reliably deliver messages and notifications via FCM}
5
+ s.name = "fcm"
6
+ s.version = "1.0.8"
7
+ s.platform = Gem::Platform::RUBY
8
+ s.authors = ["Kashif Rasul", "Shoaib Burq"]
9
+ s.email = ["kashif@decision-labs.com", "shoaib@decision-labs.com"]
10
+ s.homepage = "https://github.com/decision-labs/fcm"
11
+ s.summary = %q{Reliably deliver messages and notifications via FCM}
12
12
  s.description = %q{fcm provides ruby bindings to Firebase Cloud Messaging (FCM) a cross-platform messaging solution that lets you reliably deliver messages and notifications at no cost to Android, iOS or Web browsers.}
13
- s.license = "MIT"
13
+ s.license = "MIT"
14
14
 
15
- s.required_ruby_version = '>= 2.4.0'
15
+ s.required_ruby_version = ">= 2.4.0"
16
16
 
17
- s.files = `git ls-files`.split("\n")
18
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
17
+ s.files = `git ls-files`.split("\n")
18
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
+ s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
20
20
  s.require_paths = ["lib"]
21
21
 
22
- s.add_runtime_dependency('faraday', '~> 1')
23
- s.add_runtime_dependency('googleauth', '~> 1')
22
+ s.add_runtime_dependency("faraday", ">= 1.0.0", "< 3.0")
23
+ s.add_runtime_dependency("googleauth", "~> 1")
24
24
  end
data/lib/fcm.rb CHANGED
@@ -320,11 +320,11 @@ class FCM
320
320
 
321
321
  def jwt_token
322
322
  scope = "https://www.googleapis.com/auth/firebase.messaging"
323
- authorizer = Google::Auth::ServiceAccountCredentials.make_creds(
323
+ @authorizer ||= Google::Auth::ServiceAccountCredentials.make_creds(
324
324
  json_key_io: json_key,
325
325
  scope: scope,
326
326
  )
327
- token = authorizer.fetch_access_token!
327
+ token = @authorizer.fetch_access_token!
328
328
  token["access_token"]
329
329
  end
330
330
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fcm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kashif Rasul
@@ -9,22 +9,28 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-02-21 00:00:00.000000000 Z
12
+ date: 2022-04-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: '1'
20
+ version: 1.0.0
21
+ - - "<"
22
+ - !ruby/object:Gem::Version
23
+ version: '3.0'
21
24
  type: :runtime
22
25
  prerelease: false
23
26
  version_requirements: !ruby/object:Gem::Requirement
24
27
  requirements:
25
- - - "~>"
28
+ - - ">="
26
29
  - !ruby/object:Gem::Version
27
- version: '1'
30
+ version: 1.0.0
31
+ - - "<"
32
+ - !ruby/object:Gem::Version
33
+ version: '3.0'
28
34
  - !ruby/object:Gem::Dependency
29
35
  name: googleauth
30
36
  requirement: !ruby/object:Gem::Requirement