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.
@@ -5,7 +5,7 @@ require 'json'
5
5
  require 'rest_client'
6
6
 
7
7
  module ErrorNotifier
8
- Version = '0.0.4'
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.post(@configuration.url, data.to_json, :content_type => :json, :accept => :json)
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
@@ -1,5 +1,9 @@
1
1
  module ErrorNotifier
2
2
  class Configuration
3
- attr_accessor :url, :site
3
+ attr_accessor :url, :site, :timeout, :open_timeout
4
+ def initialize
5
+ @timeout = 5
6
+ @open_timeout = 5
7
+ end
4
8
  end
5
9
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: error_notifier
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.4
5
+ version: 0.0.5
6
6
  platform: ruby
7
7
  authors:
8
8
  - Karl Seguin