Sha256: fa9bbaa60e5b28a500ae80c65f4e4fdd862f030d20e5a2094b821b3ac8bc144f
Contents?: true
Size: 851 Bytes
Versions: 28
Compression:
Stored size: 851 Bytes
Contents
module Locomotive::Wagon class CloneCommand < Struct.new(:name, :path, :options, :shell) def self.clone(name, path, options, shell) new(name, path, options, shell).clone end def clone # create an empty site with the minimal settings create_site # pull the pages, content_types, basically any resources from the remote site pull_site end def connection_info options.symbolize_keys.slice(:host, :handle, :email, :api_key, :password) end private def create_site require 'locomotive/wagon/generators/site' generator = Locomotive::Wagon::Generators::Site::Cloned generator.start [name, path, 'true', connection_info] end def pull_site Locomotive::Wagon.pull('production', File.join(path, name), options.symbolize_keys, shell) end end end
Version data entries
28 entries across 28 versions & 1 rubygems