Class: PoiseRuby::RubyProviders::Base
- Inherits:
-
Chef::Provider
- Object
- Chef::Provider
- PoiseRuby::RubyProviders::Base
- Defined in:
- lib/poise_ruby/ruby_providers/base.rb
Overview
Instance Method Summary collapse
-
#action_install
The
install
action for theruby_runtime
resource. -
#action_uninstall
The
uninstall
action for theruby_runtime
resource. -
#gem_binary ⇒ String
The path to the
gem
binary. -
#ruby_binary ⇒ String
abstract
The path to the
ruby
binary. -
#ruby_environment ⇒ Hash<String, String>
Output property for environment variables.
Instance Method Details
#action_install
This method returns an undefined value.
The install
action for the ruby_runtime
resource.
42 43 44 45 46 47 |
# File 'lib/poise_ruby/ruby_providers/base.rb', line 42 def action_install do install_ruby install_bundler end end |
#action_uninstall
This method returns an undefined value.
The uninstall
action for the ruby_runtime
resource.
52 53 54 55 56 |
# File 'lib/poise_ruby/ruby_providers/base.rb', line 52 def action_uninstall do uninstall_ruby end end |
#gem_binary ⇒ String
The path to the gem
binary. Look relative to the
ruby
binary for a default implementation.
78 79 80 81 82 83 84 |
# File 'lib/poise_ruby/ruby_providers/base.rb', line 78 def gem_binary dir, base = ::File.split(ruby_binary) # If this ruby is called something weird, bail out. raise NotImplementedError unless base.start_with?('ruby') # Allow for names like "ruby2.0" -> "gem2.0". ::File.join(dir, base.sub(/^ruby/, 'gem')) end |
#ruby_binary ⇒ String
This method is abstract.
The path to the ruby
binary.
62 63 64 |
# File 'lib/poise_ruby/ruby_providers/base.rb', line 62 def ruby_binary raise NotImplementedError end |
#ruby_environment ⇒ Hash<String, String>
Output property for environment variables.
69 70 71 72 |
# File 'lib/poise_ruby/ruby_providers/base.rb', line 69 def ruby_environment # No environment variables needed. Rejoice. {} end |