bridge_api 0.1.52 → 0.1.53
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bridge_api/api_array.rb +4 -1
- data/lib/bridge_api/client.rb +1 -3
- data/lib/bridge_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a747c2ace7fb00d9374078f2ea7f15a8024adcadc3fa3b0b1b61b2d9cc431446
|
4
|
+
data.tar.gz: 232e795f2ac605de1bcb2b22dbae65e1355e6f35f9895e3544e392d344f9b968
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3bfd2c5c66bd5e3f20ddd2bc221ac4b69c3f14d53d5c4553d6a130795bb23971bf4c162d23b9a4ae7b43f8bee9ca8547973fa2cd4fe6dacc31ab0cd37172390
|
7
|
+
data.tar.gz: e11c84963f136ce9613b5bdaa445810aa8aa0eff47e6c5c5037b8ab5536fe2cfc94d6e77b4df7fd8fdaca3c67869caf19bf79f6492186e7f757f1d3d86bc823b
|
data/lib/bridge_api/api_array.rb
CHANGED
@@ -104,9 +104,12 @@ module BridgeAPI
|
|
104
104
|
p = CGI.parse(query).merge(params)
|
105
105
|
u = url.gsub("?#{query}", '')
|
106
106
|
p.each { |k, v| p[k] = v.first if v.is_a?(Array) }
|
107
|
-
@api_client.
|
107
|
+
@api_client.enforce_rate_limits
|
108
|
+
response = @api_client.connection.send(:get) do |r|
|
108
109
|
r.url(u, p)
|
109
110
|
end
|
111
|
+
@api_client.apply_rate_limits(response)
|
112
|
+
response
|
110
113
|
end
|
111
114
|
|
112
115
|
def load_page(url)
|
data/lib/bridge_api/client.rb
CHANGED
@@ -60,9 +60,7 @@ module BridgeAPI
|
|
60
60
|
end
|
61
61
|
|
62
62
|
def enforce_rate_limits
|
63
|
-
return unless BridgeAPI.enforce_rate_limits
|
64
|
-
self.current_limit = current_limit
|
65
|
-
return unless current_limit.present?
|
63
|
+
return unless BridgeAPI.enforce_rate_limits && current_limit.present?
|
66
64
|
return unless current_limit < BridgeAPI::rate_limit_min
|
67
65
|
|
68
66
|
BridgeAPI.logger.debug("Current LIMIT: #{current_limit}")
|
data/lib/bridge_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bridge_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.53
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jay Shaffer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|