bugsnag-api 2.1.1 → 3.0.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: 617f27c61db7b75cecc854aeeca930e461ce849c48ce5f9fba4ee072639781c4
4
- data.tar.gz: 84358e937d507d8abc75aa9971f99e9bba6a350e8292b8a3bf21d8a03d58ad33
3
+ metadata.gz: aeb56132e45bd00fe643a35e955ecebd8d98eeb8ec3dd8f0e5f5cd7523b6573e
4
+ data.tar.gz: d508f930c10ba5a9e8afcea2dc4c7395762da65fb6d5427ff03737c6d5fdfec0
5
5
  SHA512:
6
- metadata.gz: d0779c59b38cc5735a8074489df90f0ca74f34dea5a3e38e2f957ff4735aa396005e5f607c51905107d3f7f848f5226323b84e01a2e3b564ecd01df8b8151b65
7
- data.tar.gz: f1db01abc52ef8289b21de312634ecc516214bf0805f4be2063f87deb37ec3fdc70028e435ab93bc9d371e0b84beeff513f4843613c0dc3eb912fc4f9c3e3da6
6
+ metadata.gz: d04bc0203ad87c1a25e96669d802150d080119b6275231d13d87d72e741d78a823aec246ae9fd5abad5520c4f6c9568ca3f0062efc8ad6b43bf650dcb62c58db
7
+ data.tar.gz: a29144268e0157098236a3ad9915d20f027b8551b79fb82015eb739e44844834b187bbe10f8de9c5d67debee1629a466b4236775d7d007bb29e1aec5ede9bf8d
@@ -1,14 +1,14 @@
1
1
  ---
2
2
  name: Having trouble getting started?
3
- about: Please contact us at support@bugsnag.com for assistance with integrating Bugsnag
3
+ about: Please contact us at support@bugsnag.com for assistance with integrating BugSnag
4
4
  into your application.
5
5
  title: ''
6
6
  labels: ''
7
7
  assignees: ''
8
8
 
9
9
  ---
10
- Please checkout our [documentation](https://docs.bugsnag.com/api/data-access/#ruby-api-toolkit) for guides, references and tutorials.
10
+ Please check out our [documentation](https://docs.bugsnag.com/api/data-access/#ruby-api-toolkit) for guides, references and tutorials.
11
11
 
12
- If you have questions about your integration please contact us at [support@bugsnag.com](mailto:support@bugsnag.com).
12
+ If you have questions about your integration, please contact us at [support@bugsnag.com](mailto:support@bugsnag.com).
13
13
 
14
- Alternatively, view additional options at [support.md](../SUPPORT.md).
14
+ Alternatively, view additional options at [SUPPORT.md](../SUPPORT.md).
@@ -7,7 +7,7 @@ assignees: ''
7
7
 
8
8
  ---
9
9
 
10
- <!-- Before raising, please check if somebody else has already reported your issue. -->
10
+ <!-- Before raising, please check whether somebody else has already reported your issue. -->
11
11
 
12
12
  ### Describe the bug
13
13
  A clear and concise description of what the bug is.
@@ -7,7 +7,7 @@ assignees: ''
7
7
 
8
8
  ---
9
9
 
10
- <!-- Before creating, please check if somebody else has already reported your feature request. -->
10
+ <!-- Before creating, please check whether somebody else has already reported your feature request. -->
11
11
 
12
12
  ### Description
13
13
  <!-- Is your feature request related to a problem? Please describe.
@@ -0,0 +1,19 @@
1
+ ## Are you having trouble getting started?
2
+ If you haven't already, please check out 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 if you have 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.
@@ -8,7 +8,7 @@ jobs:
8
8
  strategy:
9
9
  fail-fast: false
10
10
  matrix:
11
- ruby-version: ['2.1', '2.2', '2.3', '2.4', '2.5', '2.6', '2.7', '3.0']
11
+ ruby-version: ['2.6', '2.7', '3.0', '3.1']
12
12
 
13
13
  steps:
14
14
  - uses: actions/checkout@v2
@@ -34,20 +34,3 @@ jobs:
34
34
  bundler-cache: true
35
35
 
36
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,24 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ ## 3.0.1 (27 January 2025)
5
+
6
+ ### Fixes
7
+
8
+ * Fix issue with updating several errors at once
9
+ | [#52](https://github.com/bugsnag/bugsnag-api-ruby/pull/52)
10
+
11
+ ## 3.0.0 (3 November 2022)
12
+
13
+ ### Enhancements
14
+
15
+ * Update required Sawyer version to `~> 0.9.2`
16
+ | [ilvez](https://github.com/ilvez)
17
+ | [#43](https://github.com/bugsnag/bugsnag-api-ruby/pull/43)
18
+
19
+ * Require Ruby 2.6+
20
+ | [#44](https://github.com/bugsnag/bugsnag-api-ruby/pull/44)
21
+
4
22
  ## 2.1.1 (2 November 2021)
5
23
 
6
24
  ### Fixes
data/README.md CHANGED
@@ -1,10 +1,9 @@
1
1
  Bugsnag API Toolkit for Ruby
2
2
  ============================
3
- ![Build status](https://travis-ci.org/bugsnag/bugsnag-api-ruby.svg?branch=master)
4
3
 
5
4
  The library allows for quick read/write access to the [Bugsnag Data Access API](https://docs.bugsnag.com/api/data-access/) from your Ruby applications. You can use this library to build your own applications which leverage data found in your Bugsnag dashboard.
6
5
 
7
- Version 2.x (current) of this gem corresponds to v2 of the Data Access API, while [1.x](https://github.com/bugsnag/bugsnag-api-ruby/tree/v1.0.3) uses the (deprecated) v1 of the Data Access API.
6
+ Version 3.x (current) and 2.x of this gem corresponds to v2 of the Data Access API, while [1.x](https://github.com/bugsnag/bugsnag-api-ruby/tree/v1.0.3) uses the (deprecated) v1 of the Data Access API.
8
7
 
9
8
  If you are looking to automatically detect crashes in your Ruby apps, you should take a look at the [Bugsnag Ruby Detection Library](https://docs.bugsnag.com/platforms/ruby) instead.
10
9
 
@@ -118,7 +117,7 @@ account.rels[:upgrade].href
118
117
  Resources returned by Bugsnag API methods contain not only data but hypermedia link relations:
119
118
 
120
119
  ```ruby
121
- project = Bugsnag::Api.projects("organization-id")
120
+ project = Bugsnag::Api.projects("organization-id").first
122
121
 
123
122
  # Get the users rel, returned from the API as users_url in the resource
124
123
  project.rels[:errors].href
@@ -167,7 +166,7 @@ end
167
166
 
168
167
  ### Filtering
169
168
 
170
- 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
+ Events and Errors can be filtered to return a subset of data. Any of the filters usable in the Bugsnag dashboard 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.
171
170
 
172
171
  | `type` | Description | Multiple value combination logic |
173
172
  |-|-|-|
data/SECURITY.md ADDED
@@ -0,0 +1,5 @@
1
+ # Security Policy
2
+
3
+ ## Reporting a Vulnerability
4
+
5
+ If you find a vulnerability in this SDK, please report it to our [Support Team](mailto:support@bugsnag.com) for review.
data/bugsnag-api.gemspec CHANGED
@@ -18,55 +18,16 @@ 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
- if RUBY_VERSION < "2.2.0"
22
- spec.add_dependency "sawyer", '0.8.1'
21
+ spec.required_ruby_version = ">= 2.6"
23
22
 
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 "webmock", "2.3.2"
43
- spec.add_development_dependency "addressable", "2.3.6"
44
-
45
- # hashdiff is used by webmock
46
- spec.add_development_dependency "hashdiff", "< 0.3.8"
47
-
48
- # parser is used by rubocop
49
- spec.add_development_dependency "parser", "< 2.5.0"
50
- else
51
- spec.add_development_dependency "webmock", "> 2.3.2"
52
- spec.add_development_dependency "addressable", "> 2.3.6"
53
- end
54
-
55
- if RUBY_VERSION < "2.0.0"
56
- spec.add_development_dependency "json", "< 2.0.0"
57
- elsif RUBY_VERSION < "2.3.0"
58
- spec.add_development_dependency "json", "< 2.6.0"
59
- else
60
- spec.add_development_dependency "json"
61
- end
62
-
63
- # public_suffix is used by addressable & sawyer
64
- if RUBY_VERSION < "2.0.0"
65
- spec.add_development_dependency "public_suffix", "< 1.5.0"
66
- elsif RUBY_VERSION < "2.1.0"
67
- spec.add_development_dependency "public_suffix", "< 3.0.0"
68
- end
23
+ spec.add_dependency "sawyer", '~> 0.9.2'
69
24
 
25
+ spec.add_development_dependency "rake"
26
+ spec.add_development_dependency "rubocop", "~> 0.52.1"
27
+ spec.add_development_dependency "faker", "> 1.7.3"
28
+ spec.add_development_dependency "webmock", "> 2.3.2"
29
+ spec.add_development_dependency "addressable", "> 2.3.6"
30
+ spec.add_development_dependency "json"
70
31
  spec.add_development_dependency "rspec", "~> 3.0"
71
32
  spec.add_development_dependency "vcr", "~> 2.9"
72
33
  end
@@ -42,7 +42,7 @@ module Bugsnag
42
42
  when String
43
43
  patch "projects/#{project_id}/errors/#{ids}", options.merge({:operation => operation})
44
44
  when Array
45
- defaults = {:operation => operation, :query => {:error_ids => ids.join(' ')}}
45
+ defaults = {:operation => operation, :query => {:error_ids => ids}}
46
46
  merged_opts = deep_merge(defaults, options)
47
47
  patch "projects/#{project_id}/errors", merged_opts
48
48
  else
@@ -8,7 +8,7 @@ module Bugsnag
8
8
 
9
9
  # This class raises an Bugsnag-flavored exception based
10
10
  # HTTP status codes returned by the API
11
- class RaiseError < Faraday::Response::Middleware
11
+ class RaiseError < Faraday::Response::RaiseError
12
12
  def on_complete(response)
13
13
  if error = Bugsnag::Api::Error.from_response(response)
14
14
  raise error
@@ -1,5 +1,5 @@
1
1
  module Bugsnag
2
2
  module Api
3
- VERSION = "2.1.1"
3
+ VERSION = "3.0.1"
4
4
  end
5
5
  end
data/lib/bugsnag/api.rb CHANGED
@@ -20,7 +20,10 @@ module Bugsnag
20
20
  client.configuration
21
21
  end
22
22
 
23
- # Get the static API client
23
+ # Get the static API client. Note that using the static API
24
+ # client may not work as expected in a multithreaded environment
25
+ # (e.g. when using the {#paginate} or {#last_response} instance
26
+ # methods)
24
27
  #
25
28
  # @return [Bugsnag::Api::Client] API client
26
29
  def client
@@ -42,11 +42,11 @@ describe Bugsnag::Api::Client::Errors do
42
42
  end
43
43
 
44
44
  it "updates and returns the updated errors" do
45
- errors = @client.update_errors @project_id, [@error_id], "fix", {:severity => "warn"}
45
+ errors = @client.update_errors @project_id, [@error_id, @error_id], "fix", {:severity => "warn"}
46
46
  expect(errors.operation).to_not be_nil
47
47
  expect(errors[@error_id].status).to eq("fixed")
48
48
 
49
- assert_requested :patch, bugsnag_url("/projects/#{@project_id}/errors?error_ids=#{@error_id}")
49
+ assert_requested :patch, bugsnag_url("/projects/#{@project_id}/errors?error_ids[]=#{@error_id}&error_ids[]=#{@error_id}")
50
50
  end
51
51
  end
52
52
 
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.1.1
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Smith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-02 00:00:00.000000000 Z
11
+ date: 2025-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sawyer
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.8.1
19
+ version: 0.9.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.8.1
26
+ version: 0.9.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -148,7 +148,7 @@ files:
148
148
  - ".github/ISSUE_TEMPLATE/bug_report.md"
149
149
  - ".github/ISSUE_TEMPLATE/feature_request.md"
150
150
  - ".github/PULL_REQUEST_TEMPLATE.md"
151
- - ".github/support.md"
151
+ - ".github/SUPPORT.md"
152
152
  - ".github/workflows/tests.yml"
153
153
  - ".gitignore"
154
154
  - ".rspec"
@@ -161,6 +161,7 @@ files:
161
161
  - LICENSE.txt
162
162
  - README.md
163
163
  - Rakefile
164
+ - SECURITY.md
164
165
  - bugsnag-api.gemspec
165
166
  - config/.gitignore
166
167
  - docker-compose.yml
@@ -257,14 +258,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
257
258
  requirements:
258
259
  - - ">="
259
260
  - !ruby/object:Gem::Version
260
- version: '0'
261
+ version: '2.6'
261
262
  required_rubygems_version: !ruby/object:Gem::Requirement
262
263
  requirements:
263
264
  - - ">="
264
265
  - !ruby/object:Gem::Version
265
266
  version: '0'
266
267
  requirements: []
267
- rubygems_version: 3.2.22
268
+ rubygems_version: 3.5.22
268
269
  signing_key:
269
270
  specification_version: 4
270
271
  summary: Bugsnag API toolkit for ruby
data/.github/support.md DELETED
@@ -1,19 +0,0 @@
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.