-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
163 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,35 @@ | ||
# For more information about the properties used in this file, | ||
# please see the EditorConfig documentation: | ||
# http://editorconfig.org | ||
# For more information about the properties used in | ||
# this file, please see the EditorConfig documentation: | ||
# http://editorconfig.org/ | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 4 | ||
indent_style = space | ||
indent_style = tab | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[{*.yml,package.json}] | ||
# Docs say 80 ideally, 100 ok, no more than 120 | ||
# http://doc.silverstripe.org/en/getting_started/coding_conventions/ | ||
max_line_length = 100 | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.yml] | ||
indent_size = 2 | ||
indent_style = space | ||
|
||
# The indent size used in the package.json file cannot be changed: | ||
#PSR 2 | ||
[**.php] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[{.travis.yml,package.json}] | ||
# The indent size used in the `package.json` file cannot be changed | ||
# https://github.com/npm/npm/pull/3180#issuecomment-16336516 | ||
indent_size = 2 | ||
indent_style = space |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/tests export-ignore | ||
/docs export-ignore | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore | ||
/phpunit.xml export-ignore | ||
/tests export-ignore | ||
/docs export-ignore | ||
/.travis.yml export-ignore | ||
/.scrutinizer.yml export-ignore | ||
/phpunit.xml export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
inherit: true | ||
|
||
#Copied from https://www.adayinthelifeof.nl/2013/11/20/external-code-coverage-with-travis-scrutinizer/ | ||
tools: | ||
external_code_coverage: | ||
timeout: 600 | ||
php_code_sniffer: | ||
config: | ||
standard: PSR2 | ||
php_cs_fixer: | ||
extensions: | ||
# Default: | ||
- php | ||
fixers: [] | ||
enabled: false | ||
filter: | ||
paths: [tests/*,code/*] | ||
excluded_paths: [] | ||
coding_style: | ||
php: | ||
indentation: | ||
general: | ||
use_tabs: false | ||
|
||
filter: | ||
paths: [tests/*,code/*] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
|
||
language: php | ||
|
||
sudo: false | ||
|
||
addons: | ||
apt: | ||
packages: | ||
- tidy | ||
|
||
php: | ||
- 7.0 | ||
|
||
before_install: | ||
- pip install --user codecov | ||
|
||
env: | ||
global: | ||
- DB=MYSQL CORE_RELEASE=3.4 | ||
- MODULE_PATH=imageuploadfield | ||
- COVERAGE=0 | ||
|
||
matrix: | ||
include: | ||
- php: 5.6 | ||
env: DB=MYSQL COVERAGE=1 | ||
- php: 5.6 | ||
env: DB=PGSQL | ||
- php: 5.6 | ||
env: DB=SQLITE | ||
- php: hhvm | ||
env: DB=MYSQL | ||
allow_failures: | ||
- php: 5.6 | ||
env: DB=MYSQL CORE_RELEASE=4.0 | ||
- php: 7.0 | ||
env: DB=MYSQL CORE_RELEASE=4.0 | ||
|
||
before_script: | ||
- phpenv rehash | ||
- composer self-update || true | ||
- git clone git://github.com/silverstripe-labs/silverstripe-travis-support.git ~/travis-support | ||
- php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss | ||
- cd ~/builds/ss | ||
|
||
script: | ||
# Execute tests with no coverage. This is the fastest option | ||
- "if [ \"$COVERAGE\" = \"0\" ]; then vendor/bin/phpunit $MODULE_PATH/tests/; fi" | ||
|
||
# Execute tests with coverage. Do this for a small | ||
- "if [ \"$COVERAGE\" = \"1\" ]; then vendor/bin/phpunit --coverage-clover=coverage.clover $MODULE_PATH/tests/; fi" | ||
|
||
after_script: | ||
- "if [ \"$COVERAGE\" = \"1\" ]; then mv coverage.clover ~/build/$TRAVIS_REPO_SLUG/; fi" | ||
- cd ~/build/$TRAVIS_REPO_SLUG | ||
- wget https://scrutinizer-ci.com/ocular.phar | ||
- "if [ \"$COVERAGE\" = \"1\" ]; then travis_retry codecov && travis_retry php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
--- | ||
Name: ImageUploadFieldconfig | ||
--- | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,29 @@ | ||
{ | ||
"name": "ImageUploadField", | ||
"description": "UploadField preconfigured for Image uploads. Allows max file size to be set", | ||
"name": "dynamic/imageuploadfield", | ||
"description": "SilverStripe UploadField pre-configured for Image uploads. Allows max file size to be set site wide.", | ||
"authors": [ | ||
{ | ||
"name": "Dynamic, Inc.", | ||
"email": "dev@dy.ag" | ||
} | ||
], | ||
"keywords": [ | ||
"silverstripe" | ||
"silverstripe", "dynamic", "image", "upload", "field", "module" | ||
], | ||
"type": "silverstripe-module", | ||
"license": "BSD-3-Clause", | ||
"require": { | ||
"silverstripe/cms": "^3.2", | ||
"silverstripe/framework": "^3.2", | ||
"silverstripe/reactjs-common": "dev-master" | ||
"silverstripe/framework": "^3.2" | ||
}, | ||
"require-dev": { | ||
"phpunit/PHPUnit": "^3.7" | ||
}, | ||
"repositories": [ | ||
{ | ||
"type": "vcs", | ||
"url": "https://github.com/open-sausages/silverstripe-reactjs-common" | ||
} | ||
], | ||
"config": { | ||
"process-timeout": 600 | ||
}, | ||
"minimum-stability": "dev", | ||
"prefer-stable": true | ||
"prefer-stable": true, | ||
"extra": { | ||
"installer-name": "imageuploadfield" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
class ImageUploadFieldTest extends SapphireTest | ||
{ | ||
public function test__construct() | ||
{ | ||
$field = new ImageUploadField('Image'); | ||
$this->assertInstanceOf('UploadField', $field); | ||
} | ||
} |
Oops, something went wrong.