debugged-ruby 0.1.3 → 0.1.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.
data/lib/debugged-ruby.rb CHANGED
@@ -57,16 +57,19 @@ module Debugged
57
57
  "platform" => RUBY_PLATFORM.to_s}
58
58
  }
59
59
 
60
- url = "http://debugged.herokuapp.com/report"
60
+ url = "http://debugrged.herokuapp.com/report"
61
+ uri = URI(url)
62
+
63
+ req = Net::HTTP::Post.new(uri.request_uri)
64
+ req.basic_auth @@api_key, 'pass'
65
+ req.body = report.to_json
61
66
 
62
67
  pending = 1
63
- @@log.debug(hash + " - sending report to Debugged")
64
68
 
65
69
  EM.run do
66
70
  begin
67
71
  http = EM::HttpRequest.new(url).post :body => report.to_json, :head => {'authorization' => [@@api_key, 'pass']}
68
72
  http.callback {
69
- @@log.debug(hash + " - report sent to Debugged")
70
73
  pending -= 1
71
74
  EM.stop if pending < 1
72
75
  }
@@ -85,26 +88,3 @@ module Debugged
85
88
  "http://www.debugged.herokuapp.com/report/"+hash
86
89
  end
87
90
  end
88
-
89
- module Rack
90
- class Debugged
91
- def initialize(app)
92
- @app = app
93
- end
94
-
95
- def call(env)
96
- begin
97
- @app.call(env)
98
- rescue Exception => e
99
- ::Debugged.report(e, {})
100
- raise
101
- end
102
-
103
- e = env['sinatra.error']
104
- if e
105
- ::Debugged.report(e, {})
106
- raise
107
- end
108
- end
109
- end
110
- end
@@ -1,3 +1,3 @@
1
1
  module Debugged
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: debugged-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: