Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/evanhalley/motive

Motive is a top secret project
https://github.com/evanhalley/motive

Last synced: 2 days ago
JSON representation

Motive is a top secret project

Awesome Lists containing this project

README

        

#Motive

* Motive is a top secret project
* Motive is not a real name.

### Table of Contents
[Environment Setup](#envsetup)
[Required Software](#required-software)
[Install Apache and PHP](#apache-and-php)
[Install Neo4j](#neo4j)
[Install Composer](#composer)
[Install Slim PHP / Neo4jPHP](#slim-and-neo4j)
[Download Motive](#motive)
[Apache Setup](#apache)
[Enable URL Rewrite](#rewrite)
[PHP Unit Tests](#unittests)


##Environment Setup


**Required Software**

* `Apache 2.2.22`
* `PHP 5.3.10`
* `Neo4j Server 1.8.2`
* [`Composer`](http://getcomposer.org/download/)
* [`Neo4jPHP`](https://github.com/jadell/Neo4jPHP)
* [`Slim PHP`](http://www.slimframework.com/)


##Install Apache and PHP

May already be installed, if not, please use your OS standard way of installing software packages.


##Neo4j

Can be acquired from: http://www.neo4j.org/download
Once installed, start the Neo4j server: sudo {NEO4J Home}/bin/neo4j start


##Composer

Motive uses PHP Composer to download and initialize PHP libraries.

Install PHP Composer for your operating system: http://getcomposer.org/download/


##Slim PHP / Neo4jPHP


##Download Motive

`git clone [email protected]:emuneee/motive.git`

Run PHP composer to download Neo4jPHP, Slim PHP, and PHPSec libraries

From /motive/api run:

`php composer.phar install`

-or-

`composer install`


##Apache Setup
1. Configure `Apache 2.2.22` to point to the Motive application by updating /motive/motive.conf
* Open /motive/motive.conf and update the `DocumentRoot` and `Directory` with your own paths
* `DocumentRoot` should point to .../motive/api
* Copy motive.conf to your APACHE_HOME/users directory
* `cp /motive/motive.conf /users`
2. In your Apache configuration file at `/httpd.conf`, find the directory access configuration ``, and update:
* Comment out `AllowOverride none`
* Add in `AllowOverride all`
3. Uncomment the PHP5 module in your Apache configuration file at APACHE_HOME/httpd.conf
* `LoadModule php5_module libexec/apache2/libphp5.so`


##Enable URL Rewrite

This step is necessary for us to expose our API.

```
mkdir /etc/apache2/mods-enabled #If directory does not already exist
cd /etc/apache2/mods-enabled
ln -s ../mods-available/rewrite.load rewrite.load
```


##Test Your Setup

1. Visit http://localhost/index.php. If the Slim PHP page loads, your setup is correct. If not, check your Apache logs for errors.


##PHP Unit Testing

For unit testing, we will be using the PHPUnit test framework. It can be acquired here

Mac OS X (more or less) - http://www.newmediacampaigns.com/page/install-pear-phpunit-xdebug-on-macosx-snow-leopard

Linux - http://www.giocc.com/installing-phpunit-on-ubuntu-11-04-natty-narwhal.html

##Running Unit Tests

Unit tests can be using the following command

phpunit --verbose NameOfTestHere