lib/environment.rb in dev-2.0.138 vs lib/environment.rb in dev-2.0.139
- old
+ new
@@ -37,7 +37,29 @@
}
dir=home
return dir
end
-
+ def self.check
+ #["ruby","svn","git","msbuild","candle","light"].each{|cmd|
+ puts 'checking commands...'
+ missing_command=false
+ ['ruby --version','svn --version --quiet','git --version','msbuild /version','nuget','candle','light','gem --version'].each{|cmd|
+ command=Command.new(cmd)
+ command[:quiet]=true
+ command[:ignore_failure]=true
+ command.execute
+ if(command[:exit_code] == 0)
+ puts "#{cmd.split(' ')[0]} #{get_version(command[:output])}"
+ else
+ puts "#{cmd.split(' ')[0]} not found."
+ missing_command=true
+ end
+
+ }
+ puts "missing commands may be resolved by making sure that are installed and in PATH environment variable." if missing_command
+ end
+
+ def self.get_version text
+ text.match(/(\d+\.\d+\.[\d\w]+)/)
+ end
end
\ No newline at end of file