lib/bin_install/postgres.rb in bin_install-0.0.31 vs lib/bin_install/postgres.rb in bin_install-0.0.32

- old
+ new

@@ -1,14 +1,22 @@ module BinInstall module Postgres - def self.install + def self.install(version = nil) puts 'Installing PostgreSQL...'.white - Brew::Package.install_or_upgrade('postgresql') + if version + Brew::Package.install_or_upgrade("postgresql@#{version}") + else + Brew::Package.install_or_upgrade('postgresql') + end end - def self.install! + def self.install!(version = nil) puts 'Installing PostgreSQL...'.white - Brew::Package.install_or_upgrade!('postgresql') + if version + Brew::Package.install_or_upgrade!("postgresql@#{version}") + else + Brew::Package.install_or_upgrade!('postgresql') + end end def self.create_superuser(username = 'postgres') puts 'Creating superuser postgres for postgresqlSQL...'.white system("createuser --superuser #{username}")