Skip to content

Commit

Permalink
Merge f294ab2 into 1876187
Browse files Browse the repository at this point in the history
  • Loading branch information
wilr committed Sep 18, 2017
2 parents 1876187 + f294ab2 commit 060d759
Show file tree
Hide file tree
Showing 43 changed files with 6,625 additions and 1,327 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -1 +1,3 @@
.sass-cache
/.php_cs.cache
/node_modules/
57 changes: 22 additions & 35 deletions .travis.yml
@@ -1,47 +1,34 @@
language: php

addons:
apt:
packages:
- tidy

php:
- 5.6
- 7.0
- 7.1

before_install:
- pip install --user codecov

env:
global:
- DB=MYSQL CORE_RELEASE=4
dist: trusty

matrix:
include:
- php: 7.1
env: DB=MYSQL CORE_RELEASE=4 COVERAGE=1
- php: 5.6
env: DB=PGSQL CORE_RELEASE=4
- php: 5.6
env: DB=SQLITE CORE_RELEASE=4
env: DB=MYSQL PHPCS_TEST=1 PHPUNIT_TEST=1
- php: 7.0
env: DB=PGSQL PHPUNIT_TEST=1
- php: 7.1
env: DB=MYSQL PHPUNIT_COVERAGE_TEST=1
- php: 7.0
env: DB=MYSQL

before_script:
- phpenv rehash
- composer self-update || true
- git clone git://github.com/silverstripe/silverstripe-travis-support.git ~/travis-support
# Install suggested modules in order to maximize test coverage
- php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss --require "ezyang/htmlpurifier:4.*,silverstripe/cms:^4.0@dev"
- cd ~/builds/ss
- phpenv config-rm xdebug.ini
- echo 'memory_limit = 2G' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- composer validate
- composer require silverstripe/recipe-cms 1.0.x-dev --no-update
- if [[ $DB == PGSQL ]]; then composer require --no-update silverstripe/postgresql:2.0.x-dev; fi
- composer install --prefer-dist --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile
- echo "SS_BASE_URL=http://localhost:8080/" >> .env

script:
# Execute tests with no coverage. This is the fastest option
- "if [ \"$COVERAGE\" != \"1\" ]; then vendor/bin/phpunit comments/tests/; fi"
# Bootstrap cms / mysite folder
- php ./cms/tests/bootstrap/mysite.php

# Execute tests with coverage. Do this for a small
- "if [ \"$COVERAGE\" = \"1\" ]; then vendor/bin/phpunit --coverage-clover=coverage.clover comments/tests/; fi"
script:
- if [[ $PHPUNIT_TEST ]]; then vendor/bin/phpunit; fi
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.xml; fi
- if [[ $PHPCS_TEST ]]; then vendor/bin/phpcs --standard=framework/phpcs.xml.dist src/ tests/ ; fi

after_success:
- "if [ \"$COVERAGE\" = \"1\" ]; then mv coverage.clover ~/build/$TRAVIS_REPO_SLUG/; fi"
- cd ~/build/$TRAVIS_REPO_SLUG
- "if [ \"$COVERAGE\" = \"1\" ]; then travis_retry codecov; fi"
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then bash <(curl -s https://codecov.io/bash) -f coverage.xml; fi
2 changes: 2 additions & 0 deletions _config/comments.yml
Expand Up @@ -5,5 +5,7 @@ only:
moduleexists: 'cms'
---
SilverStripe\CMS\Model\SiteTree:
extensions:
- SilverStripe\Comments\Extensions\CommentsExtension
comments:
enabled_cms: true
6 changes: 5 additions & 1 deletion composer.json
Expand Up @@ -16,13 +16,17 @@
"silverstripe/cms": "The SilverStripe Content Management System"
},
"require-dev": {
"phpunit/PHPUnit": "~4.8"
"phpunit/PHPUnit": "^5.7"
},
"extra": {
"branch-alias": {
"dev-master": "3.x-dev"
}
},
"scripts": {
"lint": "phpcs src/ tests/",
"fix": "php-cs-fixer fix src/ && php-cs-fixer fix tests/"
},
"autoload": {
"psr-4": {
"SilverStripe\\Comments\\": "src/",
Expand Down
24 changes: 0 additions & 24 deletions config.rb

This file was deleted.

238 changes: 74 additions & 164 deletions css/comments.css
@@ -1,166 +1,76 @@
.comments-holder-container {
clear: both;
}
.comments-holder-container .field {
clear: left;
}
.comments-holder-container .num,
.comments-holder-container .author {
font-size: 1.3em;
}
.comments-holder-container .num {
color: #999;
margin-right: 5px;
}
.comments-holder-container .num-total {
line-height: 40px;
margin-bottom: 0;
}
.comments-holder-container #moderated {
border: solid #999 1px;
padding: 20px;
font-style: italic;
}
.comments-holder-container .comments-list {
margin: 0;
}
.comments-holder-container .comment-count {
margin: 15px 0;
}
.comments-holder-container .commenting-area {
margin-top: 50px;
}
.comments-holder-container .commenting-area label.left {
font-weight: normal;
}
.comments-holder-container .commenting-rss-feed {
margin-top: 4em;
text-align: right;
}
.comments-holder-container .commenting-rss-feed .action-links {
margin: 20px 0 10px;
}
.comments-holder-container .commenting-rss-feed .action-links li {
display: inline;
list-style-type: none;
margin-left: 20px;
}
.comments-holder-container .commenting-rss-feed .action-links li:first-child {
margin-left: 0;
}
.comments-holder-container .commenting-rss-feed .action-links li.comment-reply-action {
float: right;
}
.comments-holder-container .commenting-rss-feed .action-links a {
background-image: none;
}
.comments-holder-container .commenting-rss-feed .action-links a::first-letter {
text-transform: capitalize;
}
.comments-holder-container .no-comments-yet {
display: inline-block;
margin-top: 10px;
}
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // identity function for calling harmony imports with the correct context
/******/ __webpack_require__.i = function(value) { return value; };
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports) {

.comment {
clear: both;
list-style-type: none;
overflow: hidden;
padding: 20px 0 20px 0;
position: relative;
}
.comment.author-comment:after {
content: 'Author';
float: right;
position: absolute;
top: 1.5em;
right: 0.5em;
font-size: 1em;
font-weight: bold;
}
.comment.author-comment > .comment-text {
border: 1px solid blue;
}
.comment.spam .comment-text {
border: 1px dashed orange;
}
.comment img.gravatar {
float: left;
margin: 20px;
width: 90px;
height: 90px;
border: none;
}
.comment .comment-text {
background-color: #fff;
border: 1px solid #ddd;
box-shadow: none;
margin: 0;
padding: 0 20px 0 20px;
min-height: 130px;
white-space: pre;
white-space: pre-wrap;
white-space: pre-line;
word-wrap: break-word;
}
.comment .comment-text p:last-child {
margin-bottom: 0;
}
.comment .comment-text.hasGravatar {
padding: 0 20px 0 130px;
min-height: 130px;
}
.comment .date {
font-size: 16px;
}
.comment .date:before {
content: '\0000a0\0000a0\0000a0\0000a0';
}
.comment.unmoderated > .comment-text {
border: 1px solid yellow;
}
.comment .info {
margin-bottom: 10px;
}
.comment.spam .comment {
border: 1px dashed orange;
border-radius: 4px;
padding: 2.5em 1em 1em;
}
.comment .comment-replies-container {
clear: both;
padding-left: 10px;
margin: 80px 0 0 0;
border-left: 1px dashed #999;
}
.comment .comment-replies-container .comment-reply-form-holder {
padding: 0 10px;
}
.comment .comment-replies-container .comment-replies-holder {
padding: 0 0 0 10px;
}
// removed by extract-text-webpack-plugin

.comments-list.root-level {
margin-left: 0;
}

.comment-reply-link {
float: right;
}

.comment-moderation-options {
float: left;
}

.comment-action-links {
margin: 20px 0 10px;
}
.comment-action-links a:not(:last-child) {
margin-right: 12px;
}

.commenting-rss-feed ul {
list-style: none;
}

/*# sourceMappingURL=comments.css.map */
/***/ })
/******/ ]);
1 change: 1 addition & 0 deletions css/styles/bundle.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 060d759

Please sign in to comment.