Method: Teleport::Util#gem_version
- Defined in:
- lib/teleport/util.rb
#gem_version(name) ⇒ Object
Returns the newest currently installed version of the named gem or false if the gem is not installed
308 309 310 311 312 313 314 |
# File 'lib/teleport/util.rb', line 308 def gem_version(name) spec_out = `gem specification #{name} 2> /dev/null` if !spec_out.empty? spec = Gem::Specification.from_yaml(spec_out) spec.version end end |