Merge pull request #306 from anchore/update-gemspec-glob

Update gemspec glob to include named nested specification directories
This commit is contained in:
Alex Goodman 2021-01-04 19:42:26 -05:00 committed by GitHub
commit ee0a02621a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 1 deletions

View File

@ -19,7 +19,7 @@ func NewGemFileLockCataloger() *common.GenericCataloger {
// NewGemSpecCataloger returns a new Bundler cataloger object tailored for detecting installations of gems (e.g. Gemspec).
func NewGemSpecCataloger() *common.GenericCataloger {
globParsers := map[string]common.ParserFn{
"**/specifications/*.gemspec": parseGemSpecEntries,
"**/specifications/**/*.gemspec": parseGemSpecEntries,
}
return common.NewGenericCataloger(nil, globParsers, "ruby-gemspec-cataloger")

View File

@ -15,7 +15,10 @@ var imageOnlyTestCases = []testCase{
pkgType: pkg.GemPkg,
pkgLanguage: pkg.Ruby,
pkgInfo: map[string]string{
// specifications in the root specification directory
"bundler": "2.1.4",
// specifications in named directories
"unbundler": "3.1.4",
},
},
{

View File

@ -0,0 +1,25 @@
# frozen_string_literal: true
# -*- encoding: utf-8 -*-
# stub: unbundler 2.1.4 ruby lib
Gem::Specification.new do |s|
s.name = "unbundler".freeze
s.version = "3.1.4"
s.required_rubygems_version = Gem::Requirement.new(">= 2.5.2".freeze) if s.respond_to? :required_rubygems_version=
s.require_paths = ["lib".freeze]
s.authors = ["Andr\u00E9 Arko".freeze, "Samuel Giddins".freeze, "Colby Swandale".freeze, "Hiroshi Shibata".freeze, "David Rodr\u00EDguez".freeze, "Grey Baker".f
s.bindir = "exe".freeze
s.date = "2020-01-05"
s.description = "Bundler manages an application's dependencies through its entire life, across many machines, systematically and repeatably".freeze
s.email = ["team@unbundler.io".freeze]
s.executables = ["unbundle".freeze, "unbundler".freeze]
s.files = ["exe/unbundle".freeze, "exe/unbundler".freeze]
s.homepage = "https://unbundler.io".freeze
s.licenses = ["MIT".freeze]
s.required_ruby_version = Gem::Requirement.new(">= 2.3.0".freeze)
s.rubygems_version = "3.1.2".freeze
s.summary = "The best way to manage your application's dependencies".freeze
s.installed_by_version = "3.1.2" if s.respond_to? :installed_by_version
end