limiter-ruby 0.2.3 → 0.2.4
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/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: 442bbfcc13722e3bbffe3edc6bb8ea56bfd19d84e4c13ba76dcd941b3bcdcb78
|
4
|
+
data.tar.gz: 6c931ecf9b1a4ac9395e651b624e86fb1e6c2e5ee206be86f8f302bef554e706
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3328f0aa9e901c793feeb41a39ada21502a1e3edfb2960a5d8c18d7548e53e976fcb8bfb279c942a80a1514ee5d05aa431d17e0cd502b5c371ffca6aeab603e6
|
7
|
+
data.tar.gz: dc5ec8dfa8ac8ffc85888a4b9b18c88cddde408cff24f4df83cd1612b789b6d8e9705b1ecff0b309d337f3d694d0269d5d02247f9ce8e715a12abc009a6e387d
|
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/version.rb
CHANGED