rollbar 2.15.2 → 2.15.3

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: 437007ddf3cda14f45d74e3bec9c4b16a0249345
4
- data.tar.gz: 51d29703e1202335322a5386516e8ae3f85c48b7
3
+ metadata.gz: 576f76f0fa343a7b3482542fb2f8ea5fd8607322
4
+ data.tar.gz: f808fbbbe3f19cf5d66482c083b6470b363788cd
5
5
  SHA512:
6
- metadata.gz: 1e670cee39adebd4ecef829babd67c3db917ea2060bc3da396af5de471b3c24d59a046e48023922033c209b9def0b5717ff6340adb94cabad288f761cd36f51c
7
- data.tar.gz: 2bdaab51831ea7398ad86aed457da70db6f8106599528ce81bfe5aa5cf9a2bfe422c5e451eaf2ac96c1caf032d509f7c6dd9d22d00cebd095753207ebb9b38b7
6
+ metadata.gz: fb71b77242924373d75631fce0a40f316490a79b67cb7f635c6929a0b0c9e53382d61b9753c4267d25e8aeb9661fb6857bcf5a6f4594707df51e06130f9fa5e9
7
+ data.tar.gz: 9ec91943bfc0c18b9744b64561fcb94979ae4153366d881c3596d28627365a017bb04505f0c360967a7cc0b6dc0da3b731f5f8cfce7cbe29fdbf4225bae549d2
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Change Log
2
2
 
3
+ ## 2.15.3
4
+
5
+ - Fix a bug when host is nil when we are trying to extract data about a request
6
+ [#637](https://github.com/rollbar/rollbar-gem/pull/637).
7
+ - Make a copy of extra data passed in so we don't modify frozen objects
8
+ [#638](https://github.com/rollbar/rollbar-gem/pull/638)
9
+
3
10
  ## 2.15.2
4
11
 
5
12
  - Fix how person data is injected into javascript
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Rollbar [![Build Status](https://api.travis-ci.org/rollbar/rollbar-gem.svg?branch=v2.15.2)](https://travis-ci.org/rollbar/rollbar-gem/branches)
1
+ # Rollbar [![Build Status](https://api.travis-ci.org/rollbar/rollbar-gem.svg?branch=v2.15.3)](https://travis-ci.org/rollbar/rollbar-gem/branches)
2
2
 
3
3
  <!-- RemoveNext -->
4
4
  [Rollbar](https://rollbar.com) is an error tracking service for Ruby and other languages. The Rollbar service will alert you of problems with your code and help you understand them in a ways never possible before. We love it and we hope you will too.
@@ -337,7 +337,7 @@ module Rollbar
337
337
  end
338
338
  end
339
339
 
340
- [message, exception, extra]
340
+ [message, exception, Rollbar::Util.deep_dup(extra)]
341
341
  end
342
342
 
343
343
  def lookup_exception_level(orig_level, exception, use_exception_level_filters)
@@ -112,8 +112,8 @@ module Rollbar
112
112
  forwarded_proto = env['HTTP_X_FORWARDED_PROTO'] || env['rack.url_scheme'] || ''
113
113
  scheme = forwarded_proto.split(',').first
114
114
 
115
- forwarded_host = env['HTTP_X_FORWARDED_HOST'] || env['HTTP_HOST'] || env['SERVER_NAME']
116
- host = forwarded_host && forwarded_host.split(',').first.strip
115
+ host = env['HTTP_X_FORWARDED_HOST'] || env['HTTP_HOST'] || env['SERVER_NAME'] || ''
116
+ host = host.split(',').first.strip unless host.empty?
117
117
 
118
118
  path = env['ORIGINAL_FULLPATH'] || env['REQUEST_URI']
119
119
  unless path.nil? || path.empty?
@@ -121,8 +121,8 @@ module Rollbar
121
121
  end
122
122
 
123
123
  port = env['HTTP_X_FORWARDED_PORT']
124
- if port && !(scheme.downcase == 'http' && port.to_i == 80) && \
125
- !(scheme.downcase == 'https' && port.to_i == 443) && \
124
+ if port && !(!scheme.nil? && scheme.downcase == 'http' && port.to_i == 80) && \
125
+ !(!scheme.nil? && scheme.downcase == 'https' && port.to_i == 443) && \
126
126
  !(host.include? ':')
127
127
  host = host + ':' + port
128
128
  end
data/lib/rollbar/util.rb CHANGED
@@ -62,6 +62,21 @@ module Rollbar
62
62
  end
63
63
  end
64
64
 
65
+ def self.deep_dup(obj)
66
+ if obj.is_a?(::Hash)
67
+ result = obj.dup
68
+ obj.each { |k, v| result[k] = deep_dup(v)}
69
+ result
70
+ elsif obj.is_a?(Array)
71
+ result = obj.dup
72
+ result.clear
73
+ obj.each { |v| result << deep_dup(v)}
74
+ result
75
+ else
76
+ obj.dup
77
+ end
78
+ end
79
+
65
80
  def self.deep_merge(hash1, hash2)
66
81
  hash1 ||= {}
67
82
  hash2 ||= {}
@@ -1,3 +1,3 @@
1
1
  module Rollbar
2
- VERSION = '2.15.2'
2
+ VERSION = '2.15.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rollbar
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.15.2
4
+ version: 2.15.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rollbar, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-13 00:00:00.000000000 Z
11
+ date: 2017-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json