Skip to content

Commit

Permalink
Documentation update.
Browse files Browse the repository at this point in the history
  • Loading branch information
paragonie-security committed Sep 9, 2021
1 parent 78a81b8 commit 15f7cfb
Show file tree
Hide file tree
Showing 11 changed files with 192 additions and 5 deletions.
23 changes: 23 additions & 0 deletions docs/reference/Interfaces/ReleaseBundlerInterface.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Libgossamer API Reference - ReleaseBundlerInterface

* **Fully Qualified Interface Name**: `ParagonIE\Gossamer\Interfaces\ReleaseBundlerInterface`

## Interface Methods

### `setWorkDirectory()`

Performs an HTTP GET request.

**Arguments**:

1. `string` - Directory path

Returns this object that implements `ReleaseBundlerInterface`.

### `bundle()`

**Arguments**:

1. `string` - Output file path

Returns TRUE on success and FALSE on failure.
9 changes: 8 additions & 1 deletion docs/reference/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ writing code that needs to use the library.
* [HttpInterface](Interfaces/HttpInterface.md)
* [LedgerInterface](Interfaces/LedgerInterface.md)
* [LedgerVerifierInterface](Interfaces/LedgerVerifierInterface.md)
* [ReleaseBundlerInterface](Interfaces/ReleaseBundlerInterface.md)
* [ScribeInterface](Interfaces/ScribeInterface.md)
* [SourceInterface](Interfaces/SourceInterface.md)
* [VerifierInterface](Interfaces/VerifierInterface.md)
Expand All @@ -26,6 +27,12 @@ writing code that needs to use the library.
* [Packet](Protocol/Packet.md)
* [SignedMessage](Protocol/SignedMessage.md)
* [Release](Release)
* [Bundler](Release/Bundler)
* [AbstractBundler](Release/Bundler/AbstractBundler.md)
* [GitDiffBundler](Release/Bundler/GitDiffBundler.md)
* [PharBundler](Release/Bundler/PharBundler.md)
* [TarBundler](Release/Bundler/TarBundler.md)
* [ZipBundler](Release/Bundler/ZipBundler.md)
* [Common](Release/Common.md)
* [Signer](Release/Signer.md)
* [Verifier](Release/Verifier.md)
Expand All @@ -35,7 +42,7 @@ writing code that needs to use the library.
* [Chronicle](Source/Chronicle.md)
* [Verifier](Verifier)
* [Chronicle](Verifier/Chronicle.md)
* [GossamerException](GossmerException.md)
* [GossamerException](GossamerException.md)
* [Response](Response.md)
* [Synchronizer](Synchronizer.md)
* [Util](Util.md)
15 changes: 15 additions & 0 deletions docs/reference/Release/Bundler/AbstractBundler.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Libgossamer API Reference - Release - Bundler - AbstractBundler ([ReleaseBundlerInterface](../../Interfaces/ReleaseBundlerInterface.md))

* **Fully Qualified Class Name**: `ParagonIE\Gossamer\Release\Bundler\AbstractBundler`

## Methods

### `setWorkDirectory()`

See [ReleaseBundlerInterface::setWorkDirectory()](../../Interfaces/ReleaseBundlerInterface.md#setworkdirectory).

**Arguments**:

1. `string` - Full path to a project's root directory

Returns this object.
31 changes: 31 additions & 0 deletions docs/reference/Release/Bundler/GitDiffBundler.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Libgossamer API Reference - Release - Bundler - GitDiffBundler

* **Fully Qualified Class Name**: `ParagonIE\Gossamer\Release\Bundler\GitDiffBundler`

This class inherits all methods from [AbstractBundler](AbstractBundler.md).

## Methods

### `setPreviousIdentifier()`

Sets the git identifier (commit, branch, or tag) to be compared against.

**Arguments**:

1. `string` - Git identifier

Returns this object.

### `bundle()`

See [ReleaseBundlerInterface::bundle()](../../Interfaces/ReleaseBundlerInterface.md#bundle).

**Arguments**:

1. `string` - Output file path
2. `string` - Current git identifier (default: `HEAD`)

Returns TRUE on success and FALSE on failure.

This creates a patch file (in `git diff` format) based on the changes between two git
identifiers (commits, branches, or tags).
31 changes: 31 additions & 0 deletions docs/reference/Release/Bundler/PharBundler.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Libgossamer API Reference - Release - Bundler - PharBundler

* **Fully Qualified Class Name**: `ParagonIE\Gossamer\Release\Bundler\PharBundler`

This class inherits all methods from [AbstractBundler](AbstractBundler.md).

## Methods

### `setDefaultStubFilename()`

Sets the filename for the default stub in the PHP Archive.

**Arguments**:

1. `string` - Filename (e.g. `index.php`)

Returns this object.

### `bundle()`

See [ReleaseBundlerInterface::bundle()](../../Interfaces/ReleaseBundlerInterface.md#bundle).

> **Warning**: This method cannot be called unless `phar.readonly = 0` in your php.ini configuration.
**Arguments**:

1. `string` - Output file path

Returns TRUE on success and FALSE on failure.

This creates a Phar archive at the destination output file.
9 changes: 9 additions & 0 deletions docs/reference/Release/Bundler/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Libgossamer API Reference - Release Bundlers

The classes contained within facilitate the bundling of release deliverables.

* [AbstractBundler](AbstractBundler.md)
* [GitDiffBundler](GitDiffBundler.md)
* [PharBundler](PharBundler.md)
* [TarBundler](TarBundler.md)
* [ZipBundler](ZipBundler.md)
33 changes: 33 additions & 0 deletions docs/reference/Release/Bundler/TarBundler.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Libgossamer API Reference - Release - Bundler - TarBundler

* **Fully Qualified Class Name**: `ParagonIE\Gossamer\Release\Bundler\TarBundler`

This class inherits all methods from [AbstractBundler](AbstractBundler.md).

## Methods

### `setCompression()`

Toggle the type of compression to be used with this Tarball.

**Arguments**:

1. `string|null` - Compression type. Acceptable values:
* `NULL` - no compression
* `"gz"` - Gzip Compression
* `"bz2"` - Bzip2 Compression
* `"lzma2"` - LZMA 2 Compression

Returns this object.

### `bundle()`

See [ReleaseBundlerInterface::bundle()](../../Interfaces/ReleaseBundlerInterface.md#bundle).

**Arguments**:

1. `string` - Output file path

Returns TRUE on success and FALSE on failure.

This creates a Tar archive at the destination output file.
19 changes: 19 additions & 0 deletions docs/reference/Release/Bundler/ZipBundler.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Libgossamer API Reference - Release - Bundler - ZipBundler

* **Fully Qualified Class Name**: `ParagonIE\Gossamer\Release\Bundler\ZipBundler`

This class inherits all methods from [AbstractBundler](AbstractBundler.md).

## Methods

### `bundle()`

See [ReleaseBundlerInterface::bundle()](../../Interfaces/ReleaseBundlerInterface.md#bundle).

**Arguments**:

1. `string` - Output file path

Returns TRUE on success and FALSE on failure.

This creates a Zip archive at the destination output file.
9 changes: 6 additions & 3 deletions docs/reference/Release/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ version releases for packages.

## Classes

* [Backends](../CryptoBackends)
* [SodiumBackend](../CryptoBackends/SodiumBackend.md)
* [Bundler](Bundler)
* [AbstractBundler](Bundler/AbstractBundler.md)
* [GitDiffBundler](Bundler/GitDiffBundler.md)
* [PharBundler](Bundler/PharBundler.md)
* [TarBundler](Bundler/TarBundler.md)
* [ZipBundler](Bundler/ZipBundler.md)
* [Common](Common.md)
* [CryptoBakendInterface](../Interfaces/CryptoBackendInterface.md)
* [Signer](Signer.md)
* [Verifier](Verifier.md)
17 changes: 17 additions & 0 deletions docs/reference/TypeHelperTrait.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Libgossamer API Reference - TypeHelperTrait

* **Fully Qualified Trait Name**: `ParagonIE\Gossamer\TypeHelperTrait`

## Methods

### `assert()`

Throw a condition if a statement is not true.

**Arguments**:

1. `bool` Statement
2. `string` Error message if statement is false
3. `class-string` Error/Exception class to instantiate

Does not return a value, but will throw if the Statement is false (or falsy).
1 change: 0 additions & 1 deletion lib/Release/Bundler/AbstractBundler.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ abstract class AbstractBundler implements ReleaseBundlerInterface
{
use TypeHelperTrait;


/** @var string $directory */
protected $directory = '';

Expand Down

0 comments on commit 15f7cfb

Please sign in to comment.