Skip to content

Commit d71d1e6

Browse files
authored
try new composer folder for tests (#1)
* testing bad phpcs with new /tests/ folder for composer * finalize new composer setup * version bump and fix meta data * moving test ruleset into .tests folder
1 parent fc75ea3 commit d71d1e6

File tree

8 files changed

+47
-30
lines changed

8 files changed

+47
-30
lines changed

.circleci/config.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,18 @@ jobs:
77
working_directory: ~/repo
88
steps:
99
- checkout
10-
- run: sudo chmod 777 -R ~
11-
- run: echo $PWD
12-
- run: ls -lart
13-
- run: env COMPOSER=composer-test.json composer install --prefer-source --no-interaction
14-
- run: sudo ./bin/phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs/
15-
- run: env COMPOSER=composer-test.json composer test
10+
- run:
11+
name: Fix checkout permissions
12+
command: sudo chmod 777 -R ~
13+
- run :
14+
name: Run PHPCS Tests
15+
command: |
16+
cd .tests
17+
echo $PWD
18+
ls -lart
19+
composer install --prefer-source --no-interaction
20+
./bin/phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs/
21+
composer test
1622
notify:
1723
docker:
1824
- image: circleci/node:latest

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# dirs
22
/bin/
3+
*/bin/
34

45
# circle ci
56
/lib/*/.circleci
67

78
# composer
89
composer.phar
910
/vendor/
11+
*/vendor/
1012
/lib/autoload.php
1113
!/lib/composer/
1214
!/lib/composer/installed.json

.circleci/codesniffer.ruleset.xml renamed to .tests/codesniffer.ruleset.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,7 @@
1414
<rule ref="WordPress">
1515
<exclude name="WordPress.WhiteSpace.PrecisionAlignment.Found" />
1616
</rule>
17+
<rule ref="WordPress.Files.FileName.InvalidClassFileName">
18+
<exclude-pattern>/lib/*</exclude-pattern>
19+
</rule>
1720
</ruleset>

.tests/composer.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"config": {
3+
"bin-dir": "bin",
4+
"vendor-dir": "vendor"
5+
},
6+
"require-dev": {
7+
"wp-coding-standards/wpcs": "^1"
8+
},
9+
"scripts": {
10+
"test": "./bin/phpcs -s --standard=codesniffer.ruleset.xml --extensions='php,css' ../",
11+
"fix": "./bin/phpcbf --standard=codesniffer.ruleset.xml --extensions='php,css' ../"
12+
}
13+
}
File renamed without changes.

composer-test.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

composer.json

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "sm-dashboard-pages-navigator-tree",
3-
"description": "TODO",
3+
"description": "Dashboard Pages Navigator Tree plus extras!",
4+
"type": "wordpress-plugin",
45
"keywords": [
56
"wordpress",
67
"site-options",
@@ -12,15 +13,20 @@
1213
"authors": [
1314
{
1415
"name": "WordPress Phoenix",
15-
"email": "code.devwalker@domain.test",
16-
"homepage": "https://github.com/WordPress-Phoenix/sm-dashboard-pages-navigator-tree",
17-
"role": "Developer"
18-
}
16+
"homepage": "https://github.com/WordPress-Phoenix",
17+
"role": "Group"
18+
},
19+
{
20+
"name": "Seth Carstens",
21+
"email": "seth.carstens@gmail.com",
22+
"homepage": "https://github.com/scarstens",
23+
"role": "Developer"
24+
}
1925
],
2026
"require": {
2127
"WordPress-Phoenix/abstract-plugin-base": "^2.6"
2228
},
2329
"config": {
2430
"vendor-dir": "lib"
2531
}
26-
}
32+
}

sm-dashboard-pages-navigator-tree.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,21 @@
77
* @subpackage Sm_dashboard_pages_navigator_tree
88
* @author Seth Carstens - WordPress Phoenix
99
* @license GNU GPL v2.0+
10-
* @link TODO
10+
* @link https://github.com/WordPress-Phoenix/sm-dashboard-pages-navigator-tree
1111
*
1212
* Built with WP PHX WordPress Development Toolkit v3.1.0 on Friday 1st of March 2019 06:36:00 PM
1313
* @link https://github.com/WordPress-Phoenix/wordpress-development-toolkit
1414
*
1515
* Plugin Name: SM Dashboard Pages Navigator Tree
16-
* Plugin URI: TODO
17-
* Description: TODO
18-
* Version: 2.0.0
16+
* Plugin URI: https://github.com/WordPress-Phoenix/sm-dashboard-pages-navigator-tree
17+
* Description: Dashboard widget with Pages Navigator and a FrontEnd shortcode to build html sitemaps.
18+
* Version: 2.1.0
1919
* Author: Seth Carstens - WordPress Phoenix
2020
* Text Domain: sm-dashboard-pages-navigator-tree
2121
* License: GNU GPL v2.0+
2222
*/
2323

24-
defined( 'ABSPATH' ) or die(); // WordPress must exist.
24+
defined( 'ABSPATH' ) || die(); // WordPress must exist.
2525

2626
$current_dir = trailingslashit( dirname( __FILE__ ) );
2727

0 commit comments

Comments
 (0)