Sha256: 286b7e23365cf1f2981c8dad7f1c8a00f1ec8a1f7735602bd563de034bc681e1

Contents?: true

Size: 773 Bytes

Versions: 2

Compression:

Stored size: 773 Bytes

Contents

require "ostruct"
require "albacore/config/netversion"
require "albacore/support/openstruct"

module Configuration
  module AspNetCompiler
    include Configuration::NetVersion
    include Albacore::Configuration

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

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

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

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
albacore-1.0.0 lib/albacore/config/aspnetcompilerconfig.rb
albacore-1.0.0.rc.3 lib/albacore/config/aspnetcompilerconfig.rb