Class: Albacore::Asmver::MultipleFilesConfig
- Inherits:
-
Object
- Object
- Albacore::Asmver::MultipleFilesConfig
- Includes:
- Logging
- Defined in:
- lib/albacore/task_types/asmver.rb
Instance Attribute Summary collapse
-
#files ⇒ Object
writeonly
list of xxproj files to iterate over.
Instance Method Summary collapse
- #attributes(attrs) ⇒ Object
- #configurations ⇒ Object
-
#handle_config(&block) ⇒ Object
block should have signature: Project -> AsmVer::Config -> AsmVer::Config because you can use this block to change the configuration generated.
-
#initialize ⇒ MultipleFilesConfig
constructor
A new instance of MultipleFilesConfig.
- #using(ns) ⇒ Object
Methods included from Logging
#debug, #err, #error, #fatal, #info, #puts, #trace, #warn
Constructor Details
#initialize ⇒ MultipleFilesConfig
Returns a new instance of MultipleFilesConfig.
21 22 23 |
# File 'lib/albacore/task_types/asmver.rb', line 21 def initialize @usings = [] end |
Instance Attribute Details
#files=(value) ⇒ Object (writeonly)
list of xxproj files to iterate over
19 20 21 |
# File 'lib/albacore/task_types/asmver.rb', line 19 def files=(value) @files = value end |
Instance Method Details
#attributes(attrs) ⇒ Object
25 26 27 |
# File 'lib/albacore/task_types/asmver.rb', line 25 def attributes attrs @attributes = attrs end |
#configurations ⇒ Object
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/albacore/task_types/asmver.rb', line 40 def configurations @files ||= FileList['**/*.{fsproj,csproj,vbproj}'] debug { "generating config for files: #{@files}" } @files.map { |proj| proj =~ /(\w\w)proj$/ [ $1, Project.new(proj) ] }.map { |ext, proj| attrs = @attributes.clone attrs[:assembly_title] = proj.name file_path = "#{proj.proj_path_base}/AssemblyVersionInfo.#{ext}" cfg = Albacore::Asmver::Config.new file_path, proj.asmname, attrs cfg = @handle_config.call(proj, cfg) if @handle_config cfg.usings = @usings.clone cfg } end |
#handle_config(&block) ⇒ Object
block should have signature: Project -> AsmVer::Config -> AsmVer::Config because you can use this block to change the configuration generated
36 37 38 |
# File 'lib/albacore/task_types/asmver.rb', line 36 def handle_config &block @handle_config = block end |
#using(ns) ⇒ Object
29 30 31 32 |
# File 'lib/albacore/task_types/asmver.rb', line 29 def using ns debug { "adding namespace #{ns} [Asmver::MultipleFilesConfig using]" } @usings << ns end |