fcm 2.0.0 → 2.0.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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -0
  3. data/fcm.gemspec +1 -1
  4. data/lib/fcm.rb +3 -2
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 72a9acc9e72359d421c740b5ac8ce3c9547a587a1e08672931a51355523b27a0
4
- data.tar.gz: 250eb8a97008cc4affc39a512695c5cf9339baa35de77854169746ed80fcf7c3
3
+ metadata.gz: 49ddf83437f7c8df20298ffa3f334473e0032032e7f8e88d5021185f448f4606
4
+ data.tar.gz: fc79d5369ee5b22b854f49889a69de1612c4c7e2a37ec17683b8a428a0326549
5
5
  SHA512:
6
- metadata.gz: 0beb8691a1a5dc0090ce92cb584c1f44aa97545de9f45d649a65b2ac4cd2196db8178ace4675a7f39deca00bcb8650fb4a9e71569b609f24aa6942fa88e08c2c
7
- data.tar.gz: e079ef26d913c7e418e89943cedc980034f03d49cc749c681ee8e4e237fe6a2a059342f012c235a84d2ba227fa8941671e9834350beea5ce93e6ee7341f2aa49
6
+ metadata.gz: 9b37b2f37b95cc0816547c973872c8c17c3905602fe8162bff2e25e3a52c7997f7dae11c472a399c8d947e9bfdde668b3223f793b912d274f4bcd204ba827325
7
+ data.tar.gz: 06f380df29d1bcc8683df25f45c099c8615609081308de79c0966c52ea9f4f887155ee77591b65ad479260d736b5e2b98f682e4616bce19cfc52c937995015ad
data/README.md CHANGED
@@ -274,6 +274,9 @@ The guide to set up an iOS app to get notifications is here: [Setting up a FCM C
274
274
 
275
275
  ## ChangeLog
276
276
 
277
+ ### 2.0.1
278
+ - Add `http_options` to `initialize` method and whitelist `timeout` option
279
+
277
280
  ### 2.0.0
278
281
  #### Breaking Changes
279
282
  - Remove deprecated `API_KEY`
data/fcm.gemspec CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "fcm"
6
- s.version = "2.0.0"
6
+ s.version = "2.0.1"
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ["Kashif Rasul", "Shoaib Burq"]
9
9
  s.email = ["kashif@decision-labs.com", "shoaib@decision-labs.com"]
data/lib/fcm.rb CHANGED
@@ -12,9 +12,10 @@ class FCM
12
12
  INSTANCE_ID_API = "https://iid.googleapis.com"
13
13
  TOPIC_REGEX = /[a-zA-Z0-9\-_.~%]+/
14
14
 
15
- def initialize(json_key_path = "", project_name = "")
15
+ def initialize(json_key_path = "", project_name = "", http_options = {})
16
16
  @json_key_path = json_key_path
17
17
  @project_name = project_name
18
+ @http_options = http_options
18
19
  end
19
20
 
20
21
  # See https://firebase.google.com/docs/cloud-messaging/send-message
@@ -192,7 +193,7 @@ class FCM
192
193
  def for_uri(uri, extra_headers = {})
193
194
  connection = ::Faraday.new(
194
195
  url: uri,
195
- request: { timeout: DEFAULT_TIMEOUT }
196
+ request: { timeout: @http_options.fetch(:timeout, DEFAULT_TIMEOUT) }
196
197
  ) do |faraday|
197
198
  faraday.adapter Faraday.default_adapter
198
199
  faraday.headers["Content-Type"] = "application/json"
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: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kashif Rasul
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-09-18 00:00:00.000000000 Z
12
+ date: 2024-10-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday