def validate(expected_digest)
    if not bundle_exists? then
      raise BundleNotFound.new("repo = #{@repo}; bundle = #{@bundle}")
    end

    if not command_exists? then
      raise CommandNotFound.new("repo = #{@repo}; bundle = #{@bundle}; command = #{@command}")
    end
    if self.digest != expected_digest then
      raise BundleNotFound, "digest does not match ('#{self.digest}' != '#{expected_digest}')", caller
    end
    return true
  end
def validate(expected_digest)
    if not bundle_exists? then
      raise BundleNotFound.new("repo = #{@repo}; bundle = #{@bundle}")
    end

    if not command_exists? then
      raise CommandNotFound.new("repo = #{@repo}; bundle = #{@bundle}; command = #{@command}")
    end
    if self.digest != expected_digest then
      raise BundleNotFound, "digest does not match ('#{self.digest}' != '#{expected_digest}')", caller
    end
    return true
  end
Create new CommandSpec

 @param [Hash] params  Hash of attributes to initialize with
 Validate the existence of this Command on the local system
 and compare digest to local version

 @param [String] expected_digest
 @return [Boolean] returns true if available, else raises error
 @raise [BundleNotFound] If bundle doesn't exist or digest does not match
 @raise [CommandNotFound] If command doesn't exist