mirror of https://github.com/bjeanes/dotfiles.git
15 lines
326 B
Plaintext
15 lines
326 B
Plaintext
|
#!/usr/bin/env ruby
|
||
|
|
||
|
exit(1) unless ARGV[0] && File.exist?(ARGV[0])
|
||
|
|
||
|
require 'yaml'
|
||
|
|
||
|
dbs = YAML.load_file(ARGV[0]).collect do |name,info|
|
||
|
adapter = info['adapter'] || info[:adapter]
|
||
|
db = info['database'] || info[:database]
|
||
|
[adapter,db]
|
||
|
end.uniq.each do |(adapter,db)|
|
||
|
puts "%s\t%s" % [adapter, db]
|
||
|
end
|
||
|
|
||
|
exit 0
|