Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added CPAN tests and FIX typos in PURL-SPEC #325

Merged
merged 3 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions PURL-TYPES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -172,17 +172,17 @@ cpan
----
``cpan`` for CPAN Perl packages:

- The default respository is ``https://www.cpan.org/``.
- The default repository is ``https://www.cpan.org/``.
- The ``namespace``:
- To refer to a CPAN distribution name, the ``namespace`` MUST be present. In this case, the namespace is the CPAN id of the author/publisher. It MUST be written uppercase, followed by the distribution name in the ``name`` component. A distribution name may NEVER contain the string ``::``.
- To refer to a CPAN distribution name, the ``namespace`` MUST be present. In this case, the namespace is the CPAN id of the author/publisher. It MUST be written uppercase, followed by the distribution name in the ``name`` component. A distribution name MUST NOT contain the string ``::``.
- To refer to a CPAN module, the ``namespace`` MUST be absent. The module name MAY contain zero or more ``::`` strings, and the module name MUST NOT contain a ``-``

- The ``name`` is the module or distribution name and is case sensitive.
- The ``version`` is the module or distribution version.
- Optional qualifiers may include:

- ``repository_url``: CPAN/MetaCPAN/BackPAN/DarkPAN repository base URL (default is ``https://www.cpan.org``)
- ``download_url``: URL of package or distibution
- ``download_url``: URL of package or distribution
- ``vcs_url``: extra URL for a package version control system
- ``ext``: file extension (default is ``tar.gz``)

Expand Down Expand Up @@ -374,7 +374,7 @@ luarocks
The full version number is required to uniquely identify a version.
- Qualifier ``repository_url``: The LuaRocks rocks server to be used;
useful in case a private server is used (optional).
If ommitted, ``https://luarocks.org`` as default server is assumed.
If omitted, ``https://luarocks.org`` as default server is assumed.

Examples::

Expand Down
72 changes: 72 additions & 0 deletions test-suite-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -550,5 +550,77 @@
"qualifiers": null,
"subpath": null,
"is_invalid": false
},
{
"description": "cpan distribution name are case sensitive",
"purl": "pkg:cpan/DROLSKY/[email protected]",
"canonical_purl": "pkg:cpan/DROLSKY/[email protected]",
"type": "cpan",
"namespace": "DROLSKY",
"name": "DateTime",
"version": "1.55",
"qualifiers": null,
"subpath": null,
"is_invalid": false
},
{
"description": "cpan module name are case sensitive",
"purl": "pkg:cpan/URI::[email protected]",
"canonical_purl": "pkg:cpan/URI::[email protected]",
"type": "cpan",
"namespace": null,
"name": "URI::PackageURL",
"version": "2.11",
"qualifiers": null,
"subpath": null,
"is_invalid": false
},
{
"description": "cpan module name like distribution name",
"purl": "pkg:cpan/[email protected]",
"canonical_purl": "pkg:cpan/[email protected]",
"type": "cpan",
"namespace": null,
"name": "Perl-Version",
"version": "1.013",
"qualifiers": null,
"subpath": null,
"is_invalid": true
},
{
"description": "cpan distribution name like module name",
"purl": "pkg:cpan/GDT/URI::[email protected]",
"canonical_purl": "pkg:cpan/GDT/URI::PackageURL",
"type": "cpan",
"namespace": "GDT",
"name": "URI::PackageURL",
"version": null,
"qualifiers": null,
"subpath": null,
"is_invalid": true
},
{
"description": "cpan valid module name",
"purl": "pkg:cpan/[email protected]",
"canonical_purl": "pkg:cpan/[email protected]",
"type": "cpan",
"namespace": null,
"name": "DateTime",
"version": "1.55",
"qualifiers": null,
"subpath": null,
"is_invalid": false
},
{
"description": "cpan valid module name without version",
"purl": "pkg:cpan/URI",
"canonical_purl": "pkg:cpan/URI",
"type": "cpan",
"namespace": null,
"name": "URI",
"version": null,
"qualifiers": null,
"subpath": null,
"is_invalid": false
}
]