Class: PoiseRuby::RubyProviders::Dummy

Inherits:
Base
  • Object
show all
Defined in:
lib/poise_ruby/ruby_providers/dummy.rb

Overview

Inversion provider for the ruby_runtime resource to use a fake Ruby, for use in unit tests.

Since:

  • 2.1.0

Provides:

  • dummy

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.default_inversion_options(node, resource) ⇒ Object

Since:

  • 2.1.0



30
31
32
33
34
35
36
37
# File 'lib/poise_ruby/ruby_providers/dummy.rb', line 30

def self.default_inversion_options(node, resource)
  super.merge({
    # Manual overrides for dummy data.
    ruby_binary: ::File.join('', 'ruby'),
    ruby_environment: nil,
    gem_binary: nil,
  })
end

Instance Method Details

#action_install

This method returns an undefined value.

The install action for the ruby_runtime resource.

Since:

  • 2.1.0



42
43
44
# File 'lib/poise_ruby/ruby_providers/dummy.rb', line 42

def action_install
  # This space left intentionally blank.
end

#action_uninstall

This method returns an undefined value.

The uninstall action for the ruby_runtime resource.

Since:

  • 2.1.0



49
50
51
# File 'lib/poise_ruby/ruby_providers/dummy.rb', line 49

def action_uninstall
  # This space left intentionally blank.
end

#gem_binaryString

Path to the non-existent gem.

Returns:

  • (String)

Since:

  • 2.1.0



70
71
72
# File 'lib/poise_ruby/ruby_providers/dummy.rb', line 70

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

#ruby_binaryString

Path to the non-existent ruby.

Returns:

  • (String)

Since:

  • 2.1.0



56
57
58
# File 'lib/poise_ruby/ruby_providers/dummy.rb', line 56

def ruby_binary
  options['ruby_binary']
end

#ruby_environmentString

Environment for the non-existent Ruby.

Returns:

  • (String)

Since:

  • 2.1.0



63
64
65
# File 'lib/poise_ruby/ruby_providers/dummy.rb', line 63

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