frm_mercury 0.1.3 → 0.1.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d4671c387d55b1c6bb1f1ac3caf698b94118ed321d1114712d94829db1b0fc20
4
- data.tar.gz: 0bdca1141eeade80ef8e8d62447382c1366c8b108c3b7cb18d5ede8f070e5532
3
+ metadata.gz: 3e7667dcd71b588717762227ebfa68cf24249710153f588f886c70f25ec6fe11
4
+ data.tar.gz: 07bdbc0853cfc10a3e673b926d080a34fa91083c23d6d65f7b4ece1b6fe012b1
5
5
  SHA512:
6
- metadata.gz: e4d5fcb2ae12289a395fbeeaa25fb1243525f4df70f821435dee5797ac820e792c41d7acc227d8ff7b21b0e7a135f9b53a31e8f159bf30e72e5c9cfc71ae3a09
7
- data.tar.gz: f1da372b130d70566249437c3e7208388abf25f207be872208b052ae7d1fb94da54e6a8a5fffc16a288f87c9c7fae05f19f4bcd054409017df15c6a38dd6e283
6
+ metadata.gz: 91f773c4d2390a3a941a84a32889561920c2a02b962162e7019edfc32057cf1f537c665cc6822ad2ee4cb73c6f97afe97bfe8f5dfcaefdd1ae3c596b4b9759a3
7
+ data.tar.gz: 6b007bd1c4e0c80a362cb20469136a2c709768d4681b4e17f58a6a7b238cd1f2878767d4986f0270e87b95623f5892eadd0566bbaa49f0fcb6f19616e0bb9c88
data/Gemfile.lock ADDED
@@ -0,0 +1,20 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ frm_mercury (0.1.3)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ rake (10.4.2)
10
+
11
+ PLATFORMS
12
+ ruby
13
+
14
+ DEPENDENCIES
15
+ bundler (~> 2.0)
16
+ frm_mercury!
17
+ rake (~> 10.0)
18
+
19
+ BUNDLED WITH
20
+ 2.0.1
data/README.md CHANGED
@@ -22,7 +22,19 @@ Or install it yourself as:
22
22
 
23
23
  ## Usage
24
24
 
25
- TODO: Write usage instructions here
25
+ First create an frm_mercury.rb in yours config/initializers
26
+
27
+ ```ruby
28
+ require 'frm_mercury'
29
+ FrmMercury.configure do |config|
30
+ config.api_key = "Your Api Key From Firebase console"
31
+ end
32
+ ```
33
+
34
+ Then to send a message...
35
+ ```ruby
36
+ FrmMercury::Sender.send("Device FCM token", "Some title", "Some body message", "sound.mp3 (Leave empty for default)", "Hash in case you want to send extra info (optional)")
37
+ ```
26
38
 
27
39
  ## Development
28
40
 
@@ -8,8 +8,11 @@ module FrmMercury
8
8
  require 'net/https'
9
9
  require 'json'
10
10
 
11
+ key = to.kind_of?(Array) ? "registration_ids" : "to"
12
+
13
+
11
14
  params = {
12
- "to": to,
15
+ "#{key}": to,
13
16
  "notification": {
14
17
  "title": title.nil? ? "Testing notification" : title,
15
18
  "body": body.nil? ? "This is a test push notification, liking it?" : body,
@@ -1,3 +1,3 @@
1
1
  module FrmMercury
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: frm_mercury
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - DEVPENGUIN
@@ -48,6 +48,7 @@ files:
48
48
  - ".gitignore"
49
49
  - CODE_OF_CONDUCT.md
50
50
  - Gemfile
51
+ - Gemfile.lock
51
52
  - LICENSE.txt
52
53
  - README.md
53
54
  - Rakefile