failbot 0.9.4 → 0.9.5
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 +4 -4
- data/lib/failbot.rb +3 -0
- data/lib/failbot/failbot.yml +8 -56
- data/lib/failbot/json_backend.rb +20 -0
- data/lib/failbot/middleware.rb +1 -1
- data/lib/failbot/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3383e57149a6965ae7803d6170a66dd65f2932d
|
4
|
+
data.tar.gz: 08940607fb5553f0641fc35f55a8b019e185a571
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd26e1e21ee3d9f5d8b6352302d26678d1b40d0c86138fd8e509bc92d5e5aa4ee966adca191924b867228b25a0a9a81a9c39964869dc6154bc435c74aeb272c5
|
7
|
+
data.tar.gz: 90ef4318bad3829e2018f7832e288c62fdb3d3b1e1f61da138c1767870969271f242a759550a69f822d2ea74703ce54ef57f42d1d7e855de97f4f51b1278273c
|
data/lib/failbot.rb
CHANGED
@@ -22,6 +22,7 @@ module Failbot
|
|
22
22
|
autoload :HerokuBackend, 'failbot/heroku_backend'
|
23
23
|
autoload :HTTPBackend, 'failbot/http_backend'
|
24
24
|
autoload :MemoryBackend, 'failbot/memory_backend'
|
25
|
+
autoload :JSONBackend, 'failbot/json_backend'
|
25
26
|
|
26
27
|
# Public: Setup the backend for reporting exceptions.
|
27
28
|
def setup(settings={}, default_context={})
|
@@ -52,6 +53,8 @@ module Failbot
|
|
52
53
|
Failbot::FileBackend.new(settings["FAILBOT_BACKEND_FILE_PATH"])
|
53
54
|
when "http"
|
54
55
|
Failbot::HTTPBackend.new(URI(settings["FAILBOT_HAYSTACK_URL"]))
|
56
|
+
when 'json'
|
57
|
+
Failbot::JSONBackend.new(settings["FAILBOT_BACKEND_JSON_HOST"], settings["FAILBOT_BACKEND_JSON_PORT"])
|
55
58
|
else
|
56
59
|
raise ArgumentError, "Unknown backend: #{name.inspect}"
|
57
60
|
end
|
data/lib/failbot/failbot.yml
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
development:
|
2
|
-
backend:
|
2
|
+
backend: json
|
3
3
|
host: localhost
|
4
|
-
port:
|
5
|
-
haystack: http://
|
4
|
+
port: 6668
|
5
|
+
haystack: http://haystack.dev/_needles
|
6
6
|
workers: 1
|
7
7
|
service_log: /tmp/failbot.log
|
8
8
|
raise_errors: true
|
@@ -11,72 +11,24 @@ test:
|
|
11
11
|
backend: memory
|
12
12
|
host: localhost
|
13
13
|
port: 6666
|
14
|
-
haystack: http://
|
14
|
+
haystack: http://haystack.dev/_needles
|
15
15
|
workers: 0
|
16
16
|
raise_errors: true
|
17
17
|
|
18
18
|
production:
|
19
|
-
backend:
|
19
|
+
backend: json
|
20
20
|
host: localhost
|
21
|
-
port:
|
21
|
+
port: 6668
|
22
22
|
haystack: https://haystack.githubapp.com/_needles
|
23
23
|
workers: 2
|
24
24
|
service_log: /data/github/current/log/failbot.log
|
25
25
|
raise_errors: false
|
26
26
|
|
27
27
|
staging:
|
28
|
-
backend:
|
28
|
+
backend: json
|
29
29
|
host: localhost
|
30
|
-
port:
|
30
|
+
port: 6668
|
31
31
|
haystack: https://haystack.githubapp.com/_needles
|
32
32
|
workers: 1
|
33
33
|
service_log: /data/github/current/log/failbot.log
|
34
34
|
raise_errors: false
|
35
|
-
|
36
|
-
standalone:
|
37
|
-
backend: bert
|
38
|
-
host: localhost
|
39
|
-
port: 6666
|
40
|
-
haystack: https://haystack.githubapp.com/_needles
|
41
|
-
service_log: /tmp/failbot.log
|
42
|
-
workers: 1
|
43
|
-
raise_errors: false
|
44
|
-
|
45
|
-
standalone-staging:
|
46
|
-
backend: bert
|
47
|
-
host: localhost
|
48
|
-
port: 6666
|
49
|
-
haystack: https://haystack-staging.githubapp.com/async
|
50
|
-
service_log: /tmp/failbot.log
|
51
|
-
workers: 1
|
52
|
-
raise_errors: false
|
53
|
-
|
54
|
-
standalone-ng:
|
55
|
-
backend: bert
|
56
|
-
host: localhost
|
57
|
-
port: 6666
|
58
|
-
haystack: https://haystack-ng.githubapp.com/async
|
59
|
-
service_log: /tmp/failbot.log
|
60
|
-
workers: 1
|
61
|
-
raise_errors: false
|
62
|
-
|
63
|
-
haystack-ng:
|
64
|
-
backend: heroku
|
65
|
-
haystack: https://haystack-ng.githubapp.com/async
|
66
|
-
service_log: /tmp/failbot.log
|
67
|
-
workers: 1
|
68
|
-
raise_errors: false
|
69
|
-
|
70
|
-
heroku:
|
71
|
-
backend: heroku
|
72
|
-
haystack: https://hubble.githubapp.com/async
|
73
|
-
service_log: /tmp/failbot.log
|
74
|
-
workers: 1
|
75
|
-
raise_errors: false
|
76
|
-
|
77
|
-
heroku-staging:
|
78
|
-
backend: heroku
|
79
|
-
haystack: https://hubble-staging.githubapp.com/async
|
80
|
-
service_log: /tmp/failbot.log
|
81
|
-
workers: 1
|
82
|
-
raise_errors: false
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'json'
|
2
|
+
|
3
|
+
module Failbot
|
4
|
+
class JSONBackend
|
5
|
+
def initialize(host, port)
|
6
|
+
@host = host
|
7
|
+
@port = port
|
8
|
+
end
|
9
|
+
|
10
|
+
def report(data)
|
11
|
+
@socket = TCPSocket.new @host, @port
|
12
|
+
@socket.send(data.to_json, 0)
|
13
|
+
@socket.close
|
14
|
+
end
|
15
|
+
|
16
|
+
def reports
|
17
|
+
raise NotImplementedError
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/lib/failbot/middleware.rb
CHANGED
data/lib/failbot/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: failbot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- '@rtomayko'
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-
|
13
|
+
date: 2014-04-29 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: yajl-ruby
|
@@ -86,6 +86,7 @@ files:
|
|
86
86
|
- lib/failbot/haystack.rb
|
87
87
|
- lib/failbot/heroku_backend.rb
|
88
88
|
- lib/failbot/http_backend.rb
|
89
|
+
- lib/failbot/json_backend.rb
|
89
90
|
- lib/failbot/memory_backend.rb
|
90
91
|
- lib/failbot/middleware.rb
|
91
92
|
- lib/failbot/resque_failure_backend.rb
|
@@ -116,4 +117,3 @@ signing_key:
|
|
116
117
|
specification_version: 4
|
117
118
|
summary: Deliver exceptions to Haystack
|
118
119
|
test_files: []
|
119
|
-
has_rdoc:
|