Class: Emissary::Agent::Gem
- Inherits:
-
Emissary::Agent
- Object
- Emissary::Agent
- Emissary::Agent::Gem
- Defined in:
- lib/emissary/agent/gem.rb
Instance Attribute Summary
Attributes inherited from Emissary::Agent
#args, #config, #message, #method, #name, #operator
Instance Method Summary collapse
-
#install(gem_name, version = :latest, source_url = :default) ⇒ Object
Updates Emissary from the given source to the given version.
- #uninstall(gem_name, version = :latest, ignore_dependencies = true, remove_executables = false) ⇒ Object (also: #remove)
- #update(gem_name, version = :latest, source_url = :default) ⇒ Object
- #valid_methods ⇒ Object
- #version(gem_name) ⇒ Object
Methods inherited from Emissary::Agent
#activate, #initialize, #post_init, #send
Constructor Details
This class inherits a constructor from Emissary::Agent
Instance Method Details
#install(gem_name, version = :latest, source_url = :default) ⇒ Object
Updates Emissary from the given source to the given version
28 29 30 |
# File 'lib/emissary/agent/gem.rb', line 28 def install gem_name, version = :latest, source_url = :default ::Emissary::GemHelper.new(gem_name).install(version, source_url) end |
#uninstall(gem_name, version = :latest, ignore_dependencies = true, remove_executables = false) ⇒ Object Also known as: remove
36 37 38 |
# File 'lib/emissary/agent/gem.rb', line 36 def uninstall gem_name, version = :latest, ignore_dependencies = true, remove_executables = false ::Emissary::GemHelper.new(gem_name).uninstall(version, ignore_dependencies, remove_executables) end |
#update(gem_name, version = :latest, source_url = :default) ⇒ Object
32 33 34 |
# File 'lib/emissary/agent/gem.rb', line 32 def update gem_name, version = :latest, source_url = :default ::Emissary::GemHelper.new(gem_name).update(version, source_url) end |
#valid_methods ⇒ Object
19 20 21 |
# File 'lib/emissary/agent/gem.rb', line 19 def valid_methods [ :update, :install, :remove, :uninstall, :version ] end |