lib/capistrano/bundle_rsync/bundler.rb in capistrano-bundle_rsync-0.4.0 vs lib/capistrano/bundle_rsync/bundler.rb in capistrano-bundle_rsync-0.4.1

- old
+ new

@@ -1,6 +1,7 @@ require 'capistrano/bundle_rsync/base' +require 'capistrano/configuration/filter' class Capistrano::BundleRsync::Bundler < Capistrano::BundleRsync::Base def install Bundler.with_clean_env do execute :bundle, "--gemfile #{config.local_release_path}/Gemfile --deployment --quiet --path #{config.local_bundle_path} --without development test" @@ -26,9 +27,10 @@ EOS # BUNDLE_BIN requires rbenv-binstubs plugin to make it effectively work bundle_config_path = "#{config.local_base_path}/bundle_config" File.open(bundle_config_path, "w") {|file| file.print(lines) } + hosts = ::Capistrano::Configuration.env.filter(hosts) rsync_options = config.rsync_options Parallel.each(hosts, in_threads: config.max_parallels(hosts)) do |host| ssh = config.build_ssh_command(host) execute :rsync, "#{rsync_options} --rsh='#{ssh}' #{config.local_bundle_path}/ #{host}:#{shared_path}/bundle/" execute :rsync, "#{rsync_options} --rsh='#{ssh}' #{bundle_config_path} #{host}:#{release_path}/.bundle/config"