Skip to content

Commit

Permalink
Changed "user" to "username" and uncommented Rack::Auth.
Browse files Browse the repository at this point in the history
  • Loading branch information
dave committed Jul 9, 2010
1 parent 6ebac06 commit 9ee2dec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions lib/enigmamachine.rb
Expand Up @@ -86,8 +86,8 @@ class EnigmaMachine < Sinatra::Base
FileUtils.cp(File.dirname(__FILE__) + '/generators/config.yml', Dir.getwd)
end
raw_config = File.read(Dir.getwd + "/config.yml")
@@user = YAML.load(raw_config)['user']
@@auth_password = YAML.load(raw_config)['password']
@@username = YAML.load(raw_config)['username']
@@password = YAML.load(raw_config)['password']
Video.reset_encoding_videos
Thread.new do
until EM.reactor_running?
Expand All @@ -103,9 +103,9 @@ class EnigmaMachine < Sinatra::Base
# of providing security for shared hosts. TODO: figure out how to secure the
# app for use on shared hosts.
#
# use Rack::Auth::Basic do |username, password|
# [username, password] == ['admin', 'admin']
# end
use Rack::Auth::Basic do |username, password|
[username, password] == [@@username, @@password]
end


# Shows the enigma status page.
Expand Down
2 changes: 1 addition & 1 deletion lib/generators/config.yml
@@ -1,3 +1,3 @@
user: admin
username: admin
password: admin

0 comments on commit 9ee2dec

Please sign in to comment.