notification-pusher-onesignal 1.0.0.beta9 → 1.0.0.beta10

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: c1752dbe762ddbe2fb5e4e08c5eb40b16b08943c500b92b6a522183197c0aa5c
4
- data.tar.gz: e75984e28926300dc1faffb3aaaac2fa6564f6790d38895a46494f8d797740b6
3
+ metadata.gz: ddb5a0e2db3f042edf79e9bf0542a12eb7eb7aa62720a1dfd5e8fb92d4b91a2c
4
+ data.tar.gz: 1034c9c9b2462197967abe50b3cc54970ed7b2317413c9ed72074715427c006c
5
5
  SHA512:
6
- metadata.gz: b5a622932eb8cffd9eba03532c8d43aa30b99810842822ee1a5daca174315852fb493e74b7b41a78ea43589e97a96f8239c41914671e28fe08ddf46250b930b4
7
- data.tar.gz: e3e0d90746f8a815130271452b81e439fc4495f0f70b5b5a4eb77b7ec99a527610c123802a2d0f0bd351922f982002c18bb88b2e2eceb458c890077e68b7e7fa
6
+ metadata.gz: 81b242775bf672ea6c9a93b99311f5f9d5fbacea50be37e49c9361220ae82d01c8cb27b8d7fc3d95b909abeecd37fc4b00ed71ff07eeea02001be6b601c07e8e
7
+ data.tar.gz: 3e78957c1525bd71add116d2630fc187d8d7ac3ad1d5b536fe53f15f7ba1eddc027b71200c5e949014f49ac5006a45e1d023cd518fa43e42e660c09c1f0de592
@@ -0,0 +1 @@
1
+ require 'notification_pusher/one_signal'
@@ -0,0 +1,14 @@
1
+ class NotificationPusher::OneSignal
2
+
3
+ def initialize notification, options = {}
4
+ if options[:player_ids].any?
5
+ OneSignal::Notification.create params: {
6
+ app_id: options[:app_id],
7
+ url: options[:url] || notification.metadata[:onesignal_url],
8
+ contents: options[:contents] || notification.metadata[:onesignal_contents].to_h,
9
+ include_player_ids: options[:player_ids]
10
+ }, opts: { auth_key: options[:auth_key] }
11
+ end
12
+ end
13
+
14
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: notification-pusher-onesignal
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta9
4
+ version: 1.0.0.beta10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Hübotter
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 1.0.0.beta9
33
+ version: 1.0.0.beta10
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.0.0.beta9
40
+ version: 1.0.0.beta10
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -75,8 +75,8 @@ files:
75
75
  - CHANGELOG.md
76
76
  - LICENSE
77
77
  - README.md
78
- - lib/notification-pusher/one_signal.rb
79
- - lib/notification_pusher.rb
78
+ - lib/notification-pusher-onesignal.rb
79
+ - lib/notification_pusher/one_signal.rb
80
80
  homepage: https://github.com/jonhue/notifications-rails/tree/master/notification-pusher/notification-pusher-onesignal
81
81
  licenses:
82
82
  - MIT
@@ -1,16 +0,0 @@
1
- module NotificationPusher
2
- class OneSignal
3
-
4
- def initialize notification, options = {}
5
- if options[:player_ids].any?
6
- OneSignal::Notification.create params: {
7
- app_id: options[:app_id],
8
- url: options[:url] || notification.metadata[:onesignal_url],
9
- contents: options[:contents] || notification.metadata[:onesignal_contents].to_h,
10
- include_player_ids: options[:player_ids]
11
- }, opts: { auth_key: options[:auth_key] }
12
- end
13
- end
14
-
15
- end
16
- end
@@ -1,5 +0,0 @@
1
- module NotificationPusher
2
-
3
- require 'notification_pusher/one_signal'
4
-
5
- end