lita-gitlab 1.0.0 → 1.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a3db94cfc04d0f11a09276ab56a45c1b5031aee0
4
- data.tar.gz: 8887d8ed2fdfb829d83af3600205d2fd4a8b3fd2
3
+ metadata.gz: 7ad156c35c3d7dd7b6d4764c15ad2913cc0def71
4
+ data.tar.gz: 32f707f59610d78ddb44a52de90cf9de123b5369
5
5
  SHA512:
6
- metadata.gz: 9852e313140d112eaf089053a6e92fce8b08be804acf38ffbb17a2389077dd26f55f4cf8fdd42dd85c23ca35a3e673937c5e47388ae3e4544a7580c5d8e1c2d0
7
- data.tar.gz: 935c630979fbb661fd6f87e4bbdeb556d45ad6309db93b850c6cc32cb53dd858872260334573bb8e7a32409a8b27ed2a12f66df28491cd6e9efbb6baa26cad13
6
+ metadata.gz: 59007d8ec14d94743c1f890d448ba5e8c645b49ecff446af1ebb59ebb5585a59ac16f70f169a9fc7c95e76a8afeab4f48d22fa1cc303ba6a29739b9b3bd5e9f5
7
+ data.tar.gz: e54cd0ca9228fea7314730f6e11c9ce6453b6b8f8eb1dc5895e736be7999a73150219cd34838a16ccde46ca64b7a34fa608d76b48b90daa10d9f7a1208b795a1
@@ -9,8 +9,8 @@ module Lita
9
9
  http.post '/lita/gitlab', :receive
10
10
 
11
11
  def receive(request, response)
12
- json_data = parse_payload(request.params['payload'])
13
- data = symbolize(json_data)
12
+ json_body = request.params['payload'] || extract_json_from_request(request)
13
+ data = symbolize parse_payload(json_body)
14
14
  message = format_message(data)
15
15
  targets = request.params['targets'] || '#general'
16
16
  rooms = []
@@ -25,6 +25,11 @@ module Lita
25
25
 
26
26
  private
27
27
 
28
+ def extract_json_from_request(request)
29
+ request.body.rewind
30
+ request.body.read
31
+ end
32
+
28
33
  def format_message(data)
29
34
  data.key?(:event_name) ? system_message(data) : web_message(data)
30
35
  end
data/lita-gitlab.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'lita-gitlab'
3
- spec.version = '1.0.0'
3
+ spec.version = '1.0.1'
4
4
  spec.authors = ['Emilio Figueroa']
5
5
  spec.email = ['emiliofigueroatorres@gmail.com']
6
6
  spec.description = %q{A Lita handler that will display GitLab messages in the channel}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-gitlab
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emilio Figueroa