Skip to content
Browse files

Prefer REDIS_URL, get rid of deprecation warnings.

  • Loading branch information...
1 parent 8f7ccbd commit d0b00e7e234309bfbb815d60a42c0f19fb510ca0 Felix Holmgren committed
Showing with 4 additions and 6 deletions.
  1. +4 −6 lib/heroku/command/redis_console.rb
View
10 lib/heroku/command/redis_console.rb
@@ -2,12 +2,10 @@
class Heroku::Command::Redis < Heroku::Command::Base
def cli(*queries)
- # Must remember to extract these so they don't get passed to redis-cli
- db = extract_option("--db") || 'REDISTOGO_URL'
- app = extract_app
-
- redis_url = heroku.config_vars(app)[db]
- return puts "No such redis (#{db}), try setting --db REDIS_URL." unless redis_url
+ db_env_key = extract_option("--db") | 'REDIS_URL'
+ config_vars = heroku.get_config_vars
+ redis_url = config_vars(app)[db_env_key]
+ return puts "No such redis (#{db_env_key}), try setting --db REDIS_URL." unless redis_url
uri = URI.parse(redis_url)
cmd = ["redis-cli"]

0 comments on commit d0b00e7

Please sign in to comment.
Something went wrong with that request. Please try again.