lib/vagrant/box.rb
# Checks if the box has an update and returns the metadata, version,
# and provider. If the box doesn't have an update that satisfies the
# constraints, it will return nil.
#
# This will potentially make a network call if it has to load the
# metadata from the network.
#
# @param [String] version Version constraints the update must
#   satisfy. If nil, the version constrain defaults to being a
#   larger version than this box.
# @return [Array]
Checks if the box has an update and returns the metadata, version,
and provider. If the box doesn't have an update that satisfies the
constraints, it will return nil.

This will potentially make a network call if it has to load the
metadata from the network.
Checks if the box has an update and returns the metadata version and provider . If the box doesn ' t have an update that satisfies the constraints it will return nil . This will potentially make a network call if it has to load the metadata from the network .
def has_update?(version=nil, download_options: {})
      if !@metadata_url
        raise Errors::BoxUpdateNoMetadata, name: @name
      end
      version += ", " if version
      version ||= ""
      version += "> #{@version}"
      md      = self.load_metadata(download_options)
      newer   = md.version(version, provider: @provider)
      return nil if !newer
      [md, newer, newer.provider(@provider)]
    end
def has_update? ( version = nil , download_options : { } ) if ! @metadata_url raise Errors :: BoxUpdateNoMetadata , name : @name end version += ", " if version version ||= "" version += "> #{@version}" md = self . load_metadata ( download_options ) newer = md . version ( version , provider : @provider ) return nil if ! newer [ md , newer , newer . provider ( @provider ) ] end
Checks if the box has an update and returns the metadata, version,
and provider.
Checks if the box has an update and returns the metadata version and provider .
None
Array
version
download_options
version Version constraints the update must satisfy. If nil, the version constrain defaults to being a larger version than this box.
version Version constraints the update must satisfy . If nil the version constrain defaults to being a larger version than this box .
being a larger version than this box