Giter VIP home page Giter VIP logo

units's Introduction

Units

UML diagram

Getting started

The PHP intl extension is required, it can be installed easily on debian systems with apt-get install php5-intl.

$ composer install
$ app/console doctrine:database:create
$ app/console doctrine:schema:create
$ app/console unit:populate

Running the tests

Running the unit tests:

$ phpunit

Running the functional tests:

$ app/console doctrine:schema:drop --force --env=test
$ app/console doctrine:schema:create --env=test
$ app/console unit:populate --env=test
$ phpunit -c phpunit-functional.xml.dist

The functional test suite automatically generates a SQLite database in the tests/FunctionalTest directory. As such, it requires the pdo_sqlite extension and the user running the tests must have write permissions in that directory.

Continuous integration is done on CircleCI: https://circleci.com/gh/myclabs/Units

Running the server

$ app/console server:run

The server is now running at http://localhost:8000/.

If you are using Vagrant, run:

$ app/console server:run 0.0.0.0:8000

Deploying

Deployment is done use Capifony. Execute these commands on your local machine.

$ cap deploy # by default, in development
$ cap development deploy
$ cap testing deploy
$ cap production deploy

The first time, the server needs to be set up:

$ cap production deploy:setup

If you are running Capifony locally with a different user, set the user name at runtime:

$ cap -s user=myusername production deploy

Troubleshooting

Some server files could belong to the last deploying user, if necessary run the following command on the server:

$ chown -R root:deployers /home/web/units/shared/cached-copy

Capistrano may have some problem with authentication using interactive method. Uninstalling the net-ssh gem and reinstalling the 2.7.0 version solve this problem:

$ gem uninstall net-ssh
$ gem install net-ssh -v 2.7.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.