Module: SupportsLinuxEnvironment

Included in:
AspNetCompiler, CSC, NuGetInstall, NuGetPack, NuGetPublish, NuGetPush, NuGetUpdate
Defined in:
lib/albacore/support/supportlinux.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#is_linuxObject

Returns the value of attribute is_linux.



2
3
4
# File 'lib/albacore/support/supportlinux.rb', line 2

def is_linux
  @is_linux
end

Instance Method Details

#format_path(path) ⇒ Object



13
14
15
# File 'lib/albacore/support/supportlinux.rb', line 13

def format_path(path)
  "\"#{to_OS_format(path)}\""
end

#format_reference(reference) ⇒ Object



9
10
11
# File 'lib/albacore/support/supportlinux.rb', line 9

def format_reference(reference)
  "\"/reference:#{to_OS_format(reference)}\""
end

#initializeObject



4
5
6
7
# File 'lib/albacore/support/supportlinux.rb', line 4

def initialize
  @is_linux = RUBY_PLATFORM.include? 'linux'
  super()
end

#to_OS_format(input) ⇒ Object



17
18
19
20
# File 'lib/albacore/support/supportlinux.rb', line 17

def to_OS_format(input)
  formatted_input = @is_linux ? input : input.gsub("/", "\\")
  formatted_input
end