rollbar 2.25.0 → 2.25.1

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
  SHA256:
3
- metadata.gz: b9b5cc0a79feb740c661bce79fb76f17a75d38b83172783cf61c8adf955805ec
4
- data.tar.gz: a6c59d9d8d1a228f8b06779a53a07f106f85afcdece4172cdf2f59bbe8d7e330
3
+ metadata.gz: 5bffe91029b00ca56f007756a93e94cdfb22ae068983b7d81c8f5b8dd168de41
4
+ data.tar.gz: 5f75d00b9b6f8910fb0d7c8de71f30efde6b00132927b01746811d101b5a4dc2
5
5
  SHA512:
6
- metadata.gz: 639efd714acef67a62998009fbcd527a0cd28262a6cf683efc941533779bef9b51086b5469fa41971d74bf2bf29693044a0cd89634c8abfdf0021d21990524b4
7
- data.tar.gz: 5ad38e447c67a08e4da7e76fb7df303a4c9e0c11d8f469e0f6645c34283b06c35db0e6f74165d3995b0bfe95588ec94cf834f6452e7100dd7d02eddabfe828c0
6
+ metadata.gz: ff7f880b5749d41a349ffa441198d495f13b450712c79a407b9569f091161ca06fdd5c3db08068d05a970745d629e99ed258de770cb8a973e3c3834a66d0592c
7
+ data.tar.gz: 740de4df537388a5a52280c2aebb5f2286849dc70589baa20dd587518a49334e8a10f28c2caa6540b1c45dbcf24c1c46652f90c35395c51bba7ae9d154bb3c64
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Rollbar-gem
2
- [![Build Status](https://api.travis-ci.org/rollbar/rollbar-gem.svg?branch=master)](https://travis-ci.org/rollbar/rollbar-gem/branches)
2
+ [![Build Status](https://travis-ci.org/rollbar/rollbar-gem.svg?branch=master)](https://travis-ci.org/rollbar/rollbar-gem/branches)
3
3
  [![Gem Version](https://badge.fury.io/rb/rollbar.svg)](http://badge.fury.io/rb/rollbar)
4
4
  [![SemVer](https://api.dependabot.com/badges/compatibility_score?dependency-name=rollbar&package-manager=bundler&version-scheme=semver&target-version=latest)](https://dependabot.com/compatibility-score.html?dependency-name=rollbar&package-manager=bundler&version-scheme=semver&new-version=latest)
5
5
 
@@ -65,7 +65,6 @@ module Rollbar
65
65
  def build
66
66
  data = build_data
67
67
  self.payload = {
68
- 'access_token' => configuration.access_token,
69
68
  'data' => data
70
69
  }
71
70
 
@@ -104,10 +104,10 @@ module Rollbar
104
104
 
105
105
  # Sends a report to Rollbar.
106
106
  #
107
- # Accepts any number of arguments. The last String argument will become
108
- # the message or description of the report. The last Exception argument
109
- # will become the associated exception for the report. The last hash
110
- # argument will be used as the extra data for the report.
107
+ # Accepts a level string plus any number of arguments. The last String
108
+ # argument will become the message or description of the report. The last
109
+ # Exception argument will become the associated exception for the report.
110
+ # The last hash argument will be used as the extra data for the report.
111
111
  #
112
112
  # If the extra hash contains a symbol key :custom_data_method_context
113
113
  # the value of the key will be used as the context for
@@ -118,14 +118,14 @@ module Rollbar
118
118
  # begin
119
119
  # foo = bar
120
120
  # rescue => e
121
- # Rollbar.log(e)
121
+ # Rollbar.log('error', e)
122
122
  # end
123
123
  #
124
124
  # @example
125
- # Rollbar.log('This is a simple log message')
125
+ # Rollbar.log('info', 'This is a simple log message')
126
126
  #
127
127
  # @example
128
- # Rollbar.log(e, 'This is a description of the exception')
128
+ # Rollbar.log('error', e, 'This is a description of the exception')
129
129
  #
130
130
  def log(level, *args)
131
131
  return 'disabled' unless enabled?
@@ -290,7 +290,6 @@ module Rollbar
290
290
  }
291
291
 
292
292
  failsafe_payload = {
293
- 'access_token' => configuration.access_token,
294
293
  'data' => failsafe_data
295
294
  }
296
295
 
@@ -1,3 +1,3 @@
1
1
  module Rollbar
2
- VERSION = '2.25.0'.freeze
2
+ VERSION = '2.25.1'.freeze
3
3
  end
@@ -16,8 +16,8 @@ class RollbarAPI
16
16
 
17
17
  protected
18
18
 
19
- def authorized?(json, _request)
20
- json['access_token'] != UNAUTHORIZED_ACCESS_TOKEN
19
+ def authorized?(_json, request)
20
+ request.env['HTTP_X_ROLLBAR_ACCESS_TOKEN'] != UNAUTHORIZED_ACCESS_TOKEN
21
21
  end
22
22
 
23
23
  def response_headers
@@ -26,8 +26,8 @@ class RollbarAPI
26
26
  }
27
27
  end
28
28
 
29
- def valid_data?(json, _request)
30
- !!json['access_token']
29
+ def valid_data?(_json, request)
30
+ !!request.env['HTTP_X_ROLLBAR_ACCESS_TOKEN']
31
31
  end
32
32
 
33
33
  def unauthorized
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.25.0
4
+ version: 2.25.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rollbar, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-24 00:00:00.000000000 Z
11
+ date: 2020-06-10 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Easy and powerful exception tracking for Ruby
14
14
  email: