rubygems

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LatestAPI is the string format for the Rubygems latest API
	LatestAPI = "https://rubygems.org/api/v1/versions/%s/latest.json"
	// VersionsAPI is the string format for the Rubygems versions API
	VersionsAPI = "https://rubygems.org/api/v1/versions/%s.json"
	// SourceFormat is the string format for Gem sources
	SourceFormat = "https://rubygems.org/downloads/%s-%s.gem"
)

Variables

View Source
var GemRegex = regexp.MustCompile("https?://rubygems.org/downloads/(.+).gem")

GemRegex matches Rubygems sources

Functions

This section is empty.

Types

type LatestVersion

type LatestVersion struct {
	Version string `json:"version"`
}

LatestVersion is a JSON representation of the latest Version of a Gem

func (*LatestVersion) Convert

func (cr *LatestVersion) Convert(name string) *results.Result

Convert turns a Rubygems latest release into a Cuppa result

type Provider

type Provider struct{}

Provider is the upstream provider interface for rubygems

func (Provider) Latest

func (c Provider) Latest(name string) (r *results.Result, s results.Status)

Latest finds the newest release for a rubygems package

func (Provider) Match

func (c Provider) Match(query string) string

Match checks to see if this provider can handle this kind of query

func (Provider) Name

func (c Provider) Name() string

Name gives the name of this provider

func (Provider) Releases

func (c Provider) Releases(name string) (rs *results.ResultSet, s results.Status)

Releases finds all matching releases for a rubygems package

type Version

type Version struct {
	CreatedAt  string `json:"created_at"`
	PreRelease bool   `json:"prerelease"`
	Number     string `json:"number"`
}

Version is a JSON representation of a version of a Gem

func (*Version) Convert

func (cr *Version) Convert(name string) *results.Result

Convert turns a Rubygems version to a Cuppa result

type Versions

type Versions []Version

Versions holds one or more Rubygems Versions

func (*Versions) Convert

func (crs *Versions) Convert(name string) *results.ResultSet

Convert turns a Rubygems result set into a Cuppa result set

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL