rack-tor-block 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rack/tor_block.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cee08bf469b84a0c3e39e3fda6ed25d13fa3dd3b
|
4
|
+
data.tar.gz: f86e5a54cfbc95e25230645ecadee40bc91542e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c8daea66e4348be11c19fa21bdc369308632f5aef73c310114b128573a0dafea6853e04f3bba92a5d2bbf8b127ce4e8c03015f01878649380ad4e9fe5a9e8bb
|
7
|
+
data.tar.gz: 6c9e8d63754cecd59418d7d62bb2eb00a2aed93eb1146f25f963bfea4041d267eceeb683aeee591a9b6c5b02744da5be5265d4346fdb8e325175b4c8ee01af15
|
data/lib/rack/tor_block.rb
CHANGED
@@ -23,7 +23,7 @@ module Rack
|
|
23
23
|
if defined? Rails
|
24
24
|
def tor?(remote_ip)
|
25
25
|
key = "tor/#{remote_ip}"
|
26
|
-
Rails.cache.fetch(key, expires_in:
|
26
|
+
Rails.cache.fetch(key, expires_in: 6.hours) do
|
27
27
|
Rack::IP.new(remote_ip).tor?
|
28
28
|
end
|
29
29
|
rescue # In case of cache failure
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-tor-block
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luca Bonmassar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -72,3 +72,4 @@ signing_key:
|
|
72
72
|
specification_version: 4
|
73
73
|
summary: Prevent tor users to access a Rack / Rails application.
|
74
74
|
test_files: []
|
75
|
+
has_rdoc:
|