Skip to content

Commit

Permalink
Merge pull request #45 from llaski/v6
Browse files Browse the repository at this point in the history
Version 6
  • Loading branch information
llaski authored Dec 4, 2022
2 parents bde231b + 4a58c11 commit a4ebb4e
Show file tree
Hide file tree
Showing 71 changed files with 28,461 additions and 988 deletions.
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_size = 2

[docker-compose.yml]
indent_size = 4
19 changes: 11 additions & 8 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Ignore all test and documentation for archive
/.github export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/phpunit.xml.dist export-ignore
/tests export-ignore
/docs export-ignore
* text=auto

*.blade.php diff=html
*.css diff=css
*.html diff=html
*.md diff=markdown
*.php diff=php

/.github export-ignore
CHANGELOG.md export-ignore
.styleci.yml export-ignore
80 changes: 39 additions & 41 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,44 @@
name: Tests

on:
pull_request:
branches:
- master
workflow_dispatch:

pull_request:

jobs:
unit-tests:
runs-on: ubuntu-latest

strategy:
matrix:
php: [ '7.3', '7.4', '8.0' ]

name: Tests

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2

- name: Setup Laravel Nova Credentials
run: composer config http-basic.nova.laravel.com ${NOVA_USERNAME} ${NOVA_PASSWORD}
env:
NOVA_PASSWORD: ${{ secrets.NOVA_PASSWORD }}
NOVA_USERNAME: ${{ secrets.NOVA_USERNAME }}

- name: Cache composer dependencies
uses: actions/cache@v1
with:
path: vendor
key: composer-${{ hashFiles('composer.lock') }}

- name: Install composer dependencies
run: composer install --no-ansi --no-interaction --no-scripts --prefer-dist --no-progress

- name: Execute tests
run: vendor/bin/phpunit --verbose
unit-tests:
runs-on: ubuntu-latest

strategy:
matrix:
php: ['8.0', '8.1']

name: Tests - PHP ${{ matrix.php }}

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2

- name: Setup Laravel Nova Credentials
run: composer config http-basic.nova.laravel.com ${NOVA_USERNAME} ${NOVA_LICENSE_KEY}
env:
NOVA_USERNAME: ${{ secrets.NOVA_USERNAME }}
NOVA_LICENSE_KEY: ${{ secrets.NOVA_LICENSE_KEY }}

- name: Cache composer dependencies
uses: actions/cache@v3
with:
path: vendor
key: composer-${{ hashFiles('composer.lock') }}

- name: Install composer dependencies
run:
composer install --no-ansi --no-interaction --no-scripts --prefer-dist
--no-progress

- name: Execute tests
run: vendor/bin/phpunit --verbose
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/.idea
/vendor
/node_modules
package-lock.json
composer.phar
composer.lock
phpunit.xml
.phpunit.result.cache
.DS_Store
Thumbs.db
auth.json
31 changes: 26 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,33 @@

All notable changes to `nova-scheduled-jobs` will be documented in this file

## 1.0.0 - 2018-08-25
## 6.0.0 - 2022-12-05

### Breaking Changes

- Dropped support for PHP 7
- Restructured code to be more simplistic requiring changes to service provider, tool, and card
(see [Readme](https://github.com/llaski/nova-scheduled-jobs/blob/master/README.md) for upgrade,
just follow normal install instructions)
- Updated and fixed Authorization middleware structure
- Routes have changed /nova-scheduled-jobs -> Returns inertiajs component
/nova-scheduled-jobs/jobs -> Returns json w/ list of jobs /nova-scheduled-jobs/dispatch -> Dispatches command
- Temporarily removed localization support. If you need additional support can copy the keys in the resources/lang/en.json file and add them into your own language file.

### Other Changes

- Initial Release
- Removed unneeded dependencies
- Completely revamped Component, following template from `php artisan nova:tool` command
- Updated UI to utilize Nova components and methods
- Updated UI for better dark model support
- Updated UI to follow conventions from `php artisan schedule:list` command

## 1.1.0 - 2018-08-27

- Added Nova Tool to display list of scheduled jobs and commands on full page
- Updated card to 1/2 width and reduced number of fields being displayed
- Updated readme with better screenshots and instructions for tool
- Added Nova Tool to display list of scheduled jobs and commands on full page
- Updated card to 1/2 width and reduced number of fields being displayed
- Updated readme with better screenshots and instructions for tool

## 1.0.0 - 2018-08-25

- Initial Release
55 changes: 33 additions & 22 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,50 +6,61 @@ Please read and understand the contribution guide before creating an issue or pu

## Etiquette

This project is open source, and as such, the maintainers give their free time to build and maintain the source code
held within. They make the code freely available in the hope that it will be of use to other developers. It would be
extremely unfair for them to suffer abuse or anger for their hard work.
This project is open source, and as such, the maintainers give their free time to build and maintain
the source code held within. They make the code freely available in the hope that it will be of use
to other developers. It would be extremely unfair for them to suffer abuse or anger for their hard
work.

Please be considerate towards maintainers when raising issues or presenting pull requests. Let's show the
world that developers are civilized and selfless people.
Please be considerate towards maintainers when raising issues or presenting pull requests. Let's
show the world that developers are civilized and selfless people.

It's the duty of the maintainer to ensure that all submissions to the project are of sufficient
quality to benefit the project. Many developers have different skillsets, strengths, and weaknesses. Respect the maintainer's decision, and do not be upset or abusive if your submission is not used.
quality to benefit the project. Many developers have different skillsets, strengths, and weaknesses.
Respect the maintainer's decision, and do not be upset or abusive if your submission is not used.

## Viability

When requesting or submitting new features, first consider whether it might be useful to others. Open
source projects are used by many developers, who may have entirely different needs to your own. Think about
whether or not your feature is likely to be used by other users of the project.
When requesting or submitting new features, first consider whether it might be useful to others.
Open source projects are used by many developers, who may have entirely different needs to your own.
Think about whether or not your feature is likely to be used by other users of the project.

## Procedure

Before filing an issue:

- Attempt to replicate the problem, to ensure that it wasn't a coincidental incident.
- Check to make sure your feature suggestion isn't already present within the project.
- Check the pull requests tab to ensure that the bug doesn't have a fix in progress.
- Check the pull requests tab to ensure that the feature isn't already in progress.
- Attempt to replicate the problem, to ensure that it wasn't a coincidental incident.
- Check to make sure your feature suggestion isn't already present within the project.
- Check the pull requests tab to ensure that the bug doesn't have a fix in progress.
- Check the pull requests tab to ensure that the feature isn't already in progress.

Before submitting a pull request:

- Check the codebase to ensure that your feature doesn't already exist.
- Check the pull requests to ensure that another person hasn't already submitted the feature or fix.
- Check the codebase to ensure that your feature doesn't already exist.
- Check the pull requests to ensure that another person hasn't already submitted the feature or
fix.

## Requirements

If the project maintainer has any additional requirements, you will find them listed here.

- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](http://pear.php.net/package/PHP_CodeSniffer).
- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** -
The easiest way to apply the conventions is to install
[PHP Code Sniffer](http://pear.php.net/package/PHP_CodeSniffer).

- **Add tests!** - Your patch won't be accepted if it doesn't have tests.
- **Add tests!** - Your patch won't be accepted if it doesn't have tests.

- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.
- **Document any change in behaviour** - Make sure the `README.md` and any other relevant
documentation are kept up-to-date.

- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option.
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly
breaking public APIs is not an option.

- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
- **One pull request per feature** - If you want to do more than one thing, send multiple pull
requests.

- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful.
If you had to make multiple intermediate commits while developing, please
[squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages)
before submitting.

**Happy coding**!
**Happy coding**!
25 changes: 11 additions & 14 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,17 @@ The MIT License (MIT)

Copyright (c) Built By Larry <[email protected]>

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
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 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.
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.
40 changes: 27 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,71 @@
# Nova Scheduled Jobs

[![Latest Version on Packagist](https://img.shields.io/packagist/v/llaski/nova-scheduled-jobs.svg?style=flat-square)](https://packagist.org/packages/llaski/nova-scheduled-jobs)
![Test Suite](https://github.com/llaski/nova-scheduled-jobs/actions/workflows/tests.yml/badge.svg)
[![Total Downloads](https://img.shields.io/packagist/dt/llaski/nova-scheduled-jobs.svg?style=flat-square)](https://packagist.org/packages/llaski/nova-scheduled-jobs)

## Includes both a tool and card to display your scheduled commands and jobs

![Nova Scheduled Jobs Tool Screenshot](https://raw.githubusercontent.com/llaski/screenshots/master/nova-scheduled-jobs-tool.png)
![Nova Scheduled Jobs Tool Screenshot](https://raw.githubusercontent.com/llaski/nova-scheduled-jobs/screenshots/master/Tool.png)

![Nova Scheduled Jobs Card Screenshot](https://raw.githubusercontent.com/llaski/screenshots/master/nova-scheduled-jobs-card.png)
![Nova Scheduled Jobs Card Screenshot](https://raw.githubusercontent.com/llaski/nova-scheduled-jobs/screenshots/master/Card.png)

## Installation

You can install the package in to a Laravel app that uses [Nova](https://nova.laravel.com) via composer:
You can install the package in to a Laravel app that uses [Nova](https://nova.laravel.com) via
composer:

```bash
composer require llaski/nova-scheduled-jobs
```

To setup the tool, you must register the tool with Nova. This is typically done in the `tools` method of the `NovaServiceProvider`.
To setup the tool, you must register the tool with Nova. This is typically done in the `tools`
method of the `NovaServiceProvider`.

```php
// in app/Providers/NovaServiceProvider.php
<?php

namespace App\Providers;

use Llaski\NovaScheduledJobs\Tool as NovaScheduledJobsTool;

// ...

public function tools()
{
return [
// ...
new \Llaski\NovaScheduledJobs\NovaScheduledJobsTool,
new NovaScheduledJobsTool,
];
}
```

To setup the card, you must register the card with Nova. This is typically done in the `cards` method of the `NovaServiceProvider`.
To setup the card, you must register the card with Nova. This is typically done in the `cards`
method of your resource or dashboard. For example:

```php
// in app/Providers/NovaServiceProvider.php
// in app/Nova/Dashboards/Main.php
<?php

namespace App\Nova\Dashboards;

use Llaski\NovaScheduledJobs\Card as NovaScheduledJobsCard;
// ...

public function cards()
{
return [
// ...
new \Llaski\NovaScheduledJobs\NovaScheduledJobsCard,
new NovaScheduledJobsCard,
];
}
```

### Testing

``` bash
phpunit
```zsh
vendor/bin/phpunit --verbose
```

### Changelog
Expand All @@ -65,12 +78,13 @@ Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.
If you discover any security related issues, please email [email protected] instead of using the
issue tracker.

## Credits

- [Larry Laski](https://github.com/llaski)
- [All Contributors](../../contributors)
- [Larry Laski](https://github.com/llaski)
- [All Contributors](../../contributors)

## License

Expand Down
Loading

0 comments on commit a4ebb4e

Please sign in to comment.