Skip to content

Commit 57d7b18

Browse files
committed
initial commit
0 parents  commit 57d7b18

File tree

19 files changed

+330
-0
lines changed

19 files changed

+330
-0
lines changed

.editorconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# For more information about the properties used in this file,
2+
# please see the EditorConfig documentation:
3+
# http://editorconfig.org
4+
5+
[*]
6+
charset = utf-8
7+
end_of_line = lf
8+
indent_size = 4
9+
indent_style = space
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true
12+
13+
[{*.yml,package.json}]
14+
indent_size = 2
15+
16+
# The indent size used in the package.json file cannot be changed:
17+
# https://github.com/npm/npm/pull/3180#issuecomment-16336516

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/tests export-ignore
2+
/docs export-ignore
3+
/.gitattributes export-ignore
4+
/.gitignore export-ignore
5+
/phpunit.xml export-ignore

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
npm-debug.log
2+
node_modules/

.scrutinizer.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
inherit: true
2+
3+
#Copied from https://www.adayinthelifeof.nl/2013/11/20/external-code-coverage-with-travis-scrutinizer/
4+
tools:
5+
external_code_coverage:
6+
timeout: 600
7+
php_code_sniffer:
8+
config:
9+
standard: PSR2
10+
php_cs_fixer:
11+
extensions:
12+
# Default:
13+
- php
14+
fixers: []
15+
enabled: false
16+
filter:
17+
paths: [tests/*,src/*]
18+
excluded_paths: []
19+
coding_style:
20+
php:
21+
indentation:
22+
general:
23+
use_tabs: false
24+
25+
checks:
26+
php:
27+
code_rating: true
28+
duplication: true
29+
30+
build:
31+
nodes:
32+
analysis:
33+
tests:
34+
override: [php-scrutinizer-run]
35+
36+
filter:
37+
paths: [tests/*,src/*]

.travis.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
language: php
2+
3+
env:
4+
global:
5+
- COMPOSER_ROOT_VERSION=4.0.x-dev
6+
- CODECOV_TOKEN=
7+
- SCRUT_TOKEN=
8+
9+
matrix:
10+
include:
11+
- php: 7.0
12+
env: DB=MYSQL PHPUNIT_TEST=1 PHPCS_TEST=1
13+
- php: 7.1
14+
env: DB=MYSQL PHPUNIT_COVERAGE_TEST=1
15+
- php: 5.6
16+
env: DB=MYSQL PHPUNIT_TEST=1
17+
18+
before_script:
19+
# Init PHP
20+
- phpenv rehash
21+
- phpenv config-rm xdebug.ini
22+
- echo 'memory_limit = 2048M' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
23+
24+
# Install composer dependencies
25+
- composer require --prefer-dist --no-update silverstripe-themes/simple:~3.2
26+
- composer update --no-suggest --prefer-dist
27+
28+
script:
29+
- if [[ $PHPUNIT_TEST ]]; then vendor/bin/phpunit; fi
30+
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.xml && wget https://scrutinizer-ci.com/ocular.phar; fi
31+
- if [[ $PHPCS_TEST ]]; then vendor/bin/phpcs src/ tests/; fi
32+
33+
after_success:
34+
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then bash <(curl -s https://codecov.io/bash) -f coverage.xml -t $CODECOV_TOKEN && travis_retry php ocular.phar code-coverage:upload --format=php-clover --access-token=$SCRUT_TOKEN coverage.xml; fi

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
This project adheres to [Semantic Versioning](http://semver.org/).
6+
7+
## [1.0.0]

CONTRIBUTING.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Contributing
2+
3+
Contributions are welcome! Create an issue, explaining a bug or proposal. Submit pull requests if you feel brave.

LICENSE.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Copyright (c) 2018, Dynamic
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
5+
6+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7+
8+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
9+
10+
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
11+
12+
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 HOLDER 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.

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# silverstripe-elemental-embedded-code
2+
3+
A block to embed code like iFrames or Javascript on a page
4+
5+
## Requirements
6+
7+
- SilverStripe 3.2
8+
9+
## Installation
10+
11+
This is how you install silverstripe-elemental-embedded-code.
12+
13+
## Example usage
14+
15+
You use silverstripe-elemental-embedded-code like this.
16+
17+
## Documentation
18+
19+
See the [docs/en](docs/en/index.md) folder.

_config.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?php
2+
3+
define('SILVERSTRIPE_ELEMENTAL-EMBEDDED-CODE_PATH', __DIR__);
4+
define('SILVERSTRIPE_ELEMENTAL-EMBEDDED-CODE_DIR', basename(__DIR__));

0 commit comments

Comments
 (0)