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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4b73e28630b7f2b002b286a65a53c46db29d527e
4
- data.tar.gz: 58dfe465ef6578ef594ddc1a8dec60ac32b7732d
3
+ metadata.gz: 5502fc959b164039fdc5c227593cbf583854a331
4
+ data.tar.gz: ba5093333f9daebf33583b7653aa7269b73579fa
5
5
  SHA512:
6
- metadata.gz: 520d7554527cc38f616cb962a3381d399ffb37bfde161589f52fb7f49b1ee06b620fc34028a5f86bc97e1630be9b6df13836fd872aa566ab64f9e423eb7b52e4
7
- data.tar.gz: 8365b79c691e3357afff2a20ad1937162ab6d2e667c3bbfec4b4e7e288af629460b8392038c1b897d93c105d60c9f2f3529872d1bc2b2433ca8b8f0f60830bbe
6
+ metadata.gz: 9c28ea9fd3e95050e0a3caa48ae03580045733b7d55f4e1dc423778b0b1df6075b64a5dbd0cabca3dd4bb93ac63e054a4324c62affdfd4ee6453588f3929a618
7
+ data.tar.gz: 598a57788ff1752e2af72c1b731981b5844fadb70ab80b4218c697aa938928737e756715a883ee32f803081cd4adabef6f2777464132adc952321c14e51e3790
data/CHANGELOG.md CHANGED
@@ -1,5 +1,7 @@
1
1
  CHANGELOG
2
2
  ---------
3
+ - **2017-03-14**: 0.0.4
4
+ - add debug level logging to `MessageHandler::update`
3
5
  - **2017-03-13**: 0.0.3
4
6
  - fix `UserCreator::glip_user` bug
5
7
  - **2017-01-01**: 0.0.1
@@ -19,6 +19,7 @@ module Lita
19
19
  config.app_key = app_key
20
20
  config.app_secret = app_secret
21
21
  config.server_url = server
22
+ config.logger = Lita.logger
22
23
  end
23
24
  @glip_sdk = GlipSdk::REST::Client.new @rc_sdk
24
25
  @username = username
@@ -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-13'
4
- spec.version = '0.0.3'
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.3
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-13 00:00:00.000000000 Z
11
+ date: 2017-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita