pushr-fcm 1.0.0.pre → 1.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
  SHA256:
3
- metadata.gz: 1a3a8192542a24aa3bd443d64dd96c220ee562ff24f65adc70291d35500ef3e8
4
- data.tar.gz: 181f1c7c19232b6df6739e453560f8078c228c0d62197d1794010819511abc93
3
+ metadata.gz: 579d92683998de4c84a92541f753c2109c4c683d3aa39724bc384ae0c26c76d8
4
+ data.tar.gz: 18482834919c00505ff3144bbd385cb0adc276a357d52b711b4d5772d601edba
5
5
  SHA512:
6
- metadata.gz: ef695a56126a6ac381cbd4bba16b738226e08eaffa709155fa237b11400e0352bb7007915fb8b9f9f8c91305cef404e2ce6830d14709518a41856b9b8c95bd25
7
- data.tar.gz: 7dc9d51daf53a39f3f3178388813777416764f971ce1fcedb4ef4e3cd623538872be50bce9ee63063a87fdd74290cb23fa99b1b53c1eb0f45dbea06cb9c4f547
6
+ metadata.gz: eafac795cd373d0fc5dc1c635b2d3c27d8848c7cc236161245f13c67090af2f5e531d8fd57927f1e864be86f896c162345b07722acdbc9469aadcd09b79b63c6
7
+ data.tar.gz: 43f56841a8f1cd5bc00327b367e197079c65975d4ff48c499ecaa181267adecc0d36baf7edd541dc66e25b3c4b1a81cf0045684c969eb91be09225a34076e089
@@ -1,3 +1,3 @@
1
1
  module PushrFcm
2
- VERSION = '1.0.0.pre'
2
+ VERSION = '1.0.0'
3
3
  end
@@ -25,7 +25,6 @@ module Pushr
25
25
  def write(data)
26
26
  retry_count = 0
27
27
  begin
28
- puts data.to_message
29
28
  response = notification_request(data.to_message)
30
29
  handler = Pushr::Daemon::FcmSupport::ResponseHandler.new(response, data, retry_count)
31
30
  handler.handle
@@ -61,7 +60,6 @@ module Pushr
61
60
 
62
61
  begin
63
62
  response = @connection.post(uri.path, data, headers)
64
- puts response.inspect
65
63
  @last_use = Time.now
66
64
  rescue EOFError, Errno::ECONNRESET, Timeout::Error => e
67
65
  retry_count += 1
@@ -2,7 +2,7 @@ module Pushr
2
2
  class MessageFcm < Pushr::Message
3
3
  POSTFIX = 'fcm'.freeze
4
4
 
5
- attr_accessor :name, :data, :notification, :android, :webpush, :apns, :token, :topic, :condition
5
+ attr_accessor :name, :data, :notification, :android, :webpush, :apns, :fcm_options, :token, :topic, :condition
6
6
 
7
7
  # {
8
8
  # "name": string,
@@ -22,6 +22,9 @@ module Pushr
22
22
  # "apns": {
23
23
  # object(ApnsConfig)
24
24
  # },
25
+ # "fcm_options": {
26
+ # object (FcmOptions)
27
+ # },
25
28
  #
26
29
  # // Union field target can be only one of the following:
27
30
  # "token": string,
@@ -32,7 +35,7 @@ module Pushr
32
35
 
33
36
  def to_message
34
37
  hsh = {}
35
- %w[name data notification android webpush apns token topic condition].each do |variable|
38
+ %w[name data notification android webpush apns fcm_options token topic condition].each do |variable|
36
39
  hsh[variable] = send(variable) if send(variable)
37
40
  end
38
41
  MultiJson.dump(message: hsh)
@@ -40,7 +43,7 @@ module Pushr
40
43
 
41
44
  def to_hash
42
45
  hsh = { type: self.class.to_s, app: app, name: name, data: data, notification: notification, android: android,
43
- webpush: webpush, apns: apns, token: token, topic: topic, condition: condition }
46
+ webpush: webpush, apns: apns, fcm_options: fcm_options, token: token, topic: topic, condition: condition }
44
47
  hsh[Pushr::Core.external_id_tag] = external_id if external_id
45
48
  hsh
46
49
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pushr-fcm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Pesman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-18 00:00:00.000000000 Z
11
+ date: 2019-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json
@@ -250,12 +250,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
250
250
  version: 2.2.0
251
251
  required_rubygems_version: !ruby/object:Gem::Requirement
252
252
  requirements:
253
- - - ">"
253
+ - - ">="
254
254
  - !ruby/object:Gem::Version
255
- version: 1.3.1
255
+ version: '0'
256
256
  requirements: []
257
- rubyforge_project:
258
- rubygems_version: 2.7.6
257
+ rubygems_version: 3.0.6
259
258
  signing_key:
260
259
  specification_version: 4
261
260
  summary: FCM (Android) part of the modular push daemon.