Sha256: 21fa3dff5c31d24a89883d20bcf64adeeac3f78e0ffcd737d0e707cca65c7be3

Contents?: true

Size: 1.36 KB

Versions: 1

Compression:

Stored size: 1.36 KB

Contents

set :application, "capistrano-pyenv"
set :repository,  "."
set :deploy_to do
  File.join("/home", user, application)
end
set :deploy_via, :copy
set :scm, :none
set :use_sudo, false
set :user, "vagrant"
set :password, "vagrant"
set :ssh_options do
  run_locally("rm -f known_hosts")
  {:user_known_hosts_file => "known_hosts"}
end

role :web, "192.168.33.10"
role :app, "192.168.33.10"
role :db,  "192.168.33.10", :primary => true

$LOAD_PATH.push(File.expand_path("../../lib", File.dirname(__FILE__)))
require "capistrano-pyenv"

namespace(:test_all) {
  task(:default) {
    find_and_execute_task("pyenv:setup")
    methods.grep(/^test_/).each do |m|
      send(m)
    end
    find_and_execute_task("pyenv:purge")
  }

  task(:test_pyenv_is_installed) {
    run("pyenv --version")
  }

  task(:test_python_is_installed) {
    run("pyenv exec python --version")
  }

  task(:test_pip_is_installed) {
    run("pyenv exec pip --version")
  }

  task(:test_virtualenv) {
    python_version = pyenv_python_version
    set(:pyenv_use_virtualenv, true)
    set(:pyenv_python_version, "venv")
    set(:pyenv_virtualenv_python_version, python_version)

    find_and_execute_task("pyenv:setup")
    run("pyenv exec python --version")

    set(:pyenv_use_virtualenv, false)
    set(:pyenv_python_version, python_version)
    set(:pyenv_virtualenv_python_version, nil)
  }
}

# vim:set ft=ruby sw=2 ts=2 :

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
capistrano-pyenv-1.0.0rc1 test/config/deploy.rb