moromi-aws-sns 0.11.0 → 0.12.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: 1e05640c122172894ce9ece2ce55a4423c6a07e0
4
- data.tar.gz: 46f9d345ae9f7effa2659b4c4000c8939ba180b3
3
+ metadata.gz: cd6c8cad33c5f12466294a0faeaabce0fc910f81
4
+ data.tar.gz: 1d413d4511b3bbf71e124b56d949ec8ba34e7359
5
5
  SHA512:
6
- metadata.gz: a7cda9d8976602947f041d40881914b0203c25cca42e72f015d09e8a804705477858f82c3ef1406a5808311c294578c220d2c8298ef1156f5e7b06aeebf2d25a
7
- data.tar.gz: 4fe8dd6b75105bd64063795c4aecfe3d1375433364a53587a52f0035b241a97daea83d841080841eb933b95a0e80d384ccbe1a1640efb80f1e66c068bde7bd14
6
+ metadata.gz: e6168df685bba3f1dcc4cddcaecf31040e37df3077bd74b423f4b33f0133efc7f1312fcf4115efc71500b9e23d56d918b6612ee8382ef02e777af3c2245fe931
7
+ data.tar.gz: 6b780788a05c925753aace43b0ad18c41b30ba91f052d50607c8108ea4665f63c4aebf0c19cb967e70e111954ecd98fefe874690330c98dfc1a1a1ed647b20cb
@@ -57,10 +57,27 @@ module Moromi
57
57
  }
58
58
  end
59
59
 
60
+ def to_data_hash
61
+ {
62
+ title: @title,
63
+ body: @body,
64
+ android_channel_id: @android_channel_id,
65
+ icon: @icon,
66
+ sound: @sound,
67
+ tag: @tag,
68
+ color: @color,
69
+ click_action: @click_action,
70
+ body_loc_key: @body_loc_key,
71
+ body_loc_args: @body_loc_args,
72
+ title_loc_key: @title_loc_key,
73
+ title_loc_args: @title_loc_args,
74
+ type: @type,
75
+ custom_data: @custom_data.to_json
76
+ }
77
+ end
78
+
60
79
  def to_message_json
61
- notification = to_hash
62
- %i[custom_data type].each { |k| notification.delete(k) }
63
- {notification: notification, data: @custom_data}.to_json
80
+ {data: to_data_hash}.to_json
64
81
  end
65
82
 
66
83
  private
@@ -1,7 +1,7 @@
1
1
  module Moromi
2
2
  module Aws
3
3
  module Sns
4
- VERSION = '0.11.0'
4
+ VERSION = '0.12.0'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moromi-aws-sns
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.12.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: 2017-09-08 00:00:00.000000000 Z
11
+ date: 2017-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-sns