slack_500_revue 1.2.1 → 1.2.3
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 +4 -4
- data/lib/slack_500_revue/version.rb +1 -1
- data/lib/slack_500_revue.rb +4 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '08db346ae0c63314d374e3df383659f9a0235b320483fe167cd2114776d4c80a'
|
4
|
+
data.tar.gz: 465620e6bc1f1c701ba7c4b71d3e9b5aaca37b6f4c1aadcceda487e369c7ba5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab180d6e8482e80f5c8193469510c0573d9be9fbe19cb8ff8a3274551d69161d6218c2a71477c8388c1de3cbe687b668215e2fb19b2f1fac391181434e1e90a2
|
7
|
+
data.tar.gz: bfde84a85b6084e08f3ca025cbd5f5c16d31e29a6d4218cc58ab8b891faf9d7ded606b841156b072b57b1e0350dabc572a8fad2625935503c63c17ca8b232a23
|
data/lib/slack_500_revue.rb
CHANGED
@@ -38,7 +38,7 @@ module Slack500Revue
|
|
38
38
|
mattr_accessor :webhook_url
|
39
39
|
@@webhook_url = nil
|
40
40
|
|
41
|
-
def self.post (request, exception, params = {})
|
41
|
+
def self.post (request, exception, env=nil, params = {})
|
42
42
|
url = self.webhook_url
|
43
43
|
begin
|
44
44
|
uri = URI.parse(url)
|
@@ -82,8 +82,9 @@ module Slack500Revue
|
|
82
82
|
end
|
83
83
|
end
|
84
84
|
end
|
85
|
-
|
86
|
-
|
85
|
+
if env.blank?
|
86
|
+
text += "#{bullet}*Body*\n#{body}\n\n" unless body.nil?
|
87
|
+
end
|
87
88
|
text += "#{bullet}*Backtrace*\n#{exception.backtrace.map {|s| "`#{s.gsub('`', '').gsub("'", '').gsub(Rails.root.to_s, '')}`"}.join("\n")}"
|
88
89
|
text = text.force_encoding('UTF-8')
|
89
90
|
default_params = {
|