Module: Configuration::AspNetCompiler

Includes:
Albacore::Configuration, NetVersion
Included in:
AspNetCompiler
Defined in:
lib/albacore/config/aspnetcompilerconfig.rb

Instance Attribute Summary

Attributes included from Logging

#current_log_device, #logger

Class Method Summary collapse

Instance Method Summary collapse

Methods included from NetVersion

#get_net_version, #win_dir

Methods included from Failure

#fail_with_message, #initialize

Methods included from Logging

#create_logger, #initialize, #log_device=, #log_level, #log_level=

Class Method Details

.aspnetcompilerconfigObject



10
11
12
# File 'lib/albacore/config/aspnetcompilerconfig.rb', line 10

def self.aspnetcompilerconfig
  @config ||= OpenStruct.new.extend(OpenStructToHash).extend(AspNetCompiler)
end

.included(mod) ⇒ Object



20
21
22
# File 'lib/albacore/config/aspnetcompilerconfig.rb', line 20

def self.included(mod)
  self.aspnetcompilerconfig.use :net40
end

Instance Method Details

#aspnetcompiler {|config| ... } ⇒ Object

Yields:

  • (config)


14
15
16
17
18
# File 'lib/albacore/config/aspnetcompilerconfig.rb', line 14

def aspnetcompiler
  config ||= AspNetCompiler.aspnetcompilerconfig
  yield(config) if block_given?
  config
end

#use(netversion) ⇒ Object



24
25
26
27
# File 'lib/albacore/config/aspnetcompilerconfig.rb', line 24

def use(netversion)
  netversion = :net20 if netversion == :net35 # since .net 3.5 doesn't have aspnet_compiler use .net 2.0
  self.command = File.join(get_net_version(netversion), "aspnet_compiler.exe")
end