| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Registry.Rubygems.Wire
Description
The RubyGems registry wire JSON, decoded into a typed model.
A placeholder boundary mirroring Ecluse.Registry.Pypi.Wire. Écluse serves
only npm, so this models just the one shape another part of the system reads from
RubyGems: the published version strings of the /api/v1/versions/{gem}.json
response, which is a JSON array with one entry per version. Only each entry's
number (the version string) is modelled; the rest of the entry (platform, SHA,
timestamps) is ignored, leaving room for a full RubyGems adapter to grow the model
later.
Unlike the npm and PyPI listings, the document is a top-level array, so parseJSON
decodes it as a list of VersionEntry. An entry without a number is a decode
failure rather than a silently-dropped element, since a version entry that names no
version is meaningless.
Synopsis
- newtype VersionEntry = VersionEntry {}
- newtype VersionListing = VersionListing {
- vlEntries :: [VersionEntry]
- listingVersions :: VersionListing -> [Text]
Documentation
newtype VersionEntry Source #
One entry of the RubyGems versions array, modelled only by its version string.
Constructors
| VersionEntry | |
Instances
| FromJSON VersionEntry Source # | |
Defined in Ecluse.Registry.Rubygems.Wire Methods parseJSON :: Value -> Parser VersionEntry Source # parseJSONList :: Value -> Parser [VersionEntry] Source # | |
| Show VersionEntry Source # | |
Defined in Ecluse.Registry.Rubygems.Wire Methods showsPrec :: Int -> VersionEntry -> ShowS # show :: VersionEntry -> String # showList :: [VersionEntry] -> ShowS # | |
| Eq VersionEntry Source # | |
Defined in Ecluse.Registry.Rubygems.Wire | |
newtype VersionListing Source #
The whole /api/v1/versions/{gem}.json array, one VersionEntry per version.
Constructors
| VersionListing | |
Fields
| |
Instances
| FromJSON VersionListing Source # | |
Defined in Ecluse.Registry.Rubygems.Wire Methods parseJSON :: Value -> Parser VersionListing Source # parseJSONList :: Value -> Parser [VersionListing] Source # | |
| Show VersionListing Source # | |
Defined in Ecluse.Registry.Rubygems.Wire Methods showsPrec :: Int -> VersionListing -> ShowS # show :: VersionListing -> String # showList :: [VersionListing] -> ShowS # | |
| Eq VersionListing Source # | |
Defined in Ecluse.Registry.Rubygems.Wire Methods (==) :: VersionListing -> VersionListing -> Bool # (/=) :: VersionListing -> VersionListing -> Bool # | |
listingVersions :: VersionListing -> [Text] Source #
The published version strings of a gem: each entry's number, in the order
RubyGems returns them.