bullhorn 0.0.3 → 0.0.4
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.
- data/README.rdoc +11 -2
- data/VERSION +1 -1
- data/bullhorn.gemspec +5 -3
- data/examples/sinatra.rb +12 -0
- data/lib/bullhorn/sender.rb +3 -2
- metadata +5 -3
data/README.rdoc
CHANGED
@@ -14,9 +14,13 @@ See http://bullhorn.it and signup for a free account!
|
|
14
14
|
|
15
15
|
# of course the best way to do that is:
|
16
16
|
set :raise_errors, production?
|
17
|
+
|
18
|
+
# Let's say we have an error we don't want to be notified about
|
19
|
+
MyOwnError = Class.new(StandardError)
|
17
20
|
|
18
21
|
use Bullhorn, :api_key => "__your key here__",
|
19
|
-
:filters => %w(password password_confirmation)
|
22
|
+
:filters => %w(password password_confirmation),
|
23
|
+
:ignore_exceptions => [MyOwnError]
|
20
24
|
|
21
25
|
get "/hello" do
|
22
26
|
"Hello world"
|
@@ -26,11 +30,16 @@ See http://bullhorn.it and signup for a free account!
|
|
26
30
|
raise "Failure from the app"
|
27
31
|
end
|
28
32
|
|
33
|
+
|
29
34
|
== Rails 3 Example
|
30
35
|
|
31
36
|
Whatever::Application.config.middleware.use Bullhorn,
|
32
37
|
:api_key => "_your api key here_",
|
33
38
|
:filters => %w(password password_confirmation credit_card)
|
39
|
+
|
40
|
+
# by default, ActiveRecord::RecordNotFound,
|
41
|
+
# AbstractController::ActionNotFound and ActionController::RoutingError
|
42
|
+
# are ignored in a Rails 3 context.
|
34
43
|
|
35
44
|
== Rails 2.3.5 backward compatibility
|
36
45
|
|
@@ -61,4 +70,4 @@ See http://bullhorn.it and signup for a free account!
|
|
61
70
|
|
62
71
|
== Copyright
|
63
72
|
|
64
|
-
Copyright (c) 2010 Cyril David. See LICENSE for details.
|
73
|
+
Copyright (c) 2010 Cyril David. See LICENSE for details.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.4
|
data/bullhorn.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{bullhorn}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Cyril David"]
|
12
|
-
s.date = %q{2010-05-
|
12
|
+
s.date = %q{2010-05-23}
|
13
13
|
s.description = %q{drop in rack middleware for bullhorn.it}
|
14
14
|
s.email = %q{cyx.ucron@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -76,6 +76,7 @@ Gem::Specification.new do |s|
|
|
76
76
|
"examples/foobar/test/performance/browsing_test.rb",
|
77
77
|
"examples/foobar/test/test_helper.rb",
|
78
78
|
"examples/foobar/test/unit/helpers/raiser_helper_test.rb",
|
79
|
+
"examples/sinatra.rb",
|
79
80
|
"lib/bullhorn.rb",
|
80
81
|
"lib/bullhorn/plugin.rb",
|
81
82
|
"lib/bullhorn/sender.rb",
|
@@ -114,7 +115,8 @@ Gem::Specification.new do |s|
|
|
114
115
|
"examples/foobar/test/functional/raiser_controller_test.rb",
|
115
116
|
"examples/foobar/test/performance/browsing_test.rb",
|
116
117
|
"examples/foobar/test/test_helper.rb",
|
117
|
-
"examples/foobar/test/unit/helpers/raiser_helper_test.rb"
|
118
|
+
"examples/foobar/test/unit/helpers/raiser_helper_test.rb",
|
119
|
+
"examples/sinatra.rb"
|
118
120
|
]
|
119
121
|
|
120
122
|
if s.respond_to? :specification_version then
|
data/examples/sinatra.rb
ADDED
data/lib/bullhorn/sender.rb
CHANGED
@@ -3,7 +3,7 @@ class Bullhorn
|
|
3
3
|
extend self
|
4
4
|
|
5
5
|
def serialize(str)
|
6
|
-
|
6
|
+
Base64.encode64(str.to_json).strip
|
7
7
|
end
|
8
8
|
|
9
9
|
def notify(exception, env)
|
@@ -23,6 +23,7 @@ class Bullhorn
|
|
23
23
|
io.rewind if io.respond_to?(:rewind)
|
24
24
|
io.read
|
25
25
|
end
|
26
|
+
# TODO : only rescue the expected exceptions
|
26
27
|
rescue
|
27
28
|
""
|
28
29
|
end
|
@@ -59,4 +60,4 @@ class Bullhorn
|
|
59
60
|
Digest::SHA1.hexdigest(exception.message + exception.backtrace.inspect)
|
60
61
|
end
|
61
62
|
end
|
62
|
-
end
|
63
|
+
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 4
|
9
|
+
version: 0.0.4
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Cyril David
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-05-
|
17
|
+
date: 2010-05-23 00:00:00 +08:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -134,6 +134,7 @@ files:
|
|
134
134
|
- examples/foobar/test/performance/browsing_test.rb
|
135
135
|
- examples/foobar/test/test_helper.rb
|
136
136
|
- examples/foobar/test/unit/helpers/raiser_helper_test.rb
|
137
|
+
- examples/sinatra.rb
|
137
138
|
- lib/bullhorn.rb
|
138
139
|
- lib/bullhorn/plugin.rb
|
139
140
|
- lib/bullhorn/sender.rb
|
@@ -197,3 +198,4 @@ test_files:
|
|
197
198
|
- examples/foobar/test/performance/browsing_test.rb
|
198
199
|
- examples/foobar/test/test_helper.rb
|
199
200
|
- examples/foobar/test/unit/helpers/raiser_helper_test.rb
|
201
|
+
- examples/sinatra.rb
|