Class: PoisePython::PythonProviders::Dummy

Inherits:
Base
  • Object
show all
Defined in:
lib/poise_python/python_providers/dummy.rb

Overview

Inversion provider for the python_runtime resource to use a fake Python, for use in unit tests.

Since:

  • 1.1.0

Provides:

  • dummy

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.default_inversion_options(node, resource) ⇒ Object

Since:

  • 1.1.0



30
31
32
33
34
35
36
# File 'lib/poise_python/python_providers/dummy.rb', line 30

def self.default_inversion_options(node, resource)
  super.merge({
    # Manual overrides for dummy data.
    python_binary: ::File.join('', 'python'),
    python_environment: nil,
  })
end

Instance Method Details

#action_install

This method returns an undefined value.

The install action for the python_runtime resource.

Since:

  • 1.1.0



41
42
43
# File 'lib/poise_python/python_providers/dummy.rb', line 41

def action_install
  # This space left intentionally blank.
end

#action_uninstall

This method returns an undefined value.

The uninstall action for the python_runtime resource.

Since:

  • 1.1.0



48
49
50
# File 'lib/poise_python/python_providers/dummy.rb', line 48

def action_uninstall
  # This space left intentionally blank.
end

#python_binaryString

Path to the non-existent python.

Returns:

  • (String)

Since:

  • 1.1.0



55
56
57
# File 'lib/poise_python/python_providers/dummy.rb', line 55

def python_binary
  options['python_binary']
end

#python_environmentString

Environment for the non-existent python.

Returns:

  • (String)

Since:

  • 1.1.0



62
63
64
# File 'lib/poise_python/python_providers/dummy.rb', line 62

def python_environment
  options['python_environment'] || super
end