dev 1.0.153 → 1.0.154

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/dev/Paths.rb +28 -8
  2. data/lib/dev/cmd/Setup.rb +6 -0
  3. metadata +1 -1
data/lib/dev/Paths.rb CHANGED
@@ -8,16 +8,36 @@ class Paths < Hash
8
8
  self[:regasm]=f if File.exists?(f) && self[:regasm].nil?
9
9
  }
10
10
 
11
- ["2.6.0.12051","2.5.10.11092"].each{ |v|
12
- Dir.glob("#{Dev::Environment.dev_root}/dep/*/NUnit/#{v}/bin/nunit-console-x86.exe").each{|f|
13
- self[:nunit]=f if File.exists?(f) && self[:nunit].nil?
11
+ initialize_nunit
12
+
13
+ end
14
+
15
+ def initialize_nunit
16
+ nunit=""
17
+ nunit_bin=""
18
+ Dir.glob("#{Rake.original_dir()}/**/*.csproj").each { |f|
19
+ text=File.read(f)
20
+ text.scan(/dep\\([\w\d.\-\\]+)\\bin\\[\w\d.\-\\]+\\nunit.framework.dll/).each{ | nunit_bin_match |
21
+ nunit_bin="#{Dev::Environment::dev_root}/dep/#{nunit_bin_match[0].to_s.gsub('\\','/')}"
14
22
  }
15
- if( !self.has_key?(:nunit) )
16
- Dir.glob("#{Dev::Environment.dev_root}/dep/*/NUnit/#{v}/bin/*/nunit-console-x86.exe").each{|f|
17
- self[:nunit]=f if File.exists?(f) && self[:nunit].nil?
18
- }
19
- end
20
23
  }
24
+
25
+ nunit="#{nunit_bin}/bin/nunit-console-x86.exe" if nunit_bin.length > 3
26
+
27
+ if nunit.length==0
28
+ ["2.6.0.12051","2.5.10.11092"].each{ |v|
29
+ Dir.glob("#{Dev::Environment.dev_root}/dep/*/NUnit/#{v}/bin/nunit-console-x86.exe").each{|f|
30
+ nunit=f if File.exists?(f) && self[:nunit].nil?
31
+ }
32
+ if( !self.has_key?(:nunit) )
33
+ Dir.glob("#{Dev::Environment.dev_root}/dep/*/NUnit/#{v}/bin/*/nunit-console-x86.exe").each{|f|
34
+ self[:nunit]=f if File.exists?(f) && self[:nunit].nil?
35
+ }
36
+ end
37
+ }
38
+ end
39
+
40
+ self[:nunit]=nunit
21
41
  end
22
42
  end # class Paths
23
43
  end # module Dev
data/lib/dev/cmd/Setup.rb CHANGED
@@ -12,6 +12,12 @@ class Setup < Array
12
12
  dep.setup_commands.each{|cmd| self << cmd}
13
13
  end
14
14
  }
15
+
16
+ if(!Dir.glob("*.csproj").nil? && Dir.glob("*.csproj").length > 0)
17
+ self << "{:cmd=>\"<%Dir.mkdir 'bin' unless File.exist?('bin')%>\", :auto=>true}"
18
+ self << "{:cmd=>\"<%Dir.mkdir 'bin/Debug' unless File.exist?('bin/Debug')%>\", :auto=>true}"
19
+ self << "{:cmd=>\"<%Dir.mkdir 'bin/Release' unless File.exist?('bin/Release')%>\", :auto=>true}"
20
+ end
15
21
  end
16
22
 
17
23
  end # class Setup
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dev
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.153
4
+ version: 1.0.154
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: