oneops-admin/lib/shared/cookbooks/artifact/providers/deploy.rb
def manifest_differences?
    if new_resource.force
      Chef::Log.info "artifact_deploy[manifest_differences?] Force attribute has been set for #{new_resource.name}."
      Chef::Log.info "artifact_deploy[manifest_differences?] Installing version, #{artifact_version} for #{new_resource.name}."
      return true
    elsif get_current_release_version.nil?
      Chef::Log.info "artifact_deploy[manifest_differences?] No current version installed for #{new_resource.name}."
      Chef::Log.info "artifact_deploy[manifest_differences?] Installing version, #{artifact_version} for #{new_resource.name}."
      return true
    elsif artifact_version != get_current_release_version && !previous_version_numbers.include?(artifact_version)
      Chef::Log.info "artifact_deploy[manifest_differences?] Currently installed version of artifact is #{get_current_release_version}."
      Chef::Log.info "artifact_deploy[manifest_differences?] Version #{artifact_version} for #{new_resource.name} has not already been installed."
      Chef::Log.info "artifact_deploy[manifest_differences?] Installing version, #{artifact_version} for #{new_resource.name}."
      return true
    elsif artifact_version != get_current_release_version && previous_version_numbers.include?(artifact_version)
      Chef::Log.info "artifact_deploy[manifest_differences?] Version #{artifact_version} of artifact has already been installed."
      return has_manifest_changed?
    elsif artifact_version == get_current_release_version
      Chef::Log.info "artifact_deploy[manifest_differences?] Currently installed version of artifact is #{artifact_version}."
      return has_manifest_changed?
    end
  end
# Checks the various cases of whether an artifact has or has not been installed. If the artifact
# has been installed let #has_manifest_changed? determine the return value.
# 
# @return [Boolean]
Checks the various cases of whether an artifact has or has not been installed. If the artifact
has been installed let #has_manifest_changed. determine the return value.
Checks the various cases of whether an artifact has or has not been installed . If the artifact has been installed let #has_manifest_changed . determine the return value .
def manifest_differences?
    if new_resource.force
      Chef::Log.info "artifact_deploy[manifest_differences?] Force attribute has been set for #{new_resource.name}."
      Chef::Log.info "artifact_deploy[manifest_differences?] Installing version, #{artifact_version} for #{new_resource.name}."
      return true
    elsif get_current_release_version.nil?
      Chef::Log.info "artifact_deploy[manifest_differences?] No current version installed for #{new_resource.name}."
      Chef::Log.info "artifact_deploy[manifest_differences?] Installing version, #{artifact_version} for #{new_resource.name}."
      return true
    elsif artifact_version != get_current_release_version && !previous_version_numbers.include?(artifact_version)
      Chef::Log.info "artifact_deploy[manifest_differences?] Currently installed version of artifact is #{get_current_release_version}."
      Chef::Log.info "artifact_deploy[manifest_differences?] Version #{artifact_version} for #{new_resource.name} has not already been installed."
      Chef::Log.info "artifact_deploy[manifest_differences?] Installing version, #{artifact_version} for #{new_resource.name}."
      return true
    elsif artifact_version != get_current_release_version && previous_version_numbers.include?(artifact_version)
      Chef::Log.info "artifact_deploy[manifest_differences?] Version #{artifact_version} of artifact has already been installed."
      return has_manifest_changed?
    elsif artifact_version == get_current_release_version
      Chef::Log.info "artifact_deploy[manifest_differences?] Currently installed version of artifact is #{artifact_version}."
      return has_manifest_changed?
    end
  end
def manifest_differences? if new_resource . force Chef :: Log . info "artifact_deploy[manifest_differences?] Force attribute has been set for #{new_resource.name}." Chef :: Log . info "artifact_deploy[manifest_differences?] Installing version, #{artifact_version} for #{new_resource.name}." return true elsif get_current_release_version . nil? Chef :: Log . info "artifact_deploy[manifest_differences?] No current version installed for #{new_resource.name}." Chef :: Log . info "artifact_deploy[manifest_differences?] Installing version, #{artifact_version} for #{new_resource.name}." return true elsif artifact_version != get_current_release_version && ! previous_version_numbers . include? ( artifact_version ) Chef :: Log . info "artifact_deploy[manifest_differences?] Currently installed version of artifact is #{get_current_release_version}." Chef :: Log . info "artifact_deploy[manifest_differences?] Version #{artifact_version} for #{new_resource.name} has not already been installed." Chef :: Log . info "artifact_deploy[manifest_differences?] Installing version, #{artifact_version} for #{new_resource.name}." return true elsif artifact_version != get_current_release_version && previous_version_numbers . include? ( artifact_version ) Chef :: Log . info "artifact_deploy[manifest_differences?] Version #{artifact_version} of artifact has already been installed." return has_manifest_changed? elsif artifact_version == get_current_release_version Chef :: Log . info "artifact_deploy[manifest_differences?] Currently installed version of artifact is #{artifact_version}." return has_manifest_changed? end end
Checks the various cases of whether an artifact has or has not been installed.
Checks the various cases of whether an artifact has or has not been installed .
None
Boolean