whoops_rails_logger 0.1.2 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.asciidoc ADDED
@@ -0,0 +1,41 @@
1
+ = WhoopsRailsLogger
2
+
3
+ This gem provides an exception strategy for Rails applications. By default, it catches all unhandled exceptions raised within a Rails controller.
4
+
5
+ == Installation
6
+
7
+ . Add +whoops_rails_logger+ to your +Gemfile+
8
+ . Create +config/whoops_logger.yml+
9
+ . Add the following options, as needed, per environment:
10
+
11
+ ====
12
+ :host
13
+ :http_open_timeout
14
+ :http_read_timeout
15
+ :port
16
+ :protocol
17
+ :proxy_host
18
+ :proxy_pass
19
+ :proxy_port
20
+ :proxy_user
21
+ :secure
22
+ ====
23
+
24
+ Example:
25
+
26
+ ====
27
+ development:
28
+ host: localhost
29
+ port: 3000
30
+ production:
31
+ host: somehost.com
32
+ ====
33
+
34
+ == Usage
35
+
36
+ By default, it catches all unhandled exceptions raised within a Rails controller.
37
+
38
+
39
+ == TODO
40
+
41
+ * Provide a mechanism for logging an exception at any point
@@ -11,7 +11,13 @@ module WhoopsRailsLogger
11
11
  end
12
12
 
13
13
  def self.configure
14
- config = YAML.load_file(File.join(Rails.root, "config", "whoops.yml"))[Rails.env]
14
+ config_path = File.join(Rails.root, "config", "whoops_logger.yml")
15
+
16
+ unless File.exists?(config_path)
17
+ raise "Please create config/whoops_logger.yml"
18
+ end
19
+
20
+ config = YAML.load_file(config_path)[Rails.env]
15
21
  WhoopsLogger.config.set(config)
16
22
  WhoopsLogger.config.logger = Rails.logger
17
23
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whoops_rails_logger
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 2
10
- version: 0.1.2
9
+ - 4
10
+ version: 0.1.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Daniel Higginbotham
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-07-27 00:00:00 -04:00
18
+ date: 2011-08-02 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -26,12 +26,12 @@ dependencies:
26
26
  requirements:
27
27
  - - "="
28
28
  - !ruby/object:Gem::Version
29
- hash: 31
29
+ hash: 19
30
30
  segments:
31
31
  - 0
32
32
  - 1
33
- - 2
34
- version: 0.1.2
33
+ - 4
34
+ version: 0.1.4
35
35
  type: :runtime
36
36
  version_requirements: *id001
37
37
  - !ruby/object:Gem::Dependency
@@ -153,7 +153,7 @@ files:
153
153
  - MIT-LICENSE
154
154
  - Rakefile
155
155
  - Gemfile
156
- - README.rdoc
156
+ - README.asciidoc
157
157
  has_rdoc: true
158
158
  homepage:
159
159
  licenses: []
data/README.rdoc DELETED
@@ -1,3 +0,0 @@
1
- = WhoopsRailsLogger
2
-
3
- This project rocks and uses MIT-LICENSE.