bugsnag-api 2.0.2 → 2.0.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
- SHA1:
3
- metadata.gz: f1a072712b9388b873f8159b1da219c8cdb56e88
4
- data.tar.gz: 7094b51bf0f0565b52e04515007dd0456b8766c4
2
+ SHA256:
3
+ metadata.gz: '008defb6062958e4592b9e4a2a6ca8c8594af2c2751d593c8349e4e40d781c15'
4
+ data.tar.gz: 69a52ad4465bb7de30725175172a7fee6003385fd952f1f791aedad6b0944350
5
5
  SHA512:
6
- metadata.gz: 505c72dc46ca8a41bcc3772e765508b0d26c6610810a73e7bc542ea7a3ed903c7622aa6e41bfd86a4322ee41e940678e53f1ee0ee3ebcbf302e1145c6cfbb7af
7
- data.tar.gz: c187d9eb7dd6fe2f234652e9bf85e324ac5c0a1f436b0b35e528ae670d8fb8d520347a433fd23dea7a48af2988833a41f170d3fb66a8aa95a7c985099f8d8498
6
+ metadata.gz: 88b38958f05730d46bd8dfeeda7ead7e7c1c6d86a7fb8628b9ec4f8790bc2638d2e88bcbb0dfb2acd1b393468625bb52838d6f69a90f81c01bdf6fce60d4269f
7
+ data.tar.gz: 1e06a3d3c3b2c551078a66dd0743633cca7c45f49d5a5e6cadd886c6555854d36da2a8c6d67e40be94d530fd0932c4b923258b03793f50a52cf122b699a5ae4a
@@ -0,0 +1,6 @@
1
+ steps:
2
+ - name: ':copyright: License Audit'
3
+ plugins:
4
+ docker-compose#v3.7.0:
5
+ run: license_finder
6
+ command: /bin/bash -lc '/scan/scripts/license_finder.sh'
@@ -0,0 +1,14 @@
1
+ ---
2
+ name: Having trouble getting started?
3
+ about: Please contact us at support@bugsnag.com for assistance with integrating Bugsnag
4
+ into your application.
5
+ title: ''
6
+ labels: ''
7
+ assignees: ''
8
+
9
+ ---
10
+ Please checkout our [documentation](https://docs.bugsnag.com/api/data-access/#ruby-api-toolkit) for guides, references and tutorials.
11
+
12
+ If you have questions about your integration please contact us at [support@bugsnag.com](mailto:support@bugsnag.com).
13
+
14
+ Alternatively, view additional options at [support.md](../SUPPORT.md).
@@ -0,0 +1,47 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve the library
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ <!-- Before raising, please check if somebody else has already reported your issue. -->
11
+
12
+ ### Describe the bug
13
+ A clear and concise description of what the bug is.
14
+
15
+ ### Steps to reproduce
16
+ 1. Go to '...'
17
+ 2. Click on '....'
18
+ 3. Scroll down to '....'
19
+ 4. See error
20
+
21
+ ### Environment
22
+ * Ruby version:
23
+
24
+ <!--
25
+ Below are a few approaches you might take to communicate the issue, in
26
+ descending order of awesomeness. Please choose one and feel free to delete
27
+ the others from this template.
28
+ -->
29
+
30
+ ### Example Repo <!-- Option 1 -->
31
+
32
+ - [ ] Create a minimal repository that can reproduce the issue
33
+ - [ ] Link to it here:
34
+
35
+ ### Example code snippet <!-- Option 2 -->
36
+
37
+ ```
38
+ # (Insert code sample to reproduce the problem)
39
+ ```
40
+
41
+ <!-- Error messages, if any -->
42
+ <details><summary>Error messages:</summary>
43
+
44
+ ```
45
+
46
+ ```
47
+ </details>
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ <!-- Before creating, please check if somebody else has already reported your feature request. -->
11
+
12
+ ### Description
13
+ <!-- Is your feature request related to a problem? Please describe.
14
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
15
+ -->
16
+
17
+ **Describe the solution you'd like**
18
+ <!-- A clear and concise description of what you want to happen. -->
19
+
20
+ **Describe alternatives you've considered**
21
+ <!-- A clear and concise description of any alternative solutions or features you've considered. -->
22
+
23
+ **Additional context**
24
+ <!--Add any other context about the feature request here.-->
@@ -0,0 +1,16 @@
1
+ ## Goal
2
+
3
+ <!-- Why is this change necessary? -->
4
+
5
+ ## Design
6
+
7
+ <!-- Why was this approach used? -->
8
+
9
+ ## Changeset
10
+
11
+ <!-- What changed? -->
12
+
13
+ ## Testing
14
+
15
+ <!-- How was it tested? What manual and automated tests were
16
+ run/added? -->
@@ -0,0 +1,19 @@
1
+ ## Are you having trouble getting started?
2
+ If you haven't already, please checkout our [documentation](https://docs.bugsnag.com/api/data-access/#ruby-api-toolkit) for guides, references and tutorials.
3
+
4
+ Or, if you wish you can [contact us directly](mailto:support@bugsnag.com) for assistance on integrating Bugsnag into your application, troubleshooting an issue or a question about our supported features.
5
+
6
+ When contacting support, please include as much information as necessary, including:
7
+
8
+ - example code snippet
9
+ - steps to reproduce
10
+ - expected/actual behaviour
11
+
12
+ * Ruby version:
13
+
14
+ ## Bug or Feature Requests
15
+ If you would like to raise a bug or feature request please do so by creating a [New Issue](https://github.com/bugsnag/bugsnag-api-ruby/issues/new/choose) and selecting bug or feature.
16
+ Please note: we cannot promise that we will fulfil all requests
17
+
18
+ ## Pull Requests
19
+ If you have made a fix and would like to raise a pull request, please read our [CONTRIBUTING.md](../CONTRIBUTING.md) file before creating the pull request.
@@ -0,0 +1,53 @@
1
+ name: Tests
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ specs:
7
+ runs-on: ubuntu-latest
8
+ strategy:
9
+ fail-fast: false
10
+ matrix:
11
+ ruby-version: ['2.1', '2.2', '2.3', '2.4', '2.5', '2.6', '2.7', '3.0']
12
+
13
+ steps:
14
+ - uses: actions/checkout@v2
15
+
16
+ - name: Install Ruby
17
+ uses: ruby/setup-ruby@v1
18
+ with:
19
+ ruby-version: ${{ matrix.ruby-version }}
20
+ bundler-cache: true
21
+
22
+ - run: bundle exec rake spec
23
+
24
+ linting:
25
+ runs-on: ubuntu-latest
26
+
27
+ steps:
28
+ - uses: actions/checkout@v2
29
+
30
+ - name: Install Ruby
31
+ uses: ruby/setup-ruby@v1
32
+ with:
33
+ ruby-version: '3.0'
34
+ bundler-cache: true
35
+
36
+ - run: bundle exec rubocop lib/
37
+
38
+ # Ruby 1.9 and 2.0 aren't supported by setup-ruby so we have to use Docker instead
39
+ legacy:
40
+ runs-on: ubuntu-latest
41
+ strategy:
42
+ fail-fast: false
43
+ matrix:
44
+ ruby-version: ['1.9', '2.0']
45
+
46
+ container: ruby:${{ matrix.ruby-version }}
47
+
48
+ steps:
49
+ - uses: actions/checkout@v2
50
+
51
+ - run: bundle install
52
+
53
+ - run: bundle exec rake spec
data/CHANGELOG.md CHANGED
@@ -1,6 +1,18 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ ## 2.0.3 (11 May 2021)
5
+
6
+ ### Fixes
7
+
8
+ * Fix error handling middleware compatibility with Faraday v1.2.0 and above
9
+ | [askreet](https://github.com/askreet)
10
+ | [#30](https://github.com/bugsnag/bugsnag-api-ruby/pull/30)
11
+
12
+ * Remove call to deprecated `URI.escape`
13
+ | [askreet](https://github.com/askreet)
14
+ | [#28](https://github.com/bugsnag/bugsnag-api-ruby/pull/28)
15
+
4
16
  ## 2.0.2 (21 Feb 2018)
5
17
 
6
18
  ### Fixes
data/CONTRIBUTING.md CHANGED
@@ -26,7 +26,7 @@ If you're a member of the core team, follow these instructions for releasing bug
26
26
  ### Every time
27
27
 
28
28
  * Update `CHANGELOG.md`
29
- * Update the version number in `bugsnag-api.gemspec`
29
+ * Update the version number in [`lib/bugsnag/api/version.rb`](./lib/bugsnag/api/version.rb)
30
30
  * Update `README.md` if necessary with changes to the interface or configuration
31
31
  * Commit/push your changes
32
32
  * Release to rubygems
data/Gemfile CHANGED
@@ -1,4 +1,13 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
+ # Any :development dependencies are ignored for license auditing purposes
4
+ group :development do
5
+ end
6
+
7
+ # Any :test dependencies are ignored for license auditing purposes
8
+ group :test do
9
+ end
10
+
3
11
  # Specify your gem's dependencies in bugsnag-api.gemspec
4
12
  gemspec
13
+
data/README.md CHANGED
@@ -20,6 +20,7 @@ This library borrows heavily from the code and philosophies of the fantastic [Oc
20
20
  - [Accessing Related Resources](#accessing-related-resources)
21
21
  - [Authentication](#authentication)
22
22
  - [Pagination](#pagination)
23
+ - [Filtering](#filtering)
23
24
  - [Accessing HTTP responses](#accessing-http-responses)
24
25
  - [API Methods](#api-methods)
25
26
  - [Organizations](#organizations)
@@ -162,6 +163,33 @@ until last_response.rels[:next].nil?
162
163
  end
163
164
  ```
164
165
 
166
+ ### Filtering
167
+
168
+ Events and Errors can be filtered to return a subset of data. Any of the filters usable in the Bugsnag dashoard can be used in this API. The filter object is a hash of Event Field keys containing an array of filter values. Each filter value has a `type` and a `value` to filter on. The type determines the type of comparison that will be performed.
169
+
170
+ | `type` | Description | Multiple value combination logic |
171
+ |-|-|-|
172
+ | `eq` | Filter for items that 'match' the value. Some fields require an exact match and some support substring matching. | OR |
173
+ | `ne` | Filter for items that don't match the value. | AND |
174
+
175
+ :warning: Note that the Event Field `search` can not be used more than once in a call.
176
+
177
+ You can see the filterable fields for a project using the following snippet, after setting the `project-id` value.
178
+
179
+ ```ruby
180
+ fields = Bugsnag::Api.event_fields("project-id")
181
+
182
+ puts "List of the searchable fields for this project:"
183
+ fields.each_with_index do |field,idx|
184
+ puts " [#{idx}] #{field.display_id}"
185
+ end
186
+ # => List of the searchable fields for this project:
187
+ # => [0] event
188
+ # => [1] error
189
+ # => [2] search
190
+ # => [3] user.id
191
+ # => ...
192
+ ```
165
193
 
166
194
  ### Accessing HTTP responses
167
195
 
@@ -186,7 +214,7 @@ documentation](http://www.rubydoc.info/gems/bugsnag-api/Bugsnag/Api/Client)
186
214
  orgs = Bugsnag::Api.organizations
187
215
 
188
216
  # Get a single organization
189
- org = Bugsnag::Api.organizations("organization-id")
217
+ org = Bugsnag::Api.organization("organization-id")
190
218
  ```
191
219
 
192
220
  ### Collaborators
@@ -236,7 +264,13 @@ Bugsnag::Api.delete_comment("comment-id")
236
264
 
237
265
  ```ruby
238
266
  # List project errors
239
- errors = Bugsnag::Api.errors("project-id", "project-id")
267
+ errors = Bugsnag::Api.errors("project-id", nil)
268
+
269
+ # List errors with a filter (see Filtering section for more information)
270
+ # Returns errors that match `EXC_BAD_INSTRUCTION`, this could be from the error class, message, context, or stack trace.
271
+ errors = Bugsnag::Api.errors("project-id", nil, direction:"desc", filters: {
272
+ "search": [{ "type":"eq", "value":"EXC_BAD_INSTRUCTION" }]
273
+ })
240
274
 
241
275
  # Get a single error
242
276
  error = Bugsnag::Api.error("project-id", "error-id")
@@ -261,6 +295,15 @@ events = Bugsnag::Api.events("project-id")
261
295
  # List error events
262
296
  events = Bugsnag::Api.error_events("project-id", "error-id")
263
297
 
298
+ # List events with a filter (see Filtering section for more information)
299
+ # Returns events with
300
+ # class `EXC_BAD_INSTRUCTION` OR `EXC_BAD_ACCESS`
301
+ # AND where the device is jailbroken
302
+ events = Bugsnag::Api.events(PROJECT_ID, direction:"desc", filters: {
303
+ "event.class": [{ "type":"eq", "value":"EXC_BAD_INSTRUCTION" }, { "type":"eq", "value":"EXC_BAD_ACCESS" }],
304
+ "device.jailbroken": [{ "type":"eq", "value":"false"}]
305
+ })
306
+
264
307
  # Get the latest event
265
308
  event = Bugsnag::Api.latest_event("project-id", "error-id")
266
309
 
@@ -321,6 +364,16 @@ Bugsnag::Api.pivots("project-id")
321
364
  Bugsnag::Api.pivot_values("project-id", "display id")
322
365
  ```
323
366
 
367
+ ### Trends
368
+
369
+ ```ruby
370
+ # list an error's trends in 5 buckets
371
+ Bugsnag::Api.trends_buckets("project-id", 5, "error-id")
372
+
373
+ # list a project's trends by resolution
374
+ Bugsnag::Api.trends_resolution("project-id", "2h")
375
+ ```
376
+
324
377
  ## Advanced Configuration
325
378
 
326
379
  ### Endpoint
data/bugsnag-api.gemspec CHANGED
@@ -18,14 +18,49 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency "sawyer", '~> 0.8.1'
21
+ if RUBY_VERSION < "2.2.0"
22
+ spec.add_dependency "sawyer", '0.8.1'
23
+
24
+ spec.add_development_dependency "rake", "< 12.0.0"
25
+ spec.add_development_dependency "rubocop", "0.41.2"
26
+ spec.add_development_dependency "faker", "1.3.0"
27
+
28
+ # i18n is used by faker
29
+ spec.add_development_dependency "i18n", "< 1.0.0"
30
+
31
+ # crack is used by webmock
32
+ spec.add_development_dependency "crack", "< 0.4.5"
33
+ else
34
+ spec.add_dependency "sawyer", '~> 0.8.1'
35
+
36
+ spec.add_development_dependency "rake"
37
+ spec.add_development_dependency "rubocop", "~> 0.52.1"
38
+ spec.add_development_dependency "faker", "> 1.7.3"
39
+ end
40
+
41
+ if RUBY_VERSION < "2.0.0"
42
+ spec.add_development_dependency "json", "< 2.0.0"
43
+ spec.add_development_dependency "webmock", "2.3.2"
44
+ spec.add_development_dependency "addressable", "2.3.6"
45
+
46
+ # hashdiff is used by webmock
47
+ spec.add_development_dependency "hashdiff", "< 0.3.8"
48
+
49
+ # parser is used by rubocop
50
+ spec.add_development_dependency "parser", "< 2.5.0"
51
+ else
52
+ spec.add_development_dependency "json"
53
+ spec.add_development_dependency "webmock", "> 2.3.2"
54
+ spec.add_development_dependency "addressable", "> 2.3.6"
55
+ end
56
+
57
+ # public_suffix is used by addressable & sawyer
58
+ if RUBY_VERSION < "2.0.0"
59
+ spec.add_development_dependency "public_suffix", "< 1.5.0"
60
+ elsif RUBY_VERSION < "2.1.0"
61
+ spec.add_development_dependency "public_suffix", "< 3.0.0"
62
+ end
22
63
 
23
- spec.add_development_dependency "rake"
24
64
  spec.add_development_dependency "rspec", "~> 3.0"
25
- spec.add_development_dependency "webmock", RUBY_VERSION <= '2.0.0' ? '2.3.2': '>2.3.2'
26
- spec.add_development_dependency "addressable", RUBY_VERSION <= '2.0.0' ? '2.3.6': '>2.3.6'
27
- spec.add_development_dependency "faker", RUBY_VERSION <= '2.0.0' ? '1.3.0' : '>1.7.3'
28
65
  spec.add_development_dependency "vcr", "~> 2.9"
29
- spec.add_development_dependency "json"
30
- spec.add_development_dependency "rubocop", RUBY_VERSION <= '2.1.0' ? '0.41.2': '~>0.52.1'
31
66
  end
data/config/.gitignore ADDED
@@ -0,0 +1 @@
1
+ global.yml
@@ -0,0 +1,9 @@
1
+ version: '3.6'
2
+ services:
3
+
4
+ license_finder:
5
+ build:
6
+ dockerfile: dockerfiles/Dockerfile.audit
7
+ context: .
8
+ volumes:
9
+ - ./:/scan
@@ -0,0 +1,5 @@
1
+ FROM licensefinder/license_finder
2
+
3
+ WORKDIR /scan
4
+
5
+ CMD /scan/scripts/license_finder.sh
@@ -185,7 +185,7 @@ module Bugsnag
185
185
  end
186
186
  end
187
187
 
188
- @last_response = response = agent.call(method, URI.escape(path.to_s), data, options)
188
+ @last_response = response = agent.call(method, path.to_s, data, options)
189
189
  response.data
190
190
  end
191
191
 
@@ -19,7 +19,7 @@ module Bugsnag
19
19
  # @argument project_id [String] ID of project to get collaborators from (conflicts with org_id)
20
20
  # @argument org_id [String] ID of organization to get collaborators from (conflicts with project_id)
21
21
  #
22
- # @option per_page [Number] Amount of results per-page
22
+ # @option per_page [Number] Amount of results per-page
23
23
  # @return [Array<Sawyer::Resource>] List of Collaborators
24
24
  # @see http://docs.bugsnagapiv2.apiary.io/#reference/organizations/collaborators/list-collaborators
25
25
  # @see http://docs.bugsnagapiv2.apiary.io/#reference/organizations/collaborators/list-collaborators-on-a-project
@@ -84,4 +84,3 @@ module Bugsnag
84
84
  end
85
85
  end
86
86
  end
87
-
@@ -30,4 +30,3 @@ module Bugsnag
30
30
  end
31
31
  end
32
32
  end
33
-
@@ -8,6 +8,8 @@ module Bugsnag
8
8
  module Errors
9
9
  # List the Errors on a Project
10
10
  #
11
+ # @argument id [String] optional ID of error to retrieve
12
+ #
11
13
  # @option base [String] Only Error Events occuring before this time will be returned
12
14
  # @option sort [String] Which field to sort by, one of: last_seen, first_seen, users, events, unsorted
13
15
  # @option direction [String] Which direction to sort the result by, one of: asc, desc
@@ -15,16 +17,14 @@ module Bugsnag
15
17
  # @return [Array<Sawyer::Resource>] List of Project Errors
16
18
  # @see http://docs.bugsnagapiv2.apiary.io/#reference/errors/errors/list-the-errors-on-a-project
17
19
  def errors(project_id, id=nil, options = {})
18
- paginate "projects/#{project_id}/errors", options
20
+ if id.nil?
21
+ paginate "projects/#{project_id}/errors", options
22
+ else
23
+ get "projects/#{project_id}/errors/#{id}", options
24
+ end
19
25
  end
20
26
 
21
- # View an Error
22
- #
23
- # @return [Sawyer::Resource] Requested Error
24
- # @see http://docs.bugsnagapiv2.apiary.io/#reference/errors/errors/view-an-error
25
- def error(project_id, id, options = {})
26
- get "projects/#{project_id}/errors/#{id}", options
27
- end
27
+ alias error errors
28
28
 
29
29
  # Update an Error
30
30
  #
@@ -55,7 +55,7 @@ module Bugsnag
55
55
  # @argument error_id [String] ID of error to delete (conflicts with project_id)
56
56
  # @argument project_id [String] Id of project to delete all errors from (conflicts with error_id)
57
57
  #
58
- # @return
58
+ # @return
59
59
  # @see http://docs.bugsnagapiv2.apiary.io/#reference/errors/errors/delete-an-error
60
60
  def delete_errors(project_id, error_id=nil, options = {})
61
61
  if !error_id.nil?
@@ -68,4 +68,3 @@ module Bugsnag
68
68
  end
69
69
  end
70
70
  end
71
-
@@ -38,7 +38,7 @@ module Bugsnag
38
38
 
39
39
  # Delete a custom Event Field
40
40
  #
41
- # @return
41
+ # @return
42
42
  # @see http://docs.bugsnagapiv2.apiary.io/#reference/projects/event-fields/delete-a-custom-event-field
43
43
  def delete_event_field(project_id, display_id, options = {})
44
44
  boolean_from_resposne :delete, "project/#{project_id}/event_fields/#{display_id}", options
@@ -47,4 +47,3 @@ module Bugsnag
47
47
  end
48
48
  end
49
49
  end
50
-
@@ -16,7 +16,7 @@ module Bugsnag
16
16
 
17
17
  # Delete an Event
18
18
  #
19
- # @return
19
+ # @return
20
20
  # @see http://docs.bugsnagapiv2.apiary.io/#reference/errors/events/delete-an-event
21
21
  def delete_event(project_id, id, options = {})
22
22
  boolean_from_response :delete, "projects/#{project_id}/events/#{id}", options
@@ -57,4 +57,3 @@ module Bugsnag
57
57
  end
58
58
  end
59
59
  end
60
-
@@ -34,7 +34,7 @@ module Bugsnag
34
34
 
35
35
  # Delete an Organization
36
36
  #
37
- # @return
37
+ # @return
38
38
  # @see http://docs.bugsnagapiv2.apiary.io/#reference/organizations/organizations/delete-an-organization
39
39
  def delete_organization(id, options = {})
40
40
  boolean_from_response :delete, "organizations/#{id}", options
@@ -43,4 +43,3 @@ module Bugsnag
43
43
  end
44
44
  end
45
45
  end
46
-
@@ -26,7 +26,7 @@ module Bugsnag
26
26
  #
27
27
  # @option filters [Object] An optional filter object, see http://docs.bugsnagapiv2.apiary.io/#introduction/filtering
28
28
  # @option sort [String] Sorting method
29
- # @option base [String] Only Events occuring before this time will be used
29
+ # @option base [String] Only Events occuring before this time will be used
30
30
  # @return [Array<Sawyer::Resource>] List of values for the Pivots requested
31
31
  # @see http://docs.bugsnagapiv2.apiary.io/#reference/errors/pivots/list-values-of-a-pivot-on-an-error
32
32
  def pivot_values(project_id, ef_display_id, error_id=nil, options = {})
@@ -40,4 +40,3 @@ module Bugsnag
40
40
  end
41
41
  end
42
42
  end
43
-
@@ -42,7 +42,7 @@ module Bugsnag
42
42
 
43
43
  # Regenerate a Project's notifier API key
44
44
  #
45
- # @return
45
+ # @return
46
46
  # @see http://docs.bugsnagapiv2.apiary.io/#reference/projects/projects/regenerate-a-project's-notifier-api-key
47
47
  def regenerate_api_key(id, options = {})
48
48
  delete "projects/#{id}/api_key", options
@@ -50,7 +50,7 @@ module Bugsnag
50
50
 
51
51
  # Delete a Project
52
52
  #
53
- # @return
53
+ # @return
54
54
  # @see http://docs.bugsnagapiv2.apiary.io/#reference/organizations/organizations/delete-an-organization
55
55
  def delete_project(id, options = {})
56
56
  boolean_from_response :delete, "projects/#{id}", options
@@ -59,4 +59,3 @@ module Bugsnag
59
59
  end
60
60
  end
61
61
  end
62
-
@@ -39,4 +39,3 @@ module Bugsnag
39
39
  end
40
40
  end
41
41
  end
42
-
@@ -3,7 +3,7 @@ module Bugsnag
3
3
  # Custom error class for rescuing from all Bugsnag API errors
4
4
  class Error < StandardError
5
5
 
6
- # Returns the appropriate Bugnsag::Api::Error subclass based
6
+ # Returns the appropriate Bugsnag::Api::Error subclass based
7
7
  # on status and response message
8
8
  #
9
9
  # @param [Hash] response HTTP response
@@ -9,8 +9,6 @@ module Bugsnag
9
9
  # This class raises an Bugsnag-flavored exception based
10
10
  # HTTP status codes returned by the API
11
11
  class RaiseError < Faraday::Response::Middleware
12
-
13
- private
14
12
  def on_complete(response)
15
13
  if error = Bugsnag::Api::Error.from_response(response)
16
14
  raise error
@@ -1,5 +1,5 @@
1
1
  module Bugsnag
2
2
  module Api
3
- VERSION = "2.0.2"
3
+ VERSION = "2.0.3"
4
4
  end
5
5
  end
@@ -0,0 +1,4 @@
1
+ #!/bin/bash
2
+ curl https://raw.githubusercontent.com/bugsnag/license-audit/master/config/decision_files/global.yml -o config/global.yml
3
+ bundle install
4
+ license_finder --decisions-file=config/global.yml
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bugsnag-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.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: 2018-02-21 00:00:00.000000000 Z
11
+ date: 2021-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sawyer
@@ -39,103 +39,103 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: rspec
42
+ name: rubocop
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '3.0'
47
+ version: 0.52.1
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '3.0'
54
+ version: 0.52.1
55
55
  - !ruby/object:Gem::Dependency
56
- name: webmock
56
+ name: faker
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">"
60
60
  - !ruby/object:Gem::Version
61
- version: 2.3.2
61
+ version: 1.7.3
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - ">"
67
67
  - !ruby/object:Gem::Version
68
- version: 2.3.2
68
+ version: 1.7.3
69
69
  - !ruby/object:Gem::Dependency
70
- name: addressable
70
+ name: json
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: 2.3.6
75
+ version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">"
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: 2.3.6
82
+ version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: faker
84
+ name: webmock
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">"
88
88
  - !ruby/object:Gem::Version
89
- version: 1.7.3
89
+ version: 2.3.2
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - ">"
95
95
  - !ruby/object:Gem::Version
96
- version: 1.7.3
96
+ version: 2.3.2
97
97
  - !ruby/object:Gem::Dependency
98
- name: vcr
98
+ name: addressable
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ">"
102
102
  - !ruby/object:Gem::Version
103
- version: '2.9'
103
+ version: 2.3.6
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "~>"
108
+ - - ">"
109
109
  - !ruby/object:Gem::Version
110
- version: '2.9'
110
+ version: 2.3.6
111
111
  - !ruby/object:Gem::Dependency
112
- name: json
112
+ name: rspec
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ">="
115
+ - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '0'
117
+ version: '3.0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ">="
122
+ - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '0'
124
+ version: '3.0'
125
125
  - !ruby/object:Gem::Dependency
126
- name: rubocop
126
+ name: vcr
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: 0.52.1
131
+ version: '2.9'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: 0.52.1
138
+ version: '2.9'
139
139
  description: Bugsnag API toolkit for ruby
140
140
  email:
141
141
  - james@bugsnag.com
@@ -143,11 +143,17 @@ executables: []
143
143
  extensions: []
144
144
  extra_rdoc_files: []
145
145
  files:
146
+ - ".buildkite/pipeline.yml"
147
+ - ".github/ISSUE_TEMPLATE/A.md"
148
+ - ".github/ISSUE_TEMPLATE/bug_report.md"
149
+ - ".github/ISSUE_TEMPLATE/feature_request.md"
150
+ - ".github/PULL_REQUEST_TEMPLATE.md"
151
+ - ".github/support.md"
152
+ - ".github/workflows/tests.yml"
146
153
  - ".gitignore"
147
154
  - ".rspec"
148
155
  - ".rubocop.yml"
149
156
  - ".rubocop_todo.yml"
150
- - ".travis.yml"
151
157
  - ".yardopts"
152
158
  - CHANGELOG.md
153
159
  - CONTRIBUTING.md
@@ -156,6 +162,9 @@ files:
156
162
  - README.md
157
163
  - Rakefile
158
164
  - bugsnag-api.gemspec
165
+ - config/.gitignore
166
+ - docker-compose.yml
167
+ - dockerfiles/Dockerfile.audit
159
168
  - lib/bugsnag/api.rb
160
169
  - lib/bugsnag/api/client.rb
161
170
  - lib/bugsnag/api/client/collaborators.rb
@@ -172,6 +181,7 @@ files:
172
181
  - lib/bugsnag/api/error.rb
173
182
  - lib/bugsnag/api/response/raise_error.rb
174
183
  - lib/bugsnag/api/version.rb
184
+ - scripts/license_finder.sh
175
185
  - spec/bugsnag/api/client/collaborators_spec.rb
176
186
  - spec/bugsnag/api/client/comments_spec.rb
177
187
  - spec/bugsnag/api/client/currentuser_spec.rb
@@ -244,8 +254,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
244
254
  - !ruby/object:Gem::Version
245
255
  version: '0'
246
256
  requirements: []
247
- rubyforge_project:
248
- rubygems_version: 2.6.13
257
+ rubygems_version: 3.2.11
249
258
  signing_key:
250
259
  specification_version: 4
251
260
  summary: Bugsnag API toolkit for ruby
data/.travis.yml DELETED
@@ -1,20 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.4.1
4
- - 2.2.2
5
- - 2.1.0
6
- - 2.0.0
7
- - 1.9.3
8
- - jruby-19mode
9
-
10
- install:
11
- - bundle install --with "$GEMSETS"
12
-
13
- jobs:
14
- include:
15
- - stage: test
16
- rvm: 2.4.1
17
- script: bundle exec rubocop lib/
18
-
19
- script:
20
- - bundle exec rake spec