limiter-ruby 0.2.3 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/limiter/client.rb +3 -1
- data/lib/limiter/configuration.rb +2 -1
- data/lib/limiter/points.rb +1 -1
- data/lib/limiter/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96c4939d6e56cfa24e78beec860c0a19777d28af350de443db9c2c344a0f683f
|
4
|
+
data.tar.gz: c8e52e373ba57da0c3499ed5216003c193f55bf20fc3571ae106c8efd8ef22c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61d1e3e3e19402fd2e198b7e6cbb0686e173c268dea99f95cacf34942b962e93098dd92e5748c2f9eb4083063c0ae51183005cf38d49fda8206bd607a996d5ad
|
7
|
+
data.tar.gz: 60bcdb87f03d1a80713fc0d1b50c92050b01dcd187a0d3743f234a56ee7b141b72ffe97a463b688474378ef6d465f57e916c4aee21a9fdc8efecf7cf428ac27c
|
data/lib/limiter/client.rb
CHANGED
@@ -3,6 +3,8 @@
|
|
3
3
|
module Limiter
|
4
4
|
class Client
|
5
5
|
|
6
|
+
BASE_URL = "https://api.limiter.dev"
|
7
|
+
|
6
8
|
attr_reader :namespace, :limit, :interval, :identifier, :token, :response
|
7
9
|
delegate :exhausted?, :allowed?, :exceeded?, :resets_in, :to => :response
|
8
10
|
|
@@ -48,7 +50,7 @@ module Limiter
|
|
48
50
|
HTTP
|
49
51
|
.auth("Bearer #{Limiter.configuration.api_token}")
|
50
52
|
.headers("User-Agent" => "Limiter-Ruby/#{Limiter::VERSION}")
|
51
|
-
.get(
|
53
|
+
.get(BASE_URL + limiter_path, params: params)
|
52
54
|
end
|
53
55
|
end
|
54
56
|
end
|
data/lib/limiter/points.rb
CHANGED
data/lib/limiter/version.rb
CHANGED