Overview
Comment: | Make it possible to set the ApiKey and BaseUri via the environment. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
59b2cc4c4d1afe6c0c5ee55969bd765a |
User & Date: | mistachkin on 2016-08-17 00:12:18 |
Other Links: | manifest | tags |
Context
2016-08-17
| ||
00:31 | Fix error message handling for bad PGP signatures. check-in: 53cea3f4d2 user: mistachkin tags: trunk | |
00:12 | Make it possible to set the ApiKey and BaseUri via the environment. check-in: 59b2cc4c4d user: mistachkin tags: trunk | |
2016-08-16
| ||
23:51 | Remove unused procedure argument. check-in: 6a93f22dad user: mistachkin tags: trunk | |
Changes
Modified client/pkgr.eagle from [9d8fd53b29] to [b2b57cb196].
︙ | ︙ | |||
125 126 127 128 129 130 131 | proc getLookupApiKey {} { set varName [appendArgs [getLookupVarNamePrefix] api_key] if {[info exists $varName]} then { return [set $varName] } | < < | < | < | | < < < < | < < < < | > > > > > > > | 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | proc getLookupApiKey {} { set varName [appendArgs [getLookupVarNamePrefix] api_key] if {[info exists $varName]} then { return [set $varName] } global env set varName [string trim $varName :] if {[info exists env($varName)]} then { return $env($varName) } return ""; # NOTE: System default, which is "public". } proc getLookupBaseUri {} { set varName [appendArgs [getLookupVarNamePrefix] base_uri] if {[info exists $varName]} then { return [set $varName] } global env set varName [string trim $varName :] if {[info exists env($varName)]} then { return $env($varName) } return https://urn.to/r/pkg; # NOTE: System default. } proc getLookupUri { apiKey package version } { set baseUri [getLookupBaseUri] |
︙ | ︙ | |||
182 183 184 185 186 187 188 189 190 191 192 193 194 195 | package require http 2.0 return [appendArgs \ $baseUri ? [http::formatQuery raw 1 method lookup apiKey $apiKey \ package $package version $version]] } } proc getLookupData { apiKey package version } { set uri [getLookupUri $apiKey $package $version] if {[string length $uri] == 0} then { return "" } | > > > > > > > > > > > > > > > > > > > | 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | package require http 2.0 return [appendArgs \ $baseUri ? [http::formatQuery raw 1 method lookup apiKey $apiKey \ package $package version $version]] } } proc getLookupVersion { requirement } { if {[set index [string first - $requirement]] != -1} then { incr index -1; set requirement [string range $requirement 0 $index] } if {[set index [string first a $requirement]] != -1 || \ [set index [string first b $requirement]] != -1} then { incr index -1; set requirement [string range $requirement 0 $index] } if {$requirement eq "0"} then { set requirement "" } elseif {[regexp -- {^\d+$} $requirement]} then { append requirement .0 } return $requirement } proc getLookupData { apiKey package version } { set uri [getLookupUri $apiKey $package $version] if {[string length $uri] == 0} then { return "" } |
︙ | ︙ |
Modified client/pkgr.eagle.harpy from [33afef44d1] to [908106e1ab].
︙ | ︙ | |||
17 18 19 20 21 22 23 | 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> | | | | | | | | | | | | | | | | | | | | | | 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 | 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> <Id>cf83423e-b1fd-4c09-9293-0c0dc51a6359</Id> <HashAlgorithm>SHA512</HashAlgorithm> <EntityType>Script</EntityType> <TimeStamp>2016-08-17T00:11:40.8366719Z</TimeStamp> <Duration>-1.00:00:00</Duration> <Key>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