Class: Physique::OctopusPack::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/physique/tasks/octopus_pack.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#configuration=(value) ⇒ Object (writeonly)

Sets the attribute configuration

Parameters:

  • value

    the value to set the attribute configuration to.



9
10
11
# File 'lib/physique/tasks/octopus_pack.rb', line 9

def configuration=(value)
  @configuration = value
end

#exe=(value) ⇒ Object (writeonly)

Sets the attribute exe

Parameters:

  • value

    the value to set the attribute exe to.



10
11
12
# File 'lib/physique/tasks/octopus_pack.rb', line 10

def exe=(value)
  @exe = value
end

#metadata=(value) ⇒ Object (writeonly)

Sets the attribute metadata

Parameters:

  • value

    the value to set the attribute metadata to.



13
14
15
# File 'lib/physique/tasks/octopus_pack.rb', line 13

def metadata=(value)
  @metadata = value
end

#original_path=(value) ⇒ Object (writeonly)

Sets the attribute original_path

Parameters:

  • value

    the value to set the attribute original_path to.



12
13
14
# File 'lib/physique/tasks/octopus_pack.rb', line 12

def original_path=(value)
  @original_path = value
end

#out=(value) ⇒ Object (writeonly)

Sets the attribute out

Parameters:

  • value

    the value to set the attribute out to.



11
12
13
# File 'lib/physique/tasks/octopus_pack.rb', line 11

def out=(value)
  @out = value
end

#project_file=(value) ⇒ Object (writeonly)

Sets the attribute project_file

Parameters:

  • value

    the value to set the attribute project_file to.



7
8
9
# File 'lib/physique/tasks/octopus_pack.rb', line 7

def project_file=(value)
  @project_file = value
end

#type=(value) ⇒ Object (writeonly)

Sets the attribute type

Parameters:

  • value

    the value to set the attribute type to.



8
9
10
# File 'lib/physique/tasks/octopus_pack.rb', line 8

def type=(value)
  @type = value
end

Instance Method Details

#optsObject

Raises:

  • (ArgumentError)


15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/physique/tasks/octopus_pack.rb', line 15

def opts
  raise ArgumentError, 'You must specify a project file' if @project_file.blank?
  raise ArgumentError, 'You must specify a version' if @metadata.version.blank?
  raise ArgumentError, 'You must specify the NuGet executable' if @exe.blank?
  raise ArgumentError, 'You must specify an output folder' if @out.blank?

  Map.new({
    project_file: @project_file,
    type: @type,
    configuration: @configuration,
    exe: @exe,
    out: @out,
    original_path: @original_path,
    metadata: @metadata,
  }).apply({
    type: :console,
    configuration: 'Release',
    original_path: FileUtils.pwd,
    verify_files: true,
  })
end