Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New feature #8

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
dist
vendor
.idea
tags
coverage-report-html
composer.lock
16 changes: 9 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ PREFIX = .
DIST_DIR = ${PREFIX}/dist
PLY = Polyline.php

GMPET = ${DIST_DIR}/${PLY}
SRC_GMPET = ${SRC_DIR}/${PLY}
GMPET = ${DIST_DIR}/${PLY}
SRC_GMPET = ${SRC_DIR}/${PLY}
NAMESPACE_GMPET = ${DIST_DIR}/emcconville/${PLY}

GMPET_VER = $(shell git log -1 --pretty=format:%h\ %p\ %t)
Expand All @@ -27,24 +27,26 @@ goodbye:

polyline: ${SRC_GMPET} | ${DIST_DIR}
@@echo "Building Polyline"

@@cat ${SRC_GMPET} | \
sed 's/@VERSION@/'"${GMPET_VER}"'/' | \
sed 's/@DATE@/'"${GMPET_DATE}"'/' > ${GMPET};

namespace: polyline
@@echo "Patching namespace"
@@mkdir -p ${DIST_DIR}/emcconville
@@cat ${GMPET} | \
sed 's/^\/\/@NAMESPACE@\s*//g' > ${NAMESPACE_GMPET}

test:
test:
@@echo "Testing Polyline"
@@if test ! -z ${PHPUNIT}; then \
${PHPUNIT} --testdox ; \
else \
echo "PHPUnit not installed. Skipping build test."; \
fi


lint:
vendor/bin/phpcs --standard=tests/phpcs-ruleset.xml src tests

.PHONY: all clean goodbye polyline namespace test

3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
"require": {
"php": ">=5.3"
},
"require-dev": {
"squizlabs/php_codesniffer": "2.0.0a2"
},
"autoload": {
"files": ["src/Polyline.php"]
}
Expand Down
8 changes: 6 additions & 2 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
bootstrap="tests/bootstrap.php" >

<testsuites>
<testsuite name="Polyline Test Suite">
<directory>./tests/</directory>
Expand All @@ -21,5 +21,9 @@
<directory>./src/</directory>
</whitelist>
</filter>
</phpunit>

<logging>
<log type="coverage-html" target="coverage-report-html"/>
</logging>

</phpunit>
Loading