iron_hammer 1.0.12 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -14,7 +14,7 @@ $hoe = Hoe.spec 'iron_hammer' do
14
14
  self.rubyforge_name = self.name
15
15
  self.extra_deps = [['rubyzip2','>= 2.0.1'],
16
16
  ['builder', '>= 2.1.2']]
17
- self.version = '1.0.12'
17
+ self.version = '1.1.0'
18
18
  end
19
19
 
20
20
  require 'newgem/tasks'
@@ -21,11 +21,15 @@ module IronHammer
21
21
  end
22
22
  end
23
23
 
24
- def build solution
24
+ def msbuild args
25
25
  msbuild = @dot_net_environment.msbuild
26
+ "#{msbuild} #{args}"
27
+ end
28
+
29
+ def build solution
26
30
  configuration = @configuration
27
31
  solution = solution.solution
28
- "#{msbuild} /p:Configuration=#{configuration} #{solution} /t:Rebuild"
32
+ msbuild "/p:Configuration=#{configuration} #{solution} /t:Rebuild"
29
33
  end
30
34
 
31
35
  def test *projects
@@ -1,3 +1,7 @@
1
+ require 'builder'
2
+
3
+ CLEAN.include('coverage.xml')
4
+ CLEAN.include('build.proj')
1
5
 
2
6
  namespace :iron do
3
7
  namespace :analyze do
@@ -7,6 +11,38 @@ namespace :iron do
7
11
  puts response
8
12
  end
9
13
  end
14
+
15
+ desc 'Generates test coverage report using Emma syntax'
16
+ task :coverage do
17
+ home = ENV['IRON_HAMMER_HOME']
18
+ raise "You must set IRON_HAMMER_HOME env variable" unless home
19
+ file = File.open 'build.proj', 'w'
20
+ xml = Builder::XmlMarkup.new(:indent => 2, :target => file)
21
+ xml.Project :xmlns=>"http://schemas.microsoft.com/developer/msbuild/2003",
22
+ :DefaultTargets=>"CoverageReport" do
23
+ xml.Import :Project=>"$(MSBuildExtensionsPath)\\MSBuildCommunityTasks\\MSBuild.Community.Tasks.Targets"
24
+ xml.PropertyGroup do
25
+ project_dir = File.expand_path('.')
26
+ compilation_dir = Dir[File.join(project_dir,'TestResults', '*')].first
27
+ xml.CompilationDirectory(compilation_dir.gsub('/','\\'))
28
+ xml.HomeDir(home.gsub('/', '\\'))
29
+ xml.ProjectDir(project_dir.gsub('/','\\'))
30
+ xml.InputDir('$(CompilationDirectory)\\In\\$(ComputerName)')
31
+ end
32
+ xml.UsingTask :AssemblyFile => "$(HomeDir)\\CI.MSBuild.Tasks.dll", :TaskName => "CI.MSBuild.Tasks.ConvertVSCoverageToXml"
33
+
34
+ xml.Target :Name=>"CoverageReport" do
35
+ xml.ConvertVSCoverageToXml :CoverageFiles=>"$(InputDir)\\data.coverage",
36
+ :SymbolsDirectory=>"$(CompilationDirectory)\\Out"
37
+
38
+ xml.Xslt :Inputs=>"$(InputDir)\\data.xml",
39
+ :Xsl=>"$(HomeDir)\\mstestcoverage-to-emma.xsl",
40
+ :Output=>"$(ProjectDir)\\coverage.xml"
41
+ end
42
+ end
43
+ file.close
44
+ sh @hammer.msbuild 'build.proj'
45
+ end
10
46
  end
11
47
  end
12
48
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iron_hammer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.12
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mozair Alves do Carmo Junior
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2010-02-24 00:00:00 -03:00
13
+ date: 2010-02-26 00:00:00 -03:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency