catchex 0.0.3 → 0.0.4

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.
Files changed (3) hide show
  1. data/Rakefile +1 -1
  2. data/lib/catchex.rb +2 -1
  3. metadata +4 -4
data/Rakefile CHANGED
@@ -12,7 +12,7 @@ require 'rake/testtask'
12
12
  require 'fileutils'
13
13
  spec = Gem::Specification.new do |s|
14
14
  s.name = 'catchex'
15
- s.version = '0.0.3'
15
+ s.version = '0.0.4'
16
16
  s.has_rdoc = false
17
17
  s.bindir = 'bin'
18
18
  s.add_dependency('rake', '>= 0.8')
data/lib/catchex.rb CHANGED
@@ -13,6 +13,7 @@ module CatchEx
13
13
  class Config
14
14
  @@project_key = ""
15
15
  @@scenario = ""
16
+ @@excepted = [ActionController::RoutingError]
16
17
 
17
18
  def self.project_key(project_key = nil)
18
19
  unless project_key.nil?
@@ -51,7 +52,7 @@ module CatchEx
51
52
 
52
53
  # The catch_ex is a convenient method for posting exception.
53
54
  def catch(exception, from = "", url = "", params = {})
54
- return if Config.project_key.blank? || Config.scenario.blank?
55
+ return if Config.project_key.blank? || Config.scenario.blank? || @@excepted.include?(exception.class)
55
56
  begin
56
57
  Net::HTTP.post_form(URI.parse(@@DATA_PUSH_URL), {:version => @@PLUGIN_VERSION, :language => @@LANGUAGE,
57
58
  :project_key => Config.project_key, :local_ip => local_ip, :message => exception.message, :scenario => Config.scenario,
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: catchex
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Braisdom
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-09-20 00:00:00 +08:00
18
+ date: 2011-12-08 00:00:00 +08:00
19
19
  default_executable: rake
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency