https://github.com/zircote/chef-composer
a opscode chef recipe for composer http://getcomposer.org
https://github.com/zircote/chef-composer
Last synced: 11 months ago
JSON representation
a opscode chef recipe for composer http://getcomposer.org
- Host: GitHub
- URL: https://github.com/zircote/chef-composer
- Owner: zircote
- Created: 2012-10-01T04:59:37.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2013-09-10T14:02:55.000Z (almost 13 years ago)
- Last Synced: 2025-04-09T18:06:21.398Z (about 1 year ago)
- Language: Ruby
- Size: 146 KB
- Stars: 23
- Watchers: 1
- Forks: 14
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE-2.0.txt
Awesome Lists containing this project
README
Description
===========
A cookbook to install [Composer](http://getcomposer.org) and maintain composer packages within project deployments.
Requirements
============
n/a
Attributes
==========
- `:install_path`: The path which composer will be installed
- `:owner`: The owner of the file
- `:dev`: Whether to execute the project activities with the `--dev` flag.
```ruby
default[:composer][:install_path] = "/usr/local/bin"
default[:composer][:owner] = "root" # apache|www-data|root|whatever
default[:composer][:project][:dev] = false
```
Usage
=====
## `composer`
### Actions:
- `:install`
- `:uninstall`
- `:update`
### Example:
```ruby
composer "/usr/local/bin" do
owner "root" # optional
action [:install, :update]
end
composer "/usr/local/bin" do
action :uninstall
do
```
## `composer_project`
### Actions:
- `:install`
- `:update`
- `:dump_autoload`
### Example:
```ruby
composer_project "/var/www/pr1" do
dev true # optional
run_as "www-data" # optional
composer_path "/usr/local/bin" #optional
quiet false #optional
action [:install, :update, :dump_autoload]
end
```
For backwards compatibility, composer will run in quiet mode by default. However,
this can make it very difficult to debug any problems installing packages as it
suppresses all error messages. To allow output, set the "quiet" attribute to false.
## `composer_project_package`
create a custom project from a specific package like symfony (recipe as an example)
## Actions:
- `:install`
- `:update`
### Example:
```ruby
composer_project_packages "symfony/framework-standard-edition" do
project_packpath "/var/www"
project_packfolder "Symfony"
project_packversion "2.1.7"
dev false
action [:install]
end
```
## `Recipe Symfony`
This recipe install symfony in default folder define or by cutomize the folowing attributes :
### Attributes
- `:sfpath`: The path which Symfony will be installed
- `:sffolder`: The directory inside the path
- `:sfversion`: The Symfony version to install
- `:sfuser`: Owner
- `:sfgroup`: Owner's group
```ruby
default[:composer][:sfpath] = "/var/www"
default[:composer][:sffolder] = "Symfony"
default[:composer][:sfversion] = ""
default[:composer][:sfuser] = "vagrant"
default[:composer][:sfgroup] = "vagrant"
```