class Object
Constants
- CompilerFileName
- ConfigPropertiesFileName
- DirFilePath
- HTTPServerPort
HTTP 服务端口号
- LocalIP
获取本机 IP
- PropertiesFileName
路径
- PropertiesFilePath
- RubyGemsLatestVersionURL
- TemplatePath
- TemplatesPath
- VVBuildLogFilePath
- VVBuildPath
- VVCompilerDownloadURL
VV 编译器下载地址 URL
- VVCompilerFilePath
- VVConfigPropertiesDownloadURL
VV 默认的 config.properties 下载地址 URL
- VVConfigPropertiesFilePath
Public Instance Methods
check_new_version()
click to toggle source
# File lib/vvtool/version_checker.rb, line 19 def check_new_version get_remote_version { |remoteVersion| currentVersion = VVTool::VERSION if currentVersion < remoteVersion puts "VVTool 发现新版本 v#{remoteVersion}(当前 v#{currentVersion}),可以通过命令 `sudo gem install vvtool` 升级" end } end
get_first_public_ipv4()
click to toggle source
# File lib/vvtool/utils.rb, line 3 def get_first_public_ipv4 ip_info = Socket.ip_address_list.detect{|intf| intf.ipv4? and !intf.ipv4_loopback? and !intf.ipv4_multicast? and !intf.ipv4_private?} ip_info.ip_address unless ip_info.nil? end
get_remote_version() { |response| ... }
click to toggle source
# File lib/vvtool/version_checker.rb, line 9 def get_remote_version begin Thread.new { response = Net::HTTP.get(URI(RubyGemsLatestVersionURL)) response = JSON.parse(response) yield response['version'] } end end