This repository was archived by the owner on Dec 2, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +7
-5
lines changed Expand file tree Collapse file tree 4 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 1010
1111 exec { "postgresql-db-${name}" :
1212 command => join([
13- ' createdb' ,
13+ " ${postgresql::binpath} / createdb" ,
1414 " -p${postgresql::port} " ,
1515 ' -E UTF-8' ,
1616 " -O ${postgresql::user} " ,
1717 $name
1818 ], ' ' ),
19- unless => " psql -aA -p${postgresql::port} -t -l | cut -d \\ | -f 1 | grep -w '${name} '"
19+ unless => " ${postgresql::binpath} / psql -aA -p${postgresql::port} -t -l | cut -d \\ | -f 1 | grep -w '${name} '"
2020 }
2121}
Original file line number Diff line number Diff line change 66class postgresql (
77 $ensure = $postgresql::params::ensure,
88
9+ $binpath = $postgresql::params::binpath,
910 $executable = $postgresql::params::executable,
1011
1112 $host = $postgresql::params::host,
Original file line number Diff line number Diff line change 55 Darwin: {
66 include boxen::config
77
8- $executable = " ${boxen::config::homebrewdir} /bin/postgres"
8+ $binpath = " ${boxen::config::homebrewdir} /bin"
9+ $executable = " ${binpath} /postgres"
910 $datadir = " ${boxen::config::datadir} /postgresql"
1011 $logdir = " ${boxen::config::logdir} /postgresql"
1112 $port = 15432
Original file line number Diff line number Diff line change 88 should include_class ( "postgresql" )
99
1010 should contain_exec ( "postgresql-db-#{ title } " ) . with ( {
11- :command => "createdb -p15432 -E UTF-8 -O testuser #{ title } " ,
12- :unless => "psql -aA -p15432 -t -l | cut -d \\ | -f 1 | grep -w '#{ title } '"
11+ :command => "/test/boxen/homebrew/bin/ createdb -p15432 -E UTF-8 -O testuser #{ title } " ,
12+ :unless => "/test/boxen/homebrew/bin/ psql -aA -p15432 -t -l | cut -d \\ | -f 1 | grep -w '#{ title } '"
1313 } )
1414 end
1515end
You can’t perform that action at this time.
0 commit comments