copy 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/copy/generators/site/config.ru +1 -1
- data/lib/copy/server.rb +2 -2
- data/lib/copy/version.rb +1 -1
- data/test/test_helper.rb +1 -1
- metadata +3 -3
@@ -16,7 +16,7 @@ Copy::Server.config do
|
|
16
16
|
# to use or set them as environment variables.
|
17
17
|
# Heroku friendly: http://devcenter.heroku.com/articles/config-vars
|
18
18
|
#
|
19
|
-
# set :
|
19
|
+
# set :admin_username, ENV['COPY_USERNAME']
|
20
20
|
# set :admin_password, ENV['COPY_PASSWORD']
|
21
21
|
|
22
22
|
# Enter the URL to your data store.
|
data/lib/copy/server.rb
CHANGED
@@ -17,9 +17,9 @@ module Copy
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def authorized?
|
20
|
-
return false unless settings.respond_to?(:
|
20
|
+
return false unless settings.respond_to?(:admin_username) && settings.respond_to?(:admin_password)
|
21
21
|
@auth ||= Rack::Auth::Basic::Request.new(request.env)
|
22
|
-
@auth.provided? && @auth.basic? && @auth.credentials && @auth.credentials == [settings.
|
22
|
+
@auth.provided? && @auth.basic? && @auth.credentials && @auth.credentials == [settings.admin_username, settings.admin_password]
|
23
23
|
end
|
24
24
|
|
25
25
|
def set_cache_control_header
|
data/lib/copy/version.rb
CHANGED
data/test/test_helper.rb
CHANGED
metadata
CHANGED