Class: Scatter::Commands::Sync
- Inherits:
-
Scatter::Command
- Object
- Scatter::Command
- Scatter::Commands::Sync
- Defined in:
- lib/scatter/commands/sync.rb
Instance Method Summary collapse
- #execute! ⇒ Object
-
#initialize(out, node_name) ⇒ Sync
constructor
A new instance of Sync.
- #node ⇒ Object
Methods inherited from Scatter::Command
command_name, help, inherited, usage
Constructor Details
#initialize(out, node_name) ⇒ Sync
Returns a new instance of Sync.
7 8 9 10 |
# File 'lib/scatter/commands/sync.rb', line 7 def initialize(out, node_name) super(out) @node_name = node_name end |
Instance Method Details
#execute! ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/scatter/commands/sync.rb', line 12 def execute! gemlist = Dir.glob("#{ENV['GEM_HOME']}/cache/*.gem") gemlist.each do |gemfile| @out.puts "Pushing gem #{File.basename(gemfile)} to #{@node_name} ..." node.push(gemfile) end end |