rollbar 2.16.0 → 2.16.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -55,4 +55,7 @@ end
55
55
 
56
56
  gem 'resque'
57
57
 
58
+ gem 'aws-sdk-sqs'
59
+ gem 'shoryuken'
60
+
58
61
  gemspec :path => '../'
@@ -52,4 +52,7 @@ end
52
52
 
53
53
  gem 'resque'
54
54
 
55
+ gem 'aws-sdk-sqs'
56
+ gem 'shoryuken'
57
+
55
58
  gemspec :path => '../'
@@ -54,4 +54,7 @@ end
54
54
 
55
55
  gem 'resque'
56
56
 
57
+ gem 'aws-sdk-sqs'
58
+ gem 'shoryuken'
59
+
57
60
  gemspec :path => '../'
@@ -54,4 +54,7 @@ else
54
54
  gem 'webmock', :require => false
55
55
  end
56
56
 
57
- gemspec :path => '../'
57
+ gem 'aws-sdk-sqs'
58
+ gem 'shoryuken'
59
+
60
+ gemspec :path => '../'
@@ -51,4 +51,7 @@ end
51
51
 
52
52
  gem 'resque'
53
53
 
54
+ gem 'aws-sdk-sqs'
55
+ gem 'shoryuken'
56
+
54
57
  gemspec :path => '../'
@@ -53,4 +53,7 @@ else
53
53
  gem 'webmock', :require => false
54
54
  end
55
55
 
56
+ gem 'aws-sdk-sqs'
57
+ gem 'shoryuken'
58
+
56
59
  gemspec :path => '../'
@@ -55,4 +55,7 @@ end
55
55
 
56
56
  gem 'webmock', :require => false
57
57
 
58
+ gem 'aws-sdk-sqs'
59
+ gem 'shoryuken'
60
+
58
61
  gemspec :path => '../'
@@ -55,4 +55,7 @@ end
55
55
 
56
56
  gem 'webmock', :require => false
57
57
 
58
+ gem 'aws-sdk-sqs'
59
+ gem 'shoryuken'
60
+
58
61
  gemspec :path => '../'
@@ -103,6 +103,8 @@ module Rollbar
103
103
  {}
104
104
  elsif sensitive_headers_list.include?(name)
105
105
  { name => Rollbar::Scrubbers.scrub_value(env[header]) }
106
+ elsif name == 'X-Forwarded-For' && !Rollbar.configuration.collect_user_ip
107
+ {}
106
108
  else
107
109
  { name => env[header] }
108
110
  end
@@ -14,58 +14,25 @@ namespace :rollbar do
14
14
  :local_username => fetch(:rollbar_user),
15
15
  :access_token => fetch(:rollbar_token),
16
16
  :environment => fetch(:rollbar_env),
17
- :revision => fetch(:rollbar_revision) }
17
+ :revision => fetch(:rollbar_revision),
18
+ :comment => fetch(:rollbar_comment),
19
+ }
18
20
 
19
21
  debug "Building Rollbar POST to #{uri} with #{params.inspect}"
20
22
 
21
23
  request = Net::HTTP::Post.new(uri.request_uri)
22
24
  request.body = ::JSON.dump(params)
23
25
 
24
- Net::HTTP.start(uri.host, uri.port, :use_ssl => true) do |http|
26
+ Net::HTTP.start(uri.host, uri.port, :ENV, :use_ssl => true) do |http|
25
27
  http.request(request)
26
28
  end
27
29
 
28
30
  info 'Rollbar notification complete.'
29
31
  end
30
32
  end
31
-
32
- desc 'Upload sourcemaps to Rollbar.'
33
- task :sourcemap do
34
- on primary fetch(:rollbar_role) do
35
- info "Uploading source maps"
36
- warn("You need to upgrade capistrano to '>= 3.1' version in order to correctly upload sourcemaps to Rollbar. (On 3.0, the reported revision will be incorrect.)") if Capistrano::VERSION =~ /^3\.0/
37
- url_base = fetch(:rollbar_sourcemaps_minified_url_base)
38
- unless url_base
39
- warn "No #{rollbar_sourcemaps_minified_url_base} was specified. Sourcemaps won't be uploaded."
40
- return
41
- end
42
- url_base = "http://#{url_base}" unless url_base.index(/https?:\/\//)
43
- within release_path do
44
- within 'public' do
45
- source_maps = capture(:find, '-L', '.', '-name', "'*.js.map'").split("\n")
46
- source_maps = source_maps.map { |file| file.gsub(/^\.\//, '') }
47
- source_maps.each do |source_map|
48
- minified_url = File.join(url_base, source_map)
49
- args = *%W(--silent https://api.rollbar.com/api/1/sourcemap -F access_token=#{fetch(:rollbar_token)} -F version=#{fetch(:rollbar_revision)} -F minified_url=#{minified_url} -F source_map=@./#{source_map})
50
- info "curl #{args.join(' ')}" # log the command, since capture doesn't output anything
51
- api_response_body = capture(:curl, args)
52
- begin
53
- api_response_json = JSON.parse(api_response_body)
54
- if api_response_json["err"] != 0
55
- warn "Error uploading sourcemaps: #{api_response_json["message"] || 'Unknown Error'}"
56
- end
57
- rescue JSON::ParserError => e
58
- warn "Error parsing response: #{e.message}. Response body: #{api_response_body}"
59
- end
60
- end
61
- end
62
- end
63
- end
64
- end
65
33
  end
66
34
 
67
35
  namespace :deploy do
68
- after 'deploy:compile_assets', 'rollbar:sourcemap'
69
36
  after 'deploy:finished', 'rollbar:deploy'
70
37
  end
71
38
 
@@ -1,3 +1,3 @@
1
1
  module Rollbar
2
- VERSION = '2.16.0'
2
+ VERSION = '2.16.2'
3
3
  end
@@ -149,6 +149,12 @@ describe Rollbar::RequestDataExtractor do
149
149
 
150
150
  expect(result[:user_ip]).to be_nil
151
151
  end
152
+
153
+ it 'does not extract user\'s IP on X-Forwarded-For header' do
154
+ result = subject.extract_request_data_from_rack(env)
155
+
156
+ expect(result[:headers]['X-Forwarded-For']).to be_nil
157
+ end
152
158
  end
153
159
 
154
160
  context 'with anonymize_user_ip configuration option enabled' do
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.16.0
4
+ version: 2.16.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rollbar, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-17 00:00:00.000000000 Z
11
+ date: 2018-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json
@@ -284,7 +284,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
284
284
  version: '0'
285
285
  requirements: []
286
286
  rubyforge_project:
287
- rubygems_version: 2.5.1
287
+ rubygems_version: 2.6.10
288
288
  signing_key:
289
289
  specification_version: 4
290
290
  summary: Reports exceptions to Rollbar