Module: GetVersion::PlatformVersions

Included in:
ExecutionContext
Defined in:
lib/getversion/platform_versions.rb

Instance Method Summary collapse

Instance Method Details

#google_appengine_versionObject



9
10
11
12
13
14
15
# File 'lib/getversion/platform_versions.rb', line 9

def google_appengine_version
  has_dir = File.basename(@path) != @path
  realpath = has_dir ? Pathname.new(@path).realpath.to_s : WickedWitch[@path]
  dir = File.dirname realpath
  version_file = File.join dir, 'VERSION'
  YAML::load_file(version_file)['release']
end

#osx_versionObject



17
18
19
# File 'lib/getversion/platform_versions.rb', line 17

def osx_version
  Executable.version('sw_vers') { find_version_in_output '-productVersion' }
end

#windows_versionObject



21
22
23
# File 'lib/getversion/platform_versions.rb', line 21

def windows_version
  Executable.version('ver') { find_version_in_output }
end