lita-glip 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -0
- data/lib/lita/adapters/glip/connector.rb +1 -0
- data/lib/lita/adapters/glip/message_handler.rb +6 -0
- data/lita-glip.gemspec +2 -2
- 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: 5502fc959b164039fdc5c227593cbf583854a331
|
4
|
+
data.tar.gz: ba5093333f9daebf33583b7653aa7269b73579fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c28ea9fd3e95050e0a3caa48ae03580045733b7d55f4e1dc423778b0b1df6075b64a5dbd0cabca3dd4bb93ac63e054a4324c62affdfd4ee6453588f3929a618
|
7
|
+
data.tar.gz: 598a57788ff1752e2af72c1b731981b5844fadb70ab80b4218c697aa938928737e756715a883ee32f803081cd4adabef6f2777464132adc952321c14e51e3790
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'multi_json'
|
2
|
+
|
1
3
|
module Lita
|
2
4
|
module Adapters
|
3
5
|
class Glip < Adapter
|
@@ -13,9 +15,12 @@ module Lita
|
|
13
15
|
def update(message)
|
14
16
|
m = message
|
15
17
|
|
18
|
+
Lita.logger.debug("#{@logger_prefix}Glip Lita: Glip Message Received: #{MultiJson.encode(m)}")
|
19
|
+
|
16
20
|
unless m.is_a?(Hash) && m.key?('event') && m['event'].index('/glip/posts').is_a?(Integer)
|
17
21
|
return
|
18
22
|
end
|
23
|
+
|
19
24
|
unless m.key?('body') && m['body'].key?('messageType') && m['body']['messageType'] == "PostAdded"
|
20
25
|
return
|
21
26
|
end
|
@@ -30,6 +35,7 @@ module Lita
|
|
30
35
|
post = message['body']['post']['text'].to_s
|
31
36
|
msg = Lita::Message.new @robot, post, source
|
32
37
|
|
38
|
+
Lita.logger.debug("#{@logger_prefix}Glip Lita: Robot Message Built")
|
33
39
|
@robot.receive msg
|
34
40
|
end
|
35
41
|
end
|
data/lita-glip.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = 'lita-glip'
|
3
|
-
spec.date = '2017-03-
|
4
|
-
spec.version = '0.0.
|
3
|
+
spec.date = '2017-03-14'
|
4
|
+
spec.version = '0.0.4'
|
5
5
|
spec.authors = ['John Wang']
|
6
6
|
spec.email = ["johncwang@gmail.com"]
|
7
7
|
spec.description = %q{A Glip adapter for Lita.}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lita-glip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Wang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lita
|