notification-pusher-onesignal 1.2.3 → 1.2.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: 83cb0aef8e9080900979c6dbb73945358805414388cd25c750bc4ffce7077825
4
- data.tar.gz: 0c0e7bf6ecf0cd9c42014e023c9d13d8d7ca9bb89ca2d6b6dfc60773422e7ed6
3
+ metadata.gz: c7f494623972710cc4ebbb457b680c28609c552d1f45e1585e7c1d152b3f4ca1
4
+ data.tar.gz: 883a0caca51dd1ebb688b0c67dd7647c393afe4e45190a58c49412a4bf1252fc
5
5
  SHA512:
6
- metadata.gz: 78dc1ecafa8577e21e360a388e64e171d8a7c1075a6da632980d47d4fef848e1a2896d7b96ea267808d7b846b79985389443267f135d4a578f6ed1b90b27091b
7
- data.tar.gz: df8ecc4a3b546bf4a5c8905ab00e60e86f27fdab3e74b311d36d5f27f69d46ba8f722a710258de6969afffdb39941822d84b8cf17ae81671fb89f1db0eb76733
6
+ metadata.gz: 41538a5066cb83c86f71de73c5c2098a257614b3805fe36e5a603cde4b50ca9a1ef87e9c70a940da90cebfe425239feb19d3ca4b293dc33f0919975a6a0ff048
7
+ data.tar.gz: 2d54e7a6e222b9c4a4c7f36cdf10f1b9fd5b4663ea2acbd0c19ad664ce739837490039c67ec939b2ba274d767acfc1169863a38fa3eed7331fea2b775a0e6f0d
@@ -4,6 +4,11 @@
4
4
 
5
5
  * nothing yet
6
6
 
7
+ ### 1.2.4 - 2018/03/17
8
+
9
+ * bugfixes
10
+ * rename `headers` option to `headings`
11
+
7
12
  ### 1.1.0 - 2017/12/29
8
13
 
9
14
  * features
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: User.first.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[:onesignal_headers] = { en: 'My notification header' }
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: User.first.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
- **`headers`** Globalized header of the notification. Takes a hash with languages as keys and strings as values.
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
- headers: options[:headers] || notification.metadata[:onesignal_headers].to_h,
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.3
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-01-23 00:00:00.000000000 Z
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.3
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.3
40
+ version: 1.2.4
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement