exceptiontrap 1.0.11 → 1.1.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 3b1def55adf6d714e85478a8b3fe91ba5cab3198
4
- data.tar.gz: d5b04534b99b4503cd31acfe0efa2176cd5231d2
2
+ SHA256:
3
+ metadata.gz: 46f79c8fcfbdce4d8549d9603975e3153c55d92b05a05316203520195cf5c9e5
4
+ data.tar.gz: b9d046b6d26ba05f2b6320cc0b533f56b2feca0610516677c085e89deb6b159c
5
5
  SHA512:
6
- metadata.gz: 27a77766486e8dc6a40e19d295831ebad24f820cdac09e851238842cb7d1ee4329dbfa0eb2b5818d272f1d6bcaba2eb80a33674b2649914ab67a8931b3a240a6
7
- data.tar.gz: 648c061fa2e638589308bd0f11c15e7d8002225be1a11b75a3b9da058620c11c65b448eb5b21b5d7bb1c7e9532049979acb4a47cc240ab2cc15f8f55593bd3a4
6
+ metadata.gz: b0c445fcb4591fa8f03c29adb951bd2f166a525f808ee4b7919d6fdb266bcd6c52bd66cdfc4744cb5af75d5b2fb10064bb0efa6b73c3699f8bde919348670f20
7
+ data.tar.gz: 695c8bed8a6d220162f901dc888cffdea59c5d584c6da033fde6ab1bb89fd27ada49442a6defa146f433d8bb18ebeb4cbc704fa7630d2c34b772a49bbb7ff9fd
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source "http://rubygems.org"
1
+ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in exceptiontrap.gemspec
4
4
  gemspec
@@ -0,0 +1,19 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ exceptiontrap (1.1.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ rake (12.3.2)
10
+
11
+ PLATFORMS
12
+ ruby
13
+
14
+ DEPENDENCIES
15
+ exceptiontrap!
16
+ rake
17
+
18
+ BUNDLED WITH
19
+ 1.17.3
data/README.md CHANGED
@@ -5,11 +5,11 @@ This gem is used to catch and report your Ruby on Rails applications errors and
5
5
  The gem is compatible with the following Rails versions
6
6
 
7
7
  - >= 2.3
8
- - 3 and 4
8
+ - 3, 4, and 5
9
9
 
10
10
  ## Setup
11
11
 
12
- ### Rails 3 / 4
12
+ ### Rails 3 / 4 / 5
13
13
 
14
14
  #### 1. Install
15
15
 
@@ -83,7 +83,7 @@ end
83
83
 
84
84
  ### Resque
85
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.
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 Resque's `on_failure` hook.
87
87
 
88
88
  You can also create a module with Exceptiontrap enabled and integrate this.
89
89
 
@@ -107,4 +107,4 @@ end
107
107
  Optimize and insert the test suite to the gem.
108
108
 
109
109
 
110
- Copyright (c) 2013 [Torsten Bühl], released under the MIT license
110
+ Copyright (c) 2018 [Torsten Bühl], released under the MIT license
@@ -17,4 +17,6 @@ Gem::Specification.new do |s|
17
17
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
18
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
19
  s.require_paths = ["lib"]
20
- end
20
+
21
+ s.add_development_dependency 'rake'
22
+ end
@@ -7,7 +7,7 @@ require 'exceptiontrap/config'
7
7
  require 'exceptiontrap/notifier'
8
8
  require 'exceptiontrap/rack'
9
9
 
10
- # Use Rack Middleware for Rails 3
10
+ # Use Rack Middleware for Rails >= 3
11
11
  require 'exceptiontrap/railtie' if defined?(Rails::Railtie)
12
12
  # Background Worker Middleware
13
13
  require "exceptiontrap/sidekiq" if defined?(Sidekiq)
@@ -27,22 +27,27 @@ module Exceptiontrap
27
27
  Exceptiontrap::Config.load(File.join(Rails.root, '/config/exceptiontrap.yml'))
28
28
 
29
29
  if enabled?
30
+ # Rails 2
30
31
  if defined?(ActionController::Base) && !ActionController::Base.include?(Exceptiontrap::Catcher)
31
- ActionController::Base.send(:include, Exceptiontrap::Catcher) # puts "-> Activated Exceptiontrap::Catcher for Rails 2"
32
+ ActionController::Base.send(:include, Exceptiontrap::Catcher)
32
33
  end
33
34
 
34
- Rails.configuration.middleware.use 'Exceptiontrap::Rack' # puts "-> Activated Exceptiontrap::Rack for Rails 2.3+"
35
+ # Rails >= 2.3
36
+ Rails.configuration.middleware.use 'Exceptiontrap::Rack'
35
37
  end
36
38
  end
37
39
 
38
40
  def self.notify(exception, params = {})
39
- if enabled?
40
- data = Data.rack_data(exception, params)
41
- Notifier.notify(data)
42
- end
41
+ return if disabled?
42
+ data = Data.rack_data(exception, params)
43
+ Notifier.notify(data)
43
44
  end
44
45
 
45
46
  def self.enabled?
46
47
  Config.enabled_environments.include?(Data.application_environment)
47
48
  end
49
+
50
+ def self.disabled?
51
+ !enabled?
52
+ end
48
53
  end
@@ -6,9 +6,9 @@ module Exceptiontrap
6
6
  class ExceptiontrapRailtie < Rails::Railtie
7
7
  initializer 'exceptiontrap.middleware' do |app|
8
8
  Exceptiontrap::Config.load(File.join(Rails.root, '/config/exceptiontrap.yml'))
9
- if Exceptiontrap::enabled?
10
- app.config.middleware.insert_after 'ActionDispatch::ShowExceptions', 'Exceptiontrap::Rack'
11
- end
9
+ return if Exceptiontrap::disabled?
10
+
11
+ app.config.middleware.insert_after ActionDispatch::ShowExceptions, Exceptiontrap::Rack
12
12
  end
13
13
  end
14
- end
14
+ end
@@ -1,3 +1,3 @@
1
1
  module Exceptiontrap
2
- VERSION = '1.0.11'
3
- end
2
+ VERSION = '1.1.0'
3
+ end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exceptiontrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.11
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - tbuehl
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-19 00:00:00.000000000 Z
12
- dependencies: []
11
+ date: 2019-02-02 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  description: Exception notifier. The Gem catches your applications exceptions and
14
28
  sends those to the exceptiontrap webservice hosted at https://exceptiontrap.com
15
29
  email:
@@ -18,8 +32,9 @@ executables: []
18
32
  extensions: []
19
33
  extra_rdoc_files: []
20
34
  files:
21
- - .gitignore
35
+ - ".gitignore"
22
36
  - Gemfile
37
+ - Gemfile.lock
23
38
  - MIT-LICENSE
24
39
  - README.md
25
40
  - Rakefile
@@ -54,17 +69,16 @@ require_paths:
54
69
  - lib
55
70
  required_ruby_version: !ruby/object:Gem::Requirement
56
71
  requirements:
57
- - - '>='
72
+ - - ">="
58
73
  - !ruby/object:Gem::Version
59
74
  version: '0'
60
75
  required_rubygems_version: !ruby/object:Gem::Requirement
61
76
  requirements:
62
- - - '>='
77
+ - - ">="
63
78
  - !ruby/object:Gem::Version
64
79
  version: '0'
65
80
  requirements: []
66
- rubyforge_project: exceptiontrap
67
- rubygems_version: 2.1.11
81
+ rubygems_version: 3.0.2
68
82
  signing_key:
69
83
  specification_version: 4
70
84
  summary: Exception notifier, used to report your apps exceptions to the exceptiontrap
@@ -72,4 +86,3 @@ summary: Exception notifier, used to report your apps exceptions to the exceptio
72
86
  test_files:
73
87
  - test/exceptiontrap_test.rb
74
88
  - test/test_helper.rb
75
- has_rdoc: