Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
williammck committed Nov 10, 2023
0 parents commit 68b3265
Show file tree
Hide file tree
Showing 15 changed files with 4,980 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Release

on:
push:
tags:
- v*.*.*

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install dependencies
run: composer install

- name: Compile package
run: vendor/bin/box compile

- name: Release
uses: softprops/action-gh-release@v1
with:
files: dist/auth-vatsim.phar
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/dist
/vendor-bin/*/vendor
/vendor
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) VATSIM Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# DigitalOcean Spaces for osTicket

## Installation

Download `storage-do.phar` from the
[latest release](https://github.com/vatsimnetwork/osticket-storage-do/releases/latest)
and place it in the `include/plugins` folder in your osTicket installation.

Sign into your osTicket staff control panel, enable the plugin, and create a
plugin instance. You'll then be able to configure the plugin.

## Configuration

You'll need to create a new bucket and API key pair in the DigitalOcean Control
Panel before proceeding.

* **Bucket Name**: Your Spaces bucket's name.
* **Region**: Your Spaces bucket's region.
* **ACL**: Whether to allow public read access to uploaded attachments.
* **Access Key**: Your Spaces API keypair's access key.
* **Secret Key**: Your Spaces API keypair's secret key.

Once configured, you can then switch to `DigitalOcean Spaces` in your osTicket's
system settings.
3 changes: 3 additions & 0 deletions bootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php

require __DIR__.'/vendor/autoload.php';
34 changes: 34 additions & 0 deletions box.json.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"main": false,
"output": "dist/storage-do.phar",
"chmod": "0644",
"check-requirements": false,
"files": [
"bootstrap.php",
"plugin.php"
],
"shebang": false,
"banner": [
"DigitalOcean Spaces for osTicket",
"",
"Copyright (c) VATSIM Inc.",
"",
"Permission is hereby granted, free of charge, to any person obtaining a copy",
"of this software and associated documentation files (the \"Software\"), to deal",
"in the Software without restriction, including without limitation the rights",
"to use, copy, modify, merge, publish, distribute, sublicense, and/or sell",
"copies of the Software, and to permit persons to whom the Software is",
"furnished to do so, subject to the following conditions:",
"",
"The above copyright notice and this permission notice shall be included in all",
"copies or substantial portions of the Software.",
"",
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR",
"IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,",
"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE",
"AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER",
"LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,",
"OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE",
"SOFTWARE."
]
}
44 changes: 44 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"name": "vatsim/osticket-storage-do",
"description": "osTicket plugin for uploading files to DigitalOcean Spaces",
"license": "MIT",
"authors": [
{
"name": "William McKinnerney",
"email": "[email protected]",
"homepage": "https://williammck.net"
}
],
"minimum-stability": "stable",
"require": {
"php": "^8.0",
"aws/aws-sdk-php": "^3.283"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8"
},
"autoload": {
"psr-4": {
"Vatsim\\Osticket\\Spaces\\": "src/"
}
},
"scripts": {
"pre-autoload-dump": [
"Aws\\Script\\Composer\\Composer::removeUnusedServices"
]
},
"extra": {
"aws/aws-sdk-php": [
"S3"
],
"bamarni-bin": {
"bin-links": true,
"forward-command": true
}
},
"config": {
"allow-plugins": {
"bamarni/composer-bin-plugin": true
}
}
}
Loading

0 comments on commit 68b3265

Please sign in to comment.