Class: Gloo::App::Info

Inherits:
Object
  • Object
show all
Defined in:
lib/gloo/app/info.rb

Constant Summary collapse

APP_NAME =
'Gloo'.freeze
VERSION_FILE =
'VERSION'.freeze
VERSION_NOTES_FILE =
'VERSION_NOTES'.freeze
VERSION =
Gloo::App::Info.get_version

Class Method Summary collapse

Class Method Details

.display_titleObject

Get the application display title.



42
43
44
# File 'lib/gloo/app/info.rb', line 42

def self.display_title
  return "#{APP_NAME}, version #{VERSION}"
end

.full_versionObject

Get the full application version information, including engine version.



51
52
53
54
# File 'lib/gloo/app/info.rb', line 51

def self.full_version
  return "#{display_title}\n#{ruby_info}"
  return str
end

.get_versionObject

Load the version from the VERSION file.



20
21
22
23
24
25
# File 'lib/gloo/app/info.rb', line 20

def self.get_version
  f = File.dirname( File.absolute_path( __FILE__ ) )
  f = File.dirname( File.dirname( f ) )
  f = File.join( f, VERSION_FILE )
  return File.read( f )
end

.get_version_notesObject

Load the version notes from the VERSION_NOTES file.



32
33
34
35
36
37
# File 'lib/gloo/app/info.rb', line 32

def self.get_version_notes
  f = File.dirname( File.absolute_path( __FILE__ ) )
  f = File.dirname( File.dirname( f ) )
  f = File.join( f, VERSION_NOTES_FILE )
  return File.read( f )
end

.ruby_infoObject

Get the version of Ruby.



59
60
61
# File 'lib/gloo/app/info.rb', line 59

def self.ruby_info
  return "Ruby version: #{RUBY_VERSION}"
end