{"modulePath":"github.com/wolfi-dev/wolfictl","version":"v0.39.33","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package ruby\n\n## Types\n\n```go\ntype Options struct {\n\t// RubyVersion is the version of Ruby to search for within the wolfi\n\t// directory. Used to search for packages importing ruby-${RubyVersion}\n\tRubyVersion string\n\n\t// RubyUpdateVersion is the version of Ruby to update to\n\tRubyUpdateVersion string\n\n\t// Path is the path to the wolfi directory or a single package to check\n\tPath string\n\n\t// Client is the client used to communicate with Github\n\tClient *http2.RLHTTPClient\n\n\t// NoCache instructs the client to not use cached results\n\tNoCache bool\n}\n```\n\n```go\nfunc (o *Options) CheckUpgrade(ctx context.Context, pkg *Package) error\n```\nCheckUpgrade attempts to find a gemspec for a given ruby gem and tries to extract the required\\_ruby\\_version field from it. The required\\_ruby\\_version should provide a set of constraints restricting the version of ruby a gem can run on. CheckUpgrade simply tries to make sure the given RubyUpdateVersion is within those constraints.\n\n```go\nfunc (o *Options) CodeSearch(ctx context.Context, pkg *Package, query string) error\n```\nCodeSearch is the main search function which uses Github Code Search to run the specified query for a particular package.\n\n```go\nfunc (o *Options) DiscoverRubyPackages(ctx context.Context) ([]Package, error)\n```\nDiscoverRubyPackages searches a given path for melange yaml files using packages named ruby-${RubyVersion}. It takes a path to a directory or an individual file. A list of RubyPackages will be returned to the caller.\n\n```go\ntype Package struct {\n\t// Name is the name of the package, package.name in the melange yaml\n\tName string\n\n\t// Repo is a URL struct representing the git repo for a ruby package\n\tRepo *wgit.URL\n\n\t// Ref is the version of the ruby package, used to query github\n\tRef string\n}\n```\n\n```go\ntype SearchResult struct {\n\tRepository string\n\tFilePath   string\n\tURL        string\n\tFragments  []string\n}\n```\nSearchResult represents Github Code Search results\n\n","path":"github.com/wolfi-dev/wolfictl/pkg/ruby","name":"ruby","synopsis":"","isRedistributable":true}
