Skip to content

Commit

Permalink
Merge branch 'release/1.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
jmalloc committed Sep 9, 2014
2 parents 746db21 + 18ba18e commit 843d7f5
Show file tree
Hide file tree
Showing 32 changed files with 299 additions and 1,352 deletions.
21 changes: 14 additions & 7 deletions .travis.install
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
#!/usr/bin/env php
<?php
/**
* This script is executed before composer dependencies are installed,
* and as such must be included in each project as part of the skeleton.
*/

// Update git to the latest version ...
passthru('sudo apt-get update');
passthru('sudo apt-get install git');

// Update composer to the latest version ...
passthru('composer self-update --no-interaction');

// Build a composer config that uses the GitHub OAuth token if it is available ...
$config = array(
'config' => array(
'notify-on-install' => false
Expand All @@ -16,20 +20,23 @@ if ($token = getenv('ARCHER_TOKEN')) {
'github.com' => $token
);
$composerFlags = '--prefer-dist';
passthru('curl -s -i -H "Authorization: token $ARCHER_TOKEN" https://api.github.com | grep "^X-RateLimit"');
} else {
$composerFlags = '--prefer-source';
}

$file = '~/.composer/config.json';
$dir = dirname($file);
$dir = dirname($file);
if (!is_dir($dir)) {
mkdir($dir, 0755, true);
}
file_put_contents($file, json_encode($config));

passthru('composer self-update --no-interaction');
// Display some information about GitHub rate limiting ...
if ($token) {
passthru('curl -s -i -H "Authorization: token $ARCHER_TOKEN" https://api.github.com | grep "^X-RateLimit"');
}

// Install composer dependencies ...
$exitCode = 0;
passthru('composer install --dev --no-progress --no-interaction --ansi ' . $composerFlags, $exitCode);
exit($exitCode);
11 changes: 2 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
#
# This is the default Travis CI configuration.
#
# It uses a GitHub OAuth token when fetching composer dependencies
# to avoid IP-based API throttling.
#
# It also allows publication of artifacts via an additional build.
#
language: php

php: ["5.3", "5.4", "5.5"]

env:
global:
- ARCHER_PUBLISH_VERSION=5.4
- ARCHER_PUBLISH_VERSION=5.5
- secure: "UKSpkbbxP62R8wUFrkWM6u8fmkzS85OugzaMWrx1qZTCEQ3AqdxtfLUg6SmE7ALjRQZS/CUPUZmTM05b1CsozLtk/Ehq86fNz12lWzVadfOq4J1ot9YsR5pFHb3PMusQdYZwEOppb/CAa4/FTR/K8mels4/cLclkem+kCogFTTQ="

install:
- ./.travis.install

script:
- ./vendor/bin/archer travis:build
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Temptation Changelog

### 1.0.0 (2014-09-09)

* **[FIXED]** Fixed race condition when creating temporary directory
* **[IMPROVED]** Updated autoloader to [PSR-4](http://www.php-fig.org/psr/psr-4/)

### 0.1.0 (2013-10-02)

* Initial relase
* Initial release
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# License

**© 2013, [James Harris](https://github.com/jmalloc)**
**© 2013-2014, [James Harris](https://github.com/jmalloc)**

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:

Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@
[![Test Coverage]](https://coveralls.io/r/IcecaveStudios/temptation?branch=develop)
[![SemVer]](http://semver.org)

**Temptation** is a simple PHP library for creating temporary files and directories that cleanup after themselves.
**Temptation** is a simple PHP library for creating temporary files and directories that clean up after themselves.

* Install via [Composer](http://getcomposer.org) package [icecave/temptation](https://packagist.org/packages/icecave/temptation)
* Read the [API documentation](http://icecavestudios.github.io/temptation/artifacts/documentation/api/)

## Example

```php
<?php
use Icecave\Temptation\Temptation;

// Use the temptation object to create files and directories ...
Expand All @@ -29,6 +28,6 @@ file_put_contents($file->path(), 'This is my temp file.');
```

<!-- references -->
[Build Status]: https://travis-ci.org/IcecaveStudios/temptation.png?branch=develop
[Test Coverage]: https://coveralls.io/repos/IcecaveStudios/temptation/badge.png?branch=develop
[SemVer]: http://calm-shore-6115.herokuapp.com/?label=semver&value=0.1.0&color=yellow
[Build Status]: http://img.shields.io/travis/IcecaveStudios/temptation/develop.svg
[Test Coverage]: http://img.shields.io/coveralls/IcecaveStudios/temptation/develop.svg
[SemVer]: http://img.shields.io/:semver-1.0.0-green.svg
23 changes: 13 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
{
"name": "icecave/temptation",
"description": "Painless temporary files and directories that cleanup after themselves.",
"keywords": ["tmp", "temp", "folder", "dir", "directory", "file"],
"description": "Painless temporary files and directories that clean up after themselves.",
"keywords": [
"tmp",
"temp",
"folder",
"dir",
"directory",
"file"
],
"homepage": "https://github.com/IcecaveStudios/temptation",
"license": "MIT",
"authors": [
Expand All @@ -17,20 +24,16 @@
"icecave/isolator": "~2"
},
"require-dev": {
"eloquent/typhoon": "~0.9.0",
"icecave/archer": "~1"
},
"autoload": {
"psr-0": {
"Icecave\\Temptation": "src",
"Icecave\\Temptation\\TypeCheck": "src-typhoon"
"psr-4": {
"Icecave\\Temptation\\": "src"
}
},
"extra": {
"typhoon": {
"output-path": "src-typhoon",
"validator-namespace": "Icecave\\Temptation\\TypeCheck",
"use-native-callable": false
"branch-alias": {
"dev-develop": "1.0.x-dev"
}
}
}
Loading

0 comments on commit 843d7f5

Please sign in to comment.