Class: Pantry::Chef::SendCookbooks

Inherits:
Pantry::Command
  • Object
show all
Defined in:
lib/pantry/chef/send_cookbooks.rb

Overview

Given a list of cookbooks and the Receivers waiting for them, set up some senders to start sending the appropriate Cookbook files along.

Instance Method Summary collapse

Instance Method Details

#perform(message) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/pantry/chef/send_cookbooks.rb', line 8

def perform(message)
  message.body.each do |(name, receiver_uuid, file_uuid)|
    server.send_file(
      Pantry.root.join("chef", "cookbook-cache", "#{name}.tgz"),
      receiver_uuid,
      file_uuid
    )
  end

  true
end