lib/capistrano3/pipenv/tasks/pipenv.cap in capistrano3-pipenv-0.1.4 vs lib/capistrano3/pipenv/tasks/pipenv.cap in capistrano3-pipenv-0.2.0

- old
+ new

@@ -1,25 +1,27 @@ +# -*- mode: ruby; -*- + namespace :pipenv do desc <<-DESC Install the current Pipenv environment. You can override any of these defaults by setting the variables shown below. set :pipenv_roles, :all set :pipenv_servers, -> { release_roles(fetch(:pipenv_roles)) } - set :pipenv_flags, '--deploy' + set :pipenv_flags, [] set :pipenv_env_variables, {} set :pipenv_clean_options, '--all' DESC task :install do on fetch(:pipenv_servers) do within release_path do with fetch(:pipenv_env_variables) do options = [] - options << "#{fetch(:pipenv_flags)}" if fetch(:pipenv_flags) - execute :pipenv, :install, *options + options << fetch(:pipenv_flags) unless fetch(:pipenv_flags).empty? + execute :pipenv, :sync, *options end end end end @@ -37,10 +39,10 @@ namespace :load do task :defaults do set :pipenv_roles, :all set :pipenv_servers, -> { release_roles(fetch(:pipenv_roles)) } - set :pipenv_flags, '--deploy' + set :pipenv_flags, [] set :pipenv_env_variables, {} set :pipenv_clean_options, "--all" end end