notification-pusher-onesignal 1.2.3 → 1.2.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 +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +4 -4
- data/lib/notification_pusher/one_signal.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7f494623972710cc4ebbb457b680c28609c552d1f45e1585e7c1d152b3f4ca1
|
4
|
+
data.tar.gz: 883a0caca51dd1ebb688b0c67dd7647c393afe4e45190a58c49412a4bf1252fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41538a5066cb83c86f71de73c5c2098a257614b3805fe36e5a603cde4b50ca9a1ef87e9c70a940da90cebfe425239feb19d3ca4b293dc33f0919975a6a0ff048
|
7
|
+
data.tar.gz: 2d54e7a6e222b9c4a4c7f36cdf10f1b9fd5b4663ea2acbd0c19ad664ce739837490039c67ec939b2ba274d767acfc1169863a38fa3eed7331fea2b775a0e6f0d
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -65,7 +65,7 @@ notification.push :OneSignal, player_ids: ['f158a844-9f3c-4207-b246-e93603b0a970
|
|
65
65
|
To get player id's you could use the [devise-onesignal](https://github.com/jonhue/devise-onesignal) gem. This is how that would look:
|
66
66
|
|
67
67
|
```ruby
|
68
|
-
notification.push :OneSignal, player_ids:
|
68
|
+
notification.push :OneSignal, player_ids: notification.target.onesignal_player_ids
|
69
69
|
```
|
70
70
|
|
71
71
|
You can also store OneSignal information in your notification opposed to specifying it when pushing:
|
@@ -73,10 +73,10 @@ You can also store OneSignal information in your notification opposed to specify
|
|
73
73
|
```ruby
|
74
74
|
notification.metadata[:onesignal_url] = Rails.application.routes.url_helpers.root_url
|
75
75
|
notification.metadata[:onesignal_contents] = { en: 'My notification content' }
|
76
|
-
notification.metadata[:
|
76
|
+
notification.metadata[:onesignal_headings] = { en: 'My notification header' }
|
77
77
|
notification.metadata[:onesignal_subtitle] = { en: 'My notification subtitle' }
|
78
78
|
notification.save
|
79
|
-
notification.push :OneSignal, player_ids:
|
79
|
+
notification.push :OneSignal, player_ids: notification.target.onesignal_player_ids
|
80
80
|
```
|
81
81
|
|
82
82
|
|
@@ -92,7 +92,7 @@ notification.push :OneSignal, player_ids: User.first.onesignal_player_ids
|
|
92
92
|
|
93
93
|
**`contents`** Globalized content of the notification. Takes a hash with languages as keys and strings as values.
|
94
94
|
|
95
|
-
**`
|
95
|
+
**`headings`** Globalized header of the notification. Takes a hash with languages as keys and strings as values.
|
96
96
|
|
97
97
|
**`subtitle`** Globalized subtitle of the notification. Takes a hash with languages as keys and strings as values.
|
98
98
|
|
@@ -8,7 +8,7 @@ class NotificationPusher::OneSignal
|
|
8
8
|
app_id: options[:app_id],
|
9
9
|
url: options[:url] || notification.metadata[:onesignal_url],
|
10
10
|
contents: options[:contents] || notification.metadata[:onesignal_contents].to_h,
|
11
|
-
|
11
|
+
headings: options[:headings] || notification.metadata[:onesignal_headings].to_h,
|
12
12
|
subtitle: options[:subtitle] || notification.metadata[:onesignal_subtitle].to_h,
|
13
13
|
include_player_ids: options[:player_ids]
|
14
14
|
}, opts: { auth_key: options[:auth_key] }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: notification-pusher-onesignal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonas Hübotter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: one_signal
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.2.
|
33
|
+
version: 1.2.4
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.2.
|
40
|
+
version: 1.2.4
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|