exceptiontrap 1.0.9 → 1.0.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 92d252f29a471a05c6c99b1d1176a25f0b7304e4
4
- data.tar.gz: 7812a4b2d1b365b712293d213257c669ad34ae5e
3
+ metadata.gz: 1e1546e1ff9f694036ddc647154745b1295d5697
4
+ data.tar.gz: 0a53b01cc26040b3e553fc471f9dda767e8d6ecf
5
5
  SHA512:
6
- metadata.gz: aa6466d710ba4c4a3d7bc16f2b4772900f8fa5e9af71420de30a7d8ab1b3dd689a82871a5d121ecde9b55f6e0c827e6aa304622ea6e99662e122f6d3fac5cd25
7
- data.tar.gz: cdfd6f93876a46abcdf9f78cc7f07bd519efc19663b50180edc4be3112feca0162034b61db62c6f9d3c32fe665b97986a4e48e7a2e00cb2d2426a282a926063c
6
+ metadata.gz: dbb996e48ea9db23d5798f42d967f0aa92ef336e8c1952bfc02fcce7768a22433148c26f0752c66bf3ac92bb702cf0fa626c7907aa37ecee6246e3fc2d3713fd
7
+ data.tar.gz: 8b6be5588a58b1517bfcf836b960e0ae321af2e95a79f594542ca7afcee1432862da2de4e72dbced12907beb2cc1871da955f748c2b428f7255e5390925b2556
data/README.md CHANGED
@@ -69,7 +69,7 @@ Exceptiontrap catches [Sidekiq](http://sidekiq.org) errors automatically, you do
69
69
 
70
70
  ### DelayedJob
71
71
 
72
- There is no automatic integration into [DelayedJob](https://github.com/collectiveidea/delayed_job) yet. Meanwhile you can let Exceptiontrap notifiy you about errors using its `notify` method inside DelayedJob's `error hook`
72
+ There is no automatic integration into [DelayedJob](https://github.com/collectiveidea/delayed_job) yet. Meanwhile you can let Exceptiontrap notifiy you about errors using its `notify` method inside DelayedJobs `error` hook.
73
73
 
74
74
  ```ruby
75
75
  class ParanoidNewsletterJob < NewsletterJob
@@ -81,6 +81,27 @@ class ParanoidNewsletterJob < NewsletterJob
81
81
  end
82
82
  ```
83
83
 
84
+ ### Resque
85
+
86
+ automatic integration into [Resque](https://github.com/resque/resque) yet. Meanwhile you can let Exceptiontrap notifiy you about errors using its `notify` method inside Resques `on_failure` hook.
87
+
88
+ You can also create a module with Exceptiontrap enabled and integrate this.
89
+
90
+ ```ruby
91
+ module ExceptiontrapJob
92
+ def on_failure(exception, *args)
93
+ Exceptiontrap.notify(exception, args)
94
+ end
95
+ end
96
+
97
+ class MyJob
98
+ extend ExceptiontrapJob
99
+ def self.perform(*args)
100
+ ...
101
+ end
102
+ end
103
+ ```
104
+
84
105
  ## Known Issues / Todo
85
106
 
86
107
  Optimize and insert the test suite to the gem.
@@ -5,7 +5,9 @@ module Exceptiontrap
5
5
  :enabled_environments => %w(production),
6
6
  :ignored_exceptions => %w(ActiveRecord::RecordNotFound ActionController::RoutingError),
7
7
  :filtered_params => %w(password s3-key),
8
- :ssl => false
8
+ :ssl => false,
9
+ :notification_url => 'exceptiontrap.com/notifier/api/v1/problems',
10
+ :deployment_url => 'exceptiontrap.com/notifier/api/v1/deployments'
9
11
  }
10
12
 
11
13
  def load(config_file = nil)
@@ -18,6 +20,7 @@ module Exceptiontrap
18
20
  @ignored_exceptions = config['ignoreExceptions']
19
21
  @enabled_environments = config['enabledEnvironments']
20
22
  @filtered_params = config['filterParams']
23
+ @notification_url = config['notificationUrl']
21
24
  rescue Exception => e
22
25
  raise "Unable to load configuration #{config_file} : #{e.message}"
23
26
  end
@@ -28,6 +31,10 @@ module Exceptiontrap
28
31
  @api_key
29
32
  end
30
33
 
34
+ def notification_url
35
+ @notification_url ||= DEFAULTS[:notification_url]
36
+ end
37
+
31
38
  def enabled_environments
32
39
  @enabled_environments ||= DEFAULTS[:enabled_environments]
33
40
  end
@@ -8,7 +8,7 @@ module Exceptiontrap
8
8
  end
9
9
 
10
10
  def send_problem(serialized_data)
11
- url = URI.parse((Config.use_ssl? ? 'https://' : 'http://') << NOTIFICATION_URL)
11
+ url = URI.parse((Config.use_ssl? ? 'https://' : 'http://') << Config.notification_url)
12
12
  client = prepare_client(url)
13
13
 
14
14
  headers = HEADERS
@@ -1,3 +1,3 @@
1
1
  module Exceptiontrap
2
- VERSION = '1.0.9'
2
+ VERSION = '1.0.10'
3
3
  end
data/lib/exceptiontrap.rb CHANGED
@@ -16,8 +16,6 @@ require "exceptiontrap/sidekiq" if defined?(Sidekiq)
16
16
  module Exceptiontrap
17
17
  API_VERSION = '1'
18
18
  NOTIFIER_NAME = 'exceptiontrap-rails'
19
- NOTIFICATION_URL = 'exceptiontrap.com/notifier/api/v1/problems'
20
- DEPLOYMENT_URL = 'exceptiontrap.com/notifier/api/v1/deployments'
21
19
 
22
20
  HEADERS = {
23
21
  'Content-type' => 'application/json',
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exceptiontrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.9
4
+ version: 1.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - tbuehl
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-24 00:00:00.000000000 Z
11
+ date: 2014-11-19 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Exception notifier. The Gem catches your applications exceptions and
14
14
  sends those to the exceptiontrap webservice hosted at https://exceptiontrap.com