Skip to content

Commit

Permalink
Support for AnnotateCms. Closes composerGH-74.
Browse files Browse the repository at this point in the history
  • Loading branch information
vysinsky authored and shama committed May 23, 2013
1 parent 3e2a526 commit ccfe508
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ is not needed to install packages with these frameworks:
| Framework | Types
| --------- | -----
| AGL | `agl-module`
| AnnotateCms | `annotatecms-module`<br>`annotatecms-component`<br>`annotatecms-service`
| CakePHP 2+ | **`cakephp-plugin`**
| CodeIgniter | `codeigniter-library`<br>`codeigniter-third-party`<br>`codeigniter-module`
| Drupal | <b>`drupal-module`<br>`drupal-theme`</b><br>`drupal-profile`<br>`drupal-drush`
Expand Down
11 changes: 11 additions & 0 deletions src/Composer/Installers/AnnotateCmsInstaller.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php
namespace Composer\Installers;

class AnnotateCmsInstaller extends BaseInstaller
{
protected $locations = array(
'module' => 'addons/modules/{$name}/',
'component' => 'addons/components/{$name}/',
'service' => 'addons/services/{$name}/',
);
}
1 change: 1 addition & 0 deletions src/Composer/Installers/Installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class Installer extends LibraryInstaller
*/
private $supportedTypes = array(
'agl' => 'AglInstaller',
'annotatecms' => 'AnnotateCmsInstaller',
'cakephp' => 'CakePHPInstaller',
'codeigniter' => 'CodeIgniterInstaller',
'drupal' => 'DrupalInstaller',
Expand Down
6 changes: 6 additions & 0 deletions tests/Composer/Installers/Test/InstallerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ public function dataForTestSupport()
{
return array(
array('agl-module', true),
array('annotatecms-module', true),
array('annotatecms-component', true),
array('annotatecms-service', true),
array('cakephp', false),
array('cakephp-', false),
array('cakephp-app', true),
Expand Down Expand Up @@ -132,6 +135,9 @@ public function dataForTestInstallPath()
{
return array(
array('agl-module', 'More/MyTestPackage/', 'agl/my_test-package'),
array('annotatecms-module', 'addons/modules/my_module/', 'vysinsky/my_module'),
array('annotatecms-component', 'addons/components/my_component/', 'vysinsky/my_component'),
array('annotatecms-service', 'addons/services/my_service/', 'vysinsky/my_service'),
array('cakephp-plugin', 'Plugin/Ftp/', 'shama/ftp'),
array('codeigniter-library', 'libraries/my_package/', 'shama/my_package'),
array('codeigniter-module', 'modules/my_package/', 'shama/my_package'),
Expand Down

0 comments on commit ccfe508

Please sign in to comment.