class PoiseApplicationPython::Resources::Virtualenv::Resource

An ‘application_virtualenv` resource to manage Python virtual environments inside an Application cookbook deployment.

@provides application_virtualenv @provides application_python_virtualenv @action create @action delete @example

application '/app' do
  virtualenv
end

Public Instance Methods

after_created() click to toggle source

Set this resource as the app_state’s parent python.

@api private

Calls superclass method
# File lib/poise_application_python/resources/virtualenv.rb, line 54
def after_created
  super.tap do |val|
    # Force evaluation so we get any current parent if set.
    parent_python
    app_state_python(self)
  end
end

Private Instance Methods

default_path() click to toggle source

Default value for the {#path} property.

@return [String]

# File lib/poise_application_python/resources/virtualenv.rb, line 67
def default_path
  # @todo This should handle relative paths as a name.
  ::File.join(name, '.virtualenv')
end