class Bundler::Audit::Database


and CVE number.
Represents the directory of advisories, grouped by gem name

def advisories(&block)

Returns:
  • (Enumerator) -

Other tags:
    Yieldparam: advisory -

Other tags:
    Yield: -
def advisories(&block)
  return enum_for(__method__) unless block_given?
  each_advisory_path do |path|
    yield Advisory.load(path)
  end
end

def advisories_for(name)

Returns:
  • (Enumerator) -

Other tags:
    Yieldparam: advisory -

Other tags:
    Yield: -

Parameters:
  • name (String) --
def advisories_for(name)
  return enum_for(__method__,name) unless block_given?
  each_advisory_path_for(name) do |path|
    yield Advisory.load(path)
  end
end

def check_gem(gem)

Returns:
  • (Enumerator) -

Other tags:
    Yieldparam: advisory -

Other tags:
    Yield: -

Parameters:
  • gem (Gem::Specification) --
def check_gem(gem)
  return enum_for(__method__,gem) unless block_given?
  advisories_for(gem.name) do |advisory|
    if advisory.vulnerable?(gem.version)
      yield advisory
    end
  end
end

def each_advisory_path(&block)

Other tags:
    Yieldparam: path -

Other tags:
    Yield: -
def each_advisory_path(&block)
  Dir.glob(File.join(@path,'*','*.yml'),&block)
end

def each_advisory_path_for(name,&block)

Other tags:
    Yieldparam: path -

Other tags:
    Yield: -

Parameters:
  • name (String) --
def each_advisory_path_for(name,&block)
  Dir.glob(File.join(@path,name,'*.yml'),&block)
end

def initialize(path=PATH)

Raises:
  • (ArgumentError) -

Parameters:
  • path (String) --
def initialize(path=PATH)
  unless File.directory?(path)
    raise(ArgumentError,"#{path.dump} is not a directory")
  end
  @path = path
end

def inspect

Returns:
  • (String) -
def inspect
  "#<#{self.class}:#{self}>"
end

def size

Returns:
  • (Integer) -
def size
  each_advisory_path.count
end

def to_s

Returns:
  • (String) -
def to_s
  @path
end