moromi-apns 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fec0ceed3702712d6e650344a4ff70ba3435dc32
4
- data.tar.gz: fe980721e53b811b6df5fb3cdf4456dc9db20fe7
3
+ metadata.gz: 1e7d617b691e0edf2fb30a4315fdbd4ce37a200c
4
+ data.tar.gz: a5fc0ee4706e6eb2f7277f9becb1b13daaeaac9a
5
5
  SHA512:
6
- metadata.gz: f9894585af2db8a1c9c5a1941cbb199c3a931de95ab4fe775b25d5b6d03ed1defc6faaba2b464d479f599f8a5c560540fe3df95925653df3883139e1a00ca36f
7
- data.tar.gz: 1f75efb56c54be68ef923d4033cf6f7bc3e12777d21bad72f7555f87c489648263ae3d34077033feb5afc819a622aa4aa3a9a4131bc4a65875ee3efcff1e7e25
6
+ metadata.gz: 117fbd27d4fcbc9402fc3aabfebf0bd0529cefa64bb57679d4596b5e947e5bf9da33a647c774cd6db31500fb6fffd5ef1afbae066a9d737efcf935511c1762b1
7
+ data.tar.gz: d7aa6f13feb2eeef150152a596a2a94b7858de8c9af1c330f872d041410f486d6be876f5d9c8278c00e7086a474b9b30b461fcad4dc9c31f8b241401a7f1d02f
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Moromi::Apns
2
2
 
3
- [![Latest Version](https://img.shields.io/gem/v/moromi.svg)](http://rubygems.org/gems/moromi-apns)
3
+ [![Latest Version](https://img.shields.io/gem/v/moromi-apns.svg)](http://rubygems.org/gems/moromi-apns)
4
4
  [![Circle CI](https://circleci.com/gh/moromi/moromi-apns.svg?style=svg)](https://circleci.com/gh/moromi/moromi-apns)
5
5
 
6
6
  APNS model.
@@ -6,7 +6,7 @@ module Moromi::Apns::Message
6
6
 
7
7
  attr_reader :parameter
8
8
 
9
- def_delegators :@parameter, :alert, :badge, :sound, :content_available, :priority
9
+ def_delegators :@parameter, :alert, :badge, :sound, :content_available, :category, :priority
10
10
 
11
11
  # @param [Moromi::Apns::Parameter] parameter
12
12
  def initialize(parameter:)
@@ -8,14 +8,16 @@ module Moromi
8
8
  attr_reader :badge
9
9
  attr_reader :sound
10
10
  attr_reader :content_available
11
+ attr_reader :category
11
12
  attr_reader :priority
12
13
  attr_reader :custom_data
13
14
 
14
- def initialize(alert:, badge:, sound: 'default', content_available: 1, priority: 10, custom_data: {})
15
+ def initialize(alert:, badge:, sound: 'default', content_available: 1, category: nil, priority: 10, custom_data: {})
15
16
  @alert = alert
16
17
  @badge = badge
17
18
  @sound = sound
18
19
  @content_available = content_available
20
+ @category = category
19
21
  @priority = priority
20
22
  @custom_data = custom_data
21
23
  end
@@ -34,6 +36,7 @@ module Moromi
34
36
  badge: @badge,
35
37
  sound: @sound,
36
38
  content_available: @content_available,
39
+ category: @category,
37
40
  priority: @priority,
38
41
  custom_data: @custom_data
39
42
  }.to_json
@@ -46,6 +49,7 @@ module Moromi
46
49
  badge: hash[:badge],
47
50
  sound: hash[:sound],
48
51
  content_available: hash[:content_available],
52
+ category: hash[:category],
49
53
  priority: hash[:priority],
50
54
  custom_data: hash[:custom_data]
51
55
  )
@@ -1,5 +1,5 @@
1
1
  module Moromi
2
2
  module Apns
3
- VERSION = '0.3.0'
3
+ VERSION = '0.4.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moromi-apns
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takahiro Ooishi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-10-04 00:00:00.000000000 Z
11
+ date: 2016-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport