purl 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CONTRIBUTING.md +167 -0
- data/README.md +159 -23
- data/Rakefile +153 -0
- data/SECURITY.md +164 -0
- data/lib/purl/package_url.rb +9 -1
- data/lib/purl/registry_url.rb +274 -40
- data/lib/purl/version.rb +1 -1
- data/lib/purl.rb +25 -3
- data/purl-types.json +242 -17
- data/schemas/purl-types.schema.json +154 -0
- data/schemas/test-suite-data.schema.json +134 -0
- metadata +9 -2
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
3
|
+
"$id": "./schemas/test-suite-data.schema.json",
|
|
4
|
+
"title": "PURL Test Suite Data Schema",
|
|
5
|
+
"description": "JSON schema for PURL specification test suite data",
|
|
6
|
+
"type": "array",
|
|
7
|
+
"items": {
|
|
8
|
+
"$ref": "#/definitions/testCase"
|
|
9
|
+
},
|
|
10
|
+
"definitions": {
|
|
11
|
+
"testCase": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"required": [
|
|
14
|
+
"description",
|
|
15
|
+
"purl",
|
|
16
|
+
"canonical_purl",
|
|
17
|
+
"type",
|
|
18
|
+
"namespace",
|
|
19
|
+
"name",
|
|
20
|
+
"version",
|
|
21
|
+
"qualifiers",
|
|
22
|
+
"subpath",
|
|
23
|
+
"is_invalid"
|
|
24
|
+
],
|
|
25
|
+
"properties": {
|
|
26
|
+
"description": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"description": "Human-readable description of the test case"
|
|
29
|
+
},
|
|
30
|
+
"purl": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"description": "The PURL string to be parsed and tested"
|
|
33
|
+
},
|
|
34
|
+
"canonical_purl": {
|
|
35
|
+
"oneOf": [
|
|
36
|
+
{
|
|
37
|
+
"type": "string",
|
|
38
|
+
"description": "The canonical (normalized) form of the PURL"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"type": "null",
|
|
42
|
+
"description": "No canonical form (for invalid PURLs)"
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
"type": {
|
|
47
|
+
"oneOf": [
|
|
48
|
+
{
|
|
49
|
+
"type": "string",
|
|
50
|
+
"pattern": "^[a-z][a-z0-9]*$",
|
|
51
|
+
"description": "The package type (ecosystem)"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"type": "null",
|
|
55
|
+
"description": "No type specified (for invalid PURLs)"
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
"namespace": {
|
|
60
|
+
"oneOf": [
|
|
61
|
+
{
|
|
62
|
+
"type": "string",
|
|
63
|
+
"description": "The package namespace (e.g., org.apache.commons for Maven)"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"type": "null",
|
|
67
|
+
"description": "No namespace for this package"
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
"name": {
|
|
72
|
+
"oneOf": [
|
|
73
|
+
{
|
|
74
|
+
"type": "string",
|
|
75
|
+
"minLength": 1,
|
|
76
|
+
"description": "The package name"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"type": "null",
|
|
80
|
+
"description": "No name specified (for invalid PURLs)"
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
"version": {
|
|
85
|
+
"oneOf": [
|
|
86
|
+
{
|
|
87
|
+
"type": "string",
|
|
88
|
+
"description": "The package version"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"type": "null",
|
|
92
|
+
"description": "No version specified"
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
"qualifiers": {
|
|
97
|
+
"oneOf": [
|
|
98
|
+
{
|
|
99
|
+
"type": "object",
|
|
100
|
+
"description": "Key-value pairs for additional package metadata",
|
|
101
|
+
"patternProperties": {
|
|
102
|
+
".*": {
|
|
103
|
+
"type": "string"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"additionalProperties": false
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"type": "null",
|
|
110
|
+
"description": "No qualifiers for this package"
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
"subpath": {
|
|
115
|
+
"oneOf": [
|
|
116
|
+
{
|
|
117
|
+
"type": "string",
|
|
118
|
+
"description": "Sub-path within the package"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"type": "null",
|
|
122
|
+
"description": "No subpath specified"
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
"is_invalid": {
|
|
127
|
+
"type": "boolean",
|
|
128
|
+
"description": "Whether this PURL should be considered invalid and parsing should fail"
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"additionalProperties": false
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: purl
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andrew Nesbitt
|
|
@@ -9,6 +9,9 @@ bindir: exe
|
|
|
9
9
|
cert_chain: []
|
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies: []
|
|
12
|
+
description: |-
|
|
13
|
+
This library features comprehensive error handling with namespaced error types, bidirectional registry URL conversion, and JSON-based configuration for cross-language compatibility.
|
|
14
|
+
It supports 37 package types (32 official + 5 additional ecosystems) and is fully compliant with the official PURL specification test suite.
|
|
12
15
|
email:
|
|
13
16
|
- andrewnez@gmail.com
|
|
14
17
|
executables: []
|
|
@@ -17,15 +20,19 @@ extra_rdoc_files: []
|
|
|
17
20
|
files:
|
|
18
21
|
- CHANGELOG.md
|
|
19
22
|
- CODE_OF_CONDUCT.md
|
|
23
|
+
- CONTRIBUTING.md
|
|
20
24
|
- LICENSE
|
|
21
25
|
- README.md
|
|
22
26
|
- Rakefile
|
|
27
|
+
- SECURITY.md
|
|
23
28
|
- lib/purl.rb
|
|
24
29
|
- lib/purl/errors.rb
|
|
25
30
|
- lib/purl/package_url.rb
|
|
26
31
|
- lib/purl/registry_url.rb
|
|
27
32
|
- lib/purl/version.rb
|
|
28
33
|
- purl-types.json
|
|
34
|
+
- schemas/purl-types.schema.json
|
|
35
|
+
- schemas/test-suite-data.schema.json
|
|
29
36
|
- sig/purl.rbs
|
|
30
37
|
- test-suite-data.json
|
|
31
38
|
homepage: https://github.com/andrew/purl
|
|
@@ -41,7 +48,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
41
48
|
requirements:
|
|
42
49
|
- - ">="
|
|
43
50
|
- !ruby/object:Gem::Version
|
|
44
|
-
version: 3.
|
|
51
|
+
version: 3.1.0
|
|
45
52
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
46
53
|
requirements:
|
|
47
54
|
- - ">="
|