Skip to content

Commit 997aa8c

Browse files
committed
Initial Import
Signed-off-by: Chris Hallgren <[email protected]>
0 parents  commit 997aa8c

21 files changed

+639
-0
lines changed

.editorconfig

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
; This file is for unifying the coding style for different editors and IDEs.
2+
; More information at http://editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
indent_style = tab
8+
indent_size = 4
9+
end_of_line = lf
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true
12+
13+
[*.bat]
14+
end_of_line = crlf
15+
16+
[*.yml]
17+
indent_style = space
18+
indent_size = 2
19+
20+
[*.md]
21+
indent_style = space

.gitattributes

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Define the line ending behavior of the different file extensions
2+
# Set default behavior, in case users don't have core.autocrlf set.
3+
* text text=auto eol=lf
4+
5+
# Denote all files that are truly binary and should not be modified.
6+
*.png binary
7+
*.jpg binary
8+
*.gif binary
9+
*.ico binary
10+
*.mo binary
11+
*.pdf binary
12+
13+
# Remove files for archives generated using `git archive`
14+
phpunit.xml.dist export-ignore
15+
.travis.yml export-ignore
16+
.gitignore export-ignore
17+
.gitattributes export-ignore
18+
.editorconfig export-ignore
19+
tests/test_app export-ignore

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/phpunit.phar
2+
/vendor/
3+
/tmp/
4+
.idea/
5+
composer.lock
6+
schema-dump-default.lock
7+
composer.phar
8+
/.phpunit.result.cache
9+
.DS_Store

.travis.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
language: php
2+
3+
php:
4+
- 7.4
5+
6+
env:
7+
global:
8+
- DEFAULT=1
9+
10+
matrix:
11+
fast_finish: true
12+
13+
include:
14+
- php: 7.1
15+
16+
- php: 7.2
17+
18+
- php: 7.0
19+
env: PREFER_LOWEST=1
20+
21+
- php: 7.3
22+
env: CODECOVERAGE=1 DEFAULT=0
23+
24+
- php: 7.3
25+
env: CHECKS=1 DEFAULT=0
26+
27+
before_install:
28+
- phpenv config-rm xdebug.ini
29+
30+
before_script:
31+
- if [[ $CHECKS != 1 ]]; then composer require --dev phpunit/phpunit:"^5.7.14|^6.0"; fi
32+
33+
- if [[ $PREFER_LOWEST != 1 ]]; then composer install --prefer-source --no-interaction; fi
34+
- if [[ $PREFER_LOWEST == 1 ]]; then composer update --prefer-lowest --prefer-stable --prefer-dist --no-interaction; fi
35+
- if [[ $PREFER_LOWEST == 1 ]]; then composer require --dev dereuromark/composer-prefer-lowest:dev-master; fi
36+
37+
script:
38+
- if [[ $DEFAULT == 1 ]]; then vendor/bin/phpunit; fi
39+
- if [[ $PREFER_LOWEST == 1 ]]; then vendor/bin/validate-prefer-lowest; fi
40+
41+
- if [[ $CHECKS == 1 ]]; then composer phpstan-setup && composer phpstan; fi
42+
- if [[ $CHECKS == 1 ]]; then composer cs-check; fi
43+
44+
- if [[ $CODECOVERAGE == 1 ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=clover.xml; fi
45+
46+
after_success:
47+
- if [[ $CODECOVERAGE == 1 ]]; then bash <(curl -s https://codecov.io/bash); fi
48+
49+
cache:
50+
directories:
51+
- $HOME/.composer/cache

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License
2+
3+
Copyright (c) 2020 [email protected]
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Cloudflare Deploy Plugin for CakePHP
2+
3+
[![Build Status](https://travis-ci.com/challgren/cakephp-cloudflare-deploy.svg?branch=master)](https://travis-ci.com/challgren/cakephp-cloudflare-deploy)
4+
[![Coverage Status](https://codecov.io/gh/challgren/cakephp-cloudflare-deploy/branch/master/graph/badge.svg)](https://codecov.io/gh/challgren/cakephp-cloudflare-deploy)
5+
[![Latest Stable Version](https://img.shields.io/packagist/v/challgren/cakephp-cloudflare-deploy)](https://packagist.org/packages/challgren/cakephp-cloudflare-deploy)
6+
![PHP from Packagist](https://img.shields.io/packagist/php-v/challgren/cakephp-cloudflare-deploy)
7+
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)
8+
[![Total Downloads](https://img.shields.io/packagist/dt/challgren/cakephp-cloudflare-deploy)](https://packagist.org/packages/challgren/cakephp-cloudflare-deploy)
9+
[![PHPStan Level](https://img.shields.io/badge/PHPStan%20Level-7-brightgreen)](https://github.com/phpstan/phpstan)
10+
11+
This plugin provides userful commands when deploying with [Cloudflare](https://cloudflare.com/).
12+
13+
This branch is for use with **CakePHP 3.8+**. For details see [version map](https://github.com/challgren/cakephp-cloudflare-deploy/wiki)
14+
15+
## Installation and Usage
16+
17+
See [documentation](https://github.com/challgren/cakephp-cloudflare-deploy/tree/master/docs)
18+
19+
## Contributing
20+
You can [fork](https://help.github.com/articles/fork-a-repo) the project, add features, and send [pull requests](https://help.github.com/articles/using-pull-requests) or open [issues](https://github.com/challgren/cakephp-cloudflare-deploy/issues).
21+
22+
## Reporting Issues
23+
24+
If you are facing a problem with this plugin or found any bug, please open an issue on [GitHub](https://github.com/challgren/cakephp-cloudflare-deploy/issues).

composer.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"name": "challgren/cakephp-cloudflare-deploy",
3+
"type": "cakephp-plugin",
4+
"description": "Useful console commands for deploying CakePHP apps using Cloudflare.",
5+
"keywords": ["cakephp","cloudflare","deploy"],
6+
"homepage": "https://github.com/challgren/cakephp-cloudflare-deploy",
7+
"license": "MIT",
8+
"authors": [
9+
{
10+
"name": "Chris Hallgren",
11+
"homepage": "https://www.hallgren.net",
12+
"role": "Maintainer"
13+
},
14+
{
15+
"name": "Contributors",
16+
"homepage": "https://github.com/challgren/cakephp-cloudflare-deploy/graphs/contributors",
17+
"role": "Contributor"
18+
}
19+
],
20+
"require": {
21+
"php": ">=7.0",
22+
"cakephp/cakephp": "^3.8",
23+
"cloudflare/sdk": "^1.1"
24+
},
25+
"require-dev": {
26+
"cakephp/cakephp-codesniffer": "^3.0"
27+
},
28+
"support": {
29+
"source": "https://github.com/challgren/cakephp-cloudflare-deploy"
30+
},
31+
"autoload": {
32+
"psr-4": {
33+
"CloudflareDeploy\\": "src/"
34+
}
35+
},
36+
"autoload-dev": {
37+
"psr-4": {
38+
"CloudflareDeploy\\Test\\": "tests/",
39+
"App\\": "tests/test_app/src/",
40+
"Cake\\Test\\": "vendor/cakephp/cakephp/tests/"
41+
}
42+
},
43+
"scripts": {
44+
"phpstan": "phpstan analyse -c tests/phpstan.neon src/",
45+
"phpstan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:^0.12 && mv composer.backup composer.json",
46+
"test": "php phpunit.phar",
47+
"test-setup": "[ ! -f phpunit.phar ] && wget https://phar.phpunit.de/phpunit-6.5.13.phar && mv phpunit-6.5.13.phar phpunit.phar || true",
48+
"cs-check": "phpcs --colors -p --standard=vendor/cakephp/cakephp-codesniffer/CakePHP src/ tests/",
49+
"cs-fix": "phpcbf --colors --standard=vendor/cakephp/cakephp-codesniffer/CakePHP src/ tests/"
50+
}
51+
}

config/app_cloudflare.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
return [
4+
'Cloudflare' => [
5+
'apiUser' => '',
6+
'apiKey' => '',
7+
'zoneId' => ''
8+
]
9+
];

config/bootstrap.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
use Cake\Core\Configure;
3+
4+
// Optionally load additional queue config defaults from local app config
5+
if (file_exists(ROOT . DS . 'config' . DS . 'app_cloudflare.php')) {
6+
Configure::load('app_cloudflare');
7+
}

config/routes.php

Whitespace-only changes.

0 commit comments

Comments
 (0)