From 9f0db809e1188c59e6b430a5a49012675cb81c3e Mon Sep 17 00:00:00 2001 From: Nick Freear Date: Thu, 25 Jun 2015 10:46:25 +0100 Subject: [PATCH] Bug #10/#14, Add `open-media-player-core` to `composer` [iet:3633574] * Plus coding-standard integration/tweaks - `phpcs.xml` * Use `composer-suggest` & `composer-merge-plugin` --- .gitignore | 1 + composer-shared/composer.json | 42 +++++++++++++++++++++ composer.json | 65 +++++++++----------------------- phpcs.xml | 70 ++--------------------------------- 4 files changed, 64 insertions(+), 114 deletions(-) create mode 100644 composer-shared/composer.json diff --git a/.gitignore b/.gitignore index 8405241..1d008e9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ +.env version.json /composer.lock diff --git a/composer-shared/composer.json b/composer-shared/composer.json new file mode 100644 index 0000000..532e284 --- /dev/null +++ b/composer-shared/composer.json @@ -0,0 +1,42 @@ +{ + "name": "iet-ou/open-media-player-shared", + "description": "Shared packages & repositories. ©2015 The Open University, UK.", + "license": "proprietary", + + "repositories": [ + { + "type": "package", + "package": { + "name": "johndyer/mediaelement", + "version": "2.17.0", + "license": "MIT", + "dist": { + "url": "https://github.com/johndyer/mediaelement/archive/2.17.0.zip", + "type": "zip" + }, + "// - source": { + "url": "https://github.com/johndyer/mediaelement.git", + "type": "git", + "reference": "2.17.0" + } + } + }, + { + "type": "vcs", + "url": "https://github.com/IET-OU/open-media-player-core" + }, + { + "type": "vcs", + "url": "https://github.com/IET-OU/open-oembed-providers" + } + ], + "extra": { + "//": [ + "http://mediaplayer.open.ac.uk/demo/info#php - 5.4.36", + "http://embed.open.ac.uk/demo/info#php - 5.3.3", + "https://github.com/IET-OU/ouplayer ../system/core/CodeIgniter.php#L36 - CI 2.1.3", + "http://iet-embed-acct.open.ac.uk/docs/CREDITS.txt", + "https://gist.github.com/nfreear/57262e040d49b2f212ec" + ] + } +} \ No newline at end of file diff --git a/composer.json b/composer.json index 2827e96..e70af40 100644 --- a/composer.json +++ b/composer.json @@ -17,55 +17,37 @@ "issues": "https://github.com/IET-OU/ouplayer/issues", "source": "https://github.com/IET-OU/ouplayer" }, - "repositories": [ - { - "type": "package", - "package": { - "name": "johndyer/mediaelement", - "version": "2.17.0", - "license": "MIT", - "dist": { - "url": "https://github.com/johndyer/mediaelement/archive/2.17.0.zip", - "type": "zip" - }, - "// - source": { - "url": "https://github.com/johndyer/mediaelement.git", - "type": "git", - "reference": "2.17.0" - } - } - } - ], "require": { "php": ">=5.3.3", + "ext-curl": "*", + "ext-xml": "*", "mnsami/composer-custom-directory-installer": "1.0.*", - "johndyer/mediaelement": "2.17.0" + "wikimedia/composer-merge-plugin": "1.0.0", + "nfreear/composer-suggest": "^1.1", + "johndyer/mediaelement": "2.17.0", + "iet-ou/open-media-player-core": "dev-master" }, "require-dev": { "squizlabs/php_codesniffer": "~2.1.0", "jakub-onderka/php-parallel-lint": "~0.8" }, "suggest": { - "iet-ou/ou-media-player-base": "*; Base classes for themes, providers & extensions", - "iet-ou/ou-media-player-ou": "*; OU-only - theme, SAMS auth ...", - "iet-ou/ou-embed-providers": "*; oEmbed providers - Google Docs, Prezi ...", + "iet-ou/open-media-player-theme-x": "*; OU-only - theme ...", + "iet-ou/sams-auth": "*; OU-only - SAMS authentication", + "iet-ou/open-oembed-providers": "*; oEmbed providers - Google Docs, Prezi ...", "nfreear/ou-media-player-test": "*; Remote integration tests.", - "IET-OU/mediaelement-demo": "*; Demos for IET-OU enhancements & fixes to MediaElement.js", - - "wikimedia/composer-merge-plugin": "v1.0.0", - "nfreear/composer-suggest": "^1.1" + "iet-ou/mediaelement-demo": "*; Demos for IET-OU enhancements & fixes to MediaElement.js" }, "scripts": { "test": [ - "#echo $1", - "#export F=application/$1 ;", - "#composer validate #--no-interaction", + "composer validate --no-interaction", + "composer validate --no-interaction --working-dir composer-shared", "#parallel-lint application/*", - "phpcs --standard=./phpcs.xml -n --encoding=utf-8 --extensions=php application/core/*" + "phpcs --standard=./phpcs.xml -n --encoding=utf-8 --extensions=php application/*" ], "test-psr2": [ - "phpcs --standard=PSR2 -n --encoding=utf-8 --extensions=php application/core/MY_Co*" + "phpcs --standard=PSR2 -n --encoding=utf-8 --extensions=php application/core/*" ], "test-v": [ @@ -76,31 +58,20 @@ "phpcbf --standard=PSR2 -n -l --encoding=utf-8 --extensions=php application/core/MY_Co*" ], "fix-oump": [ - "phpcbf --standard=./phpcs.xml -n -l --encoding=utf-8 --extensions=php application/core/*" + "phpcbf --standard=./phpcs.xml -n -l --encoding=utf-8 --extensions=php application/help*" ] }, "config": { "preferred-install": "source" }, "extra": { - "installer-paths": { "./application/engines/mediaelement-x": [ "johndyer/mediaelement" ] }, - "merge-plugin": { "include": [ - "./shared/composer.json" + "./composer-shared/composer.json" ] - }, - - "//": [ - "http://mediaplayer.open.ac.uk/demo/info#php - 5.4.36", - "http://embed.open.ac.uk/demo/info#php - 5.3.3", - "https://github.com/IET-OU/ouplayer ../system/core/CodeIgniter.php#L36 - CI 2.1.3", - "http://iet-embed-acct.open.ac.uk/docs/CREDITS.txt", - - "https://gist.github.com/nfreear/57262e040d49b2f212ec" - ] + } } -} \ No newline at end of file +} diff --git a/phpcs.xml b/phpcs.xml index 1633d04..260e6da 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -2,12 +2,6 @@ OU Media Player coding standard - PSR2, almost! - - \.git /application/assets/ /application/cli/ @@ -25,77 +19,19 @@ /application/libraries/class.pdf2text.php /application/libraries/POParser.php - - /application/libraries/ht--tp.php - */views/* /application/libraries/providers/ + /application/libraries/ - - - - + - - - - - - - - - - - - - /application/controllers/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file