hubble 0.1.0 → 0.1.1

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.md CHANGED
@@ -13,3 +13,41 @@ Test posting from a console trivially:
13
13
  $ bundle exec irb
14
14
  irb(main):001:0> require "hubble"; Hubble.setup; Hubble.boomtown!
15
15
  => #<Net::HTTPOK 200 OK readbody=true>
16
+
17
+ Using inside a rails app
18
+
19
+ In application.rb
20
+
21
+ ```ruby
22
+ # Push extra information into the failbot context
23
+ def exception_reporting_filter
24
+ Failbot.reset!
25
+ env = request.env || {}
26
+ request_url =
27
+ "#{request.protocol}#{request.host_with_port}#{request.fullpath}" rescue nil
28
+ context = {
29
+ :user => current_user.to_s,
30
+ :method => request.try(:method),
31
+ :user_agent => env['HTTP_USER_AGENT'],
32
+ :accept => env['HTTP_ACCEPT'],
33
+ :language => env['HTTP_ACCEPT_LANGUAGE'],
34
+ :params => params,
35
+ :session => session.try(:to_hash),
36
+ :referrer => request.try(:referrer),
37
+ :remote_ip => request.try(:remote_ip),
38
+ :url => request_url,
39
+ :controller => self.class,
40
+ :action => params[:action]
41
+ }
42
+ Failbot.push(context)
43
+ end
44
+ before_filter :exception_reporting_filter
45
+
46
+ ```
47
+
48
+ In config application
49
+
50
+ ```
51
+ require 'hubble/middleware'
52
+ config.middleware.use "Hubble::Rescuer"
53
+ ```
@@ -20,7 +20,7 @@ module Hubble
20
20
 
21
21
  def self.report(boom, env, other={})
22
22
  request = Rack::Request.new(env)
23
- Hubble::Client.report(boom, other.merge({
23
+ Hubble.report(boom, other.merge({
24
24
  :method => request.request_method,
25
25
  :user_agent => env['HTTP_USER_AGENT'],
26
26
  :params => (request.params.inspect rescue nil),
@@ -1,3 +1,3 @@
1
1
  module Hubble
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hubble
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - GitHub Inc.