feat: add puppet forge remote type
Adds package: puppet for proxying the Puppet Forge API (forgeapi.puppet.com). - remote/puppet.py: rewrites absolute forge URLs and relative /v3/files/ paths in JSON responses to absolute proxy URLs; g10k uses url.ResolveReference so absolute file_uri values override the base entirely, meaning tarball downloads go straight to the proxy - config.py: registers built-in mutable patterns for v3/modules/ and v3/releases (module metadata pages) - artifact/proxy.py: dispatches to puppet.resolve_content for package: puppet remotes - 9 new tests covering mutable detection, URL rewriting (relative and absolute), content-type, tarball pass-through, and pattern blocking Client configuration (g10k): - config file: forge_base_url: https://artifacts.example.com/api/v1/remote/puppet-forge - Puppetfile: forge.baseUrl https://artifacts.example.com/api/v1/remote/puppet-forge
This commit is contained in:
@@ -112,6 +112,12 @@ TEST_REMOTES = {
|
||||
"immutable_patterns": [r"\.tgz$"],
|
||||
"cache": {"immutable_ttl": 0, "mutable_ttl": 1800},
|
||||
},
|
||||
"puppet-test": {
|
||||
"base_url": "https://forgeapi.puppet.com",
|
||||
"package": "puppet",
|
||||
"immutable_patterns": [r"^v3/files/.*\.tar\.gz$"],
|
||||
"cache": {"immutable_ttl": 0, "mutable_ttl": 600},
|
||||
},
|
||||
},
|
||||
"locals": {
|
||||
"local-test": {
|
||||
|
||||
Reference in New Issue
Block a user