Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultRubyVersion = "3.2" DefaultBaseURIFormat = "https://rubygems.org/api/v1/gems/%s.json" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GemContext ¶
type GemContext struct { // RubyVersion is the version of ruby used when generating melange files. RubyVersion string // OutDir is the output directory for the generated melange files. OutDir string // BaseURIFormat is the base URI which should contain a %s for the // package name. BaseURIFormat string // AdditionalRepositories contains any additional apk repos to add // to the manifest. AdditionalRepositories []string // AdditionalKeyrings contains any additional apk keys to add // to the manifest. AdditionalKeyrings []string // Client is a rate limited client used to make http calls Client *rlhttp.RLHTTPClient // ToGenerate is the map of dependencies that have been visited when the // transitive dependency list is being calculated. ToGenerate map[string]GemMeta // ToCheck is the list of dependencies that have yet to be checked for // transitive dependencies. ToCheck []string }
GemContext is the execution context for the gem subcommand.
func New ¶
func New() (GemContext, error)
New initialises a new GemContext.
TODO: Add a check for ruby-* packages in wolfios once the name has been \ standardised. Otherwise, we risk skipping ruby packages if the apk \ exists but is not actually a ruby gem.
type GemMeta ¶
type GemMeta struct { Name string `json:"name"` Version string `json:"version"` Info string `json:"info"` Licenses []string `json:"licenses"` SourceCodeURI string `json:"source_code_uri"` HomepageURI string `json:"homepage_uri"` Dependencies GemMetaDependencies `json:"dependencies"` // RepoURI is not a part of the gem metadata returned by rubygems.org, // however it is intended to be the source of truth for the repository // URI since some gems use HomepageURI and some use SourceCodeURI. RepoURI string `json:"-"` }
GemMeta is the json response from rubygems.org
type GemMetaDependencies ¶
type GemMetaDependencies struct {
Runtime []GemMetaDependency `json:"runtime"`
}
type GemMetaDependency ¶
Click to show internal directories.
Click to hide internal directories.