Some time ago gemspec files for ruby gems added the ability to specify the short identifier for the license type.

Gem::Specification.new do |s|
  s.licenses    = ['MIT']
end

The unofficial list of short identifiers is available from spdx.