Sha256: e06f756377a2ebc2ef3f9ebb390cc6b5006fee00e7081a7247465491212eb1cb

Contents?: true

Size: 719 Bytes

Versions: 6

Compression:

Stored size: 719 Bytes

Contents

require 'albacore/project'

module Physique
  module Project
    extend self

    def get_path(name, ext = 'cs')
      return name if is_full_path name
      "src/#{name}/#{name}.#{ext}proj"
    end

    private

    def is_full_path(name)
      name =~ /^.*\.(cs|fs|vb)proj$/i
    end
  end
end

module Albacore
  class Project
    def add_compile_node(folder, name)
      if folder == :root
        add_include :Compile, "#{name}"
      else
        add_include :Compile, "#{folder.to_s}\\#{name}"
      end
    end

    def add_include(type, value)
      @proj_xml_node.xpath("//xmlns:ItemGroup[xmlns:#{type.to_s}]").first << "<#{type.to_s} Include=\"#{value}\" />"
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
physique-0.3.4 lib/physique/project.rb
physique-0.3.3 lib/physique/project.rb
physique-0.3.2 lib/physique/project.rb
physique-0.3.1 lib/physique/project.rb
physique-0.3.0 lib/physique/project.rb
physique-0.2.2 lib/physique/project.rb