-
-
Notifications
You must be signed in to change notification settings - Fork 313
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow config and temp directories to be configured independently.
- Loading branch information
1 parent
26a70c2
commit 8d3ffa5
Showing
14 changed files
with
244 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# docker-compose up -d && docker logs -f scribe_app_1 | ||
FROM ubuntu:jammy | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
ENV TZ=Etc/UTC | ||
|
||
# APT | ||
RUN apt-get -qq update && apt-get install -qq \ | ||
make \ | ||
curl \ | ||
php \ | ||
php-curl \ | ||
php-xml \ | ||
php-sqlite3 \ | ||
php-bcmath \ | ||
php-curl \ | ||
php-gd \ | ||
php-imagick \ | ||
php-intl \ | ||
php-mbstring \ | ||
php-pdo \ | ||
php-zip \ | ||
php-soap \ | ||
php-pcov \ | ||
git \ | ||
p7zip-full | ||
|
||
# Composer Install | ||
RUN curl -sS https://getcomposer.org/installer | php && \ | ||
mv composer.phar /usr/local/bin/composer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
install: | ||
composer install | ||
|
||
test: install | ||
composer test-ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Allow devs to run the unit tests in a dockerized environment | ||
# clear && docker-compose up -d && docker logs -f scribe_app_1 | ||
version: '3.7' | ||
services: | ||
app: | ||
build: | ||
context: ./ | ||
volumes: | ||
- ./:/testing | ||
working_dir: /testing | ||
command: make test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
|
||
namespace Knuckles\Scribe\Configuration; | ||
|
||
/** | ||
* Decouple scribe config file name from the cache directory. | ||
*/ | ||
class CacheConfiguration | ||
{ | ||
/** @var string */ | ||
private string $scribeConfig; | ||
|
||
/** @var string */ | ||
private string $cacheDir; | ||
|
||
/** @var bool */ | ||
private bool $isHidden; | ||
|
||
/** | ||
* @param string $cacheDir | ||
* @param string $scribeConfig | ||
* @param bool $isHidden | ||
*/ | ||
public function __construct(string $cacheDir, string$scribeConfig, bool $isHidden = true) | ||
{ | ||
$this->cacheDir = $cacheDir; | ||
$this->scribeConfig = $scribeConfig; | ||
$this->isHidden = $isHidden; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getScribeConfigFile(): string | ||
{ | ||
return $this->scribeConfig; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function __toString(): string | ||
{ | ||
return ($this->isHidden ? '.' : '') . $this->cacheDir; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.