guard_dog 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57ce842c017fda60c8d5ab05c7194409561015fa
|
4
|
+
data.tar.gz: 562c96af7d7b27cf93b2c95528ba175f6ece8428
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a61544f2dbc3958c91e05078093172919239e4ef28a6816fc617f4b38a40be46853057707e152d7386c591cff1c38e33e3dcff265152b018212679f9dafd33c4
|
7
|
+
data.tar.gz: 88d4fc6a1a0faff5579e60be147eb3664a8cda111d85ddab3a5acf65ec6a4c4a6c6fb7023fce5956b902c8517f7a25fb37ac6fcecedd040733f3dc6db11ce1b0
|
@@ -6,14 +6,11 @@ module GuardDog
|
|
6
6
|
skip_before_filter :guard_dog_authentication
|
7
7
|
|
8
8
|
def authentication
|
9
|
-
|
9
|
+
passwords = ENV['GUARD_DOG_PASSWORD'].try(:split, /\s*,\s*/) || []
|
10
|
+
if passwords.empty? || passwords.include?(params[:password])
|
10
11
|
allow_access
|
11
12
|
else
|
12
|
-
|
13
|
-
allow_access
|
14
|
-
else
|
15
|
-
deny_access
|
16
|
-
end
|
13
|
+
deny_access
|
17
14
|
end
|
18
15
|
end
|
19
16
|
|
@@ -34,3 +31,4 @@ module GuardDog
|
|
34
31
|
end
|
35
32
|
end
|
36
33
|
end
|
34
|
+
|
@@ -5,8 +5,8 @@ class ApplicationController < ActionController::Base
|
|
5
5
|
protected
|
6
6
|
|
7
7
|
def guard_dog_authentication
|
8
|
-
|
8
|
+
if !ENV['GUARD_DOG_PASSWORD'].blank? && !session[:guard_dog_password]
|
9
9
|
redirect_to guard_dog.root_url
|
10
10
|
end
|
11
11
|
end
|
12
|
-
end
|
12
|
+
end
|
data/lib/guard_dog/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard_dog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Endri Gjiri
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-07-
|
11
|
+
date: 2013-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|