Skip to content

Commit 1057cf0

Browse files
authored
Merge pull request #240 from dshanske/dec22fixes
Dev Dependencies Fixes
2 parents 7539633 + b2db145 commit 1057cf0

File tree

5 files changed

+90
-80
lines changed

5 files changed

+90
-80
lines changed

Gruntfile.js

Lines changed: 39 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,42 @@
11
module.exports = function (grunt) {
2-
// Project configuration.
3-
grunt.initConfig({
4-
checktextdomain: {
5-
options:{
6-
text_domain: 'indieauth',
7-
keywords: [
8-
'__:1,2d',
9-
'_e:1,2d',
10-
'_x:1,2c,3d',
11-
'esc_html__:1,2d',
12-
'esc_html_e:1,2d',
13-
'esc_html_x:1,2c,3d',
14-
'esc_attr__:1,2d',
15-
'esc_attr_e:1,2d',
16-
'esc_attr_x:1,2c,3d',
17-
'_ex:1,2c,3d',
18-
'_n:1,2,4d',
19-
'_nx:1,2,4c,5d',
20-
'_n_noop:1,2,3d',
21-
'_nx_noop:1,2,3c,4d'
22-
]
23-
},
24-
files: {
25-
src: [
26-
'**/*.php', // Include all files
27-
'includes/*.php', // Include includes
28-
'!node_modules/**', // Exclude node_modules/
29-
'!tests/**', // Exclude tests/
30-
'!vendor/**', // Exclude vendor/
31-
'!static/**', // Exclude static resources
32-
],
33-
expand: true
34-
}
35-
},
2+
// Project configuration.
3+
grunt.initConfig(
4+
{
5+
files: {
6+
src: [
7+
'**/*.php', // Include all files
8+
'includes/*.php', // Include includes
9+
'!node_modules/**', // Exclude node_modules/
10+
'!tests/**', // Exclude tests/
11+
'!vendor/**', // Exclude vendor/
12+
'!static/**', // Exclude static resources
13+
],
14+
expand: true
15+
},
16+
wp_readme_to_markdown: {
17+
target: {
18+
files: {
19+
'readme.md': 'readme.txt'
20+
}
21+
}
22+
},
23+
makepot: {
24+
target: {
25+
options: {
26+
mainFile: 'indieauth.php',
27+
domainPath: '/languages',
28+
exclude: ['build/.*'],
29+
potFilename: 'indieauth.pot',
30+
type: 'wp-plugin',
31+
updateTimestamp: true
32+
}
33+
}
34+
}
35+
}
36+
);
3637

37-
wp_readme_to_markdown: {
38-
target: {
39-
files: {
40-
'readme.md': 'readme.txt'
41-
}
42-
}
43-
},
44-
makepot: {
45-
target: {
46-
options: {
47-
mainFile: 'indieauth.php',
48-
domainPath: '/languages',
49-
exclude: ['build/.*'],
50-
potFilename: 'indieauth.pot',
51-
type: 'wp-plugin',
52-
updateTimestamp: true
53-
}
54-
}
55-
}
56-
});
57-
58-
grunt.loadNpmTasks('grunt-wp-readme-to-markdown');
59-
grunt.loadNpmTasks('grunt-wp-i18n');
60-
grunt.loadNpmTasks('grunt-checktextdomain');
61-
// Default task(s).
62-
grunt.registerTask('default', ['wp_readme_to_markdown', 'makepot', 'checktextdomain']);
38+
grunt.loadNpmTasks( 'grunt-wp-readme-to-markdown' );
39+
grunt.loadNpmTasks( 'grunt-wp-i18n' );
40+
// Default task(s).
41+
grunt.registerTask( 'default', ['wp_readme_to_markdown','makepot'] );
6342
};

composer.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,20 @@
2828
},
2929
"require-dev": {
3030
"squizlabs/php_codesniffer": "^2.2 || ^3.5",
31-
"phpcompatibility/php-compatibility": "^9.3",
31+
"phpcompatibility/php-compatibility": "*",
3232
"wp-coding-standards/wpcs": "*",
3333
"dealerdirect/phpcodesniffer-composer-installer": "^0.7",
34-
"phpcompatibility/phpcompatibility-wp": "^2.1",
34+
"phpcompatibility/phpcompatibility-wp": "*",
3535
"sebastian/phpcpd": "^3.0 || ^4.0 || ^6.0",
3636
"yoast/phpunit-polyfills": "^1.0"
3737
},
3838
"scripts": {
3939
"install-codestandards": [
4040
"Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run"
4141
],
42+
"post-install-cmd": [
43+
"@install-codestandard"
44+
],
4245
"setup-local-tests": "bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1 latest",
4346
"phpunit": "./vendor/bin/phpunit",
4447
"test": [

includes/class-indieauth-token-endpoint.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,14 +226,14 @@ public function generate_token_response( $response ) {
226226
$return['uuid'] = $response['uuid'];
227227
}
228228

229-
$return['scope'] = $response['scope'];
230-
$return['issued_by'] = rest_url( 'indieauth/1.0/token' );
231-
$return['client_id'] = $response['client_id'];
229+
$return['scope'] = $response['scope'];
230+
$return['issued_by'] = rest_url( 'indieauth/1.0/token' );
231+
$return['client_id'] = $response['client_id'];
232232
if ( array_key_exists( 'id', $client ) ) {
233233
$return['client_uid'] = $client['id'];
234234
}
235235

236-
$return['iat'] = time();
236+
$return['iat'] = time();
237237

238238
$expires = (int) get_option( 'indieauth_expires_in' );
239239

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@
1212
},
1313
"devDependencies": {
1414
"grunt": "^1.0.4",
15-
"grunt-checktextdomain": "^1.0.1",
1615
"grunt-wp-i18n": "^1.0.3",
17-
"grunt-wp-readme-to-markdown": "^2.0.1"
16+
"grunt-wp-readme-to-markdown": "^2.1.0"
1817
},
1918
"license": "MIT",
2019
"bugs": {

phpcs.xml

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,53 @@
22
<ruleset name="WordPress Indieauth">
33
<description>WordPress Indieauth Standards</description>
44

5-
<file>./indieauth.php</file>
6-
<file>./includes/</file>
7-
<file>./templates/</file>
8-
<exclude-pattern>*/includes/*\.(inc|css|js|svg)</exclude-pattern>
9-
<exclude-pattern>*/vendor/*</exclude-pattern>
10-
<rule ref="PHPCompatibility"/>
5+
<file>.</file>
6+
<exclude-pattern>*\.(inc|css|js|svg)</exclude-pattern>
7+
<!-- Exclude the Composer Vendor directory. -->
8+
<exclude-pattern>/vendor/*</exclude-pattern>
9+
10+
<!-- Exclude the Node Modules directory. -->
11+
<exclude-pattern>/node_modules/*</exclude-pattern>
12+
13+
<!-- Exclude the Test directory. -->
14+
<exclude-pattern>/tests/*</exclude-pattern>
15+
16+
<!-- Exclude the Bin directory. -->
17+
<exclude-pattern>/bin/*</exclude-pattern>
18+
19+
<!-- Strip the filepaths down to the relevant bit. -->
20+
<arg name="basepath" value="."/>
21+
22+
<!-- Check up to 8 files simultaneously. -->
23+
<arg name="parallel" value="8"/>
24+
25+
26+
<!-- PHP/WordPress Compatibility Check -->
1127
<config name="testVersion" value="5.6-"/>
1228
<rule ref="PHPCompatibilityWP"/>
13-
<config name="minimum_supported_wp_version" value="4.7"/>
29+
30+
<config name="minimum_supported_wp_version" value="4.9"/>
31+
32+
33+
<rule ref="WordPress.WP.I18n">
34+
<properties>
35+
<property name="text_domain" type="array">
36+
<element value="indieauth"/>
37+
<element value="default"/>
38+
</property>
39+
</properties>
40+
</rule>
41+
1442
<rule ref="WordPress.WP.DeprecatedFunctions" />
43+
<rule ref="WordPress.WP.DeprecatedParameters" />
44+
<rule ref="WordPress.WP.AlternativeFunctions" />
45+
1546
<rule ref="WordPress-Core" />
1647
<rule ref="WordPress.Files.FileName">
17-
<properties>
18-
<property name="strict_class_file_names" value="false" />
19-
</properties>
48+
<properties>
49+
<property name="strict_class_file_names" value="false" />
50+
</properties>
2051
</rule>
2152

2253
<rule ref="WordPress-Extra" />
23-
<rule ref="WordPress.WP.I18n"/>
24-
<config name="text_domain" value="indieauth,default"/>
2554
</ruleset>

0 commit comments

Comments
 (0)