Giter Club home page Giter Club logo

resourcemap's Introduction

Resource Map

Resource Map helps people track their work, resources and results geographically in a collaborative environment accessible from anywhere.

Resource Map is a free, open-source tool that helps you make better decisions by giving you better insight into the location and distribution of your resources. With Resource Map, you and your team can collaboratively record, track, and analyze resources at a glance using a live map. Resource Map works with any computer or cell phone with text messaging capability, putting up-to-the-minute alerts and powerful resource management always within reach, wherever you go.

Please refer to the wiki for more information.

Development Setup

Dependencies

Resource Map is a standard Rails application, but also needs the following services to run:

Installation on Mac OS X

Use Homebrew to retrieve and install the required dependencies.

Install the 1.7 series of elasticsearch (Homebrew defaults to the latest version which may introduce compatibility problems):

brew install homebrew/versions/elasticsearch17

Then install Redis with:

brew install redis

Likewise, MySQL server installation is straightforward:

brew install mysql

Installation on Ubuntu Linux

Install Elasticsearch from the official download site using .deb packages by following the instructions given at https://www.elastic.co/guide/en/elasticsearch/reference/1.7/setup-repositories.html

For Redis server, you can use the version provided in the distribution:

sudo apt-get install redis-server

Likewise for MySQL:

sudo apt-get install mysql-server

Rails Setup

The current required Ruby version is 2.1.2. We recommend you use a Ruby version manager to handle parallel installations of different Ruby versions. rbenv and RVM are both supported.

  1. Install the bundle:

    bundle install
    
  2. Create and setup de database

    bundle exec rake db:setup
    

Running in development

Once the application has been setup, run the application in development mode:

bundle exec rails server

To run the background jobs (through resque) execute:

bundle exec rake resque:work

Running the tests

Resource Map has unit tests, acceptance tests (using Capybara) and Javascript tests.

Execute the unit tests through Rspec:

bundle exec rspec

To run the acceptance tests you need to have a recent version of Firefox, since Capybara is configured to use the Selenium driver with Firefox.

bundle exec rspec -t js spec/integration

Keep in mind that the acceptance tests are kind of out-of-date. Many of them will pass, but lots of them are marked as pending - the coverage isn't that good to rely on them.

Finally, Javascript tests are run through Jasmine. Start the Jasmine server with:

bundle exec rake jasmine

And open a browser tab in http://localhost:8888

Docker development

docker-compose.yml file build a development environment mounting the current folder and running rails in development environment.

Run the following commands to have a stable development environment.

$ docker-compose run --rm --no-deps web bundle install
$ docker-compose up -d db
$ docker-compose run --rm web rake db:setup
$ docker-compose up

To setup and run test, once the web container is running:

$ docker-compose exec web bash
root@web_1 $ rake

Deployment

Resource Map uses Capistrano 3 to deploy. Capistrano requires the target server to be already provisioned and correctly setup before deploying.

The Vagrant configuration file contains two different virtual machines for testing, which are provisioned for deployment using Capistrano. One is setup to install RVM and the other rbenv. Check the Vagrantfile and the configuration files and scripts in config/vagrant for a sample provisioning.

The Capistrano stages vagrant-rvm and vagrant-rbenv can be used to deploy Resource Map to the virtual machines. Only one of the virtual machines can be running at the same time, since per configuration both forward the 80 port to the host's 8080.

resourcemap's People

Contributors

bcardiff avatar carohadad avatar fciccioli avatar flbulgarelli avatar gbatiston avatar ggiraldez avatar juanboca avatar juanedi avatar kakada avatar kensreng avatar lmatayoshi avatar macoca avatar matiasgarciaisaia avatar mmuller avatar pablobrusco avatar spalladino avatar waj avatar

Watchers

 avatar

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.