rack-failtale 0.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.
Files changed (4) hide show
  1. data/LICENSE +20 -0
  2. data/README.md +15 -0
  3. data/lib/rack/failtale.rb +22 -0
  4. metadata +87 -0
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2010 Robert Sköld
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,15 @@
1
+ Rack::Failtale
2
+ ==============
3
+
4
+ A very simple Rack Middleware for reporting errors to the Failtale Service.
5
+
6
+ Usage:
7
+ ------
8
+
9
+ require "rack/failtale"
10
+ use Rack::Failtale, "API KEY HERE"
11
+
12
+ TODO:
13
+ -----
14
+
15
+ Allow for reporting to a Failtale service on other domains than the official.
@@ -0,0 +1,22 @@
1
+ require "failtale-reporter"
2
+
3
+ module Rack
4
+
5
+ class Failtale
6
+
7
+ def initialize(app, api_key = nil)
8
+ @app = app
9
+ FailtaleReporter.configure do |config|
10
+ config.api_token api_key
11
+ config.application_root ::File.dirname(::File.dirname(__FILE__))
12
+ end
13
+ end
14
+
15
+ def call(env)
16
+ FailtaleReporter.report do
17
+ @app.call(env)
18
+ end
19
+ end
20
+
21
+ end
22
+ end
metadata ADDED
@@ -0,0 +1,87 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rack-failtale
3
+ version: !ruby/object:Gem::Version
4
+ hash: 27
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 0
10
+ version: 0.1.0
11
+ platform: ruby
12
+ authors:
13
+ - "Robert Sk\xC3\xB6ld"
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-06-21 00:00:00 +02:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ version_requirements: &id001 !ruby/object:Gem::Requirement
23
+ none: false
24
+ requirements:
25
+ - - "="
26
+ - !ruby/object:Gem::Version
27
+ hash: 17
28
+ segments:
29
+ - 0
30
+ - 2
31
+ - 3
32
+ version: 0.2.3
33
+ name: failtale-reporter
34
+ requirement: *id001
35
+ prerelease: false
36
+ type: :runtime
37
+ description: A Rack middleware for the Failtale service
38
+ email:
39
+ - robert@publicclass.se
40
+ executables: []
41
+
42
+ extensions: []
43
+
44
+ extra_rdoc_files: []
45
+
46
+ files:
47
+ - lib/rack/failtale.rb
48
+ - LICENSE
49
+ - README.md
50
+ has_rdoc: true
51
+ homepage: http://github.com/publicclass/rack-failtale
52
+ licenses: []
53
+
54
+ post_install_message:
55
+ rdoc_options: []
56
+
57
+ require_paths:
58
+ - lib
59
+ required_ruby_version: !ruby/object:Gem::Requirement
60
+ none: false
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ hash: 3
65
+ segments:
66
+ - 0
67
+ version: "0"
68
+ required_rubygems_version: !ruby/object:Gem::Requirement
69
+ none: false
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ hash: 23
74
+ segments:
75
+ - 1
76
+ - 3
77
+ - 6
78
+ version: 1.3.6
79
+ requirements: []
80
+
81
+ rubyforge_project:
82
+ rubygems_version: 1.3.7
83
+ signing_key:
84
+ specification_version: 3
85
+ summary: A Rack middleware for Failtale
86
+ test_files: []
87
+