Skip to content

Commit 0f350ea

Browse files
committed
Remove capistrano-rvm in favor of simple capistrano/sshkit command map prefixes in deploy.rb; Update to newer version of net-ssh for OpenSSL 3 compatibility (for Ubuntu 22)
1 parent 7a5d48f commit 0f350ea

File tree

4 files changed

+13
-15
lines changed

4 files changed

+13
-15
lines changed

Capfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ install_plugin Capistrano::SCM::Git
1010

1111
# additional modules
1212
require 'capistrano/rails'
13-
require 'capistrano/rvm'
1413
require 'capistrano/passenger'
1514
require 'capistrano/cul'
1615
require 'whenever/capistrano'

Gemfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,10 @@ group :development do
7474
gem 'listen', '~> 3.3'
7575

7676
# Capistrano gems for deployment
77-
gem 'capistrano', '~> 3.17.0', require: false
77+
gem 'capistrano', '~> 3.18.0', require: false
7878
gem 'capistrano-cul', require: false
7979
gem 'capistrano-passenger', '~> 0.1', require: false
8080
gem 'capistrano-rails', '~> 1.4', require: false
81-
gem 'capistrano-rvm', '~> 0.1', require: false
8281

8382
# Use net-ssh >= 4.2 to prevent warnings with Ruby 2.4
8483
gem 'net-ssh', '>= 4.2'

Gemfile.lock

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ GEM
7676
i18n (>= 1.6, < 2)
7777
minitest (>= 5.1)
7878
tzinfo (~> 2.0)
79-
airbrussh (1.4.0)
79+
airbrussh (1.5.0)
8080
sshkit (>= 1.6.1, != 1.7.0)
8181
ast (2.4.2)
8282
bcrypt_pbkdf (1.1.0)
@@ -85,7 +85,7 @@ GEM
8585
msgpack (~> 1.2)
8686
builder (3.2.4)
8787
byebug (11.1.3)
88-
capistrano (3.17.0)
88+
capistrano (3.18.0)
8989
airbrussh (>= 1.0.0)
9090
i18n
9191
rake (>= 10.0.0)
@@ -105,9 +105,6 @@ GEM
105105
capistrano-rails (1.6.2)
106106
capistrano (~> 3.1)
107107
capistrano-bundler (>= 1.1, < 3)
108-
capistrano-rvm (0.1.2)
109-
capistrano (~> 3.0)
110-
sshkit (~> 1.2)
111108
chronic (0.10.2)
112109
concurrent-ruby (1.1.10)
113110
crass (1.0.6)
@@ -165,13 +162,13 @@ GEM
165162
timeout
166163
net-protocol (0.1.3)
167164
timeout
168-
net-scp (3.0.0)
169-
net-ssh (>= 2.6.5, < 7.0.0)
165+
net-scp (4.0.0)
166+
net-ssh (>= 2.6.5, < 8.0.0)
170167
net-smtp (0.3.1)
171168
digest
172169
net-protocol
173170
timeout
174-
net-ssh (6.1.0)
171+
net-ssh (7.2.0)
175172
netrc (0.11.0)
176173
nio4r (2.5.8)
177174
nokogiri (1.15.4)
@@ -299,7 +296,7 @@ GEM
299296
activesupport (>= 5.2)
300297
sprockets (>= 3.0.0)
301298
sqlite3 (1.4.2)
302-
sshkit (1.21.2)
299+
sshkit (1.21.5)
303300
net-scp (>= 1.1.2)
304301
net-ssh (>= 2.8.0)
305302
strscan (3.0.1)
@@ -334,11 +331,10 @@ DEPENDENCIES
334331
alexandria-zoom!
335332
bootsnap (>= 1.1.0)
336333
byebug
337-
capistrano (~> 3.17.0)
334+
capistrano (~> 3.18.0)
338335
capistrano-cul
339336
capistrano-passenger (~> 0.1)
340337
capistrano-rails (~> 1.4)
341-
capistrano-rvm (~> 0.1)
342338
factory_bot_rails (~> 6.1.0)
343339
io-wait (= 0.2.0)
344340
jbuilder (~> 2.5)

config/deploy.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# config valid for current version and patch releases of Capistrano
2-
lock "~> 3.17.0"
2+
lock "~> 3.18.0"
33

44
set :remote_user, "renserv"
55
set :application, 'hysync'
@@ -47,6 +47,10 @@
4747
# Whenever gem
4848
set :whenever_identifier, ->{ "#{fetch(:application)}_#{fetch(:stage)}" }
4949

50+
[:rake, :gem, :bundle, :ruby].each do |command_to_prefix_with_rvm|
51+
SSHKit.config.command_map.prefix[command_to_prefix_with_rvm].push("~/.rvm/bin/rvm #{fetch(:deploy_name)} do")
52+
end
53+
5054
namespace :deploy do
5155
desc "Report the environment"
5256
task :report do

0 commit comments

Comments
 (0)