aws_sns_manager 0.0.2.pre.alpha.pre.28 → 0.0.2.pre.alpha.pre.31
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 +8 -8
- data/Gemfile.lock +24 -22
- data/lib/aws_sns_manager/client.rb +14 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
ZDdlYWY4MjE3OGQwZWZlYzllYzAwYjkwZmY0NzI5YzMyZTkzZWJlNg==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
NjgxOTMwNjNjNmQxMWNlOTQ4MTIzN2I1MDBjYjE0NmNkOTcyNzA5NA==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
ZDc5YmQxODAzNTQxYTJiZWE1ZjMzNTEzYzEwMjI4N2FmN2M0ZjcyMmY2NTk5
|
|
10
|
+
NTIyMzUxNjYyZDA1NmJlMzYzMTk3ZGJiNWIwYTRlNzA2ZjIwNDA4NzQzM2Fm
|
|
11
|
+
YTZjMWJlYTJkMmExZDU4NmZhOTg2NTk1YjdlODlmZTA2Y2RmNjU=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
ZGMyZjBkMjUzMDVkZmFjOWQ3M2NjNWMwM2ZiYzVlNjgyMGEyYjQxYTMxNjQ3
|
|
14
|
+
YmNkYWY0MDUyZDgwYmJlY2RkYzNkZjlkZTZiMmU5MTY5MTQzNjdmNmRmNDZi
|
|
15
|
+
ZTNkZGQ2ZDk0MjQ1OGJjY2JhMzdhY2ZkMTVkMDAyNDJmNTZjYjg=
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
aws_sns_manager (0.0.2.pre.alpha.pre.
|
|
4
|
+
aws_sns_manager (0.0.2.pre.alpha.pre.31)
|
|
5
5
|
aws-sdk (~> 2)
|
|
6
6
|
bundler (>= 1.3.0, < 2.0)
|
|
7
7
|
json (~> 1.8)
|
|
@@ -12,12 +12,12 @@ GEM
|
|
|
12
12
|
ast (2.1.0)
|
|
13
13
|
astrolabe (1.3.1)
|
|
14
14
|
parser (~> 2.2)
|
|
15
|
-
aws-sdk (2.
|
|
16
|
-
aws-sdk-resources (= 2.
|
|
17
|
-
aws-sdk-core (2.
|
|
15
|
+
aws-sdk (2.2.7)
|
|
16
|
+
aws-sdk-resources (= 2.2.7)
|
|
17
|
+
aws-sdk-core (2.2.7)
|
|
18
18
|
jmespath (~> 1.0)
|
|
19
|
-
aws-sdk-resources (2.
|
|
20
|
-
aws-sdk-core (= 2.
|
|
19
|
+
aws-sdk-resources (2.2.7)
|
|
20
|
+
aws-sdk-core (= 2.2.7)
|
|
21
21
|
codeclimate-test-reporter (0.4.8)
|
|
22
22
|
simplecov (>= 0.7.1, < 1.0.0)
|
|
23
23
|
diff-lcs (1.2.5)
|
|
@@ -29,31 +29,33 @@ GEM
|
|
|
29
29
|
powerpack (0.1.1)
|
|
30
30
|
rainbow (2.0.0)
|
|
31
31
|
rake (10.4.2)
|
|
32
|
-
rspec (3.
|
|
33
|
-
rspec-core (~> 3.
|
|
34
|
-
rspec-expectations (~> 3.
|
|
35
|
-
rspec-mocks (~> 3.
|
|
36
|
-
rspec-core (3.
|
|
37
|
-
rspec-support (~> 3.
|
|
38
|
-
rspec-expectations (3.
|
|
32
|
+
rspec (3.4.0)
|
|
33
|
+
rspec-core (~> 3.4.0)
|
|
34
|
+
rspec-expectations (~> 3.4.0)
|
|
35
|
+
rspec-mocks (~> 3.4.0)
|
|
36
|
+
rspec-core (3.4.1)
|
|
37
|
+
rspec-support (~> 3.4.0)
|
|
38
|
+
rspec-expectations (3.4.0)
|
|
39
39
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
40
|
-
rspec-support (~> 3.
|
|
41
|
-
rspec-mocks (3.
|
|
40
|
+
rspec-support (~> 3.4.0)
|
|
41
|
+
rspec-mocks (3.4.0)
|
|
42
42
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
43
|
-
rspec-support (~> 3.
|
|
44
|
-
rspec-support (3.
|
|
45
|
-
rubocop (0.
|
|
43
|
+
rspec-support (~> 3.4.0)
|
|
44
|
+
rspec-support (3.4.1)
|
|
45
|
+
rubocop (0.35.1)
|
|
46
46
|
astrolabe (~> 1.3)
|
|
47
|
-
parser (>= 2.2.
|
|
47
|
+
parser (>= 2.2.3.0, < 3.0)
|
|
48
48
|
powerpack (~> 0.1)
|
|
49
49
|
rainbow (>= 1.99.1, < 3.0)
|
|
50
|
-
ruby-progressbar (~> 1.
|
|
50
|
+
ruby-progressbar (~> 1.7)
|
|
51
|
+
tins (<= 1.6.0)
|
|
51
52
|
ruby-progressbar (1.7.5)
|
|
52
|
-
simplecov (0.
|
|
53
|
+
simplecov (0.11.1)
|
|
53
54
|
docile (~> 1.1.0)
|
|
54
55
|
json (~> 1.8)
|
|
55
56
|
simplecov-html (~> 0.10.0)
|
|
56
57
|
simplecov-html (0.10.0)
|
|
58
|
+
tins (1.6.0)
|
|
57
59
|
|
|
58
60
|
PLATFORMS
|
|
59
61
|
ruby
|
|
@@ -67,4 +69,4 @@ DEPENDENCIES
|
|
|
67
69
|
simplecov (~> 0.9)
|
|
68
70
|
|
|
69
71
|
BUNDLED WITH
|
|
70
|
-
1.
|
|
72
|
+
1.11.2
|
|
@@ -30,13 +30,15 @@ module AwsSnsManager
|
|
|
30
30
|
# +text+:: Text you want to send
|
|
31
31
|
# +options+:: Options you want on payload
|
|
32
32
|
# +env+:: Environments :prod, :dev
|
|
33
|
-
# +type+:: Notification type :normal, :silent
|
|
33
|
+
# +type+:: Notification type :normal, :silent, :nosound
|
|
34
34
|
#
|
|
35
35
|
def message(text, options = {}, env = :prod, type = :normal)
|
|
36
36
|
if type == :normal
|
|
37
37
|
data = normal_notification(text, options)
|
|
38
38
|
elsif type == :silent
|
|
39
39
|
data = silent_notification(text, options)
|
|
40
|
+
elsif type == :nosound
|
|
41
|
+
data = nosound_notification(text, options)
|
|
40
42
|
end
|
|
41
43
|
return dev_json(data) if env == :dev
|
|
42
44
|
prod_json(data)
|
|
@@ -63,6 +65,17 @@ module AwsSnsManager
|
|
|
63
65
|
base.merge(options)
|
|
64
66
|
end
|
|
65
67
|
|
|
68
|
+
def nosound_notification(text, options = {})
|
|
69
|
+
base = {
|
|
70
|
+
aps: {
|
|
71
|
+
alert: text,
|
|
72
|
+
badge: 1,
|
|
73
|
+
'content-available': 1
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
base.merge(options)
|
|
77
|
+
end
|
|
78
|
+
|
|
66
79
|
private
|
|
67
80
|
|
|
68
81
|
def dev_json(data)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: aws_sns_manager
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.2.pre.alpha.pre.
|
|
4
|
+
version: 0.0.2.pre.alpha.pre.31
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Fumiya Nakamura
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-
|
|
11
|
+
date: 2015-12-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|