trabajo-afectivo/lib/version.rb

33 lines
461 B
Ruby
Raw Normal View History

# Copyright (C) 2012-2017 Zammad Foundation, http://zammad-foundation.org/
class Version
=begin
Returns version number of application
version = Version.get
returns
'1.3.0' # example
=end
def self.get
begin
2017-11-23 08:09:44 +00:00
version = File.read(Rails.root.join('VERSION'))
version.strip!
rescue => e
message = e.to_s
Rails.logger.error "VERSION file could not be read: #{message}"
version = ''
end
version
end
end