# File lib/chef/provider/package/rubygems.rb, line 325 def current_version #raise 'todo' # If one or more matching versions are installed, the newest of them # is the current version if !matching_installed_versions.empty? gemspec = matching_installed_versions.last logger.debug { "Found installed gem #{gemspec.name} version #{gemspec.version} matching #{gem_dependency}"} gemspec # If no version matching the requirements exists, the latest installed # version is the current version. elsif !all_installed_versions.empty? gemspec = all_installed_versions.last logger.debug { "Newest installed version of gem #{gemspec.name} is #{gemspec.version}" } gemspec else logger.debug { "No installed version found for #{gem_dependency.to_s}"} nil end end