Amahi Edge
Amahi Edge is the developer version of Amahi, with the very latest and greatest code in it. It lives in a branch of the Amahi Git repo, called
amahi-edge
This page is about working notes for the latest in the development tree.
Contents
How to Get Amahi Edge Running (Amahi 7)
This assumes you have ruby 1.9.3 installed in your system:
- download the latest tarball or get the latest git repo code
- extract the tarball into your user folder use tar or your file manager-extract function
- cd /amahi-7
- bundle install (this will install all the necessary gems)
- rake db:create (this will ask for the mysql root password with a prompt ">" -- note that it will echo the password)
- rake db:migrate (this will get the database up to snuff)
- rake db:seed (this will get a basic database setup)
- rails s (this will start the rails server)
The development dashboard can be reached with your favorite browser at:
http://localhost:3000
To stop the development server, just hit Ctrl+C
in the terminal where you started the server.
Run Tests
A great way to contribute is to write tests. The spec tests are in the spec/
directory. To run them:
rake spec
It will show you one dot per test passing. It will show test fails with F and display the error.
Old info for Amahi 6
First you need to get the latest git repository (see how on the Contribute-page)
After you've got the latest master branch you need to switch to the amahi-edge branch (and tell git to follow it on the remote server):
git checkout amahi-edge
The amahi-edge code uses a different database for it's data so we need to create one, copy the production data in it and migrate it to the new datamodel:
- Go to
/path/to/git/clone/platform/platform
- Execute
./hda-create-db-and-user amahi_devel
- Go to
/path/to/git/clone/platform/platform/html/script
- Execute
./db-duplicate hda_production amahi_devel
- Go to
/path/to/git/clone/platform/platform/html
- Execute
rake db:migrate
Now we have a working amahi-edge branch which can be used to develop features, gadgets, widgets and fix bugs.
To reach the amahi-edge branch you need to go to /path/to/git/clone/platform/platform/html
and execute
./script/server
How to install one Gadget
If you have developed a new gadget or fixed some bugs on an existing one you can install it using:
- Go to
/path/to/git/clone/platform/platform/html
- Execute
rake gadgets:install source=/path/to/the/gadget/source
, e.g.
rake gadgets:install source=../../gadgets/gadget_last_modified_files
When there are errors after installing the gadget you can uninstall it using:
- Go to
/path/to/git/clone/platform/platform/html
- Execute
rake gadgets:uninstall source=/path/to/the/gadget/source
Tips
- Start with VM with snapshots. Take a snapshot of your VM to begin, in case you have to revert
- If you do not have a VM, take a snapshot of your development database. You can use ./script/db-duplicate and ./script/db-restore (use with care!)