moromi-apns 0.7.0 → 0.8.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: 05bc31e586bb7a3d93019962fb4be84487487b35
4
- data.tar.gz: 2faac8ede4e600fbf33c889633c510b1a56bfd5c
3
+ metadata.gz: 32190ab275e62ad14f3f38abc9628f7582c448e1
4
+ data.tar.gz: 41a4f27cc3d6be7e81505191af8c4fdd0420b494
5
5
  SHA512:
6
- metadata.gz: d2e2046ee8130935dbd750d9b5b4e47484812ca07ab0715d3be524284090c58e8e3589ddbb09a3a8a9626fc6d10b42cbbe0920b0b00552ab9ff4d0eb8d5c1a9a
7
- data.tar.gz: 22f75d95951edb6dc5e004d9535e5dfc5f83bddc3888fa30891aabd1fa26351d862d346573cd09ad7457c8b99a0c48b34aca7da47b75dc76a45a34188c34b1f3
6
+ metadata.gz: 73c6b4c57555334df2c230a7e1512fd98999cb0111a09960d18b8f89befdebb8ac4789e8be5e87219dc63e3a416a526d7fede048a1d479ccd3d0d9f2bb3c15af
7
+ data.tar.gz: 95b2bc3fa6bcac3bcef117d9b34781c2edd34bb5d3ff0703171c27bd3fe778d52780da9375f35ea193a0ee5e08a20e8c4ca8c45e9c68da2b6945162069b9dbb0
@@ -9,12 +9,13 @@ module Moromi::Apns::Message
9
9
  def_delegators :@parameter, :alert, :badge, :sound, :content_available, :mutable_content, :category, :priority
10
10
 
11
11
  # @param [Moromi::Apns::Parameter] parameter
12
- def initialize(parameter:)
12
+ def initialize(parameter:, type: nil)
13
13
  @parameter = parameter
14
+ @type = type
14
15
  end
15
16
 
16
17
  def type
17
- self.class.name
18
+ type || self.class.name
18
19
  end
19
20
 
20
21
  def custom_data
@@ -45,7 +46,7 @@ module Moromi::Apns::Message
45
46
  # @param [Hash] params
46
47
  def self.unserialize(params)
47
48
  parameter = ::Moromi::Apns::Parameter.unserialize(params[:parameter])
48
- new(parameter: parameter)
49
+ new(parameter: parameter, type: params[:type])
49
50
  end
50
51
  end
51
52
  end
@@ -1,5 +1,5 @@
1
1
  module Moromi
2
2
  module Apns
3
- VERSION = '0.7.0'
3
+ VERSION = '0.8.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moromi-apns
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takahiro Ooishi