-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
1,004 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
114 changes: 114 additions & 0 deletions
114
wp-content/plugins/civicrm-config-exporter/.circleci/config.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
workflows: | ||
version: 2 | ||
main: | ||
jobs: | ||
- php56-build | ||
- php70-build | ||
- php71-build | ||
- php72-build | ||
- php73-build | ||
- php74-build | ||
|
||
version: 2 | ||
|
||
job-references: | ||
mysql_image: &mysql_image | ||
circleci/mysql:5.6 | ||
|
||
setup_environment: &setup_environment | ||
name: "Setup Environment Variables" | ||
command: | | ||
echo "export PATH=$HOME/.composer/vendor/bin:$PATH" >> $BASH_ENV | ||
source /home/circleci/.bashrc | ||
install_dependencies: &install_dependencies | ||
name: "Install Dependencies" | ||
command: | | ||
sudo apt-get update && sudo apt-get install subversion | ||
sudo -E docker-php-ext-install mysqli | ||
sudo sh -c "printf '\ndeb http://ftp.us.debian.org/debian sid main\n' >> /etc/apt/sources.list" | ||
sudo apt-get update && sudo apt-get install mysql-client-5.7 | ||
php_job: &php_job | ||
environment: | ||
- WP_TESTS_DIR: "/tmp/wordpress-tests-lib" | ||
- WP_CORE_DIR: "/tmp/wordpress/" | ||
steps: | ||
- checkout | ||
- run: *setup_environment | ||
- run: *install_dependencies | ||
- run: | ||
name: "Run Tests" | ||
command: | | ||
composer global require "phpunit/phpunit=5.7.*" | ||
composer global require wp-coding-standards/wpcs | ||
phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs | ||
phpcs | ||
rm -rf $WP_TESTS_DIR $WP_CORE_DIR | ||
bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 latest | ||
phpunit | ||
WP_MULTISITE=1 phpunit | ||
jobs: | ||
php56-build: | ||
<<: *php_job | ||
docker: | ||
- image: circleci/php:5.6 | ||
- image: *mysql_image | ||
steps: | ||
- checkout | ||
- run: *setup_environment | ||
- run: *install_dependencies | ||
- run: | ||
name: "Run Tests" | ||
command: | | ||
composer global require "phpunit/phpunit=5.7.*" | ||
composer global require wp-coding-standards/wpcs | ||
phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs | ||
phpcs | ||
SKIP_DB_CREATE=false | ||
rm -rf $WP_TESTS_DIR $WP_CORE_DIR | ||
bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 4.5 $SKIP_DB_CREATE | ||
phpunit | ||
WP_MULTISITE=1 phpunit | ||
SKIP_DB_CREATE=true | ||
rm -rf $WP_TESTS_DIR $WP_CORE_DIR | ||
bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 latest $SKIP_DB_CREATE | ||
phpunit | ||
WP_MULTISITE=1 phpunit | ||
SKIP_DB_CREATE=true | ||
rm -rf $WP_TESTS_DIR $WP_CORE_DIR | ||
bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 trunk $SKIP_DB_CREATE | ||
phpunit | ||
WP_MULTISITE=1 phpunit | ||
SKIP_DB_CREATE=true | ||
php70-build: | ||
<<: *php_job | ||
docker: | ||
- image: circleci/php:7.0 | ||
- image: *mysql_image | ||
|
||
php71-build: | ||
<<: *php_job | ||
docker: | ||
- image: circleci/php:7.1 | ||
- image: *mysql_image | ||
|
||
php72-build: | ||
<<: *php_job | ||
docker: | ||
- image: circleci/php:7.2 | ||
- image: *mysql_image | ||
|
||
php73-build: | ||
<<: *php_job | ||
docker: | ||
- image: circleci/php:7.3 | ||
- image: *mysql_image | ||
|
||
php74-build: | ||
<<: *php_job | ||
docker: | ||
- image: circleci/php:7.4 | ||
- image: *mysql_image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# A set of files you probably don't want in your WordPress.org distribution | ||
.babelrc | ||
.deployignore | ||
.distignore | ||
.editorconfig | ||
.eslintignore | ||
.eslintrc | ||
.git | ||
.gitignore | ||
.github | ||
.gitlab-ci.yml | ||
.travis.yml | ||
.DS_Store | ||
.*~ | ||
Thumbs.db | ||
behat.yml | ||
bitbucket-pipelines.yml | ||
bin | ||
.circleci/config.yml | ||
composer.json | ||
composer.lock | ||
dependencies.yml | ||
Gruntfile.js | ||
package.json | ||
package-lock.json | ||
phpunit.xml | ||
phpunit.xml.dist | ||
multisite.xml | ||
multisite.xml.dist | ||
.phpcs.xml | ||
phpcs.xml | ||
.phpcs.xml.dist | ||
phpcs.xml.dist | ||
README.md | ||
webpack.config.js | ||
wp-cli.local.yml | ||
yarn.lock | ||
tests | ||
vendor | ||
node_modules | ||
*.sql | ||
*.tar.gz | ||
*.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# This file is for unifying the coding style for different editors and IDEs | ||
# editorconfig.org | ||
|
||
# WordPress Coding Standards | ||
# https://make.wordpress.org/core/handbook/coding-standards/ | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
indent_style = tab | ||
indent_size = 4 | ||
|
||
[{.jshintrc,*.json,*.yml}] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[{*.txt,wp-config-sample.php}] | ||
end_of_line = crlf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.DS_Store | ||
phpcs.xml | ||
phpunit.xml | ||
Thumbs.db | ||
wp-cli.local.yml | ||
node_modules/ | ||
*.sql | ||
*.tar.gz | ||
*.zip |
47 changes: 47 additions & 0 deletions
47
wp-content/plugins/civicrm-config-exporter/.phpcs.xml.dist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="WordPress Coding Standards based custom ruleset for your plugin"> | ||
<description>Generally-applicable sniffs for WordPress plugins.</description> | ||
|
||
<!-- What to scan --> | ||
<file>.</file> | ||
<exclude-pattern>/vendor/</exclude-pattern> | ||
<exclude-pattern>/node_modules/</exclude-pattern> | ||
|
||
<!-- How to scan --> | ||
<!-- Usage instructions: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage --> | ||
<!-- Annotated ruleset: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml --> | ||
<arg value="sp"/> <!-- Show sniff and progress --> | ||
<arg name="basepath" value="./"/><!-- Strip the file paths down to the relevant bit --> | ||
<arg name="colors"/> | ||
<arg name="extensions" value="php"/> | ||
<arg name="parallel" value="8"/><!-- Enables parallel processing when available for faster results. --> | ||
|
||
<!-- Rules: Check PHP version compatibility --> | ||
<!-- https://github.com/PHPCompatibility/PHPCompatibility#sniffing-your-code-for-compatibility-with-specific-php-versions --> | ||
<config name="testVersion" value="5.6-"/> | ||
<!-- https://github.com/PHPCompatibility/PHPCompatibilityWP --> | ||
<rule ref="PHPCompatibilityWP"/> | ||
|
||
<!-- Rules: WordPress Coding Standards --> | ||
<!-- https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards --> | ||
<!-- https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties --> | ||
<config name="minimum_supported_wp_version" value="4.6"/> | ||
<rule ref="WordPress"/> | ||
<rule ref="WordPress.NamingConventions.PrefixAllGlobals"> | ||
<properties> | ||
<!-- Value: replace the function, class, and variable prefixes used. Separate multiple prefixes with a comma. --> | ||
<property name="prefixes" type="array" value="my-plugin"/> | ||
</properties> | ||
</rule> | ||
<rule ref="WordPress.WP.I18n"> | ||
<properties> | ||
<!-- Value: replace the text domain used. --> | ||
<property name="text_domain" type="array" value="my-plugin"/> | ||
</properties> | ||
</rule> | ||
<rule ref="WordPress.WhiteSpace.ControlStructureSpacing"> | ||
<properties> | ||
<property name="blank_line_check" value="true"/> | ||
</properties> | ||
</rule> | ||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
module.exports = function( grunt ) { | ||
|
||
'use strict'; | ||
|
||
// Project configuration | ||
grunt.initConfig( { | ||
|
||
pkg: grunt.file.readJSON( 'package.json' ), | ||
|
||
addtextdomain: { | ||
options: { | ||
textdomain: 'civicrm-config-exporter', | ||
}, | ||
update_all_domains: { | ||
options: { | ||
updateDomains: true | ||
}, | ||
src: [ '*.php', '**/*.php', '!\.git/**/*', '!bin/**/*', '!node_modules/**/*', '!tests/**/*' ] | ||
} | ||
}, | ||
|
||
wp_readme_to_markdown: { | ||
your_target: { | ||
files: { | ||
'README.md': 'readme.txt' | ||
} | ||
}, | ||
}, | ||
|
||
makepot: { | ||
target: { | ||
options: { | ||
domainPath: '/languages', | ||
exclude: [ '\.git/*', 'bin/*', 'node_modules/*', 'tests/*' ], | ||
mainFile: 'civicrm-config-exporter.php', | ||
potFilename: 'civicrm-config-exporter.pot', | ||
potHeaders: { | ||
poedit: true, | ||
'x-poedit-keywordslist': true | ||
}, | ||
type: 'wp-plugin', | ||
updateTimestamp: true | ||
} | ||
} | ||
}, | ||
} ); | ||
|
||
grunt.loadNpmTasks( 'grunt-wp-i18n' ); | ||
grunt.loadNpmTasks( 'grunt-wp-readme-to-markdown' ); | ||
grunt.registerTask( 'default', [ 'i18n','readme' ] ); | ||
grunt.registerTask( 'i18n', ['addtextdomain', 'makepot'] ); | ||
grunt.registerTask( 'readme', ['wp_readme_to_markdown'] ); | ||
|
||
grunt.util.linefeed = '\n'; | ||
|
||
}; |
Oops, something went wrong.