Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
hollodotme committed Aug 13, 2016
0 parents commit ac40a8a
Show file tree
Hide file tree
Showing 16 changed files with 320 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
service_name: travis-ci
coverage_clover: build/logs/clover.xml
json_path: build/logs/coveralls-upload.json
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.idea

# vagrant
.vagrant/
vagrant

# composer
vendor/
composer.lock

# locally generated docs
build/api/
build/phpdox/
build/logs/
26 changes: 26 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
language: php

php:
- 7.0

branches:
only:
- master
- development
- /^feature\/.+$/

before_script:
- git checkout $TRAVIS_BRANCH
- composer self-update
- mkdir -p vendor/bin
- composer install -o --prefer-dist --no-interaction
- mkdir build/logs

script:
- php vendor/bin/phpunit -c build/

after_success:
- travis_retry php vendor/bin/coveralls -v --exclude-no-stmt

notifications:
slack: fortunesolutions:PoLjMJuARdFicBIEPzdNrZ96
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Change Log
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a CHANGELOG](http://keepachangelog.com).

25 changes: 25 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Contributing

Contributions are **welcome** and will be fully **credited**.

We accept contributions via pull requests on [GitHub](https://github.com/icehawk/static-page-generator).


## Pull Requests

- **Add tests!** - Your patch will not be accepted if it does not have tests.

- **Document any change in behaviour** - Make sure the documentation in `README.md` is kept up-to-date.

- **Consider our release cycle** - We follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option.

- **Create topic branches** - Do not ask us to pull from your master branch.

- **One pull request per feature** - If you want to do more than one thing, please send multiple pull requests.

- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please squash them before submitting.


## Running Tests

$ vendor/bin/phpunit -c build/
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2016 Holger Woltersdorf and contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[![Build Status](https://travis-ci.org/icehawk/static-page-generator.svg?branch=master)](https://travis-ci.org/icehawk/static-page-generator)
[![Coverage Status](https://coveralls.io/repos/github/icehawk/static-page-generator/badge.svg?branch=master)](https://coveralls.io/github/icehawk/static-page-generator?branch=master)
[![Latest Stable Version](https://poser.pugx.org/icehawk/static-page-generator/v/stable)](https://packagist.org/packages/icehawk/static-page-generator)
[![Total Downloads](https://poser.pugx.org/icehawk/static-page-generator/downloads)](https://packagist.org/packages/icehawk/static-page-generator)
[![Latest Unstable Version](https://poser.pugx.org/icehawk/static-page-generator/v/unstable)](https://packagist.org/packages/icehawk/static-page-generator)
[![License](https://poser.pugx.org/icehawk/static-page-generator/license)](https://packagist.org/packages/icehawk/static-page-generator)

# IceHawk\StaticPageGenerator

Static Page Generator

29 changes: 29 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
VAGRANTFILE_API_VERSION = "2"

$script = <<SCRIPT
curl -sS 'https://getcomposer.org/installer' | php -- --install-dir=/usr/local/bin --filename=composer
chmod +x /usr/local/bin/composer
SCRIPT

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

# box-config
config.vm.box = "devops007"
config.vm.box_url = "http://box.3wolt.de/devops007/"
config.vm.box_check_update = true
config.vm.box_version = "~> 1.2.1"

# network-config
config.vm.network "public_network", type: "dhcp"
config.vm.boot_timeout = 600

# SSH-config
config.ssh.username = "root"
config.ssh.insert_key = true

# hostname
config.vm.hostname = "StaticPageGenerator"

config.vm.provision "shell", inline: $script

end
24 changes: 24 additions & 0 deletions build/phpdox.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8" ?>
<phpdox xmlns="http://xml.phpdox.net/config">
<project name="StaticPageGenerator" source="../src" workdir="phpdox">
<collector publiconly="false">
<include mask="*.php"/>
<exclude mask="*autoload.php"/>
</collector>

<generator output=".">
<enrich base="logs">
<source type="build"/>
<source type="git"/>
<source type="phploc"/>
<source type="checkstyle"/>
<source type="pmd"/>
<source type="phpunit"/>
</enrich>

<build engine="html" enabled="true" output="api">
<file extension="html"/>
</build>
</generator>
</project>
</phpdox>
27 changes: 27 additions & 0 deletions build/phpmd.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0"?>

<ruleset name="StaticPageGenerator"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
<description>StaticPageGenerator ruleset</description>

<rule ref="rulesets/codesize.xml/CyclomaticComplexity"/>
<rule ref="rulesets/codesize.xml/NPathComplexity"/>
<rule ref="rulesets/codesize.xml/ExcessiveClassComplexity"/>
<rule ref="rulesets/codesize.xml/ExcessiveClassLength"/>
<rule ref="rulesets/codesize.xml/ExcessiveMethodLength"/>
<rule ref="rulesets/codesize.xml/ExcessiveParameterList"/>

<rule ref="rulesets/design.xml/EvalExpression"/>
<rule ref="rulesets/design.xml/ExitExpression"/>
<rule ref="rulesets/design.xml/GotoStatement"/>

<rule ref="rulesets/naming.xml/ConstructorWithNameAsEnclosingClass"/>

<rule ref="rulesets/unusedcode.xml/UnusedFormalParameter"/>
<rule ref="rulesets/unusedcode.xml/UnusedLocalVariable"/>
<rule ref="rulesets/unusedcode.xml/UnusedPrivateField"/>
<rule ref="rulesets/unusedcode.xml/UnusedPrivateMethod"/>
</ruleset>
29 changes: 29 additions & 0 deletions build/phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<phpunit
bootstrap="../tests/Unit/bootstrap.php"
verbose="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTestSize="true"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true">
<testsuites>
<testsuite name="StaticPageGenerator">
<directory suffix="Test.php">../tests/Unit</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">../src</directory>
</whitelist>
<blacklist>
<directory suffix=".php">../tests/Unit</directory>
<directory>../tests/Unit/Fixtures</directory>
<directory>../vendor</directory>
</blacklist>
</filter>
<logging>
<log type="coverage-html" target="logs/coverage"/>
<log type="coverage-clover" target="logs/clover.xml"/>
</logging>
</phpunit>
55 changes: 55 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"name": "icehawk/static-page-generator",
"description": "Static Page Generator",
"minimum-stability": "dev",
"prefer-stable": true,
"license": "MIT",
"authors": [
{
"name": "hollodotme"
}
],
"support": {
"source": "https://github.com/icehawk/static-page-generator"
},
"require": {
"php": ">=7.0"
},
"require-dev": {
"tm/tooly-composer-script": "^1.0"
},
"autoload": {
"psr-4": {
"IceHawk\\StaticPageGenerator\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"IceHawk\\StaticPageGenerator\\Tests\\": "tests/"
}
},
"scripts": {
"post-install-cmd": "Tooly\\ScriptHandler::installPharTools",
"post-update-cmd": "Tooly\\ScriptHandler::installPharTools"
},
"extra": {
"tools": {
"phpunit": {
"url": "https://phar.phpunit.de/phpunit.phar",
"only-dev": true
},
"phpmetrics": {
"url": "https://github.com/phpmetrics/PhpMetrics/raw/master/build/phpmetrics.phar",
"only-dev": true
},
"phpdox": {
"url": "https://github.com/theseer/phpdox/releases/download/0.8.1.1/phpdox-0.8.1.1.phar",
"only-dev": true
},
"coveralls": {
"url": "https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar",
"only-dev": true
}
}
}
}
15 changes: 15 additions & 0 deletions src/Exceptions/StaticPageGeneratorException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php




namespace IceHawk\StaticPageGenerator\Exceptions;





class StaticPageGeneratorException extends \Exception
{

}
15 changes: 15 additions & 0 deletions src/StaticPageGenerator.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php




namespace IceHawk\StaticPageGenerator;





class StaticPageGenerator
{

}
15 changes: 15 additions & 0 deletions tests/Unit/StaticPageGeneratorTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php




namespace IceHawk\StaticPageGenerator\Tests\Unit;





class StaticPageGeneratorTest extends \PHPUnit_Framework_TestCase
{

}
7 changes: 7 additions & 0 deletions tests/Unit/bootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php





require(__DIR__ . '/../../vendor/autoload.php');

0 comments on commit ac40a8a

Please sign in to comment.