Push0r 0.4.3 → 0.4.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/lib/push0r/APNS/ApnsPushMessage.rb +6 -2
- metadata +3 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 743b3cb996a180ba70171eeab749a395c78c6d03
|
|
4
|
+
data.tar.gz: a1319283af3cd495de24590dcc7967e09b585248
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 24f684c5e324447760f1c0d6ee19bc75342c5bf7bbe6d19eef0829113ec72b2964765ca08bab76c1c87794b6c0520f75c2a3979a2b7931b37c18d6b37ee3cdc2
|
|
7
|
+
data.tar.gz: 7d9fc5ae2fc378ddef6c6f7e04b5984440e3ab20624968c03bf89d10418595b17071895731edda9e4d9dc7c1a74996e77d3fc368f5e425cddd0c2299c14d4366
|
|
@@ -17,7 +17,8 @@ module Push0r
|
|
|
17
17
|
# @param alert_text [String] the alert text to be displayed
|
|
18
18
|
# @param sound [String] the sound to be played
|
|
19
19
|
# @param badge [Fixnum] the badge value to be displayed
|
|
20
|
-
|
|
20
|
+
# @param category [String] the category this message belongs to (see UIUserNotificationCategory in apple's documentation)
|
|
21
|
+
def simple(alert_text = nil, sound = nil, badge = nil, category = nil)
|
|
21
22
|
new_payload = {aps: {}}
|
|
22
23
|
if alert_text
|
|
23
24
|
new_payload[:aps][:alert] = alert_text
|
|
@@ -27,7 +28,10 @@ module Push0r
|
|
|
27
28
|
end
|
|
28
29
|
if badge
|
|
29
30
|
new_payload[:aps][:badge] = badge
|
|
30
|
-
end
|
|
31
|
+
end
|
|
32
|
+
if category
|
|
33
|
+
new_payload[:aps][:category] = category
|
|
34
|
+
end
|
|
31
35
|
@payload.merge!(new_payload)
|
|
32
36
|
|
|
33
37
|
return self
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: Push0r
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kai Straßmann
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2015-05-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rspec
|
|
@@ -59,9 +59,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
59
59
|
version: '0'
|
|
60
60
|
requirements: []
|
|
61
61
|
rubyforge_project:
|
|
62
|
-
rubygems_version: 2.
|
|
62
|
+
rubygems_version: 2.4.5
|
|
63
63
|
signing_key:
|
|
64
64
|
specification_version: 4
|
|
65
65
|
summary: Push0r gem
|
|
66
66
|
test_files: []
|
|
67
|
-
has_rdoc:
|