Skip to content

Commit 7f115d0

Browse files
committed
## v6.2.0, 10/06/18
Moved back to upload! from sshkit instead of NetSCP
1 parent e83d0b0 commit 7f115d0

File tree

2 files changed

+28
-16
lines changed

2 files changed

+28
-16
lines changed
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.1.0'
3+
VERSION = '6.2.0'
44
end
55
end

lib/capistrano/tasks/postgresql.rake

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -110,22 +110,30 @@ 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!(
114-
self.host.hostname,
115-
self.host.user,
113+
upload!(
116114
StringIO.new(pg_template(true, download!(archetype_database_yml_file))),
117-
archetype_database_yml_file,
118-
ssh: { port: self.host.port }
115+
archetype_database_yml_file
119116
)
117+
# Net::SCP.upload!(
118+
# self.host.hostname,
119+
# self.host.user,
120+
# StringIO.new(pg_template(true, download!(archetype_database_yml_file))),
121+
# archetype_database_yml_file,
122+
# ssh: { port: self.host.port }
123+
# )
120124
else
121125
execute :mkdir, '-pv', File.dirname(archetype_database_yml_file)
122-
Net::SCP.upload!(
123-
self.host.hostname,
124-
self.host.user,
126+
upload!(
125127
StringIO.new(pg_template),
126-
archetype_database_yml_file,
127-
ssh: { port: self.host.port }
128+
archetype_database_yml_file
128129
)
130+
# Net::SCP.upload!(
131+
# self.host.hostname,
132+
# self.host.user,
133+
# StringIO.new(pg_template),
134+
# archetype_database_yml_file,
135+
# ssh: { port: self.host.port }
136+
# )
129137
end
130138
end
131139
end
@@ -139,13 +147,17 @@ namespace :postgresql do
139147
end
140148
on release_roles :all do
141149
execute :mkdir, '-pv', File.dirname(database_yml_file)
142-
Net::SCP.upload!(
143-
self.host.hostname,
144-
self.host.user,
150+
upload!(
145151
StringIO.new(database_yml_contents),
146-
database_yml_file,
147-
ssh: { port: self.host.port }
152+
database_yml_file
148153
)
154+
# Net::SCP.upload!(
155+
# self.host.hostname,
156+
# self.host.user,
157+
# StringIO.new(database_yml_contents),
158+
# database_yml_file,
159+
# ssh: { port: self.host.port }
160+
# )
149161
end
150162
end
151163

0 commit comments

Comments
 (0)