A Drupal 7 powered distribution providing a community platform to share knowledge.
Warning: you need to setup Drush first or the installation and update scripts will not work.
Clone the project from GitHub.
Copy the example configuration file to config.sh:
$ cp default.config.sh config.sh
Edit the configuration file, fill in the blanks.
Run the install script from within the root of the repository:
$ ./install
The profile has a module to load demo data in to the platform. Loading that data during install can be requested by adding -d top the command:
$ ./install -d
Create a vhost for your webserver, point it to the REPOSITORY/ROOT/www
folder.
(Restart/reload your webserver).
Add the local domain to your /etc/hosts
file.
Open the URL in your favorite browser.
You can Reinstall the platform any type by running the install script.
$ ./install
- Delete the /www folder.
- Recreate the /www folder.
- Download and extract all contrib modules, themes & libraries to the proper subfolders of the profile.
- Download and extract Drupal 7 core in the /www folder
- Create an empty sites/default/files directory
- Makes a symlink within the /www/profiles directory to the /capacity4more directory.
- Run the Drupal installer (Drush) using the capacity4more profile.
- The install script will not preserve the data located in the sites/default/files directory.
- The install script will clear the database during the installation.
You need to take backups before you run the install script!
It is also possible to upgrade Drupal core and contributed modules and themes without destroying the data in tha database and the sites/default directory.
Run the update script:
$ ./upgrade
The profile has a module to load demo data in to the platform. Loading or updating that data during an upgrade can be requested by adding -d top the command:
$ ./upgrade -d
- Create a backup of the sites/default folder.
- Delete the /www folder.
- Recreate the /www folder.
- Download and extract all contrib modules, themes & libraries to the proper subfolders of the profile.
- Download and extract Drupal 7 core in the /www folder.
- Makes a symlink within the /www/profiles directory to the /capacity4more 7. directory.
- Restore the backup of the sites/default folder.
For testing use Behat with PhantomJS.
To run our tests, we need behat (and some extensions). With composer installed, we can quickly install the right versions:
$ cd /PATH/TO/capacity4more/capacity4more/behat
$ composer install
This will download the right versions of all dependencies into the behat/bin folder.
To test javascript behaviour we need to install PhantomJs:
$ sudo npm install -g phantomjs
You need to start the webdriver before you start the tests:
$ cd /PATH/TO/capacity4more/capacity4more/behat
$ phantomjs --webdriver=4444
Behat needs a configuration file. Copy the example file and fill in the local configuration parameters.
$ cd /PATH/TO/capacity4more/capacity4more/behat
$ cp behat.local.yml.example behat.local.yml
$ vi behat.local.yml
Executing behat is as simple as running
$ cd /PATH/TO/capacity4more/capacity4more/behat
$ ./bin/behat
This will run all tests.
If you only want to test the API and don't need the JavaScript tests (or you don't have PhantomJS installed/running), you can add tags to our scenarios and only execute them.
There are 2 default tags in use:
@api : Run all tests that don't require PhantomJs:
$ cd /PATH/TO/capacity4more/capacity4more/behat
$ ./bin/behat --tags=@api
@javascript : Run only the tests that require PhantomJs:
$ cd /PATH/TO/capacity4more/capacity4more/behat
$ ./bin/behat --tags=@javascript