ruboty-lambda 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ruboty/handlers/lambda.rb +16 -10
- data/lib/ruboty/lambda/version.rb +1 -1
- 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: b66b3dd172b2172a442a7a9bab2c1599255cf0ce
|
4
|
+
data.tar.gz: c48c6b58648e9065a552e2c3307408e5e6ef90cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 078ee45e88b957a28a90742fde96faade378b0c66025aaaa15120bd292ced65c0a35552fa933a78c7411be5e46412619c66f77a8a73e439bd01a1fd0ede6fdf6
|
7
|
+
data.tar.gz: 427e18e539610cd2a895bd4ad017927b4f5fe77f11a23f066b635a0517a89e3a480cc5911de5ad63e37027564bd4f4809460627472816859e0650dbab5ad25df
|
@@ -30,8 +30,8 @@ module Ruboty::Handlers
|
|
30
30
|
})
|
31
31
|
|
32
32
|
result = Base64.decode64(resp.log_result)
|
33
|
-
|
34
|
-
|
33
|
+
logs = []
|
34
|
+
fields = []
|
35
35
|
|
36
36
|
result.each_line do |line|
|
37
37
|
case true
|
@@ -39,24 +39,30 @@ module Ruboty::Handlers
|
|
39
39
|
next
|
40
40
|
when line.start_with?('REPORT')
|
41
41
|
line[7..-1].strip.split("\t").map {|f| f.split(':', 2).map(&:strip) }.each do |f|
|
42
|
-
|
42
|
+
fields << {
|
43
43
|
title: f[0],
|
44
|
-
|
44
|
+
value: f[1],
|
45
45
|
short: true
|
46
46
|
}
|
47
47
|
end
|
48
48
|
else
|
49
|
-
field = line.split("\t")
|
50
|
-
|
49
|
+
field = line.strip.split("\t")
|
50
|
+
logs << "#{field[0]} #{field[2]}"
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
54
54
|
payload = resp.payload.read
|
55
|
-
|
56
|
-
title: "
|
57
|
-
|
55
|
+
fields << {
|
56
|
+
title: "Payload",
|
57
|
+
value: payload
|
58
58
|
}
|
59
|
-
|
59
|
+
|
60
|
+
success = resp.status_code >= 200 && resp.status_code <= 299
|
61
|
+
|
62
|
+
message.reply(logs.join("\n"), code: true, attachments: [{
|
63
|
+
color: success ? 'good' : 'danger',
|
64
|
+
fields: fields
|
65
|
+
}])
|
60
66
|
end
|
61
67
|
|
62
68
|
private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruboty-lambda
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sho Kusano
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|