From 0542d370260f6a4b4786395fa0ed1591ff577e1f Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Thu, 26 Jan 2017 10:50:36 +1300 Subject: [PATCH] Update configuration, CI, readme, composer for SS4 compatibility --- .scrutinizer.yml | 2 +- .travis.yml | 25 ++++++---------- _config/config.yml | 17 ++++++----- code-of-conduct.md | 2 +- composer.json | 71 +++++++++++++++++++++++----------------------- license.md | 12 ++++---- package.json | 8 +++--- readme.md | 10 +++---- 8 files changed, 68 insertions(+), 79 deletions(-) diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 630167b..08d4445 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -66,4 +66,4 @@ checks: argument_type_checks: true filter: - paths: [code/*, tests/*] + paths: [src/*, tests/*] diff --git a/.travis.yml b/.travis.yml index 452a012..13afbd4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,38 +1,29 @@ language: php php: - - 5.3 - - 5.4 + - 5.5 + - 5.6 - 7.0 - -sudo: false + - 7.1 env: - - DB=MYSQL CORE_RELEASE=3.3 + - DB=MYSQL CORE_RELEASE=4 matrix: include: - - php: 5.5 - env: DB=PGSQL CORE_RELEASE=3 - php: 5.6 - env: DB=MYSQL CORE_RELEASE=3.3 - allow_failures: - - php: 7.0 + env: DB=PGSQL CORE_RELEASE=3 before_script: - composer self-update || true - - git clone git://github.com/silverstripe-labs/silverstripe-travis-support.git ~/travis-support + - git clone git://github.com/silverstripe/silverstripe-travis-support.git ~/travis-support - php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss - cd ~/builds/ss - composer install script: - vendor/bin/phpunit --coverage-clover coverage.clover sharedraftcontent/tests + +after_success: - wget https://scrutinizer-ci.com/ocular.phar - - git remote rm origin - - git remote add origin git@github.com:silverstripe-labs/silverstripe-sharedraftcontent.git - php ocular.phar code-coverage:upload --format=php-clover coverage.clover - -branches: - only: - - master diff --git a/_config/config.yml b/_config/config.yml index 734b906..622e3f8 100644 --- a/_config/config.yml +++ b/_config/config.yml @@ -2,16 +2,15 @@ Name: sharedraftcontent After: framework/routes#coreroutes --- -SiteTree: +SilverStripe\CMS\Model\SiteTree: extensions: - - ShareDraftContentSiteTreeExtension -CMSMain: + - SilverStripe\ShareDraftContent\Extensions\ShareDraftContentSiteTreeExtension +SilverStripe\CMS\Controllers\CMSMain: extensions: - - ShareDraftContentRequirementsExtension -Controller: + - SilverStripe\ShareDraftContent\Extensions\ShareDraftContentRequirementsExtension +SilverStripe\Control\Controller: extensions: - - ShareDraftContentControllerExtension -Director: + - SilverStripe\ShareDraftContent\Controllers\ShareDraftContentControllerExtension +SilverStripe\Core\Director: rules: - 'preview': 'ShareDraftController' ---- \ No newline at end of file + 'preview': 'SilverStripe\ShareDraftContent\Controllers\ShareDraftController' diff --git a/code-of-conduct.md b/code-of-conduct.md index 9cad55d..98bc37d 100644 --- a/code-of-conduct.md +++ b/code-of-conduct.md @@ -1,3 +1,3 @@ # Code of Conduct -https://docs.silverstripe.org/en/3.1/contributing/code_of_conduct/ \ No newline at end of file +https://docs.silverstripe.org/en/4/contributing/code_of_conduct/ diff --git a/composer.json b/composer.json index c11d0aa..eaac975 100644 --- a/composer.json +++ b/composer.json @@ -1,38 +1,37 @@ { - "name": "silverstripe/sharedraftcontent", - "type": "silverstripe-module", - "description": "Share draft page content with non-CMS users", - "license": "BSD-3-Clause", - "keywords": ["silverstripe"], - "authors": [ - { - "name": "Damian Mooyman", - "email": "damian.mooyman@gmail.com" - }, - { - "name": "Christopher Pitt", - "email": "chris@silverstripe.com" - }, - { - "name": "David Craig", - "email": "david@silverstripe.com" - } - ], - "require": { - "silverstripe/framework": "^3.3", - "silverstripe/cms": "^3.3", - "assertchris/hash-compat": "^1.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.7" - }, - "extra": - { - "branch-alias": - { - "dev-master": "1.1.x-dev" - } - }, - "minimum-stability": "dev", - "prefer-stable": true + "name": "silverstripe/sharedraftcontent", + "type": "silverstripe-module", + "description": "Share draft page content with non-CMS users", + "license": "BSD-3-Clause", + "keywords": ["silverstripe"], + "authors": [ + { + "name": "Damian Mooyman", + "email": "damian.mooyman@gmail.com" + }, + { + "name": "Christopher Pitt", + "email": "chris@silverstripe.com" + }, + { + "name": "David Craig", + "email": "david@silverstripe.com" + } + ], + "require": { + "silverstripe/framework": "^4.0@dev", + "silverstripe/cms": "^4.0@dev" + }, + "require-dev": { + "phpunit/phpunit": "~4.8" + }, + "extra": + { + "branch-alias": + { + "dev-master": "2.x-dev" + } + }, + "minimum-stability": "dev", + "prefer-stable": true } diff --git a/license.md b/license.md index f8030d4..996beee 100644 --- a/license.md +++ b/license.md @@ -1,4 +1,4 @@ -Copyright (c) 2015, SilverStripe Limited +Copyright (c) 2017, SilverStripe Limited All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -8,9 +8,9 @@ Redistribution and use in source and binary forms, with or without modification, * Neither the name of SilverStripe nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/package.json b/package.json index 05ef620..fedb36a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sharedraftcontent", - "version": "1.0.0", + "version": "2.0.0", "description": "Share draft page content with non-CMS users", "devDependencies": { "clean-css": "^3.2.8", @@ -14,14 +14,14 @@ }, "repository": { "type": "git", - "url": "https://github.com/silverstripe-labs/silverstripe-sharedraftcontent.git" + "url": "https://github.com/silverstripe/silverstripe-sharedraftcontent.git" }, "keywords": [ "SilverStripe" ], "license": "BSD-3-Clause", "bugs": { - "url": "https://github.com/silverstripe-labs/silverstripe-sharedraftcontent/issues" + "url": "https://github.com/silverstripe/silverstripe-sharedraftcontent/issues" }, - "homepage": "https://github.com/silverstripe-labs/silverstripe-sharedraftcontent" + "homepage": "https://github.com/silverstripe/silverstripe-sharedraftcontent" } diff --git a/readme.md b/readme.md index 864422e..a83cdb0 100644 --- a/readme.md +++ b/readme.md @@ -1,8 +1,8 @@ # Share Draft Content -[![Build Status](http://img.shields.io/travis/silverstripe-labs/silverstripe-sharedraftcontent.svg?style=flat-square)](https://travis-ci.org/silverstripe-labs/silverstripe-sharedraftcontent) -[![Code Quality](http://img.shields.io/scrutinizer/g/silverstripe-labs/silverstripe-sharedraftcontent.svg?style=flat-square)](https://scrutinizer-ci.com/g/silverstripe-labs/silverstripe-sharedraftcontent) -[![Code Coverage](http://img.shields.io/scrutinizer/coverage/g/silverstripe-labs/silverstripe-sharedraftcontent.svg?style=flat-square)](https://scrutinizer-ci.com/g/silverstripe-labs/silverstripe-sharedraftcontent) +[![Build Status](http://img.shields.io/travis/silverstripe/silverstripe-sharedraftcontent.svg?style=flat-square)](https://travis-ci.org/silverstripe/silverstripe-sharedraftcontent) +[![Code Quality](http://img.shields.io/scrutinizer/g/silverstripe/silverstripe-sharedraftcontent.svg?style=flat-square)](https://scrutinizer-ci.com/g/silverstripe/silverstripe-sharedraftcontent) +[![Code Coverage](http://img.shields.io/scrutinizer/coverage/g/silverstripe/silverstripe-sharedraftcontent.svg?style=flat-square)](https://scrutinizer-ci.com/g/silverstripe/silverstripe-sharedraftcontent) [![Version](http://img.shields.io/packagist/v/silverstripe/sharedraftcontent.svg?style=flat-square)](https://packagist.org/packages/silverstripe/silverstripe-sharedraftcontent) [![License](http://img.shields.io/packagist/l/silverstripe/sharedraftcontent.svg?style=flat-square)](LICENSE.md) ![helpfulrobot](https://helpfulrobot.io/silverstripe/sharedraftcontent/badge) @@ -15,7 +15,7 @@ This module adds a 'Share draft' action menu to the CMS. This enables Content Au ## Requirements -- SilverStripe ^3.1 +- SilverStripe ^4.0 ## Installation @@ -37,4 +37,4 @@ All methods, with `public` visibility, are part of the public API. All other met ## Reporting Issues -Please [create an issue](http://github.com/silverstripe-labs/silverstripe-sharedraftcontent/issues) for any bugs you've found, or features you're missing. +Please [create an issue](http://github.com/silverstripe/silverstripe-sharedraftcontent/issues) for any bugs you've found, or features you're missing.