failbot_rails 0.3.4 → 0.4.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 +7 -0
- data/.gitignore +15 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -1
- data/Rakefile +9 -0
- data/failbot_rails.gemspec +19 -16
- data/lib/failbot_rails.rb +2 -5
- data/lib/failbot_rails/version.rb +3 -0
- data/script/cibuild +6 -0
- metadata +36 -18
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 8d410a401eeb4fda32c54f83a092c151176b1a4e
|
4
|
+
data.tar.gz: 238ea3683e6f5b0485b7500380590c6f03f40edf
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 68f58b62c1c6ed3916a4ce882848bea6dfeb9a86ddb9b567e12fad49ca3dd9f7dbcfa599d468dab0efd438f7450db3dfd42cf5c901dbb44284e7a0dc5acd47fd
|
7
|
+
data.tar.gz: 3053397d1e7e46be6232a0e4aec18e39256f9affe4f3cb88628d29bf802b3160a930250e8d8e835a11988436aaef41365515e08cd2eb0e66a9db0b76fa7db7e2
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 GitHub
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -12,7 +12,7 @@ Add it to the app's Gemfile manifest. The gem is publicly available but **keep
|
|
12
12
|
this repository private.**
|
13
13
|
|
14
14
|
```ruby
|
15
|
-
gem "failbot_rails", "~>0.3.
|
15
|
+
gem "failbot_rails", "~>0.3.4"
|
16
16
|
```
|
17
17
|
|
18
18
|
## Usage
|
@@ -33,6 +33,34 @@ FailbotRails.setup("my_app")
|
|
33
33
|
Every library, script or unicorn that loads the Rails environment are now setup
|
34
34
|
to automatically report all exceptions to Haystack.
|
35
35
|
|
36
|
+
### ENV Vars
|
37
|
+
|
38
|
+
In order for your exceptions to reach Haystack, you'll need to inform your
|
39
|
+
application of how to do that. Set these `ENV` vars on your application in
|
40
|
+
production.
|
41
|
+
|
42
|
+
#### Heroku
|
43
|
+
|
44
|
+
To use failbot with heroku applications, the application needs the following environment variables set:
|
45
|
+
|
46
|
+
* `FAILBOT_BACKEND`
|
47
|
+
* `FAILBOT_HAYSTACK_URL`
|
48
|
+
|
49
|
+
`FAILBOT_BACKEND` should always be set to `http`. `FAILBOT_HAYSTACK_URL` should be set to the value of `FAILBOT_HAYSTACK_URL` of https://github.com/github/puppet/blob/master/modules/github/files/home/deploy/.rbexec/_failbot.rb.
|
50
|
+
|
51
|
+
Most versions of Failbot expect `FAILBOT_BACKEND` to always be present. Try adding this line above `require 'failbot'` to ensure that if `FAILBOT_BACKEND` isn't configured, it will fall back to `memory`:
|
52
|
+
|
53
|
+
```ruby
|
54
|
+
ENV["FAILBOT_BACKEND"] ||= "memory"
|
55
|
+
```
|
56
|
+
|
57
|
+
|
58
|
+
#### EC2
|
59
|
+
|
60
|
+
Apps hosted on EC2 are managed by puppet. Puppet has these ENV vars already. You
|
61
|
+
don't have to worry about them.
|
62
|
+
|
63
|
+
|
36
64
|
### `failbot_context`
|
37
65
|
|
38
66
|
The exception context is automatically populated with request metadata including
|
data/Rakefile
ADDED
data/failbot_rails.gemspec
CHANGED
@@ -1,21 +1,24 @@
|
|
1
|
-
#
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'failbot_rails/version'
|
2
5
|
|
3
|
-
Gem::Specification.new do |
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "failbot_rails"
|
8
|
+
spec.version = FailbotRails::VERSION
|
9
|
+
spec.authors = ["sr", "Grant Rodgers"]
|
10
|
+
spec.email = ["grant.rodgers@github.com"]
|
11
|
+
spec.summary = %q{Glue code for using Failbot in a Rails app}
|
12
|
+
spec.description = %q{Glue code for using Failbot in a Rails app}
|
13
|
+
spec.homepage = "https://github.com/github/failbot_rails"
|
14
|
+
spec.license = "MIT"
|
12
15
|
|
13
|
-
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
14
20
|
|
15
|
-
|
21
|
+
spec.add_runtime_dependency "failbot", "~> 0.9.2"
|
16
22
|
|
17
|
-
|
18
|
-
s.test_files = `git ls-files -- test`.split("\n").select { |f| f =~ /_test.rb$/ }
|
19
|
-
s.executables = `git ls-files -- bin`.split("\n").map { |f| File.basename(f) }
|
20
|
-
s.require_paths = %w[lib]
|
23
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
21
24
|
end
|
data/lib/failbot_rails.rb
CHANGED
@@ -6,7 +6,7 @@ require "rails/railtie"
|
|
6
6
|
require "active_support/concern"
|
7
7
|
|
8
8
|
module FailbotRails
|
9
|
-
def self.setup(app_name)
|
9
|
+
def self.setup(app_name, default_context={})
|
10
10
|
if _setup
|
11
11
|
fail "FailbotRails already setup"
|
12
12
|
end
|
@@ -26,7 +26,7 @@ module FailbotRails
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
-
Failbot.setup(settings, {:app => app_name.to_str})
|
29
|
+
Failbot.setup(settings, default_context.merge({:app => app_name.to_str}))
|
30
30
|
Failbot.install_unhandled_exception_hook!
|
31
31
|
|
32
32
|
@_setup = true
|
@@ -110,9 +110,6 @@ module FailbotRails
|
|
110
110
|
end
|
111
111
|
|
112
112
|
def _failbot_rails
|
113
|
-
# clear context before every request
|
114
|
-
Failbot.reset!
|
115
|
-
|
116
113
|
context = {
|
117
114
|
:controller => params[:controller],
|
118
115
|
:action => params[:action],
|
data/script/cibuild
ADDED
metadata
CHANGED
@@ -1,64 +1,82 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: failbot_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.4.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
|
-
-
|
7
|
+
- sr
|
8
|
+
- Grant Rodgers
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2014-09-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: failbot
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
17
|
requirements:
|
19
|
-
- - ~>
|
18
|
+
- - "~>"
|
20
19
|
- !ruby/object:Gem::Version
|
21
20
|
version: 0.9.2
|
22
21
|
type: :runtime
|
23
22
|
prerelease: false
|
24
23
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
24
|
requirements:
|
27
|
-
- - ~>
|
25
|
+
- - "~>"
|
28
26
|
- !ruby/object:Gem::Version
|
29
27
|
version: 0.9.2
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: rake
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - "~>"
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '10.0'
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '10.0'
|
30
42
|
description: Glue code for using Failbot in a Rails app
|
31
43
|
email:
|
32
|
-
-
|
44
|
+
- grant.rodgers@github.com
|
33
45
|
executables: []
|
34
46
|
extensions: []
|
35
47
|
extra_rdoc_files: []
|
36
48
|
files:
|
49
|
+
- ".gitignore"
|
50
|
+
- Gemfile
|
51
|
+
- LICENSE.txt
|
37
52
|
- README.md
|
53
|
+
- Rakefile
|
38
54
|
- failbot_rails.gemspec
|
39
55
|
- lib/failbot_rails.rb
|
40
|
-
|
41
|
-
|
56
|
+
- lib/failbot_rails/version.rb
|
57
|
+
- script/cibuild
|
58
|
+
homepage: https://github.com/github/failbot_rails
|
59
|
+
licenses:
|
60
|
+
- MIT
|
61
|
+
metadata: {}
|
42
62
|
post_install_message:
|
43
63
|
rdoc_options: []
|
44
64
|
require_paths:
|
45
65
|
- lib
|
46
66
|
required_ruby_version: !ruby/object:Gem::Requirement
|
47
|
-
none: false
|
48
67
|
requirements:
|
49
|
-
- -
|
68
|
+
- - ">="
|
50
69
|
- !ruby/object:Gem::Version
|
51
70
|
version: '0'
|
52
71
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
53
|
-
none: false
|
54
72
|
requirements:
|
55
|
-
- -
|
73
|
+
- - ">="
|
56
74
|
- !ruby/object:Gem::Version
|
57
|
-
version:
|
75
|
+
version: '0'
|
58
76
|
requirements: []
|
59
77
|
rubyforge_project:
|
60
|
-
rubygems_version:
|
78
|
+
rubygems_version: 2.2.2
|
61
79
|
signing_key:
|
62
|
-
specification_version:
|
80
|
+
specification_version: 4
|
63
81
|
summary: Glue code for using Failbot in a Rails app
|
64
82
|
test_files: []
|