bugsnag 3.0.0 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c47737bc08fe70bfdc4b9391ab04d5b6aa6900aa
4
- data.tar.gz: abe70b3cc901bf48a06fab50bd410e1927ca7a6d
3
+ metadata.gz: 0ebe81525d5bc908bded68c8fe66f2148c827bf2
4
+ data.tar.gz: 5094f9cbca6d554b8ab8599dd8cf751824f39564
5
5
  SHA512:
6
- metadata.gz: eedb7804e481f0ecfd3436b758e7880f7ebfe232cc7fc93ee5a670738e61df4751a7ff11523cd523c9ec873259f21880df84d214f2a63333c3f6bda704c34184
7
- data.tar.gz: afc1a1885938f4926dea26e9eb4f22080ea506f15997afe4acd4302085a445e5ff7a0e7191c2d55f50f2919a8a56c664ea7e64b261d6c4c76d360ed823d5da23
6
+ metadata.gz: 7893ddc4139330cddecddee79e8d25306385a2aa1d9d1e73d4d715af856aa03c9f534614b2747291136910df04fdab64416e15ef476bdec6b8b8b04363fc23e1
7
+ data.tar.gz: a48b1f8f0745b50ec99322f98d5fb7dd37f3df0b3b3fa46fb2e2894043a6afd484c1710ed346deb8f61461be9de1a293e4f67e83f4260fb3e30245f8799f36c1
@@ -1,12 +1,14 @@
1
1
  sudo: false
2
2
  language: ruby
3
+ cache: bundler
3
4
  rvm:
4
- - 2.1.0
5
+ - 2.3.0
6
+ - 2.2.4
7
+ - 2.1.8
5
8
  - 2.0.0
6
9
  - 1.9.3
7
- - jruby-18mode
8
10
  - jruby-19mode
9
- - 1.8.7
11
+
10
12
  before_install:
11
13
  - gem update --system 2.1.11
12
14
  - gem --version
@@ -1,6 +1,22 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ ## 4.0.0 (9 Mar 2016)
5
+
6
+ This release includes general fixes as well as removing support
7
+ for Ruby versions below 1.9.2.
8
+
9
+ ### Fixes
10
+
11
+ * Fix deployment notification failure in Capistrano
12
+ | [Simon Maynard](https://github.com/snmaynard)
13
+ | [#275](https://github.com/bugsnag/bugsnag-ruby/pull/275)
14
+
15
+ * Fix Bad Request errors generated by large payloads
16
+ | [Simon Maynard](https://github.com/snmaynard)
17
+ | [#276](https://github.com/bugsnag/bugsnag-ruby/pull/276)
18
+
19
+
4
20
  3.0.0 (23 Dec 2015)
5
21
  -----
6
22
 
data/README.md CHANGED
@@ -6,7 +6,7 @@ thrown from your **Rails**, **Sinatra**, **Rack** or **plain Ruby** app.
6
6
  Any uncaught exceptions will trigger a notification to be sent to your
7
7
  Bugsnag project.
8
8
 
9
- [Bugsnag](http://bugsnag.com) captures errors in real-time from your web,
9
+ Capture Rails errors with Bugsnag's [Rails error monitoring](https://bugsnag.com/platforms/rails) solution. [Bugsnag](http://bugsnag.com) captures errors in real-time from your web,
10
10
  mobile and desktop applications, helping you to understand and resolve them
11
11
  as fast as possible. [Create a free account](http://bugsnag.com) to start
12
12
  capturing exceptions from your applications.
@@ -188,7 +188,7 @@ If you would like to send non-fatal exceptions to Bugsnag, you can call
188
188
  Bugsnag.notify(RuntimeError.new("Something broke"))
189
189
  ```
190
190
 
191
- Additional data can be sent with exceptions as an options hash as detailed in the [Notification Options](docs/Notification Options.md) documentation, including some [options specific to non-fatal exceptions](docs/Notification Options.md#handled-notification-options).
191
+ Additional data can be sent with exceptions as an options hash as detailed in the [Notification Options](https://github.com/bugsnag/bugsnag-ruby/tree/master/docs/Notification Options.md) documentation, including some [options specific to non-fatal exceptions](https://github.com/bugsnag/bugsnag-ruby/tree/master/docs/Notification Options.md#handled-notification-options).
192
192
 
193
193
 
194
194
  ### Callbacks
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.0
1
+ 4.0.0
@@ -13,18 +13,13 @@ Gem::Specification.new do |s|
13
13
  s.files = `git ls-files`.split("\n").reject {|file| file.start_with? "example/"}
14
14
  s.extra_rdoc_files = [
15
15
  "LICENSE.txt",
16
- "README.md"
16
+ "README.md",
17
+ "CHANGELOG.md"
17
18
  ]
18
19
  s.require_paths = ["lib"]
20
+ s.required_ruby_version = '>= 1.9.2'
19
21
 
20
- s.add_dependency 'json', '~> 1.7', '>= 1.7.7'
21
-
22
- if RUBY_VERSION < "1.9"
23
- s.add_development_dependency "rake", "~> 10.1.1"
24
- else
25
- s.add_development_dependency 'rake'
26
- end
27
-
22
+ s.add_development_dependency 'rake', '~> 10.1.1'
28
23
  s.add_development_dependency 'rspec'
29
24
  s.add_development_dependency 'rdoc'
30
25
  s.add_development_dependency 'pry'
@@ -140,6 +140,9 @@ By default, `params_filters` is set to `[/authorization/i, /cookie/i,
140
140
  /password/i, /secret/i]`, and for rails apps, imports all values from
141
141
  `Rails.configuration.filter_parameters`.
142
142
 
143
+ **Note:** Assigning (`=`) instead of appending (`+=`) to the default value will
144
+ remove the default protections.
145
+
143
146
  <!-- Custom anchor for linking from alerts -->
144
147
  <div id="set-project-root"></div>
145
148
  ### `project_root`
@@ -15,7 +15,7 @@ exceptions, to help debug problems.
15
15
 
16
16
  ## Notification Object
17
17
 
18
- The notification object is passed to all [before bugsnag notify](#sending-custom-data-with-exceptions)
18
+ The notification object is passed to all [before bugsnag notify](#framework-specific-configuration)
19
19
  callbacks and is used to manipulate the error report before it is transmitted.
20
20
 
21
21
  ### Instance Methods
@@ -44,6 +44,8 @@ module Bugsnag
44
44
  require "bugsnag/delay/resque" if configuration.delay_with_resque && defined?(Resque)
45
45
 
46
46
  # Log that we are ready to rock
47
+ @logged_ready = false unless defined?(@logged_ready)
48
+
47
49
  if configuration.api_key && !@logged_ready
48
50
  log "Bugsnag exception handler #{VERSION} ready, api_key=#{configuration.api_key}"
49
51
  @logged_ready = true
@@ -95,6 +97,7 @@ module Bugsnag
95
97
 
96
98
  # Configuration getters
97
99
  def configuration
100
+ @configuration = nil unless defined?(@configuration)
98
101
  @configuration || LOCK.synchronize { @configuration ||= Bugsnag::Configuration.new }
99
102
  end
100
103
 
@@ -1,4 +1,4 @@
1
- require "bugsnag/deploy"
1
+ require "bugsnag"
2
2
 
3
3
  if defined?(Capistrano::VERSION) && Gem::Version.new(Capistrano::VERSION).release >= Gem::Version.new('3.0.0')
4
4
  load File.expand_path('../tasks/bugsnag.cap', __FILE__)
@@ -81,6 +81,7 @@ module Bugsnag
81
81
  self.delivery_method = DEFAULT_DELIVERY_METHOD
82
82
  self.timeout = 15
83
83
  self.vendor_paths = [%r{vendor/}]
84
+ self.notify_release_stages = nil
84
85
 
85
86
  # Read the API key from the environment
86
87
  self.api_key = ENV["BUGSNAG_API_KEY"]
@@ -24,6 +24,7 @@ module Bugsnag
24
24
 
25
25
  def start_once!
26
26
  MUTEX.synchronize do
27
+ @started = nil unless defined?(@started)
27
28
  return if @started == Process.pid
28
29
  @started = Process.pid
29
30
 
@@ -41,7 +41,7 @@ module Bugsnag
41
41
  # a minimal payload instead
42
42
  payload_string = ::JSON.dump(payload)
43
43
  if payload_string.length > 128000
44
- payload[:events].each {|e| e[:metaData] = Bugsnag::Helpers.reduce_hash_size(e[:metaData])}
44
+ payload[:events] = payload[:events].map {|e| Bugsnag::Helpers.reduce_hash_size(e)}
45
45
  payload_string = ::JSON.dump(payload)
46
46
  end
47
47
 
@@ -56,6 +56,9 @@ module Bugsnag
56
56
  @meta_data = {}
57
57
  @user = {}
58
58
  @should_ignore = false
59
+ @severity = nil
60
+ @grouping_hash = nil
61
+ @delivery_method = nil
59
62
 
60
63
  self.severity = @overrides[:severity]
61
64
  @overrides.delete :severity
@@ -272,6 +272,23 @@ describe Bugsnag::Notification do
272
272
  }
273
273
  end
274
274
 
275
+ it "truncates large messages before sending" do
276
+ Bugsnag.notify(BugsnagTestException.new(SecureRandom.hex(500_000)), {
277
+ :meta_data => {
278
+ :some_tab => {
279
+ :giant => SecureRandom.hex(500_000/2),
280
+ :mega => SecureRandom.hex(500_000/2)
281
+ }
282
+ }
283
+ })
284
+
285
+ expect(Bugsnag).to have_sent_notification{ |payload|
286
+ # Truncated body should be no bigger than
287
+ # 2 truncated hashes (4096*2) + rest of payload (20000)
288
+ expect(::JSON.dump(payload).length).to be < 4096*2 + 20000
289
+ }
290
+ end
291
+
275
292
  it "accepts a severity in overrides" do
276
293
  Bugsnag.notify(BugsnagTestException.new("It crashed"), {
277
294
  :severity => "info"
metadata CHANGED
@@ -1,117 +1,97 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bugsnag
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Smith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-23 00:00:00.000000000 Z
11
+ date: 2016-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: json
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ~>
18
- - !ruby/object:Gem::Version
19
- version: '1.7'
20
- - - '>='
21
- - !ruby/object:Gem::Version
22
- version: 1.7.7
23
- type: :runtime
24
- prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- requirements:
27
- - - ~>
28
- - !ruby/object:Gem::Version
29
- version: '1.7'
30
- - - '>='
31
- - !ruby/object:Gem::Version
32
- version: 1.7.7
33
13
  - !ruby/object:Gem::Dependency
34
14
  name: rake
35
15
  requirement: !ruby/object:Gem::Requirement
36
16
  requirements:
37
- - - '>='
17
+ - - "~>"
38
18
  - !ruby/object:Gem::Version
39
- version: '0'
19
+ version: 10.1.1
40
20
  type: :development
41
21
  prerelease: false
42
22
  version_requirements: !ruby/object:Gem::Requirement
43
23
  requirements:
44
- - - '>='
24
+ - - "~>"
45
25
  - !ruby/object:Gem::Version
46
- version: '0'
26
+ version: 10.1.1
47
27
  - !ruby/object:Gem::Dependency
48
28
  name: rspec
49
29
  requirement: !ruby/object:Gem::Requirement
50
30
  requirements:
51
- - - '>='
31
+ - - ">="
52
32
  - !ruby/object:Gem::Version
53
33
  version: '0'
54
34
  type: :development
55
35
  prerelease: false
56
36
  version_requirements: !ruby/object:Gem::Requirement
57
37
  requirements:
58
- - - '>='
38
+ - - ">="
59
39
  - !ruby/object:Gem::Version
60
40
  version: '0'
61
41
  - !ruby/object:Gem::Dependency
62
42
  name: rdoc
63
43
  requirement: !ruby/object:Gem::Requirement
64
44
  requirements:
65
- - - '>='
45
+ - - ">="
66
46
  - !ruby/object:Gem::Version
67
47
  version: '0'
68
48
  type: :development
69
49
  prerelease: false
70
50
  version_requirements: !ruby/object:Gem::Requirement
71
51
  requirements:
72
- - - '>='
52
+ - - ">="
73
53
  - !ruby/object:Gem::Version
74
54
  version: '0'
75
55
  - !ruby/object:Gem::Dependency
76
56
  name: pry
77
57
  requirement: !ruby/object:Gem::Requirement
78
58
  requirements:
79
- - - '>='
59
+ - - ">="
80
60
  - !ruby/object:Gem::Version
81
61
  version: '0'
82
62
  type: :development
83
63
  prerelease: false
84
64
  version_requirements: !ruby/object:Gem::Requirement
85
65
  requirements:
86
- - - '>='
66
+ - - ">="
87
67
  - !ruby/object:Gem::Version
88
68
  version: '0'
89
69
  - !ruby/object:Gem::Dependency
90
70
  name: addressable
91
71
  requirement: !ruby/object:Gem::Requirement
92
72
  requirements:
93
- - - ~>
73
+ - - "~>"
94
74
  - !ruby/object:Gem::Version
95
75
  version: 2.3.8
96
76
  type: :development
97
77
  prerelease: false
98
78
  version_requirements: !ruby/object:Gem::Requirement
99
79
  requirements:
100
- - - ~>
80
+ - - "~>"
101
81
  - !ruby/object:Gem::Version
102
82
  version: 2.3.8
103
83
  - !ruby/object:Gem::Dependency
104
84
  name: webmock
105
85
  requirement: !ruby/object:Gem::Requirement
106
86
  requirements:
107
- - - '>='
87
+ - - ">="
108
88
  - !ruby/object:Gem::Version
109
89
  version: '0'
110
90
  type: :development
111
91
  prerelease: false
112
92
  version_requirements: !ruby/object:Gem::Requirement
113
93
  requirements:
114
- - - '>='
94
+ - - ">="
115
95
  - !ruby/object:Gem::Version
116
96
  version: '0'
117
97
  description: Ruby notifier for bugsnag.com
@@ -121,11 +101,12 @@ extensions: []
121
101
  extra_rdoc_files:
122
102
  - LICENSE.txt
123
103
  - README.md
104
+ - CHANGELOG.md
124
105
  files:
125
- - .document
126
- - .gitignore
127
- - .rspec
128
- - .travis.yml
106
+ - ".document"
107
+ - ".gitignore"
108
+ - ".rspec"
109
+ - ".travis.yml"
129
110
  - CHANGELOG.md
130
111
  - CONTRIBUTING.md
131
112
  - Gemfile
@@ -200,17 +181,17 @@ require_paths:
200
181
  - lib
201
182
  required_ruby_version: !ruby/object:Gem::Requirement
202
183
  requirements:
203
- - - '>='
184
+ - - ">="
204
185
  - !ruby/object:Gem::Version
205
- version: '0'
186
+ version: 1.9.2
206
187
  required_rubygems_version: !ruby/object:Gem::Requirement
207
188
  requirements:
208
- - - '>='
189
+ - - ">="
209
190
  - !ruby/object:Gem::Version
210
191
  version: '0'
211
192
  requirements: []
212
193
  rubyforge_project:
213
- rubygems_version: 2.0.14
194
+ rubygems_version: 2.4.5
214
195
  signing_key:
215
196
  specification_version: 4
216
197
  summary: Ruby notifier for bugsnag.com