class Bundler::Audit::Database
and CVE number.
Represents the directory of advisories, grouped by gem name
def advisories(&block)
-
(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)
-
(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)
-
(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)
- 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)
- 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)
-
(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
-
(String)
-
def inspect "#<#{self.class}:#{self}>" end
def size
-
(Integer)
-
def size each_advisory_path.count end
def to_s
-
(String)
-
def to_s @path end