bugsnag 1.2.13 → 1.2.14

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.
@@ -1,6 +1,15 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ 1.2.14
5
+ ------
6
+ - Add debug method, configuration option to help debug issues
7
+ - Better protection against bad unicode strings in metadata
8
+
9
+ 1.2.13
10
+ ------
11
+ - Protect against invalid unicode strings in metadata
12
+
4
13
  1.2.12
5
14
  ------
6
15
  - Fixed minor HTTParty dependency issue
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.13
1
+ 1.2.14
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "bugsnag"
8
- s.version = "1.2.13"
8
+ s.version = "1.2.14"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["James Smith"]
12
- s.date = "2013-02-19"
12
+ s.date = "2013-02-20"
13
13
  s.description = "Ruby notifier for bugsnag.com"
14
14
  s.email = "james@bugsnag.com"
15
15
  s.extra_rdoc_files = [
@@ -63,6 +63,11 @@ module Bugsnag
63
63
  configuration.logger.warn("#{LOG_PREFIX}#{message}")
64
64
  end
65
65
 
66
+ # Debug logger
67
+ def debug(message)
68
+ configuration.logger.info("#{LOG_PREFIX}#{message}") if configuration.debug
69
+ end
70
+
66
71
  # Configuration getters
67
72
  def configuration
68
73
  @configuration ||= Bugsnag::Configuration.new
@@ -17,6 +17,7 @@ module Bugsnag
17
17
  attr_accessor :logger
18
18
  attr_accessor :middleware
19
19
  attr_accessor :delay_with_resque
20
+ attr_accessor :debug
20
21
 
21
22
  THREAD_LOCAL_NAME = "bugsnag_req_data"
22
23
 
@@ -26,13 +26,11 @@ module Bugsnag
26
26
  clean_hash
27
27
  elsif obj.is_a?(Array) || obj.is_a?(Set)
28
28
  obj.map { |el| cleanup_obj(el, filters) }.compact
29
- elsif obj.is_a?(Integer) || obj.is_a?(Float)
29
+ elsif obj.is_a?(Integer) || obj.is_a?(Float) || obj.is_a?(String)
30
30
  obj
31
31
  else
32
32
  obj.to_s unless obj.to_s =~ /#<.*>/
33
33
  end
34
- rescue
35
- return nil
36
34
  end
37
35
 
38
36
  def self.reduce_hash_size(hash)
@@ -34,6 +34,7 @@ module Bugsnag
34
34
  end
35
35
 
36
36
  response = post(endpoint, {:body => payload_string})
37
+ Bugsnag.debug("Notification to #{endpoint} finished, response was #{response.code}, payload was #{payload_string}")
37
38
  rescue StandardError => e
38
39
  # KLUDGE: Since we don't re-raise http exceptions, this breaks rspec
39
40
  raise if e.class.to_s == "RSpec::Expectations::ExpectationNotMetError"
@@ -122,7 +123,7 @@ module Bugsnag
122
123
 
123
124
  # Build the endpoint url
124
125
  endpoint = (@configuration.use_ssl ? "https://" : "http://") + @configuration.endpoint
125
- Bugsnag.log("Notifying #{endpoint} of #{@exceptions.last.class}")
126
+ Bugsnag.log("Notifying #{endpoint} of #{@exceptions.last.class} from api_key #{@configuration.api_key}")
126
127
 
127
128
  # Build the payload's exception event
128
129
  payload_event = {
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bugsnag
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 3
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 13
10
- version: 1.2.13
9
+ - 14
10
+ version: 1.2.14
11
11
  platform: ruby
12
12
  authors:
13
13
  - James Smith
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-02-19 00:00:00 Z
18
+ date: 2013-02-20 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  requirement: &id001 !ruby/object:Gem::Requirement
@@ -28,10 +28,10 @@ dependencies:
28
28
  - 1
29
29
  - 0
30
30
  version: "1.0"
31
- version_requirements: *id001
32
- name: multi_json
33
31
  prerelease: false
34
32
  type: :runtime
33
+ name: multi_json
34
+ version_requirements: *id001
35
35
  - !ruby/object:Gem::Dependency
36
36
  requirement: &id002 !ruby/object:Gem::Requirement
37
37
  none: false
@@ -50,10 +50,10 @@ dependencies:
50
50
  - 0
51
51
  - 6
52
52
  version: "0.6"
53
- version_requirements: *id002
54
- name: httparty
55
53
  prerelease: false
56
54
  type: :runtime
55
+ name: httparty
56
+ version_requirements: *id002
57
57
  - !ruby/object:Gem::Dependency
58
58
  requirement: &id003 !ruby/object:Gem::Requirement
59
59
  none: false
@@ -66,10 +66,10 @@ dependencies:
66
66
  - 11
67
67
  - 0
68
68
  version: 2.11.0
69
- version_requirements: *id003
70
- name: rspec
71
69
  prerelease: false
72
70
  type: :development
71
+ name: rspec
72
+ version_requirements: *id003
73
73
  - !ruby/object:Gem::Dependency
74
74
  requirement: &id004 !ruby/object:Gem::Requirement
75
75
  none: false
@@ -81,10 +81,10 @@ dependencies:
81
81
  - 3
82
82
  - 12
83
83
  version: "3.12"
84
- version_requirements: *id004
85
- name: rdoc
86
84
  prerelease: false
87
85
  type: :development
86
+ name: rdoc
87
+ version_requirements: *id004
88
88
  - !ruby/object:Gem::Dependency
89
89
  requirement: &id005 !ruby/object:Gem::Requirement
90
90
  none: false
@@ -97,10 +97,10 @@ dependencies:
97
97
  - 8
98
98
  - 4
99
99
  version: 1.8.4
100
- version_requirements: *id005
101
- name: jeweler
102
100
  prerelease: false
103
101
  type: :development
102
+ name: jeweler
103
+ version_requirements: *id005
104
104
  description: Ruby notifier for bugsnag.com
105
105
  email: james@bugsnag.com
106
106
  executables: []