ruby-mpns 1.1.1 → 1.1.2
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/CHANGELOG.md +5 -0
- data/README.md +4 -1
- data/VERSION +1 -1
- data/lib/ruby-mpns.rb +5 -1
- data/ruby-mpns.gemspec +2 -2
- data/sample/sample_usage.rb +1 -1
- metadata +2 -2
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -63,12 +63,15 @@ The following notification parameters can be defined in the options hash for `:t
|
|
63
63
|
* `back_title` - the title when the tile is flipped
|
64
64
|
* `back_background_image` - the path to a local image embedded in the app or an image accessible via HTTP (.jpg or .png, 173x137px, max 80kb)
|
65
65
|
* `back_content` - the content when the tile is flipped
|
66
|
+
* `navigation_uri` _(optional)_ - the exact navigation URI for the tile to update, only needed if you wish to update a secondary tile
|
66
67
|
|
67
68
|
## Reference
|
68
69
|
|
69
70
|
For general information about Push Notification on Windows Phone check the [MSDN](http://msdn.microsoft.com/en-us/library/hh202945\(v=vs.92\).aspx).
|
70
71
|
|
71
|
-
##
|
72
|
+
## How to contribute ?
|
73
|
+
|
74
|
+
### Missing features
|
72
75
|
|
73
76
|
* Add unit tests
|
74
77
|
* Add support for multi-level hash for raw notifications
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.2
|
data/lib/ruby-mpns.rb
CHANGED
@@ -109,12 +109,16 @@ protected
|
|
109
109
|
# - back_title : string
|
110
110
|
# - back_background_image : string, path to local image embedded in the app or accessible via HTTP (.jpg or .png, 173x137px, max 80kb)
|
111
111
|
# - back_content : string
|
112
|
+
# - (optional) navigation_uri : string, the exact navigation URI for the tile to update, only needed if you wish to update a secondary tile
|
112
113
|
def tile_notification_with_options options = {}
|
113
114
|
coder = HTMLEntities.new
|
114
115
|
|
116
|
+
navigation_uri = options[:navigation_uri]
|
117
|
+
tile_id = navigation_uri.nil? ? "" : 'Id="' + coder.encode(navigation_uri) + '"'
|
118
|
+
|
115
119
|
notification = '<?xml version="1.0" encoding="utf-8"?>'
|
116
120
|
notification << '<wp:Notification xmlns:wp="WPNotification">'
|
117
|
-
notification << '<wp:Tile '
|
121
|
+
notification << '<wp:Tile' << tile_id << '>'
|
118
122
|
notification << '<wp:BackgroundImage>' << coder.encode(options[:background_image]) << '</wp:BackgroundImage>'
|
119
123
|
notification << '<wp:Count>' << coder.encode(options[:count]) << '</wp:Count>'
|
120
124
|
notification << '<wp:Title>' << coder.encode(options[:title]) << '</wp:Title>'
|
data/ruby-mpns.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "ruby-mpns"
|
8
|
-
s.version = "1.1.
|
8
|
+
s.version = "1.1.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Nicolas VERINAUD"]
|
12
|
-
s.date = "2012-
|
12
|
+
s.date = "2012-09-29"
|
13
13
|
s.description = "This gem provides an easy way to send push notifications to Windows Phone devices using Microsoft Push Notification Service."
|
14
14
|
s.email = "n.verinaud@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
data/sample/sample_usage.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-mpns
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-09-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: htmlentities
|