Normalize rvm version to float if it comes as an integer

This commit is contained in:
Piotr Sarnacki 2013-02-11 15:59:52 +01:00
parent 2607197cba
commit e90c21c9a5

View File

@ -30,6 +30,8 @@ require 'config/emoij'
config = $.only config, 'rvm', 'gemfile', 'env', 'otp_release', 'php', 'node_js', 'scala', 'jdk', 'python', 'perl', 'compiler'
values = $.map config, (value, key) ->
value = (if value && value.join then value.join(', ') else value) || ''
if key == 'rvm' && "#{value}".match(/^\d+$/)
value = "#{value}.0"
'%@: %@'.fmt $.camelize(key), value
if values.length == 0 then '-' else values.join(', ')