rnotifier 0.0.3 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +21 -0
- data/README.md +8 -5
- data/lib/generators/rnotifier/templates/initializer.rb +1 -1
- data/lib/rnotifier/configuration.rb +2 -0
- data/lib/rnotifier/notifier.rb +1 -1
- data/lib/rnotifier/rails_exception.rb +6 -6
- data/lib/rnotifier/version.rb +1 -1
- metadata +5 -4
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2011 Jiren Patel[joshsoftware.com]
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
CHANGED
@@ -3,12 +3,12 @@ Rnotifier
|
|
3
3
|
|
4
4
|
Rails 3 Exception catcher gem
|
5
5
|
|
6
|
-
Rails application for exception
|
6
|
+
Rails application for exception catching : [git@rnotifier.git](https://github.com/joshsoftware/rnotifier)
|
7
7
|
|
8
8
|
Usage
|
9
9
|
-----
|
10
10
|
|
11
|
-
Login to [
|
11
|
+
Login to [rnotifier.heroku.com](http://rnotifier.heroku.com)
|
12
12
|
|
13
13
|
Create Project and you will get api key.
|
14
14
|
|
@@ -25,10 +25,10 @@ Configuration "config/initializers/rnotifier.rb"
|
|
25
25
|
c.exception_recipients = %w{jiren@joshsoftware.com example@example.com}
|
26
26
|
```
|
27
27
|
|
28
|
-
**Set exception notification server. Default is 'http://
|
28
|
+
**Set exception notification server. Default is 'http://rnotifier.heroku.com'**
|
29
29
|
|
30
30
|
```ruby
|
31
|
-
c.notification_server = "http://
|
31
|
+
c.notification_server = "http://rnotifier.heroku.com"
|
32
32
|
```
|
33
33
|
|
34
34
|
Sample configuration
|
@@ -38,8 +38,11 @@ Sample configuration
|
|
38
38
|
Rnotifier::Notifier.config do |c|
|
39
39
|
c.api_key = 'API-KEY'
|
40
40
|
c.exception_recipients = %w{example@example.com}
|
41
|
-
c.notification_server = "http://
|
41
|
+
c.notification_server = "http://rnotifier.heroku.com"
|
42
42
|
end
|
43
43
|
```
|
44
44
|
|
45
|
+
Contributing
|
46
|
+
------------
|
47
|
+
Please send me a pull request so that this can be improved.
|
45
48
|
|
@@ -29,6 +29,7 @@ module Rnotifier
|
|
29
29
|
self.notification_server += '/notify/api/v1'
|
30
30
|
end
|
31
31
|
|
32
|
+
=begin
|
32
33
|
if self.api_key
|
33
34
|
response = Util.get(self[:validate_path])
|
34
35
|
self.is_valid = true if response['valid_api_key']
|
@@ -41,6 +42,7 @@ module Rnotifier
|
|
41
42
|
else
|
42
43
|
Rlogger.info('[CONFIG] API key is valid.')
|
43
44
|
end
|
45
|
+
=end
|
44
46
|
|
45
47
|
end
|
46
48
|
end
|
data/lib/rnotifier/notifier.rb
CHANGED
@@ -7,7 +7,7 @@ module Rnotifier
|
|
7
7
|
Configuration.validate_config rescue Rlogger.error('[CONFIG] Error from notification server.')
|
8
8
|
|
9
9
|
#Initialize Rails Exception handler
|
10
|
-
Rnotifier::RailsException.initialize if Configuration.is_valid
|
10
|
+
Rnotifier::RailsException.initialize #if Configuration.is_valid
|
11
11
|
|
12
12
|
Configuration.filter_params ||= []
|
13
13
|
|
@@ -1,11 +1,11 @@
|
|
1
1
|
module Rnotifier
|
2
|
-
|
3
|
-
|
2
|
+
module RailsException
|
3
|
+
module Catcher
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
def self.included(base)
|
6
|
+
base.send(:alias_method, :render_exception_without_rnotifier, :render_exception)
|
7
|
+
base.send(:alias_method, :render_exception, :render_exception_with_rnotifier)
|
8
|
+
end
|
9
9
|
|
10
10
|
private
|
11
11
|
def render_exception_with_rnotifier(env,exception)
|
data/lib/rnotifier/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rnotifier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jiren Patel
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-11-
|
18
|
+
date: 2011-11-25 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
@@ -45,6 +45,7 @@ extra_rdoc_files: []
|
|
45
45
|
files:
|
46
46
|
- .gitignore
|
47
47
|
- Gemfile
|
48
|
+
- LICENSE
|
48
49
|
- README.md
|
49
50
|
- Rakefile
|
50
51
|
- lib/generators/rnotifier/rnotifier_generator.rb
|