messaging_client 0.1.8 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/messaging/client.rb +1 -20
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff630975222040900c94df5779d374cd2ef58dd6
|
4
|
+
data.tar.gz: 68024fa7360cbc6a943e3336decbefce4bc7cc6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d239a092b92df8472432c90baaf47dcd75e18cd30863e9c5454a9e535559f7dbb7379d6d9014e1853a9f2f51eb9025ab60b58ef7968db6182ac4572815be7a87
|
7
|
+
data.tar.gz: e3d5ca5cbff5325739f39905eef7ba91af8e4f4a24642d95d3239d140b72e4531107d98dbd241b7538ec63040a277a23a599f2646bd78c1e6f27f993d03e3153
|
data/lib/messaging/client.rb
CHANGED
@@ -3,29 +3,10 @@ require 'aws-sdk-sns'
|
|
3
3
|
module Messaging
|
4
4
|
class Client
|
5
5
|
|
6
|
-
# @param key_name [String]
|
7
|
-
# @param url [String]
|
8
|
-
# @param secret_key [String]
|
9
|
-
def self.subscribe_to(key_name,url,secret_key="")
|
10
|
-
|
11
|
-
end
|
12
|
-
|
13
|
-
# @param key_name [String]
|
14
|
-
def self.unsubscribe_from(key_name)
|
15
|
-
|
16
|
-
end
|
17
|
-
|
18
6
|
# @param key [String]
|
19
7
|
# @param data [Hash]
|
20
8
|
def self.post_message(key,data={})
|
21
|
-
|
22
|
-
publish_to_sns(key,data)
|
23
|
-
rescue
|
24
|
-
# on transition ignore errors.
|
25
|
-
end
|
26
|
-
|
27
|
-
m = Message.new(key_name: key, data: data.to_json)
|
28
|
-
m.create
|
9
|
+
publish_to_sns(key,data)
|
29
10
|
end
|
30
11
|
|
31
12
|
def self.publish_to_sns(key,data)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: messaging_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dwayne Macgowan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|