jera_push 2.1.2 → 2.1.4

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: f7236749dd21e8caed1678a8e44c9e00b6e034e1198b9049bf5bc36ba5cee605
4
- data.tar.gz: 36f20664f005ad3459f6651ad32ac1094bd1fa9556d198a332005c92363f6138
3
+ metadata.gz: bacdcafc77ea174f2845709190af057b04d05911a0ae685d1f3cf23e40b3c455
4
+ data.tar.gz: 43eaa09a9a059bee8bc22284c8be0581f20c7ad198a17ca17f43384c0d8481b7
5
5
  SHA512:
6
- metadata.gz: 03e288ec7ce98901ab70ac41a64df9f607117af92f954357cc383191abe4a970da61764367b324d97fad57c95805fc32a4fc0833ed8980a54bf550acd7418e7c
7
- data.tar.gz: f33ffb817dc6f3f3491415703559cbeff5a3efc3e3f1aebab38f49b818605befe837d3a52538ec0f5c9ea64c4b8b3e8b7a11f0cb2dcb063bae049441045f14c9
6
+ metadata.gz: afc60f08c70e9537018a7a091e985369f7ffc1b83f13b9107d2f1a6f34022d6f4ab40ced218031288724d31fb547966fa6edafe12833c43cb9a7bdebb9ff76a6
7
+ data.tar.gz: cdb54bbb7fd80e982a987421829603495f7ac2c16bd6dd525aa4c27c65a60aed560d031cb9fe090ebef162a5b72622070b9225dc2ca82a44b1880087ad583a25
@@ -5,7 +5,7 @@ JeraPush.setup do |config|
5
5
  config.resources_name = ["<%= file_name.classify %>"]
6
6
  # You need to create a Account Service on google cloud, with editor permission or administrator. Flow this doc: https://cloud.google.com/iam/docs/service-accounts-create?hl=pt-br
7
7
  config.project_id = "YOUR_PROJECT_ID" # inside of the account service json
8
- config.credentials_path = "YOUR_CREDENTIALS_PATH" #https://firebase.google.com/docs/cloud-messaging/migrate-v1?hl=pt-br#provide-credentials-manually
8
+ config.credentials_path = Rails.root.join("YOUR_CREDENTIALS_NAME").to_path #https://firebase.google.com/docs/cloud-messaging/migrate-v1?hl=pt-br#provide-credentials-manually
9
9
  ######################################################
10
10
  # Resource attribute showed in views #
11
11
  # IMPORTANT: All models need to have this attributes #
@@ -3,7 +3,7 @@ module JeraPush::Services
3
3
  def initialize(push:)
4
4
  super
5
5
  @push = push
6
- @device = @push.devices
6
+ @devices = @push.devices
7
7
  end
8
8
 
9
9
  def call
@@ -29,9 +29,9 @@ module JeraPush::Services
29
29
 
30
30
  def send_push_to_devices
31
31
  @devices.each do |device|
32
- message_device = @message.message_devices.create(device: device)
32
+ @message_device = @message.message_devices.create(device: device)
33
33
  @push.device = device
34
- send_push(device, message_device)
34
+ send_push
35
35
  end
36
36
  end
37
37
 
@@ -1,3 +1,3 @@
1
1
  module JeraPush
2
- VERSION = "2.1.2"
2
+ VERSION = "2.1.4"
3
3
  end
data/lib/jera_push.rb CHANGED
@@ -30,9 +30,6 @@ module JeraPush
30
30
  mattr_accessor :project_id
31
31
  @@project_id = nil
32
32
 
33
- mattr_accessor :project_id
34
- @@project_id = nil
35
-
36
33
  mattr_accessor :default_topic
37
34
  @@default_topic = 'jera_push_development'
38
35
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jera_push
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.2
4
+ version: 2.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jera
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-16 00:00:00.000000000 Z
11
+ date: 2024-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails