iron_hammer 0.3.7 → 0.3.8
Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile
CHANGED
data/lib/iron_hammer/hammer.rb
CHANGED
@@ -7,7 +7,7 @@ module IronHammer
|
|
7
7
|
class Hammer
|
8
8
|
attr_accessor :dot_net_environment
|
9
9
|
attr_accessor :configuration
|
10
|
-
|
10
|
+
|
11
11
|
def initialize params={}
|
12
12
|
@configuration = params[:configuration] || IronHammer::Defaults::CONFIGURATION_RUN
|
13
13
|
@dot_net_environment = IronHammer::Utils::DotNetEnvironment.new params.merge(
|
@@ -19,22 +19,24 @@ module IronHammer
|
|
19
19
|
buffer << "/detail:#{detail} "
|
20
20
|
end
|
21
21
|
end
|
22
|
-
|
22
|
+
|
23
23
|
def build solution
|
24
|
-
msbuild = @dot_net_environment.msbuild
|
24
|
+
msbuild = @dot_net_environment.msbuild
|
25
25
|
configuration = @configuration
|
26
26
|
solution = solution.solution
|
27
27
|
"#{msbuild} /p:Configuration=#{configuration} #{solution} /t:Rebuild"
|
28
28
|
end
|
29
|
-
|
29
|
+
|
30
30
|
def test *projects
|
31
31
|
return if projects.nil? || projects.empty?
|
32
|
+
parent_dir = File.join(projects.first.path || '.', '..')
|
33
|
+
runconfig = '/runconfig:LocalTestRun.testrunconfig ' if File.exists?(File.join(parent_dir, 'LocalTestRun.testrunconfig'))
|
32
34
|
containers = projects.collect{|project| "/testcontainer:#{project.container @configuration}"}
|
33
35
|
results = projects.first.results_file
|
34
36
|
mstest = @dot_net_environment.mstest
|
35
|
-
"#{mstest} #{containers.join ' '} /resultsfile:#{results} #{details}"
|
37
|
+
"#{mstest} #{runconfig || ''}#{containers.join ' '} /resultsfile:#{results} #{details}"
|
36
38
|
end
|
37
|
-
|
39
|
+
|
38
40
|
end unless defined? Hammer
|
39
41
|
end
|
40
42
|
|
@@ -5,13 +5,13 @@ module IronHammer
|
|
5
5
|
class SolutionFile
|
6
6
|
attr_accessor :projects
|
7
7
|
|
8
|
-
NAME_PATH_CSPROJ = /.* = \"(.+)\"\, \"(.+)\\(
|
8
|
+
NAME_PATH_CSPROJ = /.* = \"(.+)\"\, \"(.+)\\(.+\.csproj)\", .*/
|
9
9
|
STOP_TRIGGER = /^Global/
|
10
10
|
|
11
11
|
def initialize projects=[]
|
12
12
|
@projects = projects
|
13
13
|
end
|
14
|
-
|
14
|
+
|
15
15
|
def self.parse lines
|
16
16
|
projects = []
|
17
17
|
lines.each do |line|
|
@@ -22,10 +22,11 @@ module IronHammer
|
|
22
22
|
end
|
23
23
|
SolutionFile.new projects
|
24
24
|
end
|
25
|
-
|
25
|
+
|
26
26
|
def self.parse_file *path
|
27
|
-
self.parse IronHammer::Utils::FileSystem::read_lines(*path)
|
27
|
+
self.parse IronHammer::Utils::FileSystem::read_lines(*path)
|
28
28
|
end
|
29
29
|
end unless defined? SolutionFile
|
30
30
|
end
|
31
31
|
end
|
32
|
+
|
data/lib/iron_hammer/tasks.rb
CHANGED
@@ -17,7 +17,11 @@ module IronHammer
|
|
17
17
|
xml.tag! 'ivy-module', :version => '2.0' do
|
18
18
|
xml.info :organisation => @organisation, :module => @project.name
|
19
19
|
xml.publications do
|
20
|
-
|
20
|
+
@project.binaries.each do |binary|
|
21
|
+
extension = binary.actual_name.split(/\./).last
|
22
|
+
name = binary.actual_name.gsub(/\.[^\.]+$/, '')
|
23
|
+
xml.artifact :name => name, :type => extension
|
24
|
+
end
|
21
25
|
end if @project.is_a? DllProject
|
22
26
|
|
23
27
|
xml.dependencies do
|
@@ -40,7 +44,7 @@ module IronHammer
|
|
40
44
|
-ivy #{ivy_file}
|
41
45
|
-settings #{@ivy_settings}
|
42
46
|
-publish default
|
43
|
-
-publishpattern
|
47
|
+
-publishpattern #{@project.path_to_binaries}/[artifact].[ext]
|
44
48
|
-revision 1.0.0.0
|
45
49
|
-overwrite true".gsub(/\s+/, ' ')
|
46
50
|
end
|
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: 0.3.
|
4
|
+
version: 0.3.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mozair Alves do Carmo Junior
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-01
|
12
|
+
date: 2010-02-01 00:00:00 -02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|