fucking_fail 0.0.2 → 0.0.3

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.
Files changed (2) hide show
  1. data/lib/fucking_fail.rb +4 -2
  2. metadata +1 -1
data/lib/fucking_fail.rb CHANGED
@@ -7,7 +7,9 @@ class FuckingFail
7
7
  DEFAULT_ON_ERROR = [ 500, {'Content-Type' => 'text/plain'}, [] ]
8
8
 
9
9
  def self.formatted_error error
10
- error.class.name + ': ' + error.message + "\n" + error.backtrace.join("\n")
10
+ formatted = error.class.name + ': ' + error.message.to_s
11
+ formatted << "\n" + error.backtrace.join("\n") if error.backtrace
12
+ formatted
11
13
  end
12
14
 
13
15
  def self.env_variable
@@ -65,7 +67,7 @@ class FuckingFail
65
67
  end
66
68
 
67
69
  def deliver exception, additional_data
68
- uri = URI.parse('http://fuckingfail.com/fails')
70
+ uri = URI.parse post_url
69
71
  params = additional_data.merge :token => token, :stacktrace => FuckingFail.formatted_error(exception)
70
72
  Net::HTTP.post_form uri, params
71
73
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fucking_fail
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors: []
7
7