class Locomotive::Wagon::PullCommand
Constants
- RESOURCES
Public Class Methods
pull(env, path, options, shell)
click to toggle source
# File lib/locomotive/wagon/commands/pull_command.rb, line 23 def self.pull(env, path, options, shell) self.new(env, path, options, shell).pull end
Public Instance Methods
pull()
click to toggle source
# File lib/locomotive/wagon/commands/pull_command.rb, line 27 def pull if options[:verbose] PullLogger.new _pull else show_wait_spinner('Pulling...') { _pull } end end
Private Instance Methods
_pull()
click to toggle source
# File lib/locomotive/wagon/commands/pull_command.rb, line 38 def _pull api_client = api_site_client(connection_information) site = api_client.current_site.get each_resource do |klass| klass.pull(api_client, site, path, env) end print_result_message end
connection_information()
click to toggle source
# File lib/locomotive/wagon/commands/pull_command.rb, line 60 def connection_information read_deploy_settings(self.env, self.path) end
each_resource() { |klass| ... }
click to toggle source
# File lib/locomotive/wagon/commands/pull_command.rb, line 50 def each_resource RESOURCES.each do |name| next if !options[:resources].blank? && !options[:resources].include?(name) klass = "Locomotive::Wagon::Pull#{name.camelcase}Command".constantize yield klass end end
print_result_message()
click to toggle source
# File lib/locomotive/wagon/commands/pull_command.rb, line 64 def print_result_message shell.try(:say, "\n\nThe templates, theme assets and content have been pulled from the remote version.", :green) true end