Class: EY::Serverside::Propagator
- Inherits:
-
Object
- Object
- EY::Serverside::Propagator
- Extended by:
- Forwardable
- Defined in:
- lib/engineyard-serverside/propagator.rb
Overview
Propagator ensures that a proper version of the engineyard-serverside gem is installed on a given set of servers
Instance Attribute Summary collapse
-
#servers ⇒ Object
readonly
Returns the value of attribute servers.
-
#shell ⇒ Object
readonly
Returns the value of attribute shell.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(servers, shell) ⇒ Propagator
constructor
A new instance of Propagator.
- #propagate ⇒ Object
Constructor Details
#initialize(servers, shell) ⇒ Propagator
Returns a new instance of Propagator.
21 22 23 24 |
# File 'lib/engineyard-serverside/propagator.rb', line 21 def initialize(servers, shell) @servers = servers @shell = shell end |
Instance Attribute Details
#servers ⇒ Object (readonly)
Returns the value of attribute servers.
19 20 21 |
# File 'lib/engineyard-serverside/propagator.rb', line 19 def servers @servers end |
#shell ⇒ Object (readonly)
Returns the value of attribute shell.
19 20 21 |
# File 'lib/engineyard-serverside/propagator.rb', line 19 def shell @shell end |
Class Method Details
.propagate(servers, shell) ⇒ Object
10 11 12 |
# File 'lib/engineyard-serverside/propagator.rb', line 10 def self.propagate(servers, shell) new(servers, shell).propagate end |
Instance Method Details
#propagate ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/engineyard-serverside/propagator.rb', line 26 def propagate shell.status "Verifying and propagating #{name_with_version} to all servers." servers.remote.run_for_each! do |server| propagation_command_for(server) end end |