Skip to content

Commit 2512fe2

Browse files
committed
Initial implementation
0 parents  commit 2512fe2

17 files changed

+983
-0
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
bin/phpspec
2+
bin/composer
3+
vendor

.travis.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
language: php
2+
php:
3+
- 5.4
4+
- 5.5
5+
- 5.6
6+
- hhvm
7+
8+
before_script: composer install --dev
9+
10+
script: php bin/phpspec run -f pretty

LICENSE

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2012 Saša Stamenković <[email protected]>
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is furnished
8+
to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.

README.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Composer Permissions Handler [![Build Status](https://travis-ci.org/umpirsky/PermissionsHandler.svg?branch=master)](https://travis-ci.org/umpirsky/PermissionsHandler)
2+
3+
Composer script handling directories permissions by making them writable both by the web server and the command line user.
4+
5+
## Usage
6+
7+
Add the following in your root composer.json file:
8+
9+
```json
10+
{
11+
"require": {
12+
"umpirsky/composer-permissions-handler": "~1.0"
13+
},
14+
"scripts": {
15+
"post-install-cmd": [
16+
"Umpirsky\\PermissionsHandler\\ScriptHandler::setPermissions"
17+
]
18+
},
19+
"extra": {
20+
"writable-dirs": ["app/cache", "app/logs"]
21+
}
22+
}
23+
```
24+
25+
`app/cache` and `app/logs` are directories we want writable by the web server and the command line user.
26+
27+
## Examples
28+
29+
* [Symfony](https://github.com/umpirsky/symfony-standard/tree/feature/permissions-handler)
30+
* [Lavarel](https://github.com/umpirsky/laravel/tree/feature/permissions-handler)

composer.json

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "umpirsky/composer-permissions-handler",
3+
"description": "Composer script handling directories permissions by making them writable both by the web server and the command line user.",
4+
"keywords": ["permissions handling"],
5+
"license": "MIT",
6+
"authors": [
7+
{
8+
"name": "Saša Stamenković",
9+
"email": "[email protected]"
10+
}
11+
],
12+
"require": {
13+
"php": ">=5.4",
14+
"symfony/process": "~2.4"
15+
},
16+
"require-dev": {
17+
"composer/composer": "1.0.*@dev",
18+
"phpspec/phpspec": "~2.0"
19+
},
20+
"autoload": {
21+
"psr-0": { "Umpirsky\\PermissionsHandler": "src" }
22+
},
23+
"config": {
24+
"bin-dir": "bin"
25+
},
26+
"branch-alias": {
27+
"dev-master": "1.0-dev"
28+
}
29+
}

0 commit comments

Comments
 (0)