lib/melodiest/setting.rb in melodiest-0.2.1 vs lib/melodiest/setting.rb in melodiest-0.3.0
- old
+ new
@@ -1,8 +1,16 @@
module Melodiest
module Setting
- def setup
- register Sinatra::ConfigFile
- config_file File.expand_path('../config.yml', __FILE__)
+ def setup(cookie_secret, options={})
+ settings = {
+ server: 'thin'
+ }.merge(options)
+
+ settings.each do |key, value|
+ set key, value
+ end
+
+ use Rack::Session::EncryptedCookie,
+ secret: cookie_secret
end
end
end