Skip to content

Commit

Permalink
Merge pull request #19 from NeroReflex/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
NeroReflex authored Aug 6, 2016
2 parents 4f44984 + 7a0430b commit 8a99cf6
Show file tree
Hide file tree
Showing 103 changed files with 3,524 additions and 883 deletions.
24 changes: 19 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,31 @@
language: php
sudo: required
php:
- '7.0'
- '5.6'
- '5.5'
- '5.4'
- hhvm
# - hhvm

before_script:
- curl -O https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.2.8.tgz
- tar -zxvf mongodb-linux-x86_64-3.2.8.tgz
- sudo mkdir -p /data/db && sudo chmod 0777 -R /data/db
- chmod +x mongodb-linux-x86_64-3.2.8/bin/mongod
- chmod +x mongodb-linux-x86_64-3.2.8/bin/mongo
- touch travis.php.ini
- sudo chmod 0777 travis.php.ini
- pecl config-set php_ini travis.php.ini
- pear config-set php_ini travis.php.ini
- pecl install -f mongodb-1.1.8
- phpenv config-add travis.php.ini
- composer self-update
- composer install

script:
- if [[ "$TRAVIS_PHP_VERSION" == '7.0' ]]; then phpunit --coverage-clover build/logs/clover.xml; else phpunit ; fi

after_script:
- if [[ "$TRAVIS_PHP_VERSION" == '7.0' ]]; then vendor/bin/test-reporter ; fi
- touch mongodb.log
- sudo chmod 0777 mongodb.log
- mongodb-linux-x86_64-3.2.8/bin/mongod --port 27017 > mongodb.log &
- sleep 5m
- mongodb-linux-x86_64-3.2.8/bin/mongo localhost:27017/gishiki tests/SetupTestingMongo.js
- phpunit --configuration phpunit.xml
2 changes: 1 addition & 1 deletion Documentation/docs/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Gishiki
_*Gishiki*_: a modern and elegant MVC framework for PHP >= 5.6 and HHVM.
_*Gishiki*_: a modern and elegant MVC framework for PHP >= 5.4 and HHVM.

Gishiki means 'ritual' in japanese, this name was chosen because this framework will help you to perform the
ritual of creation and deployment of web digital contents.
Expand Down
5 changes: 5 additions & 0 deletions Documentation/docs/installation/basic_apache.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ You can even be more aggressive here:
RewriteEngine On
RewriteRule ^ index.php [QSA,L]
</IfModule>
#allow requests from outside the domain
Header add Access-Control-Allow-Origin "*"
Header add Access-Control-Allow-Headers "origin, x-requested-with, content-type"
Header add Access-Control-Allow-Methods "PUT, GET, POST, DELETE, OPTIONS"
```

That shorted version will call the framework even if the client is asking for a
Expand Down
57 changes: 51 additions & 6 deletions Documentation/docs/usage/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ the real configuration file and application descriptor is stored inside the appl
directory and is called settings.json

It has a fixed (minumum) structure:
```
```json
{
"general": {
"development": true,
Expand All @@ -16,19 +16,64 @@ It has a fixed (minumum) structure:
"security": {
"serverPassword": "{{@MASTER_KEY}}",
"serverKey": "{{@SERVER_KEY}}"
},

"connections": [
{
"name": "default",
"query": "mongodb://user:pass@localhost:27017/dbname"
}
],

"pipeline": {
"connection": "default",
"collection": "dbname.tablename"
}
}
```

As you might have thought those {{@VAR_NAMES}} are replaced with constants defined
in your environment AND/OR Heroku "Config Variables"!

This is a GREAT feature that keeps SECRET your database connection descriptor and
This is a *GREAT* feature that keeps *SECRET* your database connection descriptor and
your master server key while allowing application portability among illimitate environments!


## Advanced Configuration
Everything about configuration is explained in the proper section:
## Automatic Logger
The automatic logger is the logger automatically used to store log entries generated by
an exception.

To understand how to connect a logger it is important to read the [Logging](logging.md) chapter of this manual.

Using null (as in the above example) will discard each log entry.


## Server Key
The server key is a serialized RSA private key as OpenSSL can deserialize it:
a PEM formatted private key or PEM encoded certificate/private key.

The serialized key __CANNOT__ be password encrypted.

The server key can be embedded into the JSON, but it may not be the best solution:
you should either create an environment variable holding the serialized key calling it MASTER_KEY
and recycle the example code, or giving a file path to the serialized key, for example:
"file:///absolute/path/to/file.pem" or "file://relative/path/to/file.pem".

The file path can also be the value of the environment variable, but that is not suggested.

The private key can be of any length and power of two, however 4096 or bigger
is suggested.

```
openssl genrsa -out relative/path/to/file.pem 4096
```

That is the OpenSSL CLI command that may be used to generate a valid RSA private key.


## Server Password
The server password is what will be used as the default server symmetric key.

Unlike the server private key, the server password has a fixed length and it must
be 64 characters long!

for example you can find the explanation of of the database connection in the
database [chapter](database/).
5 changes: 0 additions & 5 deletions Documentation/docs/usage/database/CRUD.md

This file was deleted.

171 changes: 0 additions & 171 deletions Documentation/docs/usage/database/index.md

This file was deleted.

Loading

0 comments on commit 8a99cf6

Please sign in to comment.