class Physique::OctopusDeployAppConfig

Attributes

lang[W]
name[W]
project[W]
type[W]

Public Class Methods

new() click to toggle source
Calls superclass method Physique::MetadataConfig::new
# File lib/physique/task_builders/octopus.rb, line 45
def initialize
  super
  @type = :console
  @lang = :cs
end

Public Instance Methods

opts() click to toggle source
# File lib/physique/task_builders/octopus.rb, line 51
def opts
  raise ArgumentError, 'You must specify a :project to deploy' if @project.blank?
  raise ArgumentError, 'You must specify the :type of project to deploy' if @type.blank?
  raise ArgumentError, "Project :type #{@type} is not supported." unless supported_types.include? @type

  project_file_path = Physique::ProjectPathResolver.resolve(@project, @lang)
  _, project_file = File.split project_file_path
  project_name = File.basename(project_file, '.*')

  Map.new({
    type: @type,
    name: @name || @project,
    project: project_name,
    project_file: project_file_path,
    metadata: @metadata
  })
end

Private Instance Methods

supported_types() click to toggle source
# File lib/physique/task_builders/octopus.rb, line 71
def supported_types
  [ :console, :service, :website ]
end