lib/right_chimp/Chimp.rb in right_chimp-2.1.13 vs lib/right_chimp/Chimp.rb in right_chimp-2.1.14
- old
+ new
@@ -412,10 +412,17 @@
when '--version'
puts VERSION
exit 0
when '--chimpd'
@use_chimpd = true
- @chimpd_port = arg.to_i unless arg.empty?
+ unless arg.empty?
+ if arg =~ /[\d]+\.[\d]+\.[\d]+\.[\d]+:[\d]+/
+ @chimpd_host, @chimpd_port = arg.split(':')
+ @chimpd_port = @chimpd_port.to_i
+ else
+ @chimpd_port = arg.to_i
+ end
+ end
when '--chimpd-wait-until-done'
@use_chimpd = true
@chimpd_wait_until_done = true
when '--dry-run', '-n'
@dry_run = true