Rakefile in ros-apartment-2.8.1.rc1 vs Rakefile in ros-apartment-2.8.1.rc2

- old
+ new

@@ -45,13 +45,13 @@ require 'fileutils' apartment_db_file = 'spec/config/database.yml' rails_db_file = 'spec/dummy/config/database.yml' unless File.exist?(apartment_db_file) - FileUtils.copy(apartment_db_file + '.sample', apartment_db_file, verbose: true) + FileUtils.copy("#{apartment_db_file}.sample", apartment_db_file, verbose: true) end - FileUtils.copy(rails_db_file + '.sample', rails_db_file, verbose: true) unless File.exist?(rails_db_file) + FileUtils.copy("#{rails_db_file}.sample", rails_db_file, verbose: true) unless File.exist?(rails_db_file) end end namespace :postgres do require 'active_record' @@ -63,9 +63,10 @@ params << '-E UTF8' params << pg_config['database'] params << "-U#{pg_config['username']}" params << "-h#{pg_config['host']}" if pg_config['host'] params << "-p#{pg_config['port']}" if pg_config['port'] + begin `createdb #{params.join(' ')}` rescue StandardError 'test db already exists' end