lib/extensions/memcached_settings.rb in memcached-manager-0.0.0 vs lib/extensions/memcached_settings.rb in memcached-manager-0.0.1
- old
+ new
@@ -1,14 +1,14 @@
module Sinatra
module MemcachedSettings
def memcached_host session
return session['host'] if configured? session, 'host'
- 'localhost'
+ ENV['memcached_host'] || 'localhost'
end
def memcached_port session
return session['port'] if configured? session, 'port'
- '11211'
+ ENV['memcached_port'] || '11211'
end
private
def configured? session, parameter
session.key?(parameter)