Class: Physique::PublishNugetsConfig

Inherits:
MetadataConfig show all
Extended by:
Forwardable
Defined in:
lib/physique/task_builders/publish_nugets.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from MetadataConfig

#with_metadata

Constructor Details

#initializePublishNugetsConfig

Returns a new instance of PublishNugetsConfig.



12
13
14
15
16
# File 'lib/physique/task_builders/publish_nugets.rb', line 12

def initialize
  super
  @feeds = []
  @alias_tasks = true
end

Instance Attribute Details

#exclude=(value) ⇒ Object (writeonly)

Project files to include



8
9
10
# File 'lib/physique/task_builders/publish_nugets.rb', line 8

def exclude=(value)
  @exclude = value
end

#local_path=(value) ⇒ Object (writeonly)

Project files to include



8
9
10
# File 'lib/physique/task_builders/publish_nugets.rb', line 8

def local_path=(value)
  @local_path = value
end

#project_files=(value) ⇒ Object (writeonly)

Project files to include



8
9
10
# File 'lib/physique/task_builders/publish_nugets.rb', line 8

def project_files=(value)
  @project_files = value
end

Instance Method Details

#exclude_or_defaultObject



43
44
45
# File 'lib/physique/task_builders/publish_nugets.rb', line 43

def exclude_or_default
  @exclude || /Tests/
end

#no_alias_tasksObject

Do not alias the tasks without the ‘nuget’ prefix.



19
20
21
# File 'lib/physique/task_builders/publish_nugets.rb', line 19

def no_alias_tasks
  @alias_tasks = false
end

#optsObject



25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/physique/task_builders/publish_nugets.rb', line 25

def opts
  Map.new(
    project_files: FileList[project_files_or_default].exclude(exclude_or_default),
    metadata: @metadata,
    local_path: @local_path,
    gen_symbols: @gen_symbols,
    alias_tasks: @alias_tasks,
    feeds: @feeds.map { |f| f.opts }
  ).apply(
    local_path: 'C:/Nuget.Local'
  )
end

#project_files_or_defaultObject



38
39
40
41
# File 'lib/physique/task_builders/publish_nugets.rb', line 38

def project_files_or_default
  files = @project_files || 'src/**/*.{csproj,fsproj,nuspec}'
  files.gsub('\\', '/')
end