Skip to content

Commit 80f2b99

Browse files
committed
issues/51: redundancy with ask_for_or_generate_password removed
1 parent 807e4a7 commit 80f2b99

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

lib/capistrano/postgresql/psql_helpers.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def psql_on_db(db_name, *args)
3030
args.unshift("-U #{fetch(:pg_system_user)}") if fetch(:pg_without_sudo) # Add the :pg_system_user to psql command since we aren't using sudo anymore
3131
cmd = [ :psql, "-d #{db_name}", *args ]
3232
cmd = [ :sudo, "-u #{fetch(:pg_system_user)}", *cmd ] unless fetch(:pg_without_sudo)
33+
puts "Executing #{cmd.flatten}"
3334
test *cmd.flatten
3435
#test :sudo, "-u #{fetch(:pg_system_user)} psql -d #{db_name}", *args
3536
end
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module Capistrano
22
module Postgresql
3-
VERSION = '4.9.1'
3+
VERSION = '4.9.2'
44
end
55
end

lib/capistrano/tasks/postgresql.rake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
require 'capistrano/postgresql/helper_methods'
22
require 'capistrano/postgresql/password_helpers'
33
require 'capistrano/postgresql/psql_helpers'
4-
54
include Capistrano::Postgresql::HelperMethods
65
include Capistrano::Postgresql::PasswordHelpers
76
include Capistrano::Postgresql::PsqlHelpers
@@ -136,7 +135,6 @@ namespace :postgresql do
136135
if test "[ -e #{archetype_database_yml_file} ]" # Archetype already exists. Just update values that changed. Make sure we don't overwrite it to protect generated passwords.
137136
Net::SCP.upload!(self.host.hostname, self.host.user,StringIO.new(pg_template(true, download!(archetype_database_yml_file))),archetype_database_yml_file)
138137
else
139-
ask_for_or_generate_password if fetch(:pg_password).nil? || fetch(:pg_ask_for_password) == true # Avoid setting a random password or one from user prompt
140138
execute :mkdir, '-pv', File.dirname(archetype_database_yml_file)
141139
Net::SCP.upload!(self.host.hostname,self.host.user,StringIO.new(pg_template),archetype_database_yml_file)
142140
end

0 commit comments

Comments
 (0)