nexaas-throttle 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -1
- data/lib/nexaas/throttle/guardian.rb +4 -4
- data/lib/nexaas/throttle/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c4964a580e1a99b516bd954446768224236b885
|
4
|
+
data.tar.gz: '014842f2eec77ec70cd58ddc9fba63e8072bdb83'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d70753f56f4f791dee1745d4ba2b4d426ae652c3bf343257fd1da442ec3fed98041b7870dd1fb78b1d31dc29abbc460c69731a382a7161c0892ac6a1b0da74e
|
7
|
+
data.tar.gz: 78bc184861a5a32fe0c618b0d6a14deff7d12c3021bf991a745f785d7f093c1e7267803d8c74cc2f61c6a76fd08241f4563bb6f5836d958fd245dc5c14f83d78
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
+
### v2.0.1
|
2
|
+
- Fix regex matching when checking if a given request is asset-related. [#7](https://github.com/myfreecomm/nexaas-throttle/pull/7)
|
1
3
|
## v2.0
|
2
4
|
- The gem no longer checks if the request is made from an API client. See [#6](https://github.com/myfreecomm/nexaas-throttle/pull/6) for discussion.
|
3
5
|
## v1.0
|
4
6
|
- Allow the configuration of user-agents to ignore when throttling. [#5](https://github.com/myfreecomm/nexaas-throttle/pull/5)
|
5
|
-
### v0.1
|
7
|
+
### v0.1
|
6
8
|
- Initial commit
|
@@ -29,14 +29,14 @@ module Nexaas
|
|
29
29
|
|
30
30
|
def assets?
|
31
31
|
path = request.path
|
32
|
-
path.match(
|
32
|
+
path.match(%r{/assets}).present? || path.match(extensions_regexp).present?
|
33
33
|
end
|
34
34
|
|
35
35
|
def extensions_regexp
|
36
36
|
@assets_extensions ||= begin
|
37
|
-
|
38
|
-
|
39
|
-
|
37
|
+
extensions_group = %w(css js png jpg gif).join("|")
|
38
|
+
/\.(#{extensions_group})(\?\S*)?$/
|
39
|
+
end
|
40
40
|
end
|
41
41
|
|
42
42
|
def ignore_user_agents?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nexaas-throttle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wanderson Policarpo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-12-
|
11
|
+
date: 2017-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|