Skip to content

Commit

Permalink
Add installer for Starbug packages (#475)
Browse files Browse the repository at this point in the history
* Installer for Starbug modules

* Add additional Starbug installer types

* Add Starbug installers to test
  • Loading branch information
cogentParadigm authored Jan 12, 2021
1 parent 7f3c618 commit 02652f4
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ is not needed to install packages with these frameworks:
| SilverStripe | `silverstripe-module`<br>`silverstripe-theme`
| SiteDirect | `sitedirect-module`<br>`sitedirect-plugin`
| SMF | `smf-module`<br>`smf-theme`
| Starbug | `starbug-module`<br>`starbug-theme`<br>`starbug-custom-module`<br>`starbug-custom-theme`
| SyDES | `sydes-module`<br>`sydes-theme`
| Sylius | `sylius-theme`
| symfony1 | **`symfony1-plugin`**
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"shopware",
"SilverStripe",
"SMF",
"Starbug",
"SyDES",
"Sylius",
"symfony",
Expand Down
1 change: 1 addition & 0 deletions src/Composer/Installers/Installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ class Installer extends LibraryInstaller
'sitedirect' => 'SiteDirectInstaller',
'silverstripe' => 'SilverStripeInstaller',
'smf' => 'SMFInstaller',
'starbug' => 'StarbugInstaller',
'sydes' => 'SyDESInstaller',
'sylius' => 'SyliusInstaller',
'symfony1' => 'Symfony1Installer',
Expand Down
12 changes: 12 additions & 0 deletions src/Composer/Installers/StarbugInstaller.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php
namespace Composer\Installers;

class StarbugInstaller extends BaseInstaller
{
protected $locations = array(
'module' => 'modules/{$name}/',
'theme' => 'themes/{$name}/',
'custom-module' => 'app/modules/{$name}/',
'custom-theme' => 'app/themes/{$name}/'
);
}
8 changes: 8 additions & 0 deletions tests/Composer/Installers/Test/InstallerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ public function dataForTestSupport()
array('silverstripe-theme', true),
array('smf-module', true),
array('smf-theme', true),
array('starbug-module', true),
array('starbug-theme', true),
array('starbug-custom-module', true),
array('starbug-custom-theme', true),
array('sydes-module', true),
array('sydes-theme', true),
array('sylius-theme', true),
Expand Down Expand Up @@ -422,6 +426,10 @@ public function dataForTestInstallPath()
array('silverstripe-theme', 'themes/my_theme/', 'shama/my_theme'),
array('smf-module', 'Sources/my_module/', 'shama/my_module'),
array('smf-theme', 'Themes/my_theme/', 'shama/my_theme'),
array('starbug-module', 'modules/my_module/', 'shama/my_module'),
array('starbug-theme', 'themes/my_theme/', 'shama/my_theme'),
array('starbug-custom-module', 'app/modules/my_module/', 'shama/my_module'),
array('starbug-custom-theme', 'app/themes/my_theme/', 'shama/my_theme'),
array('sylius-theme', 'themes/my_theme/', 'shama/my_theme'),
array('symfony1-plugin', 'plugins/sfShamaPlugin/', 'shama/sfShamaPlugin'),
array('symfony1-plugin', 'plugins/sfShamaPlugin/', 'shama/sf-shama-plugin'),
Expand Down

0 comments on commit 02652f4

Please sign in to comment.