Skip to content

Commit

Permalink
Merge pull request #18 from chadicus/master
Browse files Browse the repository at this point in the history
Version 2
  • Loading branch information
chadicus authored Mar 5, 2018
2 parents eb3b6b3 + a3b45eb commit 2b10026
Show file tree
Hide file tree
Showing 26 changed files with 196 additions and 1,902 deletions.
1 change: 0 additions & 1 deletion .coveralls.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
service_name: travis-ci
src_dir: .
coverage_clover: clover.xml
json_path: coveralls-upload.json
13 changes: 13 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Enforce Unix newlines
* text=lf

# Exclude unused files
# see: https://redd.it/2jzp6k
/tests export-ignore
/.github export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.*.yml export-ignore
/phpcs.xml export-ignore
/phpunit.xml.dist export-ignore
/README.md export-ignore
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @traderinteractive/opensource
23 changes: 23 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Contribution Guidelines
We welcome you to report [issues](/../../issues) or submit [pull requests](/../../pulls). While the below guidelines are necessary to get code merged, you can
submit pull requests that do not adhere to them and we will try to take care of them in our spare time. We are a smallish group of developers,
though, so if you can make sure the build is passing 100%, that would be very useful.

We recommend including details of your particular usecase(s) with any issues or pull requests. We love to hear how our libraries are being used
and we can get things merged in quicker when we understand its expected usage.

## Pull Requests
Code changes should be sent through [GitHub Pull Requests](/../../pulls). Before submitting the pull request, make sure that phpunit reports success
by running:
```sh
./vendor/bin/phpunit
```
And there are not coding standard violations by running
```sh
./vendor/bin/phpcs
```

## Builds
Our [Travis build](https://travis-ci.org/traderinteractive/column-parser-php) executes [PHPUnit](http://www.phpunit.de) and uses [Coveralls](https://coveralls.io/) to enforce code coverage.
While the build does not strictly enforce 100% code coverage, it will not allow coverage to drop below its current percentage.
[Scrutinizer](https://scrutinizer-ci.com/) is used to ensure code quality and enforce the [coding standard](http://www.php-fig.org/psr/psr-2/).
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## Expected Behavior

## Actual Behavior

## Steps to reproduce the behavior

8 changes: 8 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Fixes # .

#### What does this PR do?

#### Checklist
- [ ] Pull request contains a clear definition of changes
- [ ] Tests (either unit, integration, or acceptance) written and passing
- [ ] Relevant documentation produced and/or updated
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/coverage/
/vendor/
/clover.xml
composer.lock
phpunit.xml
11 changes: 6 additions & 5 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
filter:
excluded_paths:
- 'vendor/*'
- 'tests/*'
before_commands:
- 'composer install'
tools:
php_analyzer: true
php_mess_detector: true
php_code_sniffer:
config:
standard: PSR1
standard: PSR2
sensiolabs_security_checker: true
php_loc:
excluded_dirs:
- vendor
- tests
php_pdepend: true
php_sim: true
build_failure_conditions:
- 'elements.rating(<= B).new.exists'
- 'issues.label("coding-style").new.exists'
- 'issues.severity(>= MAJOR).new.exists'
- 'project.metric("scrutinizer.quality", <= 9)'
18 changes: 15 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
language: php
php:
- 7.0
- 5.6
script: ./build.php
after_script: ./vendor/bin/coveralls -v
- 7.1
- 7.2
- nightly
env:
- PREFER_LOWEST="--prefer-lowest --prefer-stable"
- PREFER_LOWEST=""
matrix:
fast_finish: true
allow_failures:
- php: nightly
before_script:
- composer update $PREFER_LOWEST
script:
- ./vendor/bin/phpunit --coverage-clover clover.xml
after_success: ./vendor/bin/coveralls -v
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2014 Dominion Enterprises
Copyright (c) 2017 Trader Interactive

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
Expand Down
28 changes: 17 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
# Column Parser
[![Build Status](http://img.shields.io/travis/dominionenterprises/column-parser-php.svg?style=flat)](https://travis-ci.org/dominionenterprises/column-parser-php)
[![Scrutinizer Code Quality](http://img.shields.io/scrutinizer/g/dominionenterprises/column-parser-php.svg?style=flat)](https://scrutinizer-ci.com/g/dominionenterprises/column-parser-php/)
[![Code Coverage](http://img.shields.io/coveralls/dominionenterprises/column-parser-php.svg?style=flat)](https://coveralls.io/r/dominionenterprises/column-parser-php)
[![Build Status](https://travis-ci.org/traderinteractive/column-parser-php.svg?branch=master)](https://travis-ci.org/traderinteractive/column-parser-php)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/traderinteractive/column-parser-php/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/traderinteractive/column-parser-php/?branch=master)
[![Coverage Status](https://coveralls.io/repos/github/traderinteractive/column-parser-php/badge.svg?branch=master)](https://coveralls.io/github/traderinteractive/column-parser-php?branch=master)

[![Latest Stable Version](http://img.shields.io/packagist/v/dominionenterprises/column-parser.svg?style=flat)](https://packagist.org/packages/dominionenterprises/column-parser)
[![Total Downloads](http://img.shields.io/packagist/dt/dominionenterprises/column-parser.svg?style=flat)](https://packagist.org/packages/dominionenterprises/column-parser)
[![License](http://img.shields.io/packagist/l/dominionenterprises/column-parser.svg?style=flat)](https://packagist.org/packages/dominionenterprises/column-parser)
[![Latest Stable Version](https://poser.pugx.org/traderinteractive/column-parser/v/stable)](https://packagist.org/packages/traderinteractive/column-parser)
[![Latest Unstable Version](https://poser.pugx.org/traderinteractive/column-parser/v/unstable)](https://packagist.org/packages/traderinteractive/column-parser)
[![License](https://poser.pugx.org/traderinteractive/column-parser/license)](https://packagist.org/packages/traderinteractive/column-parser)

[![Total Downloads](https://poser.pugx.org/traderinteractive/column-parser/downloads)](https://packagist.org/packages/traderinteractive/column-parser)
[![Daily Downloads](https://poser.pugx.org/traderinteractive/column-parser/d/daily)](https://packagist.org/packages/traderinteractive/column-parser)
[![Monthly Downloads](https://poser.pugx.org/traderinteractive/column-parser/d/monthly)](https://packagist.org/packages/traderinteractive/column-parser)

A PHP library that parses columnar data from a string, e.g. from CLI output.

## Requirements
This library requires PHP 5.4, or newer.
This library requires PHP 7.0, or newer.

## Installation
This package uses [composer](https://getcomposer.org) so you can just add
`dominionenterprises/column-parser` as a dependency to your `composer.json`
file.
This package uses [composer](https://getcomposer.org) so you can just add `traderinteractive/column-parser` as a dependency to your `composer.json` file.
```sh
composer require traderinteractive/column-parser
```

## Formats Supported
This library parses input that has to conform to a supported format.
Expand Down Expand Up @@ -65,7 +70,8 @@ array(
If you would like to contribute, please use our build process for any changes
and after the build passes, send us a pull request on github!
```sh
./build.php
./vendor/bin/phpunit
./vendor/bin/phpcs
```

There is also a [docker](http://www.docker.com/)-based
Expand Down
38 changes: 0 additions & 38 deletions build.php

This file was deleted.

15 changes: 9 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "dominionenterprises/column-parser",
"name": "traderinteractive/column-parser",
"description": "A library that parses columnar data from a string, e.g. from CLI output.",
"keywords": ["column", "parser", "cli"],
"authors": [
Expand All @@ -15,15 +15,18 @@
}
],
"license": "MIT",
"config": {
"sort-packages": true
},
"require": {
"php": "~5.6 || ~7.0"
"php": "^7.0"
},
"require-dev": {
"phpunit/phpunit": "~5.0",
"satooshi/php-coveralls": "~0.6.1",
"squizlabs/php_codesniffer": "~1.5"
"php-coveralls/php-coveralls": "^1.0",
"phpunit/phpunit": "^6.0",
"squizlabs/php_codesniffer": "^3.2"
},
"autoload": {
"psr-4": { "DominionEnterprises\\ColumnParser\\": "src/" }
"psr-4": { "TraderInteractive\\ColumnParser\\": "src/" }
}
}
Loading

0 comments on commit 2b10026

Please sign in to comment.