bugsnag 1.6.2 → 1.6.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ead9c3ae435b2c76b2ad41748a846992993032b0
4
- data.tar.gz: 9c7572192cdc46149bfd17d9f26183ac2ac54f3e
3
+ metadata.gz: 0f2e09404287c049f685cdb43450558c6fd744a9
4
+ data.tar.gz: 959babec9a72ab7da4ca2d7a161f1beaba38ffe0
5
5
  SHA512:
6
- metadata.gz: ed8321d8b710b85ad78c37aaadf50669ba34ee17d924014604715440c07fcd72da35e10502d45831cfcb7bc78381ec8275cad8f6b3b2e89ee4dc546d5d5c6653
7
- data.tar.gz: 23205103196fe19e341204072b74be923447f912afe01bb5ca6d21e22eef91c2f6aa039be8c09dbf4d0d5bb5d708ff667aac36572fa5e8cbf702a5369b5b60b6
6
+ metadata.gz: e253d2e9281712ee200c590dd38d50ff8f63b060dab94f077eb5113d0a7f42ff618650999baeef4eb3684485f2eea7e6bf8e0a8b65c379cafdb158652173335d
7
+ data.tar.gz: c5d5079077817aff53247a310c91b677a200149c0d07062612f6c7e8c4f921fd3d10da16e84b37c3e96efab9193c422d495b0609f0104fe86809bd7b0c71a49e
@@ -1,6 +1,10 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ 1.6.3
5
+ -----
6
+ - Deal with SSL properly for deploy notifications on ruby <2.0
7
+
4
8
  1.6.2
5
9
  -----
6
10
  - Notify about exceptions that occur in ActiveRecord `commit` and `rollback`
data/README.md CHANGED
@@ -373,6 +373,14 @@ Sets the password for the user that should be used to send requests to the HTTP
373
373
  config.proxy_password = "proxy_secret_password_here"
374
374
  ```
375
375
 
376
+ ###timeout
377
+ By default the timeout for posting errors to Bugsnag is 5 seconds, to change this
378
+ you can set the `timeout`:
379
+
380
+ ```ruby
381
+ config.timeout = 10
382
+ ```
383
+
376
384
  ###logger
377
385
 
378
386
  Sets which logger to use for Bugsnag log messages. In rails apps, this is
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.6.2
1
+ 1.6.3
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "bugsnag"
8
- s.version = "1.6.2"
8
+ s.version = "1.6.3"
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-10-14"
12
+ s.date = "2013-10-28"
13
13
  s.description = "Ruby notifier for bugsnag.com"
14
14
  s.email = "james@bugsnag.com"
15
15
  s.extra_rdoc_files = [
@@ -19,7 +19,6 @@ Gem::Specification.new do |s|
19
19
  s.files = [
20
20
  ".document",
21
21
  ".rspec",
22
- ".ruby-version",
23
22
  ".travis.yml",
24
23
  "CHANGELOG.md",
25
24
  "Gemfile",
@@ -23,6 +23,7 @@ module Bugsnag
23
23
  attr_accessor :proxy_port
24
24
  attr_accessor :proxy_user
25
25
  attr_accessor :proxy_password
26
+ attr_accessor :timeout
26
27
 
27
28
  THREAD_LOCAL_NAME = "bugsnag_req_data"
28
29
 
@@ -80,7 +80,8 @@ module Bugsnag
80
80
  end
81
81
  end
82
82
 
83
- self.class.http_proxy configuration.proxy_host, configuration.proxy_port, configuration.proxy_user, configuration.proxy_password if configuration.proxy_host
83
+ self.class.http_proxy(configuration.proxy_host, configuration.proxy_port, configuration.proxy_user, configuration.proxy_password) if configuration.proxy_host
84
+ self.class.default_timeout(configuration.timeout) if configuration.timeout
84
85
  end
85
86
 
86
87
  # Add a single value as custom data, to this notification
@@ -31,9 +31,8 @@ namespace :bugsnag do
31
31
  raise RuntimeError.new("No API key found when notifying deploy") if !api_key || api_key.empty?
32
32
 
33
33
  endpoint = (Bugsnag.configuration.use_ssl ? "https://" : "http://") \
34
- + (Bugsnag.configuration.endpoint || Bugsnag::Notification::DEFAULT_ENDPOINT) \
34
+ + (Bugsnag.configuration.endpoint || Bugsnag::Configuration::DEFAULT_ENDPOINT) \
35
35
  + "/deploy"
36
- uri = URI.parse(endpoint)
37
36
 
38
37
  parameters = {
39
38
  "apiKey" => api_key,
@@ -44,7 +43,12 @@ namespace :bugsnag do
44
43
  "branch" => branch
45
44
  }
46
45
 
47
- Net::HTTP.post_form(uri, parameters)
46
+ uri = URI.parse(endpoint)
47
+ req = Net::HTTP::Post.new(uri.path)
48
+ req.set_form_data(parameters)
49
+ http = Net::HTTP.new(uri.host, uri.port)
50
+ http.use_ssl = true if Bugsnag.configuration.use_ssl
51
+ http.request(req)
48
52
 
49
53
  rescue Exception => e
50
54
  Bugsnag.warn("Deploy notification failed, #{e.inspect}")
@@ -574,4 +574,17 @@ describe Bugsnag::Notification do
574
574
 
575
575
  Bugsnag.notify("test message")
576
576
  end
577
+
578
+ it "should set the timeout time to the value in the configuration" do |*args|
579
+ Bugsnag.configure do |config|
580
+ config.timeout = 10
581
+ end
582
+
583
+ Bugsnag::Notification.should_receive(:default_timeout) do |*args|
584
+ args.length.should be == 1
585
+ args[0].should be == 10
586
+ end
587
+
588
+ Bugsnag.notify("test message")
589
+ end
577
590
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bugsnag
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.2
4
+ version: 1.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Smith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-14 00:00:00.000000000 Z
11
+ date: 2013-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json
@@ -96,7 +96,6 @@ extra_rdoc_files:
96
96
  files:
97
97
  - .document
98
98
  - .rspec
99
- - .ruby-version
100
99
  - .travis.yml
101
100
  - CHANGELOG.md
102
101
  - Gemfile
@@ -1 +0,0 @@
1
- system