albacore 0.2.0.preview1 → 0.2.0.preview2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (167) hide show
  1. data/README.markdown +7 -2
  2. data/VERSION +1 -1
  3. data/install_dependencies.rb +1 -1
  4. data/lib/albacore.rb +6 -17
  5. data/lib/albacore/albacoretask.rb +43 -0
  6. data/lib/albacore/assemblyinfo.rb +10 -7
  7. data/lib/albacore/config/assemblyinfoconfig.rb +4 -12
  8. data/lib/albacore/config/config.rb +16 -8
  9. data/lib/albacore/config/cscconfig.rb +2 -7
  10. data/lib/albacore/config/docuconfig.rb +3 -5
  11. data/lib/albacore/config/execconfig.rb +4 -11
  12. data/lib/albacore/config/msbuildconfig.rb +2 -5
  13. data/lib/albacore/config/mspectestrunnerconfig.rb +15 -0
  14. data/lib/albacore/config/nantconfig.rb +4 -11
  15. data/lib/albacore/config/ncoverconsoleconfig.rb +4 -11
  16. data/lib/albacore/config/ncoverreportconfig.rb +4 -11
  17. data/lib/albacore/config/ndependconfig.rb +4 -11
  18. data/lib/albacore/config/netversion.rb +0 -2
  19. data/lib/albacore/config/nunittestrunnerconfig.rb +14 -0
  20. data/lib/albacore/config/specflowreportconfig.rb +2 -5
  21. data/lib/albacore/config/sqlcmdconfig.rb +4 -11
  22. data/lib/albacore/config/unzipconfig.rb +4 -11
  23. data/lib/albacore/config/xbuildconfig.rb +4 -11
  24. data/lib/albacore/config/xunittestrunnerconfig.rb +15 -0
  25. data/lib/albacore/config/zipdirectoryconfig.rb +15 -0
  26. data/lib/albacore/csc.rb +31 -5
  27. data/lib/albacore/docu.rb +2 -3
  28. data/lib/albacore/exec.rb +3 -5
  29. data/lib/albacore/msbuild.rb +3 -3
  30. data/lib/albacore/mspectestrunner.rb +5 -6
  31. data/lib/albacore/nant.rb +4 -6
  32. data/lib/albacore/ncoverconsole.rb +4 -6
  33. data/lib/albacore/ncoverreport.rb +4 -6
  34. data/lib/albacore/ncoverreports/codecoveragebase.rb +2 -2
  35. data/lib/albacore/ncoverreports/cyclomaticcomplexity.rb +2 -2
  36. data/lib/albacore/ncoverreports/fullcoveragereport.rb +0 -8
  37. data/lib/albacore/ncoverreports/reportfilterbase.rb +2 -2
  38. data/lib/albacore/ncoverreports/summaryreport.rb +0 -4
  39. data/lib/albacore/ndepend.rb +4 -6
  40. data/lib/albacore/nunittestrunner.rb +4 -5
  41. data/lib/albacore/specflowreport.rb +2 -2
  42. data/lib/albacore/sqlcmd.rb +33 -11
  43. data/lib/albacore/support/createtask.rb +30 -0
  44. data/lib/albacore/support/runcommand.rb +21 -30
  45. data/lib/albacore/support/updateattributes.rb +13 -0
  46. data/lib/albacore/unzip.rb +3 -5
  47. data/lib/albacore/xbuild.rb +5 -6
  48. data/lib/albacore/xunittestrunner.rb +4 -5
  49. data/lib/albacore/zipdirectory.rb +5 -6
  50. data/rakefile.rb +7 -8
  51. data/spec/albacoremodel_spec.rb +20 -2
  52. data/spec/assemblyinfo_spec.rb +27 -14
  53. data/spec/config_spec.rb +17 -2
  54. data/spec/createtask_spec.rb +51 -28
  55. data/spec/csc_spec.rb +135 -3
  56. data/spec/docu_spec.rb +11 -14
  57. data/spec/exec_spec.rb +1 -1
  58. data/spec/msbuild_spec.rb +9 -9
  59. data/spec/nant_spec.rb +4 -4
  60. data/spec/ncoverconsole_spec.rb +13 -13
  61. data/spec/ncoverreport_spec.rb +17 -17
  62. data/spec/ndepend_spec.rb +6 -6
  63. data/spec/runcommand_spec.rb +22 -3
  64. data/spec/sqlcmd_spec.rb +154 -12
  65. data/spec/support/assemblyinfotester.rb +1 -1
  66. data/spec/support/spec_helper.rb +2 -2
  67. data/spec/yamlconfig_spec.rb +3 -3
  68. data/spec/zip_spec.rb +4 -4
  69. metadata +32 -119
  70. data/lib/albacore/albacoremodel.rb +0 -28
  71. data/lib/albacore/config/mspecconfig.rb +0 -21
  72. data/lib/albacore/config/nunitconfig.rb +0 -20
  73. data/lib/albacore/config/xunitconfig.rb +0 -22
  74. data/lib/albacore/config/zipconfig.rb +0 -22
  75. data/lib/rake/assemblyinfotask.rb +0 -3
  76. data/lib/rake/csctask.rb +0 -3
  77. data/lib/rake/docutask.rb +0 -3
  78. data/lib/rake/exectask.rb +0 -3
  79. data/lib/rake/msbuildtask.rb +0 -3
  80. data/lib/rake/mspectask.rb +0 -3
  81. data/lib/rake/nanttask.rb +0 -3
  82. data/lib/rake/ncoverconsoletask.rb +0 -3
  83. data/lib/rake/ncoverreporttask.rb +0 -3
  84. data/lib/rake/ndependtask.rb +0 -3
  85. data/lib/rake/nunittask.rb +0 -3
  86. data/lib/rake/specflowreporttask.rb +0 -3
  87. data/lib/rake/sqlcmdtask.rb +0 -3
  88. data/lib/rake/support/albacoretask.rb +0 -30
  89. data/lib/rake/support/createtask.rb +0 -21
  90. data/lib/rake/unziptask.rb +0 -3
  91. data/lib/rake/xbuildtask.rb +0 -7
  92. data/lib/rake/xunittask.rb +0 -3
  93. data/lib/rake/ziptask.rb +0 -3
  94. data/spec/assemblyinfotask_spec.rb +0 -32
  95. data/spec/csctask_spec.rb +0 -1
  96. data/spec/docutask_spec.rb +0 -52
  97. data/spec/exectask_spec.rb +0 -46
  98. data/spec/msbuildtask_spec.rb +0 -46
  99. data/spec/mspectask_spec.rb +0 -46
  100. data/spec/nanttask_spec.rb +0 -46
  101. data/spec/ncoverconsoletask_spec.rb +0 -46
  102. data/spec/ncoverreporttask_spec.rb +0 -46
  103. data/spec/ndependtask_spec.rb +0 -46
  104. data/spec/nunittask_spec.rb +0 -46
  105. data/spec/spec.opts +0 -1
  106. data/spec/specflowreporttask_spec.rb +0 -48
  107. data/spec/sqlcmdtask_spec.rb +0 -32
  108. data/spec/support/AssemblyInfo/assemblyinfo.yml +0 -2
  109. data/spec/support/CodeCoverage/mspec/assemblies/Machine.Specifications.NUnit.dll +0 -0
  110. data/spec/support/CodeCoverage/mspec/assemblies/Machine.Specifications.dll +0 -0
  111. data/spec/support/CodeCoverage/mspec/assemblies/TestSolution.MSpecTests.dll +0 -0
  112. data/spec/support/CodeCoverage/mspec/assemblies/TestSolution.dll +0 -0
  113. data/spec/support/CodeCoverage/mspec/assemblies/nunit.framework.dll +0 -0
  114. data/spec/support/CodeCoverage/nunit/assemblies/TestSolution.Tests.dll +0 -0
  115. data/spec/support/CodeCoverage/nunit/assemblies/TestSolution.dll +0 -0
  116. data/spec/support/CodeCoverage/nunit/assemblies/nunit.framework.dll +0 -0
  117. data/spec/support/CodeCoverage/nunit/assemblies/with spaces/TestSolution.Tests.dll +0 -0
  118. data/spec/support/CodeCoverage/nunit/assemblies/with spaces/TestSolution.dll +0 -0
  119. data/spec/support/CodeCoverage/nunit/assemblies/with spaces/nunit.framework.dll +0 -0
  120. data/spec/support/CodeCoverage/nunit/failing_assemblies/TestSolution.FailingTests.dll +0 -0
  121. data/spec/support/CodeCoverage/nunit/failing_assemblies/nunit.framework.dll +0 -0
  122. data/spec/support/CodeCoverage/report/coverage.xml +0 -4578
  123. data/spec/support/CodeCoverage/xunit/assemblies/TestSolution.XUnitTests.dll +0 -0
  124. data/spec/support/CodeCoverage/xunit/assemblies/TestSolution.dll +0 -0
  125. data/spec/support/CodeCoverage/xunit/assemblies/xunit.dll +0 -0
  126. data/spec/support/CodeCoverage/xunit/assemblies/xunit.xml +0 -2306
  127. data/spec/support/SpecFlow/TechTalk.SpecFlow.dll +0 -0
  128. data/spec/support/SpecFlow/TestSolution.SpecFlow.dll +0 -0
  129. data/spec/support/SpecFlow/TestSolution.SpecFlow.pdb +0 -0
  130. data/spec/support/SpecFlow/TestSolution.dll +0 -0
  131. data/spec/support/SpecFlow/TestSolution.pdb +0 -0
  132. data/spec/support/SpecFlow/nunit.framework.dll +0 -0
  133. data/spec/support/TestSolution/NDependProject.xml +0 -315
  134. data/spec/support/TestSolution/TestSolution.5.0.ReSharper.user +0 -27
  135. data/spec/support/TestSolution/TestSolution.FailingTests/FailingTestFixture.cs +0 -19
  136. data/spec/support/TestSolution/TestSolution.FailingTests/Properties/AssemblyInfo.cs +0 -36
  137. data/spec/support/TestSolution/TestSolution.FailingTests/TestSolution.FailingTests.csproj +0 -63
  138. data/spec/support/TestSolution/TestSolution.MSpecTests/Properties/AssemblyInfo.cs +0 -36
  139. data/spec/support/TestSolution/TestSolution.MSpecTests/SomeSpecTest.cs +0 -18
  140. data/spec/support/TestSolution/TestSolution.MSpecTests/TestSolution.MSpecTests.csproj +0 -77
  141. data/spec/support/TestSolution/TestSolution.SpecFlow/OneFeature.feature +0 -8
  142. data/spec/support/TestSolution/TestSolution.SpecFlow/OneFeature.feature.cs +0 -73
  143. data/spec/support/TestSolution/TestSolution.SpecFlow/Properties/AssemblyInfo.cs +0 -36
  144. data/spec/support/TestSolution/TestSolution.SpecFlow/StepDefinition.cs +0 -30
  145. data/spec/support/TestSolution/TestSolution.SpecFlow/TestSolution.SpecFlow.csproj +0 -84
  146. data/spec/support/TestSolution/TestSolution.Tests/Properties/AssemblyInfo.cs +0 -36
  147. data/spec/support/TestSolution/TestSolution.Tests/SomeTestFixture.cs +0 -23
  148. data/spec/support/TestSolution/TestSolution.Tests/TestSolution.Tests.csproj +0 -69
  149. data/spec/support/TestSolution/TestSolution.XUnitTests/Class1.cs +0 -19
  150. data/spec/support/TestSolution/TestSolution.XUnitTests/FailingTestFixture.cs +0 -14
  151. data/spec/support/TestSolution/TestSolution.XUnitTests/Properties/AssemblyInfo.cs +0 -36
  152. data/spec/support/TestSolution/TestSolution.XUnitTests/TestSolution.XUnitTests.csproj +0 -70
  153. data/spec/support/TestSolution/TestSolution.build +0 -25
  154. data/spec/support/TestSolution/TestSolution.sln +0 -50
  155. data/spec/support/TestSolution/TestSolution/Class1.cs +0 -17
  156. data/spec/support/TestSolution/TestSolution/Properties/AssemblyInfo.cs +0 -36
  157. data/spec/support/TestSolution/TestSolution/TestSolution.csproj +0 -59
  158. data/spec/support/csc/File1.cs +0 -9
  159. data/spec/support/csc/File2.cs +0 -9
  160. data/spec/support/csc/output/ignorethis.txt +0 -1
  161. data/spec/support/test.yml +0 -4
  162. data/spec/support/yamlconfig/msbuild.yml +0 -5
  163. data/spec/support/yamlconfig/yaml_autoconfig_test.yml +0 -1
  164. data/spec/support/zip/files/subfolder/sub file.txt +0 -1
  165. data/spec/support/zip/files/testfile.txt +0 -1
  166. data/spec/xunittask_spec.rb +0 -32
  167. data/spec/ziptask_spec.rb +0 -33
@@ -81,13 +81,18 @@ Many thanks for contributions to albacore are due (in alphabetical order):
81
81
 
82
82
  * [Andreone](http://github.com/Andreone): Significant Wiki contributions, questions and contributions on the google group
83
83
  * [Ben Hall](http://github.com/benhall): Primary contributor. SSH, SFTP, ZipDirectory, Rename, YAML auto config, Wiki pages, and many other great additions
84
+ * [Brett Veenstra](http://github.com/brettveenstra): SQLCmd options (truted connection, batch abort), etc
84
85
  * [Brian Donahue](http://github.com/briandonahue): Inspiration and initial code for the ExpandTemplates task
85
- * [Hibri Marzook](http://github.com/hibri): the PLink and NDepend tasks
86
- * [James Gregory](http://github.com/jagregory): the Docu task
86
+ * [Tobias Grimm](http://github.com/e-tobi): AssemblyInfo custom_data, working directory code refactoring, relative project paths for executables
87
+ * [Hernan Garcia](http://github.com/hgarcia/): Specflow Report task
88
+ * [Hibri Marzook](http://github.com/hibri): PLink (deprecated) and NDepend tasks
89
+ * [James Gregory](http://github.com/jagregory): Docu task, zip task contributions
87
90
  * [Kevin Colyar](http://github.com/kevincolyar): Testing and updating of MSBuild to work with Cygwin
91
+ * [Louis Salin](http://github.com/louissalin): Support for *nix path separators in CSC task
88
92
  * [Mark Wilkins](http://github.com/markwilk): VB.NET Language Generator For The AssemblyInfo Task
89
93
  * [Mike Nichols](http://github.com/mnichols): XUnit contributions, bug reports, etc
90
94
  * [Nils Jonsson](http://github.com/njonsson): AssemblyInfo corrections, rakefile corrections
91
95
  * [Sean Biefeld](http://github.com/seanbiefeld): MSpecTestRunner for NCoverConsole
92
96
  * [Steven Harman](http://github.com/stevenharman): Primary contributor. Nant task, issue tickets, disucssions, and much much more.
97
+ * [Steven Johnson](http://github.com/2020steve): Expand Templates (deprecated task) supplimental data, etc
93
98
  * [Panda Wood](http://github.com/pandawood): NCover Console options and wiki edits
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0.preview1
1
+ 0.2.0.preview2
@@ -3,7 +3,7 @@ require 'rubygems/gem_runner'
3
3
  require 'rubygems/exceptions'
4
4
 
5
5
  #http://gist.github.com/236148
6
- required_version = Gem::Requirement.new "> 1.8.7"
6
+ required_version = Gem::Requirement.new "> 1.8.6"
7
7
 
8
8
  unless required_version.satisfied_by? Gem.ruby_version then
9
9
  abort "Expected Ruby Version #{required_version}, was #{Gem.ruby_version}"
@@ -1,19 +1,8 @@
1
- $: << File.expand_path(File.dirname(__FILE__))
2
- $: << File.expand_path(File.join(File.dirname(__FILE__), "albacore"))
3
- $: << File.expand_path(File.join(File.dirname(__FILE__), "albacore", 'support'))
4
- $: << File.expand_path(File.join(File.dirname(__FILE__), "albacore", 'config'))
5
- $: << File.expand_path(File.join(File.dirname(__FILE__), "rake"))
6
-
7
- require 'logging'
1
+ albacore_root = File.expand_path(File.dirname(__FILE__))
2
+ $: << albacore_root
3
+ $: << File.join(albacore_root, "albacore")
4
+ $: << File.join(albacore_root, "albacore", 'support')
5
+ $: << File.join(albacore_root, "albacore", 'config')
8
6
 
9
7
  runtime_is_ironruby = (!defined?(IRONRUBY_VERSION).nil?)
10
-
11
- Dir.glob(File.join(File.expand_path(File.dirname(__FILE__)), 'albacore/*.rb')).reject{ |f|
12
- f if runtime_is_ironruby && (f.include?("ssh") || f.include?("sftp"))
13
- }.each {|f| require f }
14
-
15
- Dir.glob(File.join(File.expand_path(File.dirname(__FILE__)), 'rake/support/*.rb')).each {|f| require f }
16
-
17
- Dir.glob(File.join(File.expand_path(File.dirname(__FILE__)), 'rake/*.rb')).reject{ |f|
18
- f if runtime_is_ironruby && (f.include?("ssh") || f.include?("sftp"))
19
- }.each {|f| require f }
8
+ Dir.glob(File.join(albacore_root, 'albacore/*.rb')).each {|f| require f }
@@ -0,0 +1,43 @@
1
+ require 'albacore/support/attrmethods'
2
+ require 'albacore/support/failure'
3
+ require 'albacore/support/logging'
4
+ require 'albacore/support/yamlconfig'
5
+ require 'albacore/support/runcommand'
6
+ require 'albacore/support/updateattributes'
7
+ require 'albacore/support/createtask'
8
+ require 'albacore/config/config'
9
+
10
+ module AlbacoreTask
11
+ include Failure
12
+ include Logging
13
+ include YAMLConfig
14
+ include UpdateAttributes
15
+
16
+ def self.included(mod)
17
+ mod.extend AttrMethods
18
+ self.create_rake_task mod
19
+ self.include_config mod, caller[0]
20
+ end
21
+
22
+ def self.include_config(mod, calledby)
23
+ dir = File.dirname(calledby)
24
+ configfile = File.join(dir, "config", "#{mod.name.downcase}config.rb")
25
+ require configfile if File.exist?(configfile)
26
+ end
27
+
28
+ def self.create_rake_task(mod)
29
+ if mod.class == Class
30
+ tasknames = Array.new
31
+
32
+ if mod.const_defined?("TaskName")
33
+ tasknames << eval("#{mod}::TaskName")
34
+ else
35
+ tasknames << mod.name.downcase
36
+ end
37
+
38
+ tasknames.flatten.each do |taskname|
39
+ Albacore.create_task taskname, mod
40
+ end
41
+ end
42
+ end
43
+ end
@@ -1,26 +1,25 @@
1
- require 'albacore/albacoremodel'
1
+ require 'albacore/albacoretask'
2
2
  require 'albacore/assemblyinfolanguages/csharpengine'
3
3
  require 'albacore/assemblyinfolanguages/vbnetengine'
4
- require 'albacore/config/assemblyinfoconfig'
5
4
 
6
5
  class AssemblyInfo
7
- include AlbacoreModel
8
- include Configuration::AssemblyInfo
6
+ include AlbacoreTask
9
7
 
10
8
  attr_accessor :version, :title, :description, :output_file, :custom_attributes
11
9
  attr_accessor :copyright, :com_visible, :com_guid, :company_name, :product_name
12
- attr_accessor :file_version, :trademark, :lang_engine
10
+ attr_accessor :file_version, :trademark, :lang_engine, :custom_data
13
11
 
14
12
  attr_array :namespaces
15
13
  attr_hash :custom_attributes
14
+ attr_array :custom_data
16
15
 
17
16
  def initialize
18
17
  @namespaces = []
19
18
  super()
20
- update_attributes assemblyinfo.to_hash
19
+ update_attributes Albacore.configuration.assemblyinfo.to_hash
21
20
  end
22
21
 
23
- def write
22
+ def execute
24
23
  @lang_engine = CSharpEngine.new unless check_lang_engine
25
24
  write_assemblyinfo @output_file
26
25
  end
@@ -71,6 +70,10 @@ class AssemblyInfo
71
70
  asm_data << "\n"
72
71
  end
73
72
 
73
+ if @custom_data != nil
74
+ @custom_data.each{|data| asm_data << data + "\n"}
75
+ end
76
+
74
77
  asm_data
75
78
  end
76
79
 
@@ -3,19 +3,11 @@ require 'albacore/support/openstruct'
3
3
 
4
4
  module Configuration
5
5
  module AssemblyInfo
6
- @asmconfig = OpenStruct.new.extend(OpenStructToHash)
7
- def self.asmconfig
8
- @asmconfig
9
- end
10
-
6
+ include Albacore::Configuration
11
7
  def assemblyinfo
12
- config = AssemblyInfo.asmconfig
13
- yield(config) if block_given?
14
- config
8
+ @asmconfig ||= OpenStruct.new.extend(OpenStructToHash)
9
+ yield(@asmconfig) if block_given?
10
+ @asmconfig
15
11
  end
16
12
  end
17
13
  end
18
-
19
- class Albacore::Configuration
20
- include Configuration::AssemblyInfo
21
- end
@@ -1,14 +1,22 @@
1
1
  module Albacore
2
+ module Configuration
3
+ def self.included(base)
4
+ Albacore.configuration.extend(base) if (base.class == Module)
5
+ end
6
+ end
7
+
8
+ class ConfigData
9
+ attr_accessor :yaml_config_folder, :log_level
10
+ end
11
+
2
12
  class << self
3
13
  def configure
4
- @configuration ||= Configuration.new
5
- yield(@configuration) if block_given?
6
- @configuration
14
+ yield(configuration) if block_given?
15
+ configuration
7
16
  end
8
- end
9
17
 
10
- class Configuration
11
- attr_accessor :yaml_config_folder
12
- attr_accessor :log_level
13
- end
18
+ def configuration
19
+ @configuration ||= ConfigData.new
20
+ end
21
+ end
14
22
  end
@@ -5,10 +5,10 @@ require 'albacore/support/openstruct'
5
5
  module Configuration
6
6
  module CSC
7
7
  include Configuration::NetVersion
8
+ include Albacore::Configuration
8
9
 
9
- @config = OpenStruct.new.extend(OpenStructToHash).extend(CSC)
10
10
  def self.cscconfig
11
- @config
11
+ @config ||= OpenStruct.new.extend(OpenStructToHash).extend(CSC)
12
12
  end
13
13
 
14
14
  def csc
@@ -24,10 +24,5 @@ module Configuration
24
24
  def use(netversion)
25
25
  self.command = File.join(get_net_version(netversion), "csc.exe")
26
26
  end
27
-
28
27
  end
29
28
  end
30
-
31
- class Albacore::Configuration
32
- include Configuration::CSC
33
- end
@@ -3,9 +3,10 @@ require 'albacore/support/openstruct'
3
3
 
4
4
  module Configuration
5
5
  module Docu
6
- @docuconfig = OpenStruct.new.extend(OpenStructToHash)
6
+ include Albacore::Configuration
7
+
7
8
  def self.docuconfig
8
- @docuconfig
9
+ @docuconfig ||= OpenStruct.new.extend(OpenStructToHash)
9
10
  end
10
11
 
11
12
  def docu
@@ -20,6 +21,3 @@ module Configuration
20
21
  end
21
22
  end
22
23
 
23
- class Albacore::Configuration
24
- include Configuration::Docu
25
- end
@@ -3,20 +3,13 @@ require 'albacore/support/openstruct'
3
3
 
4
4
  module Configuration
5
5
  module Exec
6
- @execconfig = OpenStruct.new.extend(OpenStructToHash)
7
-
8
- def self.execconfig
9
- @execconfig
10
- end
6
+ include Albacore::Configuration
11
7
 
12
8
  def exec
13
- config = Exec.execconfig
14
- yield(config) if block_given?
15
- config
9
+ @execconfig ||= OpenStruct.new.extend(OpenStructToHash)
10
+ yield(@execconfig) if block_given?
11
+ @execconfig
16
12
  end
17
13
  end
18
14
  end
19
15
 
20
- class Albacore::Configuration
21
- include Configuration::Exec
22
- end
@@ -4,11 +4,11 @@ require 'albacore/support/openstruct'
4
4
 
5
5
  module Configuration
6
6
  module MSBuild
7
+ include Albacore::Configuration
7
8
  include Configuration::NetVersion
8
9
 
9
- @msbuildconfig = OpenStruct.new.extend(OpenStructToHash).extend(MSBuild)
10
10
  def self.msbuildconfig
11
- @msbuildconfig
11
+ @msbuildconfig ||= OpenStruct.new.extend(OpenStructToHash).extend(MSBuild)
12
12
  end
13
13
 
14
14
  def msbuild
@@ -27,6 +27,3 @@ module Configuration
27
27
  end
28
28
  end
29
29
 
30
- class Albacore::Configuration
31
- include Configuration::MSBuild
32
- end
@@ -0,0 +1,15 @@
1
+ require 'ostruct'
2
+ require 'albacore/support/openstruct'
3
+
4
+ module Configuration
5
+ module MSpec
6
+ include Albacore::Configuration
7
+
8
+ def mspec
9
+ @mspecconfig ||= OpenStruct.new.extend(OpenStructToHash)
10
+ yield(@mspecconfig) if block_given?
11
+ @mspecconfig
12
+ end
13
+ end
14
+ end
15
+
@@ -3,20 +3,13 @@ require 'albacore/support/openstruct'
3
3
 
4
4
  module Configuration
5
5
  module NAnt
6
- @nantconfig = OpenStruct.new.extend(OpenStructToHash)
7
-
8
- def self.nantconfig
9
- @nantconfig
10
- end
6
+ include Albacore::Configuration
11
7
 
12
8
  def nant
13
- config = NAnt.nantconfig
14
- yield(config) if block_given?
15
- config
9
+ @nantconfig ||= OpenStruct.new.extend(OpenStructToHash)
10
+ yield(@nantconfig) if block_given?
11
+ @nantconfig
16
12
  end
17
13
  end
18
14
  end
19
15
 
20
- class Albacore::Configuration
21
- include Configuration::NAnt
22
- end
@@ -3,20 +3,13 @@ require 'albacore/support/openstruct'
3
3
 
4
4
  module Configuration
5
5
  module NCoverConsole
6
- @ncoverconsoleconfig = OpenStruct.new.extend(OpenStructToHash)
7
-
8
- def self.ncoverconsoleconfig
9
- @ncoverconsoleconfig
10
- end
6
+ include Albacore::Configuration
11
7
 
12
8
  def ncoverconsole
13
- config = NCoverConsole.ncoverconsoleconfig
14
- yield(config) if block_given?
15
- config
9
+ @ncoverconsoleconfig ||= OpenStruct.new.extend(OpenStructToHash)
10
+ yield(@ncoverconsoleconfig) if block_given?
11
+ @ncoverconsoleconfig
16
12
  end
17
13
  end
18
14
  end
19
15
 
20
- class Albacore::Configuration
21
- include Configuration::NCoverConsole
22
- end
@@ -3,20 +3,13 @@ require 'albacore/support/openstruct'
3
3
 
4
4
  module Configuration
5
5
  module NCoverReport
6
- @ncoverreportconfig = OpenStruct.new.extend(OpenStructToHash)
7
-
8
- def self.ncoverreportconfig
9
- @ncoverreportconfig
10
- end
6
+ include Albacore::Configuration
11
7
 
12
8
  def ncoverreport
13
- config = NCoverReport.ncoverreportconfig
14
- yield(config) if block_given?
15
- config
9
+ @ncoverreportconfig ||= OpenStruct.new.extend(OpenStructToHash)
10
+ yield(@ncoverreportconfig) if block_given?
11
+ @ncoverreportconfig
16
12
  end
17
13
  end
18
14
  end
19
15
 
20
- class Albacore::Configuration
21
- include Configuration::NCoverReport
22
- end
@@ -3,20 +3,13 @@ require 'albacore/support/openstruct'
3
3
 
4
4
  module Configuration
5
5
  module NDepend
6
- @ndependconfig = OpenStruct.new.extend(OpenStructToHash)
7
-
8
- def self.ndependconfig
9
- @ndependconfig
10
- end
6
+ include Albacore::Configuration
11
7
 
12
8
  def ndepend
13
- config = NDepend.ndependconfig
14
- yield(config) if block_given?
15
- config
9
+ @ndependconfig ||= OpenStruct.new.extend(OpenStructToHash)
10
+ yield(@ndependconfig) if block_given?
11
+ @ndependconfig
16
12
  end
17
13
  end
18
14
  end
19
15
 
20
- class Albacore::Configuration
21
- include Configuration::NDepend
22
- end
@@ -1,6 +1,5 @@
1
1
  module Configuration
2
2
  module NetVersion
3
-
4
3
  def win_dir
5
4
  @win_dir ||= ENV['windir'] || ENV['WINDIR'] || "C:/Windows"
6
5
  end
@@ -18,6 +17,5 @@ module Configuration
18
17
  end
19
18
  File.join(win_dir.dup, 'Microsoft.NET', 'Framework', version)
20
19
  end
21
-
22
20
  end
23
21
  end
@@ -0,0 +1,14 @@
1
+ require 'albacore/support/openstruct'
2
+
3
+ module Configuration
4
+ module NUnit
5
+ include Albacore::Configuration
6
+
7
+ def nunit
8
+ @nunitconfig ||= OpenStruct.new.extend(OpenStructToHash).extend(NUnit)
9
+ yield(@nunitconfig) if block_given?
10
+ @nunitconfig
11
+ end
12
+ end
13
+ end
14
+