You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Code cleanup
- Removal of legacy add hstore method
- Using execute and test properly so we can see what the gem is doing in the STDOUT
- Expanded remove_all task to actually cover everything
- Added deploy config option pg_generate_random_password, instead of using it by default when pg_password is excluded
- issues/53: Bug fixed for updates to the archetype when using random password
- projects/1: Prep for RSPEC testing project
raise('Updates need the original file to update from.')ifarchetype_file.nil?
45
+
raise('Regeneration of archetype database.yml need the original file to update from.')ifarchetype_file.nil?
30
46
raise('Cannot update a custom postgresql.yml.erb file.')ifFile.exists?(config_file)# Skip custom postgresql.yml.erb if we're updating. It's not supported
31
47
# Update yml file from settings
32
-
iffetch(:pg_password).nil? && fetch(:pg_ask_for_password) == false# User isn't generating a random password or wanting to set it manually from prompt
48
+
iffetch(:pg_generate_random_password) || !fetch(:pg_password)# We need to prevent updating the archetype file if we've done a random or "ask"ed password
Copy file name to clipboardExpand all lines: lib/capistrano/postgresql/psql_helpers.rb
+15-26Lines changed: 15 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -2,39 +2,28 @@ module Capistrano
2
2
modulePostgresql
3
3
modulePsqlHelpers
4
4
5
-
defpsql(*args)
6
-
# Reminder: -u #{fetch(:pg_system_user)} seen below differs slightly from -U, an option on the psql command: https://www.postgresql.org/docs/9.6/static/app-psql.html
7
-
args.unshift("-U #{fetch(:pg_system_user)}")iffetch(:pg_without_sudo)# Add the :pg_system_user to psql command since we aren't using sudo anymore
8
-
# test :sudo, "-u #{fetch(:pg_system_user)}psql", *args
0 commit comments