bin/redis-load in redis-dump-0.3.1 vs bin/redis-load in redis-dump-0.3.2

- old
+ new

@@ -27,25 +27,26 @@ global :u, :uri, String, "Redis URI (e.g. redis://hostname[:port])" global :d, :database, Integer, "Redis database (e.g. -d 15)" global :s, :sleep, Integer, "Sleep for S seconds after dumping (for debugging)" global :V, :version, "Display version" do - puts "Version: #{Redis::Dump::VERSION.to_s}" + puts "redis-dump v#{Redis::Dump::VERSION.to_s}" exit 0 end global :D, :debug do Redis::Dump.debug = true end global :nosafe do Redis::Dump.safe = false end before do |obj| + obj.global.uri ||= ENV['REDIS_URI'] obj.global.uri ||= 'redis://%s:%s' % [Redis::Dump.host, Redis::Dump.port] obj.global.uri = 'redis://' << obj.global.uri unless obj.global.uri.match(/^redis:\/\//) obj.global.database &&= obj.global.database.to_i obj.global.database ||= (0..15) - Redis::Dump.ld " redis_uri: #{obj.global.uri} (#{obj.global.database})" + Redis::Dump.ld "redis_uri: #{obj.global.uri} (#{obj.global.database})" Redis::Dump.ld "Process: #{$$}; Memory: #{Redis::Dump.memory_usage}" if Redis::Dump.debug end after do |obj| Redis::Dump.ld "Process: #{$$}; Memory: #{Redis::Dump.memory_usage}" if Redis::Dump.debug \ No newline at end of file