ipscope 1.0.0 → 1.1.0

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.
@@ -114,19 +114,18 @@ module IpScope
114
114
  def self.extract_rate_limit_metadata(headers)
115
115
  limit = parse_header_int(headers["x-ratelimit-limit"])
116
116
  remaining = parse_header_int(headers["x-ratelimit-remaining"])
117
- reset = parse_header_int(headers["x-ratelimit-reset"])
118
- credits = parse_header_int(headers["x-ratelimit-credits-remaining"])
119
- tier_raw = headers["x-ratelimit-tier"].to_s.strip
120
- tier = tier_raw.empty? ? nil : tier_raw
117
+ # `X-RateLimit-Reset` is the number of seconds until the window resets.
118
+ reset_after = parse_header_int(headers["x-ratelimit-reset"])
119
+ scope_raw = headers["x-ratelimit-scope"].to_s.strip
120
+ scope = scope_raw.empty? ? nil : scope_raw
121
121
 
122
- return nil if limit.nil? && remaining.nil? && reset.nil? && credits.nil? && tier.nil?
122
+ return nil if limit.nil? && remaining.nil? && reset_after.nil? && scope.nil?
123
123
 
124
124
  RateLimitMetadata.new(
125
125
  limit: limit,
126
126
  remaining: remaining,
127
- reset_epoch_seconds: reset,
128
- credits_remaining: credits,
129
- plan_tier: tier
127
+ reset_after_seconds: reset_after,
128
+ scope: scope
130
129
  )
131
130
  end
132
131
 
@@ -14,7 +14,7 @@ module IpScope
14
14
  trimmed = api_key.to_s.strip
15
15
  if trimmed.empty? || trimmed.length < 8
16
16
  raise IpScopeValidationError.new(
17
- 'A valid IPScope API key ("ips_live_..." or "ips_test_...") is required.',
17
+ 'A valid IPScope API key ("<public>:<private>") is required.',
18
18
  field: "api_key"
19
19
  )
20
20
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module IpScope
4
- VERSION = "1.0.0"
4
+ VERSION = "1.1.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ipscope
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - IPScope Engineering
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-10-28 00:00:00.000000000 Z
11
+ date: 2026-11-10 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Server-side Ruby SDK for IPScope providing single IP lookup, batch lookup,
14
14
  constant-RAM streaming batch lookup, CIDR network prefix lookup, dataset metadata,
@@ -19,6 +19,7 @@ executables: []
19
19
  extensions: []
20
20
  extra_rdoc_files: []
21
21
  files:
22
+ - CHANGELOG.md
22
23
  - LICENSE
23
24
  - README.md
24
25
  - lib/ipscope.rb