Skip to content

Commit e83d0b0

Browse files
committed
## v6.1.0, 10/05/18
Added, thanks to @fabrouy, support for non-standard ssh ports
1 parent 9974c4c commit e83d0b0

2 files changed

Lines changed: 22 additions & 4 deletions

File tree

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 = '6.0.1'
3+
VERSION = '6.1.0'
44
end
55
end

lib/capistrano/tasks/postgresql.rake

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,22 @@ namespace :postgresql do
110110
task :generate_database_yml_archetype do
111111
on primary :db do
112112
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.
113-
Net::SCP.upload!(self.host.hostname, self.host.user, StringIO.new(pg_template(true, download!(archetype_database_yml_file))), archetype_database_yml_file, ssh: { port: self.host.port })
113+
Net::SCP.upload!(
114+
self.host.hostname,
115+
self.host.user,
116+
StringIO.new(pg_template(true, download!(archetype_database_yml_file))),
117+
archetype_database_yml_file,
118+
ssh: { port: self.host.port }
119+
)
114120
else
115121
execute :mkdir, '-pv', File.dirname(archetype_database_yml_file)
116-
Net::SCP.upload!(self.host.hostname, self.host.user, StringIO.new(pg_template), archetype_database_yml_file, ssh: { port: self.host.port })
122+
Net::SCP.upload!(
123+
self.host.hostname,
124+
self.host.user,
125+
StringIO.new(pg_template),
126+
archetype_database_yml_file,
127+
ssh: { port: self.host.port }
128+
)
117129
end
118130
end
119131
end
@@ -127,7 +139,13 @@ namespace :postgresql do
127139
end
128140
on release_roles :all do
129141
execute :mkdir, '-pv', File.dirname(database_yml_file)
130-
Net::SCP.upload!(self.host.hostname, self.host.user, StringIO.new(database_yml_contents), database_yml_file, ssh: { port: self.host.port })
142+
Net::SCP.upload!(
143+
self.host.hostname,
144+
self.host.user,
145+
StringIO.new(database_yml_contents),
146+
database_yml_file,
147+
ssh: { port: self.host.port }
148+
)
131149
end
132150
end
133151

0 commit comments

Comments
 (0)