Overview
Comment: | Add support for a configurable default list of API keys. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
af3a11e2cdc8ac14a365bf7875a760c9 |
User & Date: | mistachkin on 2016-09-08 22:01:04 |
Other Links: | manifest | tags |
Context
2016-09-08
| ||
22:10 | The 'VERSION' file(s) must be deployed as well. check-in: ec76ecd8ad user: mistachkin tags: trunk | |
22:01 | Add support for a configurable default list of API keys. check-in: af3a11e2cd user: mistachkin tags: trunk | |
2016-09-06
| ||
19:10 | Namespace support must be enabled (i.e. in Eagle) for the package clients. check-in: d1e4c32aff user: mistachkin tags: trunk | |
Changes
Modified client/1.0/pkgr.eagle from [38a75841f0] to [0de98c695f].
︙ | |||
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 | 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + | # is returned if no API keys are currently configured. The prefix # argument is an extra variable name prefix to check prior to any # that are already configured. # # <internal> proc getApiKeys { {prefix ""} } { global env variable autoApiKeys # # NOTE: If the caller specified a variable name prefix, try to use it # first. # set prefixes [list] if {[string length $prefix] > 0} then { lappend prefixes $prefix } # # NOTE: Next, fallback to the variable name prefix for this package. # lappend prefixes [getLookupVarNamePrefix] # # NOTE: Try each variable name prefix, in order, until a set of API # keys is found. # foreach prefix $prefixes { # # NOTE: If an empty prefix is seen, force it to use the "api_keys" # variable from the global namespace. # if {[string length $prefix] == 0} then { set prefix ::; # TODO: Make non-global? } # # NOTE: Check for the variable, in whatever namespace it resides, # and return its value verbatim if it exists. # set varName [appendArgs $prefix api_keys] if {[info exists $varName]} then { return [set $varName] } # # NOTE: Fallback to using an environment variable with the same # base name and returns its value verbatim if it exists. # set varName [string trim $varName :] if {[info exists env($varName)]} then { return $env($varName) } } # # NOTE: If there is a default list of API keys, just return it. # if {[info exists autoApiKeys] && [llength $autoApiKeys] > 0} then { return $autoApiKeys } # # NOTE: Otherwise, return the system default, which is "anonymous" # packages only (i.e. those without any owners). # |
︙ | |||
1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 | 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 | + | # NOTE: This procedure performs initial setup of the package repository # client, using the current configuration parameters. There are # no arguments. It may load the Garuda package when evaluated in # native Tcl. It may load a native Tcl library when evaluated in # Eagle. It may install the [package unknown] hook. # proc setupPackageUnknownHandler {} { variable autoApiKeys variable autoHook variable autoLoadTcl variable autoRequireGaruda # # NOTE: Should we attempt to automatically load the Garuda package for # native Tcl? |
︙ | |||
1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 | 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 | + + + + + + + + + + + | # # NOTE: This procedure sets up the default values for all configuration # parameters used by the package repository client. There are no # arguments. # proc setupPackageUnknownVars {} { # # NOTE: What is the default set of API keys if none were set explicitly? # This list is subject to change at any time -AND- may be empty or # may contain non-working API keys, please do not rely on it. # variable autoApiKeys; # DEFAULT: 0000000000000000000000000000000000000000 if {![info exists autoApiKeys]} then { set autoApiKeys [list 0000000000000000000000000000000000000000] } # # NOTE: Automatically install our [package unknown] handler when this # package is loaded? # variable autoHook; # DEFAULT: true if {![info exists autoHook]} then { |
︙ |
Modified client/1.0/pkgr.eagle.asc from [7f8ba01f34] to [cb19f1ee0f].
1 2 3 4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | - - - - - - - - - - - - - + + + + + + + + + + + + + | -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Eagle Package Repository |
Modified client/1.0/pkgr.eagle.harpy from [3401063dfc] to [c5e97b17d9].
︙ | |||
17 18 19 20 21 22 23 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | THE ASSOCIATED SOFTWARE MAY NOT WORK PROPERLY IF THIS FILE IS ALTERED. --> <Certificate xmlns="https://eagle.to/2011/harpy" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Protocol>None</Protocol> <Vendor>Mistachkin Systems</Vendor> |
Modified client/1.0/pkgr.eagle.harpy.asc from [7b9676946b] to [c2cb2625aa].
1 2 3 4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | - - - - - - - - - - - - - + + + + + + + + + + + + + | -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Eagle Package Repository |