Skip to content

Commit

Permalink
Update version and copyright
Browse files Browse the repository at this point in the history
  • Loading branch information
nicksagona committed Feb 12, 2021
1 parent abbbc8e commit ab8632f
Show file tree
Hide file tree
Showing 11 changed files with 75 additions and 50 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
tests/ export-ignore
phpunit.xml export-ignore
.travis.yml export-ignore
37 changes: 37 additions & 0 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: phpunit

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

#- name: Validate composer.json and composer.lock
# run: composer validate

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress --no-suggest

# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md

- name: Run test suite
run: composer run-script test
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE.TXT
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3 Clause License

Copyright (c) 2009-2020, NOLA Interactive, LLC.
Copyright (c) 2009-2021, NOLA Interactive, LLC.
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pop-console
===========

[![Build Status](https://travis-ci.org/popphp/pop-console.svg?branch=master)](https://travis-ci.org/popphp/pop-console)
[![Build Status](https://github.com/popphp/pop-console/workflows/phpunit/badge.svg)](https://github.com/popphp/pop-console/actions)
[![Coverage Status](http://cc.popphp.org/coverage.php?comp=pop-console)](http://cc.popphp.org/pop-console/)

OVERVIEW
Expand Down
11 changes: 7 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
}
],
"require": {
"php": ">=7.1.0",
"popphp/popphp": "^3.3.0"
"php": ">=7.3.0",
"popphp/popphp": "^3.7.0"
},
"require-dev": {
"phpunit/phpunit": "^7.0.0"
"phpunit/phpunit": "^9.0.0"
},
"autoload": {
"psr-4": {
Expand All @@ -36,9 +36,12 @@
"Pop\\Console\\Test\\": "tests/"
}
},
"scripts": {
"test": "vendor/bin/phpunit"
},
"extra": {
"branch-alias": {
"dev-master": "3.1.x-dev"
"dev-master": "3.2.x-dev"
}
}
}
Expand Down
31 changes: 15 additions & 16 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<phpunit bootstrap="vendor/autoload.php">
<testsuites>
<testsuite name="Pop Console Component PHPUnit Test">
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src</directory>
</whitelist>
</filter>
<logging>
<log type="coverage-html" target="/tmp/pop-console-cc" lowUpperBound="35"
highLowerBound="70"/>
<log type="coverage-text" showUncoveredFiles="true"/>
</logging>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">src</directory>
</include>
<report>
<html outputDirectory="/tmp/pop-console-cc" lowUpperBound="35" highLowerBound="70"/>
</report>
</coverage>
<testsuites>
<testsuite name="Pop Console Component PHPUnit Test">
<directory>tests</directory>
</testsuite>
</testsuites>
<logging/>
</phpunit>
6 changes: 3 additions & 3 deletions src/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* @link https://github.com/popphp/popphp-framework
* @author Nick Sagona, III <[email protected]>
* @copyright Copyright (c) 2009-2020 NOLA Interactive, LLC. (http://www.nolainteractive.com)
* @copyright Copyright (c) 2009-2021 NOLA Interactive, LLC. (http://www.nolainteractive.com)
* @license http://www.popphp.org/license New BSD License
*/

Expand All @@ -19,9 +19,9 @@
* @category Pop
* @package Pop\Console
* @author Nick Sagona, III <[email protected]>
* @copyright Copyright (c) 2009-2020 NOLA Interactive, LLC. (http://www.nolainteractive.com)
* @copyright Copyright (c) 2009-2021 NOLA Interactive, LLC. (http://www.nolainteractive.com)
* @license http://www.popphp.org/license New BSD License
* @version 3.1.1
* @version 3.2.0
*/
class Command
{
Expand Down
6 changes: 3 additions & 3 deletions src/Console.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* @link https://github.com/popphp/popphp-framework
* @author Nick Sagona, III <[email protected]>
* @copyright Copyright (c) 2009-2020 NOLA Interactive, LLC. (http://www.nolainteractive.com)
* @copyright Copyright (c) 2009-2021 NOLA Interactive, LLC. (http://www.nolainteractive.com)
* @license http://www.popphp.org/license New BSD License
*/

Expand All @@ -21,9 +21,9 @@
* @category Pop
* @package Pop\Console
* @author Nick Sagona, III <[email protected]>
* @copyright Copyright (c) 2009-2020 NOLA Interactive, LLC. (http://www.nolainteractive.com)
* @copyright Copyright (c) 2009-2021 NOLA Interactive, LLC. (http://www.nolainteractive.com)
* @license http://www.popphp.org/license New BSD License
* @version 3.1.1
* @version 3.2.0
*/
class Console
{
Expand Down
6 changes: 3 additions & 3 deletions src/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* @link https://github.com/popphp/popphp-framework
* @author Nick Sagona, III <[email protected]>
* @copyright Copyright (c) 2009-2020 NOLA Interactive, LLC. (http://www.nolainteractive.com)
* @copyright Copyright (c) 2009-2021 NOLA Interactive, LLC. (http://www.nolainteractive.com)
* @license http://www.popphp.org/license New BSD License
*/

Expand All @@ -19,8 +19,8 @@
* @category Pop
* @package Pop\Console
* @author Nick Sagona, III <[email protected]>
* @copyright Copyright (c) 2009-2020 NOLA Interactive, LLC. (http://www.nolainteractive.com)
* @copyright Copyright (c) 2009-2021 NOLA Interactive, LLC. (http://www.nolainteractive.com)
* @license http://www.popphp.org/license New BSD License
* @version 3.1.1
* @version 3.2.0
*/
class Exception extends \Exception {}
10 changes: 5 additions & 5 deletions tests/ConsoleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,23 +171,23 @@ public function testDisplayHelpColors()
$console->help();
$result = ob_get_clean();

$this->assertContains('user', $result);
$this->assertStringContainsString('user', $result);
}

public function testColor()
{
$console = new Console();
$string = $console->colorize('Hello World', Console::BOLD_BLUE, Console::RED);
$this->assertContains('[1;34m', $string);
$this->assertContains('[41m', $string);
$this->assertContains('[0m', $string);
$this->assertStringContainsString('[1;34m', $string);
$this->assertStringContainsString('[41m', $string);
$this->assertStringContainsString('[0m', $string);
}

public function testBadColor()
{
$console = new Console();
$string = $console->colorize('Hello World', 'BAD_FG', 'BAD_BG');
$this->assertContains('Hello World', $string);
$this->assertStringContainsString('Hello World', $string);
}

public function testAppend()
Expand Down

0 comments on commit ab8632f

Please sign in to comment.