Skip to content

Commit

Permalink
Merge pull request #159 from dshanske/develop
Browse files Browse the repository at this point in the history
Merge 4.0.6 to stable
  • Loading branch information
dshanske committed Apr 13, 2020
2 parents 233cca2 + 9f00528 commit bea6bf1
Show file tree
Hide file tree
Showing 42 changed files with 8,259 additions and 1,486 deletions.
6 changes: 3 additions & 3 deletions .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
/bin
/sass
/vendor
/test
/tests
.eslintrc.js
sass
readme.md
package.json
package-lock.json
composer.json
composer.lock
Gruntfile.js
push.sh
phpunit.xml
phpunit.xml.dist
phpcs.xml
README.md
readme.md
.travis.yml

.distignore
.gitignore
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ module.exports = {
"jquery": true,
"es6": true,
},
"extends": "wordpress",
"extends": [ "plugin:@wordpress/eslint-plugin/esnext" ],
"rules": {}
};
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,3 @@ node_modules/*
!node_modules/jstz
/node_modules/jstz/dist/*
!node_modules/jstz/dist/jstz.min.js
package-lock.json
composer.lock
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ env:
- WP_TRAVISCI=travis:phpunit
matrix:
include:
- php: 7.4
env: WP_TRAVISCI=travis:phpcs
- php: 7.3
- php: 7.2
- php: 7.0
- php: 5.6
- php: 5.6
env: WP_TRAVISCI=travis:phpcs
before_script:
- |
# Remove Xdebug for a huge performance increase:
Expand All @@ -38,7 +38,7 @@ before_script:
# Install the specified version of PHPUnit depending on the PHP version:
if [[ "$WP_TRAVISCI" == "travis:phpunit" ]]; then
case "$TRAVIS_PHP_VERSION" in
7.3|7.2|7.1|7.0|nightly)
7.4|7.3|7.2|7.1|7.0|nightly)
echo "Using PHPUnit 6.x"
composer global require "phpunit/phpunit:^6"
;;
Expand Down
36 changes: 14 additions & 22 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
eslint: {
options: {
fix: true
},
location: {
src: ['js/location.js']
src: ['js/location.js', 'js/zones.js' ]
}
},

Expand Down Expand Up @@ -39,33 +42,22 @@ module.exports = function(grunt) {
}
}
},
curl: {
'data/airports.csv': 'http://ourairports.com/data/airports.csv'
},

makepot: {
target: {
options: {
mainFile: 'simple-location.php',
domainPath: '/languages',
potFilename: 'simple-location.pot',
type: 'wp-plugin',
exclude: [
'build/.*'
],
updateTimestamp: true
}
}
}
downloadfile: {
options: {
overwriteEverytime: true
},
files: {
'data/airports.csv': 'https://ourairports.com/data/airports.csv'
}
}
});

// Load plugins.
grunt.loadNpmTasks('grunt-wp-readme-to-markdown');
grunt.loadNpmTasks('grunt-wp-i18n');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-eslint');
grunt.loadNpmTasks('grunt-curl');
grunt.loadNpmTasks('grunt-downloadfile');

// Default task(s).
grunt.registerTask('default', ['wp_readme_to_markdown', 'makepot', 'eslint', 'sass' ]);
grunt.registerTask('default', ['wp_readme_to_markdown', 'eslint', 'sass' ]);
};
9 changes: 6 additions & 3 deletions bin/install-wp-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ download() {
fi
}

if [[ $WP_VERSION =~ ^[0-9]+\.[0-9]+$ ]]; then
if [[ $WP_VERSION =~ ^[0-9]+\.[0-9]+\-(beta|RC)[0-9]+$ ]]; then
WP_BRANCH=${WP_VERSION%\-*}
WP_TESTS_TAG="branches/$WP_BRANCH"

elif [[ $WP_VERSION =~ ^[0-9]+\.[0-9]+$ ]]; then
WP_TESTS_TAG="branches/$WP_VERSION"
elif [[ $WP_VERSION =~ [0-9]+\.[0-9]+\.[0-9]+ ]]; then
if [[ $WP_VERSION =~ [0-9]+\.[0-9]+\.[0] ]]; then
Expand All @@ -47,7 +51,6 @@ else
fi
WP_TESTS_TAG="tags/$LATEST_VERSION"
fi

set -ex

install_wp() {
Expand Down Expand Up @@ -95,7 +98,7 @@ install_wp() {
install_test_suite() {
# portable in-place argument for both GNU sed and Mac OSX sed
if [[ $(uname -s) == 'Darwin' ]]; then
local ioption='-i .bak'
local ioption='-i.bak'
else
local ioption='-i'
fi
Expand Down
20 changes: 16 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
"description": "Simple Location for WordPress",
"type": "wordpress-plugin",
"license": "GPLv2 or later",
"support": {
"issues": "https://github.com/dshanske/simple-location/issues",
"source": "https://github.com/dshanske/simple-location"
},
"authors": [
{
"name": "David Shanske",
Expand All @@ -13,20 +17,28 @@
"installer-name": "simple-location"
},
"require": {
"php": ">=5.2.0",
"php": ">=5.4.0",
"composer/installers": "~1.0",
"emcconville/google-map-polyline-encoding-tool": "^1.3"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.4",
"dealerdirect/phpcodesniffer-composer-installer": "^0.6",
"squizlabs/php_codesniffer": "^2.2 || ^3.0.2",
"phpcompatibility/php-compatibility": "*",
"wp-coding-standards/wpcs": "*",
"phpcompatibility/phpcompatibility-wp": "^1.0"
"phpcompatibility/phpcompatibility-wp": "*",
"php-parallel-lint/php-parallel-lint": "^1.2",
"wp-cli/i18n-command": "^2.2",
"sebastian/phpcpd": "^5.0",
"phpunit/phpunit": "^7.0"
},
"prefer-stable" : true,
"scripts": {
"lint": "phpcs",
"lint:phpcpd": "./vendor/bin/phpcpd --fuzzy --exclude .git --exclude vendor --exclude node_modules .",
"lint:wpcs": "./vendor/bin/phpcs",
"lint:wpcs-fix": "./vendor/bin/phpcbf",
"make-pot": "./vendor/bin/wp i18n make-pot . languages/simple-location.pot",
"lint:php": "@php ./vendor/bin/parallel-lint --exclude .git --exclude vendor --exclude node_modules .",
"install-codestandards": [
"Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run"
]
Expand Down
Loading

0 comments on commit bea6bf1

Please sign in to comment.