sophos_central_api 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7b18fa53d284ea012c44050984a138d3c8c4241b8dcce505b541a92c10951d1c
4
- data.tar.gz: 940bcfba27107629b2788cd150aaa6f88687d095bd5653c0a415d47aa073085c
3
+ metadata.gz: 741bd3b0b265f8bf58dca9b37fd14f07895f29d6382d5335a473bf8dc89179b2
4
+ data.tar.gz: 59b4836ccf88bd5114c33bb44972a7f7905f57a0b7b13884b5243bb89f25846d
5
5
  SHA512:
6
- metadata.gz: 73aedd595b2ba56026dbe7a871764f2e2636fde292d2bf58b4e5ed07d131b722767e6f3a6587c6dbf0b70fd033441a7b41a27603e4fd253bedcd333ec9dae314
7
- data.tar.gz: 2daf707681ea5acb32340c5cacac75d763096eca80d806c1b0d2f468324e6e32b2292353a9fd587b1fafa9cdc958196dc67c459e28643617f71120d997509f8d
6
+ metadata.gz: 6602511fd1f5b29dd8b800071d087bcd42f32c8628e836edef8b411dcd2ab2a9152b94dbd33a510ee8401329c486eb82d64d66bb3d9900327c75676e8d557870
7
+ data.tar.gz: cabe7886fe66b61e25eb326b7aa06525cb4010a62ae5a6aec16de3b5549887328d11389a314b063fc897310920b483e2f8f92d7c7b6a31fac3a74da706dd9c79
data/CHANGELOG.md CHANGED
@@ -27,3 +27,8 @@
27
27
  ## [0.2.3] - 2025-11-04
28
28
 
29
29
  - Sophos requires token type as 'Bearer' and does not support case insensitive token types.
30
+
31
+ ## [0.2.4] - 2025-11-25
32
+
33
+ - Implement rate throttling
34
+
@@ -25,6 +25,8 @@ module Sophos
25
25
  DEFAULT_USER_AGENT = "Sophos Ruby API wrapper #{Sophos::VERSION}"
26
26
  DEFAULT_PAGINATION = Sophos::RequestPagination::PagesPagination
27
27
  DEFAULT_PAGE_SIZE = 100
28
+ DEFAULT_RATE_LIMIT = 100
29
+ DEFAULT_RATE_PERIOD = 60
28
30
 
29
31
  # Initialize configuration defaults when this module is extended.
30
32
  def self.extended(base)
@@ -51,6 +53,8 @@ module Sophos
51
53
  self.user_agent = DEFAULT_USER_AGENT
52
54
  self.page_size = DEFAULT_PAGE_SIZE
53
55
  self.pagination_class = DEFAULT_PAGINATION
56
+ self.rate_limit = DEFAULT_RATE_LIMIT
57
+ self.rate_period = DEFAULT_RATE_PERIOD
54
58
  end
55
59
  end
56
60
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sophos
4
- VERSION = '0.2.3'
4
+ VERSION = '0.2.4'
5
5
  end
@@ -34,6 +34,6 @@ module Sophos
34
34
  # Sophos.client(client_id: 'abc123', client_secret: 'xyz789')
35
35
  #
36
36
  def self.client(options = {})
37
- Sophos::Client.new(options)
37
+ Sophos::Client.new({rate_limit: Configuration::DEFAULT_RATE_LIMIT, rate_period: Configuration::DEFAULT_RATE_PERIOD}.merge(options))
38
38
  end
39
39
  end
@@ -29,7 +29,7 @@ Gem::Specification.new do |s|
29
29
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
30
30
  s.platform = Gem::Platform::RUBY
31
31
  s.add_runtime_dependency 'faraday'
32
- s.add_runtime_dependency 'wrapi', ">= 0.3.0"
32
+ s.add_runtime_dependency 'wrapi', ">= 0.5.1"
33
33
  s.add_development_dependency 'dotenv'
34
34
  s.add_development_dependency 'minitest'
35
35
  s.add_development_dependency 'simplecov'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sophos_central_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Janco Tanis
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-11-04 00:00:00.000000000 Z
10
+ date: 2025-11-25 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: faraday
@@ -29,14 +29,14 @@ dependencies:
29
29
  requirements:
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 0.3.0
32
+ version: 0.5.1
33
33
  type: :runtime
34
34
  prerelease: false
35
35
  version_requirements: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: 0.3.0
39
+ version: 0.5.1
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: dotenv
42
42
  requirement: !ruby/object:Gem::Requirement