jenkins-bot has submitted this change and it was merged.

Change subject: Update Blueprint tests
......................................................................


Update Blueprint tests

Add `grunt test` automation for jshint, jscs, jsonlint, and banana; fix
files so they pass.  Add `composer test` automation for parallel-lint.
Continous Integration requires https://gerrit.wikimedia.org/r/#/c/226542/

Change-Id: I30f0c4dc656384fb0b1041e5434ea96c003043a5
---
A .jscsrc
A .jshintignore
A .jshintrc
A Gruntfile.js
M composer.json
M composer.lock
M i18n/en.json
M i18n/qqq.json
A package.json
M resources/menu.js
M resources/toc.js
11 files changed, 143 insertions(+), 7 deletions(-)

Approvals:
  Prtksxna: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/.jscsrc b/.jscsrc
new file mode 100644
index 0000000..9d22e3f
--- /dev/null
+++ b/.jscsrc
@@ -0,0 +1,3 @@
+{
+       "preset": "wikimedia"
+}
diff --git a/.jshintignore b/.jshintignore
new file mode 100644
index 0000000..3c3629e
--- /dev/null
+++ b/.jshintignore
@@ -0,0 +1 @@
+node_modules
diff --git a/.jshintrc b/.jshintrc
new file mode 100644
index 0000000..82721ad
--- /dev/null
+++ b/.jshintrc
@@ -0,0 +1,19 @@
+{
+       // Enforcing
+       "bitwise": true,
+       "eqeqeq": true,
+       "freeze": true,
+       "latedef": true,
+       "noarg": true,
+       "nonew": true,
+       "undef": true,
+       "unused": false,
+       "strict": false,
+
+       // Relaxing
+       "es5": false,
+
+       // Environment
+       "browser": true,
+       "jquery": true
+}
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 0000000..da3ed31
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,35 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+       var conf = grunt.file.readJSON( 'skin.json' );
+
+       grunt.loadNpmTasks( 'grunt-banana-checker' );
+       grunt.loadNpmTasks( 'grunt-contrib-jshint' );
+       grunt.loadNpmTasks( 'grunt-jscs' );
+       grunt.loadNpmTasks( 'grunt-jsonlint' );
+
+       grunt.initConfig( {
+               jshint: {
+                       options: {
+                               jshintrc: true
+                       },
+                       all: [
+                               '**/*.js',
+                               '!lib/**',
+                               '!node_modules/**'
+                       ]
+               },
+               jscs: {
+                       src: '<%= jshint.all %>'
+               },
+               banana: conf.MessagesDirs,
+               jsonlint: {
+                       all: [
+                               '**/*.json',
+                               '!node_modules/**'
+                       ]
+               }
+       } );
+
+       grunt.registerTask( 'test', [ 'jshint', 'jscs', 'jsonlint', 'banana' ] 
);
+       grunt.registerTask( 'default', 'test' );
+};
diff --git a/composer.json b/composer.json
index 6e5ef43..1724e12 100644
--- a/composer.json
+++ b/composer.json
@@ -2,5 +2,13 @@
     "require": {
         "werdnum/simple-lightncandy": "~0.1-dev",
         "werdnum/mediawiki-lightncandy-skin": "~0.1-dev"
+    },
+    "require-dev": {
+        "jakub-onderka/php-parallel-lint": "0.9.*"
+    },
+    "scripts": {
+        "test": [
+            "parallel-lint . --exclude vendor"
+        ]
     }
 }
diff --git a/composer.lock b/composer.lock
index 99205d2..1bd96bf 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1,10 +1,10 @@
 {
     "_readme": [
         "This file locks the dependencies of your project to a known state",
-        "Read more about it at 
http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file";,
+        "Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file";,
         "This file is @generated automatically"
     ],
-    "hash": "e72751453fd65e861864cc13d8e197db",
+    "hash": "588b787398a5b08e15c2f367fafcb0bf",
     "packages": [
         {
             "name": "werdnum/mediawiki-lightncandy-skin",
@@ -114,7 +114,55 @@
             "time": "2015-03-04 02:07:44"
         }
     ],
-    "packages-dev": [],
+    "packages-dev": [
+        {
+            "name": "jakub-onderka/php-parallel-lint",
+            "version": "v0.9",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/JakubOnderka/PHP-Parallel-Lint.git";,
+                "reference": "1b693fb455201cacf595163c92bfb1adfa2158d8"
+            },
+            "dist": {
+                "type": "zip",
+                "url": 
"https://api.github.com/repos/JakubOnderka/PHP-Parallel-Lint/zipball/1b693fb455201cacf595163c92bfb1adfa2158d8";,
+                "reference": "1b693fb455201cacf595163c92bfb1adfa2158d8",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "require-dev": {
+                "jakub-onderka/php-console-highlighter": "~0.3",
+                "nette/tester": "~1.3"
+            },
+            "suggest": {
+                "jakub-onderka/php-console-highlighter": "Highlight syntax in 
code snippet"
+            },
+            "bin": [
+                "parallel-lint"
+            ],
+            "type": "library",
+            "autoload": {
+                "classmap": [
+                    "./"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/";,
+            "license": [
+                "BSD"
+            ],
+            "authors": [
+                {
+                    "name": "Jakub Onderka",
+                    "email": "[email protected]"
+                }
+            ],
+            "description": "This tool check syntax of PHP files about 20x 
faster than serial check.",
+            "homepage": "https://github.com/JakubOnderka/PHP-Parallel-Lint";,
+            "time": "2015-06-16 10:17:07"
+        }
+    ],
     "aliases": [],
     "minimum-stability": "stable",
     "stability-flags": {
diff --git a/i18n/en.json b/i18n/en.json
index e44a6d5..11cdd63 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -1,3 +1,8 @@
 {
+       "@metadata": {
+               "authors": [
+                       "werdna"
+               ]
+       },
        "blueprint-left-nav": "* [[Main Page]]\n"
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index b9e22a9..7f44569 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -1,3 +1,8 @@
 {
+       "@metadata": {
+               "authors": [
+                       "werdna"
+               ]
+       },
        "blueprint-left-nav": "List of links to show in the left navigation for 
the skin"
 }
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..7a6ece4
--- /dev/null
+++ b/package.json
@@ -0,0 +1,13 @@
+{
+  "scripts": {
+    "test": "grunt test"
+  },
+  "devDependencies": {
+    "grunt": "0.4.5",
+    "grunt-cli": "0.1.13",
+    "grunt-contrib-jshint": "0.11.2",
+    "grunt-banana-checker": "0.2.2",
+    "grunt-jscs": "2.0.0",
+    "grunt-jsonlint": "1.0.4"
+  }
+}
diff --git a/resources/menu.js b/resources/menu.js
index 40bcd52..d2d1c40 100644
--- a/resources/menu.js
+++ b/resources/menu.js
@@ -5,12 +5,11 @@
                $extraSpace = $( '#extra-space' ),
                $content = $( '#content' );
 
-
        openSidebar = function () {
                var
                        sidebarWidth = $sideMenu.width() + 10,
                        marginDifference = sidebarWidth - 
$content.offset().left,
-                       navBrandWidth = $( '.navbar-head' ).width();
+                       navBrandWidth = $( '.navbar-head' ).width(),
                        contentWidth = $content.width();
 
                $extraSpace.css( 'width', sidebarWidth - navBrandWidth - 10 );
@@ -35,7 +34,7 @@
                        'margin-left': '',
                        'width': ''
                } );
-       }
+       };
 
        $tocToggle.click( function ( e ) {
                e.preventDefault();
diff --git a/resources/toc.js b/resources/toc.js
index f99bfd7..b19b946 100644
--- a/resources/toc.js
+++ b/resources/toc.js
@@ -1,7 +1,7 @@
 $( function () {
        var $appendTo = $( '#side-menu .sidebar-toc-active' );
 
-       if ( ! $appendTo.length ) {
+       if ( !$appendTo.length ) {
                $appendTo = $( '#side-menu' );
        }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/226535
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I30f0c4dc656384fb0b1041e5434ea96c003043a5
Gerrit-PatchSet: 7
Gerrit-Project: mediawiki/skins/Blueprint
Gerrit-Branch: master
Gerrit-Owner: Paladox <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: JanZerebecki <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Paladox <[email protected]>
Gerrit-Reviewer: Prtksxna <[email protected]>
Gerrit-Reviewer: Spage <[email protected]>
Gerrit-Reviewer: VolkerE <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to