nbuild 0.0.1 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/lib/nbuild/cmd.rb CHANGED
@@ -23,8 +23,12 @@ module Nbuild
23
23
  def execute_internal
24
24
  puts "running command \"#{command}\""
25
25
  system "#{command} 2>&1"
26
- puts "exit status was #{$?}"
27
- raise "Process failed" unless $?.success?
26
+ puts "exit status was #{exit_status}"
27
+ raise "Process failed" unless exit_status.success?
28
+ end
29
+
30
+ def exit_status
31
+ $?
28
32
  end
29
33
  end
30
34
 
@@ -3,7 +3,7 @@ require 'nbuild/cmd'
3
3
  module Nbuild
4
4
  class InstallUtilCmd < Cmd
5
5
  def initialize params={}
6
- @path = 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727'
6
+ @path = ENV['INSTALL_UTIL_HOME'] || 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727'
7
7
  @params = params
8
8
  end
9
9
 
@@ -3,8 +3,11 @@ require 'nbuild/cmd'
3
3
  module Nbuild
4
4
  class MSBuildCmd < Cmd
5
5
  def initialize params={}
6
- @path = 'C:\WINDOWS\Microsoft.NET\Framework\v3.5'
7
6
  @params = params
7
+ version = params.delete(:framework_version)
8
+ version ||= '3.5'
9
+ path = ENV['MS_NET_FRAMEWORK_HOME'] || 'C:\WINDOWS\Microsoft.NET\Framework'
10
+ @path = "#{path}\\v#{version}"
8
11
  end
9
12
 
10
13
  def command
@@ -21,4 +24,12 @@ module Nbuild
21
24
  def msbuild_command params={}
22
25
  MSBuildCmd.new(params).execute
23
26
  end
27
+
28
+ def msbuild2_command params={}
29
+ msbuild_command params.merge(:framework_version => '2.0.50727')
30
+ end
31
+
32
+ def msbuild35_command params
33
+ msbuild_command params.merge(:framework_version => '3.5')
34
+ end
24
35
  end
@@ -3,7 +3,7 @@ require 'nbuild/cmd'
3
3
  module Nbuild
4
4
  class NCacheCmd < Cmd
5
5
  def initialize params={}
6
- @path = 'C:\Program Files\NCache\bin\tools'
6
+ @path = ENV['NCACHE_HOME'] || 'C:\Program Files\NCache\bin\tools'
7
7
  @params = params
8
8
  end
9
9
 
@@ -3,7 +3,7 @@ require 'nbuild/cmd'
3
3
  module Nbuild
4
4
  class NCoverCmd < Cmd
5
5
  def initialize params={}
6
- @path = 'C:\Program Files\NCover'
6
+ @path = ENV['NCOVER_HOME'] || 'C:\Program Files\NCover'
7
7
  @params = params
8
8
  end
9
9
 
data/lib/nbuild/tf.rb CHANGED
@@ -3,7 +3,7 @@ require 'ostruct'
3
3
  module Nbuild
4
4
  class TFS
5
5
  def initialize
6
- @dir = 'C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE'
6
+ @dir = ENV['TF_HOME'] || 'C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE'
7
7
  end
8
8
 
9
9
  def repository_info
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nbuild
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Ryall
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-23 00:00:00 +11:00
12
+ date: 2010-01-23 00:00:00 +11:00
13
13
  default_executable:
14
14
  dependencies: []
15
15