devise-onesignal 3.0.0 → 3.0.1

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: bb032ba7dc17d0e039d2e4639d045017315cfccd837e57360f138635eb68a1af
4
- data.tar.gz: fd986da1ce7fede417100cb77203cee79654d9dd1a69ade70d5a980614dd00cc
3
+ metadata.gz: 512a364e2790a927c71a474ec19a9b66026e8e044d4d1f59a1f1577ac8bbe334
4
+ data.tar.gz: 3aa80afbc7d74072bc793750be7a98fd64329a4b541c540112c6aa91d8cfc5d5
5
5
  SHA512:
6
- metadata.gz: c3775ea071a90365e87cb8296735b78f5f9ae5858a551f746440ab0dc4e7e71271fa8aa1ec830c80fb8d93cb20b12c08abc9b0efe04469ae8cc32ca2827ac4fb
7
- data.tar.gz: 0bb3c6fb16252a8a99c334c6de7c596343f4684b278f172efa128b732797245d67b53a79ace98645b98fe576497912cd82e23de7d4b58f89bc84bb85e00da38b
6
+ metadata.gz: a22c23438ba1f388817f11a0919feff63dbca9f78b85f8e434387cf8017c29aace7a7bd0255448c29739acf67a0af7440404364b900b679416cadbac3bd59429
7
+ data.tar.gz: 35dd3694f3277ca45430081b6b4e1a3a211f047e3ac2a087c144512b2fbbb88cece3415523bd5e366e9dc119367d88c7e53631b9d39ce27c944cdae343d3d173
data/CHANGELOG.md CHANGED
@@ -4,6 +4,11 @@
4
4
 
5
5
  * nothing yet
6
6
 
7
+ ### 3.0.1 - 2017-12-21
8
+
9
+ * bugfixes
10
+ * custom `set_device_owner` method was not overriding default
11
+
7
12
  ### 3.0.0 - 2017-12-21
8
13
 
9
14
  * features
data/README.md CHANGED
@@ -12,6 +12,7 @@ This gem works well together with [notifications-rails](https://github.com/jonhu
12
12
 
13
13
  * [Installation](#installation)
14
14
  * [Usage](#usage)
15
+ * [Devise object](#devise-object)
15
16
  * [Device methods](#device-methods)
16
17
  * [current_device](#current_device)
17
18
  * [Subscribing](#subscribing)
@@ -84,7 +85,7 @@ document.addEventListener( 'turbolinks:load', function() {
84
85
 
85
86
  You most likely want to associate your devise object (e.g. `current_user`) with your OneSignal integration. Now, if your Devise model is called `User` and the `current_user` method is available you don't have to worry about that.
86
87
 
87
- Let's say our Devise model is named `Admin`. Just add `private` method to your `ApplicationController`:
88
+ Let's say our Devise model is named `Admin`. Just add a `private` method to your `ApplicationController`:
88
89
 
89
90
  ```ruby
90
91
  def set_device_owner
@@ -184,7 +185,7 @@ https://github.com/jonhue/devise-onesignal/graphs/contributors
184
185
 
185
186
  ### Semantic Versioning
186
187
 
187
- Sandboxy follows Semantic Versioning 2.0 as defined at http://semver.org.
188
+ devise-onesignal follows Semantic Versioning 2.0 as defined at http://semver.org.
188
189
 
189
190
  ## License
190
191
 
@@ -17,7 +17,7 @@ module DeviseOnesignal
17
17
  device = Device.find_or_create_by! onesignal_id: onesignal_player_id
18
18
  device.onesignal_permission = cookies[:oneSignalPlayerPermission]
19
19
  device.last_used = Time.now
20
- device.owner = set_device_owner
20
+ device.owner = ApplicationController.set_device_owner || set_device_owner
21
21
  device.save!
22
22
  end
23
23
  end
@@ -5,7 +5,7 @@ module DeviseOnesignal
5
5
  if cookies[:oneSignalPlayerId].nil?
6
6
  device = Device.new
7
7
  device.onesignal_permission = cookies[:oneSignalPlayerPermission]
8
- device.owner = set_device_owner
8
+ device.owner = ApplicationController.set_device_owner || set_device_owner
9
9
  device.last_used = Time.now
10
10
  else
11
11
  device = Device.find_by onesignal_id: cookies[:oneSignalPlayerId]
@@ -1,5 +1,5 @@
1
1
  module DeviseOnesignal
2
2
 
3
- VERSION = '3.0.0'
3
+ VERSION = '3.0.1'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise-onesignal
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Hübotter