lib/fulmar/domain/service/helper/common_helper.rb in fulmar-1.8.0 vs lib/fulmar/domain/service/helper/common_helper.rb in fulmar-1.8.1
- old
+ new
@@ -7,31 +7,36 @@
module Helper
# Provides the helper methods used in the tasks
module CommonHelper
attr_accessor :environment
+ # @return [Hash]
def full_configuration
configuration.configuration
end
+ # @return [Fulmar::Domain::Service::ConfigurationService]
def configuration
(@_config_service ||= Fulmar::Domain::Service::ConfigurationService.instance)
end
+ # @return [Fulmar::Domain::Model::Project]
def project
full_configuration[:project]
end
def composer(command, arguments = Fulmar::Infrastructure::Service::ComposerService::DEFAULT_PARAMS)
storage['composer'] ||= Fulmar::Infrastructure::Service::ComposerService.new(local_shell)
storage['composer'].shell.quiet = !configuration[:debug]
storage['composer'].execute(command, arguments)
end
+ # @return [Fulmar::Shell]
def local_shell
storage['local_shell'] ||= new_shell(configuration[:local_path])
end
+ # @return [Fulmar::Shell]
def remote_shell
storage['remote_shell'] ||= new_shell(configuration[:remote_path], configuration.ssh_user_and_host)
end
def file_sync