From 7d0fe59d77edf9235d7e3ec6fa6c87d2f06131aa Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Mon, 15 Feb 2016 08:54:48 -0800 Subject: [PATCH] adding PHP linting --- .gitignore | 2 ++ .travis.yml | 29 ++++++++++++++++++++++ composer.json | 5 ++++ composer.lock | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++ cron/README.md | 36 +++++++++++++++++++++++++-- 5 files changed, 136 insertions(+), 2 deletions(-) create mode 100644 .gitignore create mode 100644 .travis.yml create mode 100644 composer.json create mode 100644 composer.lock diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b2a69e9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.DS_Store +vendor diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..2c9e956 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,29 @@ +language: php + +php: + - 5.3 + - 5.4 + - 5.5 + - 5.6 + - 7.0 + +install: + - composer install + +script: + - vendor/jakub-onderka/php-parallel-lint/parallel-lint --exclude vendor . + +before_deploy: "zip -r 'Cron' cron" + +deploy: + provider: releases + api_key: + secure: mksWi0izhEWhU3ANoUxPQ0joBy4yCwiu7Y17HjvxxVYDuVXM/73ie1zQ34AFCtts4FxNmwrT1tAxVksDa41k1a6x3paxfcT6PySletw4RB3T3OmxNO4HYsvmtSL4DVWw7ru5btlFTVMB+cClqAP3u+T+14QPOrYfYJWqz5ckf+w= + file: Cron.zip + skip_cleanup: true + on: + repo: EllisLab/Cron + php: 7.0 + tags: true + condition: $TRAVIS_PULL_REQUEST = false + diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..c9be1bc --- /dev/null +++ b/composer.json @@ -0,0 +1,5 @@ +{ + "require-dev": { + "jakub-onderka/php-parallel-lint": "^0.9.2" + } +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..4e97ea5 --- /dev/null +++ b/composer.lock @@ -0,0 +1,66 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "hash": "ca39d78b044b8db537839862860bc623", + "content-hash": "ef9b5fee7c3fac8a5bc799d2b2bf31e0", + "packages": [], + "packages-dev": [ + { + "name": "jakub-onderka/php-parallel-lint", + "version": "v0.9.2", + "source": { + "type": "git", + "url": "https://github.com/JakubOnderka/PHP-Parallel-Lint.git", + "reference": "2ead2e4043ab125bee9554f356e0a86742c2d4fa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/JakubOnderka/PHP-Parallel-Lint/zipball/2ead2e4043ab125bee9554f356e0a86742c2d4fa", + "reference": "2ead2e4043ab125bee9554f356e0a86742c2d4fa", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "jakub-onderka/php-console-highlighter": "~0.3", + "nette/tester": "~1.3" + }, + "suggest": { + "jakub-onderka/php-console-highlighter": "Highlight syntax in code snippet" + }, + "bin": [ + "parallel-lint" + ], + "type": "library", + "autoload": { + "classmap": [ + "./" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Jakub Onderka", + "email": "jakub.onderka@gmail.com" + } + ], + "description": "This tool check syntax of PHP files about 20x faster than serial check.", + "homepage": "https://github.com/JakubOnderka/PHP-Parallel-Lint", + "time": "2015-12-15 10:42:16" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [] +} diff --git a/cron/README.md b/cron/README.md index a86b015..6ce0d17 100644 --- a/cron/README.md +++ b/cron/README.md @@ -2,6 +2,12 @@ Allows the calling of plugin and module scripts on a regular, scheduled basis. Unlike a true server cron that can be scheduled to the second, it is triggered by hits to the page that includes your cron tag. It should be used on templates that get regular traffic, or that are themselves accessed by a server cron. +## Installation + +1. Download the [latest release](https://github.com/EllisLab/Cron/releases/latest). +2. Copy the `cron` folder to your `system/user/addons` folder (you can ignore the rest of this repository's files). +3. In your ExpressionEngine control panel, visit the Add-On Manager and click Install next to "Cron - Base Plugin". + ## Usage ### `{exp:cron}` @@ -57,11 +63,15 @@ and then the name of the function being called in that module/plugin's class. ## Change Log +### 2.0.2 + +- Improved instructions + ### 2.0.1 - Fixed a bug where the plugin wouldn't work after 2015. -### 2.0 +### 2.0.0 - Updated plugin to be 3.0 compatible @@ -69,7 +79,7 @@ and then the name of the function being called in that module/plugin's class. - Fixed a bug that caused the plugin to stop working after December 2010 -### 1.1 +### 1.1.0 - Updated plugin to be 2.0 compatible @@ -90,3 +100,25 @@ Figured out how to make the plugin a little bit faster too. - Fixed a minor little bug that occurred when the day parameter was set to * and the month before this month had more days in it than the current month. + +## Additional Files + +You may be wondering what the rest of the files in this package are for. They are solely for development, so if you are forking the GitHub repo, they can be helpful. If you are just using the add-on in your ExpressionEngine installation, you can ignore all of these files. + +- **.editorconfig**: [EditorConfig](http://editorconfig.org) helps developers maintain consistent coding styles across files and text editors. +- **.gitignore:** [.gitignore](https://git-scm.com/docs/gitignore) lets you specify files in your working environment that you do not want under source control. +- **.travis.yml:** A [Travis CI](https://travis-ci.org) configuration file for continuous integration (automated testing, releases, etc.). +- **.composer.json:** A [Composer project setup file](https://getcomposer.org/doc/01-basic-usage.md) that manages development dependencies. +- **.composer.lock:** A [list of dependency versions](https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file) that Composer has locked to this project. + +## License + +Copyright (C) 2004 - 2016 EllisLab, 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 ELLISLAB, INC. 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. + +Except as contained in this notice, the name of EllisLab, Inc. shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from EllisLab, Inc.