Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5eb019726a | ||
|
|
74da6f9c64 |
+1
-1
@@ -65,7 +65,7 @@ por el componente que pides; los metadatos del paquete no se instalan.
|
|||||||
El instalador global arranca un proyecto desde cero y no necesita nada previo:
|
El instalador global arranca un proyecto desde cero y no necesita nada previo:
|
||||||
|
|
||||||
#+BEGIN_SRC sh
|
#+BEGIN_SRC sh
|
||||||
git clone git@git.kj2.me:kj/duckbrain-toolbox.git
|
git clone https://git.kj2.me/kj/duckbrain-toolbox.git
|
||||||
ln -s "$PWD/duckbrain-toolbox/bin/duckbrain" ~/.local/bin/duckbrain
|
ln -s "$PWD/duckbrain-toolbox/bin/duckbrain" ~/.local/bin/duckbrain
|
||||||
|
|
||||||
duckbrain install mi-proyecto # descarga el núcleo Duckbrain
|
duckbrain install mi-proyecto # descarga el núcleo Duckbrain
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "commands",
|
"name": "commands",
|
||||||
"version": "0.2.3",
|
"version": "0.2.4",
|
||||||
"description": "CLI y migraciones para Duckbrain",
|
"description": "CLI y migraciones para Duckbrain",
|
||||||
"components": {
|
"components": {
|
||||||
"cli": {
|
"cli": {
|
||||||
|
|||||||
@@ -8,18 +8,18 @@ namespace Toolbox;
|
|||||||
*/
|
*/
|
||||||
final class Config
|
final class Config
|
||||||
{
|
{
|
||||||
public const VERSION = '0.2.3';
|
public const VERSION = '0.2.4';
|
||||||
|
|
||||||
public static function toolboxUrl(): string
|
public static function toolboxUrl(): string
|
||||||
{
|
{
|
||||||
return self::env('DUCKBRAIN_TOOLBOX_URL')
|
return self::env('DUCKBRAIN_TOOLBOX_URL')
|
||||||
?: 'git@git.kj2.me:kj/duckbrain-toolbox.git';
|
?: 'https://git.kj2.me/kj/duckbrain-toolbox.git';
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function coreUrl(): string
|
public static function coreUrl(): string
|
||||||
{
|
{
|
||||||
return self::env('DUCKBRAIN_CORE_URL')
|
return self::env('DUCKBRAIN_CORE_URL')
|
||||||
?: 'git@git.kj2.me:kj/duckbrain.git';
|
?: 'https://git.kj2.me/kj/duckbrain.git';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Toolbox\Config;
|
||||||
|
|
||||||
|
Harness::suite('group12');
|
||||||
|
|
||||||
|
Harness::it('los defaults de lectura son HTTPS anónimos y los env ganan', function () {
|
||||||
|
putenv('DUCKBRAIN_TOOLBOX_URL');
|
||||||
|
putenv('DUCKBRAIN_CORE_URL');
|
||||||
|
|
||||||
|
ok(str_starts_with(Config::toolboxUrl(), 'https://'), 'toolboxUrl por defecto en https');
|
||||||
|
ok(str_starts_with(Config::coreUrl(), 'https://'), 'coreUrl por defecto en https');
|
||||||
|
|
||||||
|
putenv('DUCKBRAIN_CORE_URL=ssh://git@example.test/kj/duckbrain.git');
|
||||||
|
eq('ssh://git@example.test/kj/duckbrain.git', Config::coreUrl(), 'el override gana sobre el default');
|
||||||
|
|
||||||
|
putenv('DUCKBRAIN_CORE_URL');
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user