ios_push_notifications 0.6 → 0.7
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.
- data/README.rdoc +1 -1
- data/lib/ios_push_notifications/device.rb +12 -12
- metadata +2 -2
data/README.rdoc
CHANGED
|
@@ -21,7 +21,7 @@ gem "ios_push_notifications"
|
|
|
21
21
|
|
|
22
22
|
== Usage
|
|
23
23
|
TODO
|
|
24
|
-
device = IOSPN::Device.find_or_create_by_token(
|
|
24
|
+
device = IOSPN::Device.find_or_create_by_token(params[:device_token])
|
|
25
25
|
|
|
26
26
|
notification = IOSPN::Notification.new
|
|
27
27
|
notification.device = device
|
|
@@ -5,11 +5,11 @@ module IOSPN
|
|
|
5
5
|
validates_uniqueness_of :token
|
|
6
6
|
validates_format_of :token, :with => /^[a-z0-9]{8}\s[a-z0-9]{8}\s[a-z0-9]{8}\s[a-z0-9]{8}\s[a-z0-9]{8}\s[a-z0-9]{8}\s[a-z0-9]{8}\s[a-z0-9]{8}$/
|
|
7
7
|
|
|
8
|
-
def save
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
end
|
|
8
|
+
# def save
|
|
9
|
+
# self.last_registered_at = Time.now if self.last_registered_at.nil?
|
|
10
|
+
# self.token = self.token
|
|
11
|
+
# super()
|
|
12
|
+
# end
|
|
13
13
|
|
|
14
14
|
# before_save :set_last_registered_at
|
|
15
15
|
# private
|
|
@@ -18,13 +18,13 @@ module IOSPN
|
|
|
18
18
|
# self.token = self.token
|
|
19
19
|
# end
|
|
20
20
|
|
|
21
|
-
def token=(token)
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
end
|
|
21
|
+
# def token=(token)
|
|
22
|
+
# res = token.scan(/\<(.+)\>/).first
|
|
23
|
+
# unless res.nil? || res.empty?
|
|
24
|
+
# token = res.first
|
|
25
|
+
# end
|
|
26
|
+
# write_attribute('token', token)
|
|
27
|
+
# end
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
def to_hex
|
metadata
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: ios_push_notifications
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease:
|
|
5
|
-
version: "0.
|
|
5
|
+
version: "0.7"
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
8
8
|
- Seivan Heidari
|
|
@@ -10,7 +10,7 @@ autorequire:
|
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
12
|
|
|
13
|
-
date: 2011-
|
|
13
|
+
date: 2011-03-09 00:00:00 +08:00
|
|
14
14
|
default_executable:
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|