Skip to content

Commit

Permalink
Gets stuff ready for release. [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve "uru" West committed Feb 4, 2015
1 parent eca8725 commit ed38419
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 8 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Change Log

## [Unreleased]

## [1.0.0]
### Removed
- `IO\File` no longer does an `is_file()` check to allow for remote url fetching [#13](https://github.com/stevewest/changelog/issues/13).

Expand Down Expand Up @@ -42,6 +44,7 @@
- Initial version.

[Unreleased]: https://github.com/stevewest/changelog
[1.0.0]: https://github.com/stevewest/changelog/releases/tag/1.0.0
[0.4.0]: https://github.com/stevewest/changelog/releases/tag/0.4.0
[0.3.0]: https://github.com/stevewest/changelog/releases/tag/0.3.0
[0.2.0]: https://github.com/stevewest/changelog/releases/tag/0.2.0
Expand Down
49 changes: 49 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Contributing

Contributions are awesome but to help things along please take a look at the following.

- [Issues](#-issues)
- [Feature Requests](#-feature-requests)
- [Pull Requests](#-pull-requests)

## Issues

When opening an issue please make sure to include as much information as possible such as:

- **things you have already tried**
- Have you tried the latest package version? (`dev-master`)
- Is there already a similar issue?
- PHP version
- Stack trace
- Sample code or data

## Feature requests

Feature requests can be either opened as an issue or you can contact me and ask for something.

When you do think about what you are asking for, will others use it? Is it specific to your problem or not?

## Pull requests

These are always welcome, it's what open source software is all about. But please keep a few things in mind:

### Follow the coding standard

This package uses [PSR-2] with the exception that indentation should be `tab` characters, not `spaces` and that all `{`
should be on a new line.

### Unit tests

Any changes to the code should include updated or additional tests.
Please make sure that if a test relates to an issue there is an `@link` to show that.

Any new features should have related tests in the same pull request.

All tests must pass, nothing will be merged in if there are tests failing.

### Code Quality

While mostly a secondary concern code quality is still important. As a general rule of thumb make sure methods are not
too long or needlessly complex when they can be broken up, use a bit of common sense.

[PSR-2]: http://www.php-fig.org/psr/psr-2/
67 changes: 60 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,50 @@
[![HHVM](https://img.shields.io/hhvm/stevewest/changelog.svg?style=flat-square)](http://hhvm.h4cc.de/package/stevewest/changelog)
[![Packagist](https://img.shields.io/packagist/v/stevewest/changelog.svg?style=flat-square)](https://packagist.org/packages/stevewest/changelog)

Package to enable change logs to be parsed into objects for manipulation in code.
Quickly and easily modify change logs from a variety of sources.

Eventually the package will be able to read change logs from a number of sources, be
able to convert those to an object structure to allow them to be modified easily and
then written out to a configured output. The output could be to a file on disk or
committed to a git repo.
Currently the package only supports the [KeepAChangeLog] format of change logs.

Everything is adaptor/driver based so multiple sources, parsers and outputs can be
used as desired. There are also plans for a cli script.
It is possible to read and write logs from/to:

- File
- Url (no support for output)
- Native string
- GitHub repo via GitHub API

Logs can be formatted into the [KeepAChangeLog] format, xml and json through the use of various render classes.

## Quick Examples

### Creating a log

```php
<?php

// Create a new change log and set a title and description.
$log = new \ChangeLog\Log();
$log->setTitle('My Project Change Log');
$log->setDescription('This is my project\'s change log. Any crazy stuff that happens will appear here.');

// Create and add a new release.
$release1 = new \ChangeLog\Release('1.0.0');
$release1->addChange('Added', 'Awesome feature needed for release');
$log->addRelease($release1);

$release2 = new \ChangeLog\Release('0.3.0');
$release2->addChange('Added', 'Finally added a change log');
$release2->setChanges('Fixed', [
'Bug 1',
'Bug 2',
'Bug 3',
]);
$log->addRelease($release2);
```

**Note** releases are sorted in accordance to semantic visioning automatically with the latest release at the top.
It is expected that all release names follow this and the only exception to this is `unreleased` which will always be at
the top of the release list.

### Parsing a log

```php
Expand Down Expand Up @@ -76,3 +108,24 @@ $log1->mergeLog($log2);
```

Depending on your use case it might be useful to create an empty log first and merge other logs into that.

## Development

Current plans for development can be found in the repo's [issue tracker][issues].
If you wish to request extra functionality then open an issue or pull request or give me a poke on [twitter] or anywhere
else you can find me.

Feel free to report any issues on the [issue tracker][issues].

## Author

### Steve "uru" West

- [Twitter][twitter]
- [GitHub]
- Email: [email protected]

[KeepAChangeLog]: http://keepachangelog.com/
[issues]: https://github.com/stevewest/changelog/issues
[twitter]: http://twitter.com/SteveUru
[GitHub]: https://github.com
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"license": "MIT",
"authors": [
{
"name": "Steve West",
"name": "Steve \"uru\" West",
"email": "[email protected]"
}
],
Expand Down

0 comments on commit ed38419

Please sign in to comment.