pntfr 0.1.4 → 0.1.5

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
  SHA1:
3
- metadata.gz: 72f800de7abd264da783c00f614745d0707a1c67
4
- data.tar.gz: 6a517da6bbb0289631ed30b446b446162a9afb55
3
+ metadata.gz: 81121c5693dc0883a2cc0ac54c11b5e463d5c38f
4
+ data.tar.gz: 78fe7b37a43277c09b070fe57ea31476f9f355fc
5
5
  SHA512:
6
- metadata.gz: ef4c923993a150b1d72c02ff360675a86cd0b786836b12c558dd72e426d178fb0904640a7ec6a49b3c180643bc4f149f7e3997080073e47cc1587b7935ccdffc
7
- data.tar.gz: 84b38c45c01d94fb1a70821da23f54eba0bcb4b2d4efb0fe8d59c953e5678540359be4ffc3359fdc6cc4042a81f5e33fd759189793ee8b3d1108b4d98d89597e
6
+ metadata.gz: 3edc5e879d1f19dddad721ebe06c5256d666a997d9e20e6efc0e08f84cf526d28cb62a8352bfbfaf358a9b69e97248680406e0b93d98f65d448e3c1b5f0419bf
7
+ data.tar.gz: f00892e3d4d9f97447bf947c43162320c992a43ebb56da5874e48c0ccfffef6fb4c5e20896a24205504965de37a75d11334437d03964e2294e448a99a4a75605
data/README.md CHANGED
@@ -74,7 +74,7 @@ vsession.notify
74
74
  # send notifications with custom content (an extra optional parameter to #msg)
75
75
  vsession= Pntfr::Notifier.to(session)
76
76
  vsession.msg(
77
- {:title => 'Some Title', :description => 'A description'},
77
+ {:title => 'Short Title'},
78
78
  {
79
79
  :extra1 => 'extra one',
80
80
  :extra_2 => 'extra 2',
data/lib/pntfr/version.rb CHANGED
@@ -1,6 +1,4 @@
1
1
  module Pntfr
2
- # [FEATURE] Accept custom content.
3
- # [DOC] Documentation for testing.
4
- # [TEST] Facilitate Rails testing.
5
- VERSION = '0.1.4'
2
+ # [FIX] Custom content is a "others" key in the content argument to APNS.
3
+ VERSION = '0.1.5'
6
4
  end
@@ -51,10 +51,10 @@ module Pntfr
51
51
  @alert= @sound= @badge= nil
52
52
  end
53
53
  def add_custom_content custom
54
- @custom= {}
54
+ @custom= {other: {}}
55
55
  custom.each_pair { |k, v|
56
56
  key= "acme-#{k}".to_sym
57
- @custom[key]= v
57
+ @custom[:other][key]= v
58
58
  }
59
59
  end
60
60
  end
@@ -54,9 +54,10 @@ module Pntfr
54
54
  refute_nil ios_notifs, "A notification should have been delivered for #{@push_id}"
55
55
  ios_notif= ios_notifs.last
56
56
  assert_equal 'Test Title', ios_notif[:alert]
57
- assert_equal 'extra one', ios_notif[:'acme-extra1']
58
- assert_equal 'extra 2', ios_notif[:'acme-extra_2']
59
- assert_equal({lastkey: 'last value'}, ios_notif[:'acme-last-extra'])
57
+ other= ios_notif[:other]
58
+ assert_equal 'extra one', other[:'acme-extra1']
59
+ assert_equal 'extra 2', other[:'acme-extra_2']
60
+ assert_equal({lastkey: 'last value'}, other[:'acme-last-extra'])
60
61
  end
61
62
  end
62
63
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pntfr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - oliver
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-23 00:00:00.000000000 Z
11
+ date: 2014-12-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: apns