error_notifier 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/error_notifier.rb +9 -2
- data/lib/error_notifier/configuration.rb +5 -1
- metadata +1 -1
data/lib/error_notifier.rb
CHANGED
@@ -5,7 +5,7 @@ require 'json'
|
|
5
5
|
require 'rest_client'
|
6
6
|
|
7
7
|
module ErrorNotifier
|
8
|
-
Version = '0.0.
|
8
|
+
Version = '0.0.5'
|
9
9
|
|
10
10
|
class << self
|
11
11
|
attr_accessor :configuration
|
@@ -24,7 +24,14 @@ module ErrorNotifier
|
|
24
24
|
data[:stack] = exception.backtrace.join('\n')
|
25
25
|
data[:site] = @configuration.site
|
26
26
|
begin
|
27
|
-
RestClient.
|
27
|
+
RestClient::Request.execute(
|
28
|
+
:method => :post,
|
29
|
+
:url => @configuration.url,
|
30
|
+
:payload => data.to_json,
|
31
|
+
:headers => {:content_type => :json, :accept => :json},
|
32
|
+
:open_timeout => @configuration.open_timeout,
|
33
|
+
:timeout => @configuration.timeout
|
34
|
+
)
|
28
35
|
rescue
|
29
36
|
nil
|
30
37
|
end
|