cookbook 'activelamp_composer', '~> 0.0.1'
activelamp_composer (1) Versions 0.0.1 Follow3
Provides the `composer` resource.
cookbook 'activelamp_composer', '~> 0.0.1', :supermarket
knife supermarket install activelamp_composer
knife supermarket download activelamp_composer
Description
This cookbook provides an easy way to operate on Composer projects, like being able to install or update dependencies, as well as optimizing the autoloader.
Requirements
php
curl
This cookbook is not responsible for satisfying these requirements. You will have to provision your machine with these through your platform's dependency manager (apt
, yum
, etc), or through other cookbooks.
Platforms:
- Tested on Ubuntu/Debian only, but the deploy actions should work with any platform.
Resources / Providers
composer
Actions
download_phar
-
install
(Default) update
dump_autoload
run_script
Examples
Download composer.phar
into your project root:
composer "/path/to/project" do action :download_phar end
Install dependencies
composer "/path/to/project" do action :install prefer_dist true # Default prefer_source false # Default end
if you want to ensure that installs should only be done with composer.lock
present:
composer "/path/to/project" do lock_file_only true action :install end
Update dependencies
composer "/path/to/project" do optimize_autoloader true # Default is 'false' action :update end
Dump autoloader
composer "/path/to/project" do optimize_autoloader true # Default is 'false' action :dump_autoload end
Run Composer scripts
composer "/path/to/project" do script 'post-install-cmd' action :run_script end
Options
Option | Default | Description |
---|---|---|
directory | the resource name | The path to the Composer project |
dev | true |
If false , Composer commands are run with the --no-dev flag when applicable |
verbosity | 1 |
The verbosity level. Could be 1 , 2 , or 3 . |
quiet | true |
Supress output with the --quiet flag |
prefer_dist | false |
If true , runs commands with --prefer-dist when applicable |
prefer_source | false |
If true , runs commands with --prefer-source when applicable |
optimize_autoloader | false |
If true , runs commands with --optimize-autoloader or --optimize when applicable |
script | empty string | The script to run when called with the :run_script action. |
user | nil |
The user responible for the command (Passed to the execute resource internally) |
group | nil |
The group responible for the command (Passed to the execute resource internally) |
License and Authors
Author: Bez Hermoso bez@activelamp.com
Author: ActiveLAMP
Copyright: 2012-2014, ActiveLAMP
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
Collaborator Number Metric
0.0.1 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
0.0.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.0.1 failed this metric
FC064: Ensure issues_url is set in metadata: activelamp_composer/metadata.rb:1
FC065: Ensure source_url is set in metadata: activelamp_composer/metadata.rb:1
FC066: Ensure chef_version is set in metadata: activelamp_composer/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: activelamp_composer/metadata.rb:1
FC069: Ensure standardized license defined in metadata: activelamp_composer/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.0.1 passed this metric
Testing File Metric
0.0.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.0.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.0.1 failed this metric
0.0.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.0.1 failed this metric
FC064: Ensure issues_url is set in metadata: activelamp_composer/metadata.rb:1
FC065: Ensure source_url is set in metadata: activelamp_composer/metadata.rb:1
FC066: Ensure chef_version is set in metadata: activelamp_composer/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: activelamp_composer/metadata.rb:1
FC069: Ensure standardized license defined in metadata: activelamp_composer/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.0.1 passed this metric
Testing File Metric
0.0.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.0.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.0.1 failed this metric
FC065: Ensure source_url is set in metadata: activelamp_composer/metadata.rb:1
FC066: Ensure chef_version is set in metadata: activelamp_composer/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: activelamp_composer/metadata.rb:1
FC069: Ensure standardized license defined in metadata: activelamp_composer/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
0.0.1 passed this metric
Testing File Metric
0.0.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.0.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.0.1 failed this metric
0.0.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number