bin/redis-report in redis-dump-0.3.1 vs bin/redis-report in redis-dump-0.3.2
- old
+ new
@@ -31,25 +31,26 @@
global :v, :verbose, "Increase output" do
@verbose ||= 0
@verbose += 1
end
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