Commits

Koen Van der Auwera  committed cc33697

use env variables

  • Participants
  • Parent commits 1d1c311

Comments (0)

Files changed (2)

 
 Camping.goes :Amanda
 
+
 STORE = Amanda::Store.new("amanda.yml")
 
 module Amanda
 
   class Authorize < R '/authorize'
     def get
-      session = DropboxSession.new(STORE.dropbox_settings.fetch("app_key"), STORE.dropbox_settings.fetch("app_secret"))
+      session = DropboxSession.new(ENV["DROPBOX_APP_KEY"], ENV["DROPBOX_APP_SECRET"])
       session.get_request_token
       @state["dropbox"] = session
       redirect session.get_authorize_url(URL("/authorized").to_s)

File amanda/store.rb

     end
 
     def redis
-      @redis ||= ::Redis.new(host: config.fetch("redis").fetch("host", "localhost"),
-                             port: config.fetch("redis").fetch("port", 6379))
+      @redis ||= ::Redis.new(host: ENV["OPENREDIS_URL"])
     end
 
     def keys(pattern="*")