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 +1 -1
- data/lib/iron_hammer/hammer.rb +6 -2
- data/lib/iron_hammer/tasks/analyze.rb +36 -0
- metadata +2 -2
data/Rakefile
CHANGED
data/lib/iron_hammer/hammer.rb
CHANGED
@@ -21,11 +21,15 @@ module IronHammer
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
-
def
|
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
|
-
|
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
|
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-
|
13
|
+
date: 2010-02-26 00:00:00 -03:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|