[MediaWiki-commits] [Gerrit] Convert to extension.json - change (mediawiki...GoogleAPIClient)

2015-10-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Convert to extension.json
..


Convert to extension.json

Clear php entry point.

Change-Id: I2562e2976955eba1f0cdab88b9ddb7675e065c19
---
M GoogleAPIClient.php
A extension.json
2 files changed, 41 insertions(+), 47 deletions(-)

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



diff --git a/GoogleAPIClient.php b/GoogleAPIClient.php
index 42d9c23..ab3dc2d 100644
--- a/GoogleAPIClient.php
+++ b/GoogleAPIClient.php
@@ -1,49 +1,14 @@
  __FILE__,
-   'name' => 'GoogleAPIClient',
-   'author' => 'Florian Schmidt',
-   'url' => 
'https://www.mediawiki.org/wiki/Extension:GoogleAPIClient',
-   'descriptionmsg' => 'googleapiclient-desc',
-   'version'  => '01.0',
-   'license-name' => "MIT/Apache",
-   );
-
-   $dir = __DIR__;
-
-   // Load message file
-   $wgMessagesDirs['GoogleAPIClient'] = $dir . '/i18n';
-
-   // Autoload Classes
-   $wgAutoloadClasses[ 'Google_Client' ] = $dir . 
'/lib/src/Google/Client.php';
-   $wgAutoloadClasses[ 'GoogleAPIClientHooks' ] = $dir . 
'/GoogleAPIClient.hooks.php';
-
-   // Hook handlers
-   $wgHooks['UnitTestsList'][] = 'GoogleAPIClientHooks::onUnitTestsList';
+if ( function_exists( 'wfLoadExtension' ) ) {
+   wfLoadExtension( 'GoogleAPIClient' );
+   // Keep i18n globals so mergeMessageFileList.php doesn't break
+   $wgMessagesDirs['GoogleAPIClient'] = __DIR__ . '/i18n';
+   /* wfWarn(
+   'Deprecated PHP entry point used for GoogleAPIClient extension. 
Please use wfLoadExtension instead, ' .
+   'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
+   ); */
+   return true;
+} else {
+   die( 'This version of the GoogleAPIClient extension requires MediaWiki 
1.25+' );
+}
diff --git a/extension.json b/extension.json
new file mode 100644
index 000..434d3ee
--- /dev/null
+++ b/extension.json
@@ -0,0 +1,29 @@
+{
+   "name": "GoogleAPIClient",
+   "version": "0.1.1",
+   "author": [
+   "Florian Schmidt"
+   ],
+   "url": "https://www.mediawiki.org/wiki/Extension:GoogleAPIClient;,
+   "descriptionmsg": "googleapiclient-desc",
+   "license-name": "MIT",
+   "type": "other",
+   "requires": {
+   "MediaWiki": ">= 1.25.0"
+   },
+   "MessagesDirs": {
+   "GoogleAPIClient": [
+   "i18n"
+   ]
+   },
+   "Hooks": {
+   "UnitTestsList": [
+   "GoogleAPIClientHooks::onUnitTestsList"
+   ]
+   },
+   "AutoloadClasses": {
+   "Google_Client": "lib/src/Google/Client.php",
+   "GoogleAPIClientHooks": "GoogleAPIClient.hooks.php"
+   },
+   "manifest_version": 1
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2562e2976955eba1f0cdab88b9ddb7675e065c19
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GoogleAPIClient
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Convert to extension.json - change (mediawiki...GoogleAPIClient)

2015-10-18 Thread Florianschmidtwelzow (Code Review)
Florianschmidtwelzow has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/247189

Change subject: Convert to extension.json
..

Convert to extension.json

Clear php entry point.

Change-Id: I2562e2976955eba1f0cdab88b9ddb7675e065c19
---
M GoogleAPIClient.php
A extension.json
2 files changed, 41 insertions(+), 47 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GoogleAPIClient 
refs/changes/89/247189/1

diff --git a/GoogleAPIClient.php b/GoogleAPIClient.php
index 42d9c23..ab3dc2d 100644
--- a/GoogleAPIClient.php
+++ b/GoogleAPIClient.php
@@ -1,49 +1,14 @@
  __FILE__,
-   'name' => 'GoogleAPIClient',
-   'author' => 'Florian Schmidt',
-   'url' => 
'https://www.mediawiki.org/wiki/Extension:GoogleAPIClient',
-   'descriptionmsg' => 'googleapiclient-desc',
-   'version'  => '01.0',
-   'license-name' => "MIT/Apache",
-   );
-
-   $dir = __DIR__;
-
-   // Load message file
-   $wgMessagesDirs['GoogleAPIClient'] = $dir . '/i18n';
-
-   // Autoload Classes
-   $wgAutoloadClasses[ 'Google_Client' ] = $dir . 
'/lib/src/Google/Client.php';
-   $wgAutoloadClasses[ 'GoogleAPIClientHooks' ] = $dir . 
'/GoogleAPIClient.hooks.php';
-
-   // Hook handlers
-   $wgHooks['UnitTestsList'][] = 'GoogleAPIClientHooks::onUnitTestsList';
+if ( function_exists( 'wfLoadExtension' ) ) {
+   wfLoadExtension( 'GoogleAPIClient' );
+   // Keep i18n globals so mergeMessageFileList.php doesn't break
+   $wgMessagesDirs['GoogleAPIClient'] = __DIR__ . '/i18n';
+   /* wfWarn(
+   'Deprecated PHP entry point used for GoogleAPIClient extension. 
Please use wfLoadExtension instead, ' .
+   'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
+   ); */
+   return true;
+} else {
+   die( 'This version of the GoogleAPIClient extension requires MediaWiki 
1.25+' );
+}
diff --git a/extension.json b/extension.json
new file mode 100644
index 000..434d3ee
--- /dev/null
+++ b/extension.json
@@ -0,0 +1,29 @@
+{
+   "name": "GoogleAPIClient",
+   "version": "0.1.1",
+   "author": [
+   "Florian Schmidt"
+   ],
+   "url": "https://www.mediawiki.org/wiki/Extension:GoogleAPIClient;,
+   "descriptionmsg": "googleapiclient-desc",
+   "license-name": "MIT",
+   "type": "other",
+   "requires": {
+   "MediaWiki": ">= 1.25.0"
+   },
+   "MessagesDirs": {
+   "GoogleAPIClient": [
+   "i18n"
+   ]
+   },
+   "Hooks": {
+   "UnitTestsList": [
+   "GoogleAPIClientHooks::onUnitTestsList"
+   ]
+   },
+   "AutoloadClasses": {
+   "Google_Client": "lib/src/Google/Client.php",
+   "GoogleAPIClientHooks": "GoogleAPIClient.hooks.php"
+   },
+   "manifest_version": 1
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2562e2976955eba1f0cdab88b9ddb7675e065c19
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GoogleAPIClient
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits