Skip to content

zeamador/lattice-recipes

Repository files navigation

Build Status

Lattice

CSE 403 Spring 2014

Team Ares

  • Zach Amador (zea@uw)
  • Chris Chalmers (cchalm@uw)
  • Sam Courts (src712@uw)
  • Jake Nash (nashj2@uw)
  • Nick Parker (nnmp@uw)
  • Bessie Song (bessieyy@uw)

Important Links

Getting Started with Ubuntu 14.04

  1. Make sure git and bundler are installed
  • git --version, if not installed: sudo apt-get install git
  • bundle --version, if not installed: sudo apt-get install bundler
  1. Clone our repository
  • git clone [email protected]:zeamador/lattice-recipes.git (with ssh key)
  • or git clone https://github.com/zeamador/lattice-recipes.git
  1. cd lattice-recipes
  2. Configure the development environment using the script: ./ubuntu-dev-env.sh
  3. Restart shell
  4. Ensure your ruby and rails versions match those listed in the development environment below:
  • ruby -v
  • rails -v
  1. Create a password for the postgres account created by the script:
  • sudo -u postgres psql
  • postgres=# \password lattice
  • Enter new password: lattice
  • Enter it again: lattice
  • postgres=# \q
  1. In the lattice-recipes/ directory, create the development and test databases
  • bin/rake db:create RAILS_ENV=development
  • bin/rake db:migrate RAILS_ENV=development
  • bin/rake db:create RAILS_ENV=test
  • bin/rake db:migrate RAILS_ENV=test

Development Environment

  • Ubuntu 14.04
  • Ruby version 2.1.2
  • Rails version 4.1.0
  • Postgresql database

Supported Browsers

  • Chrome 34+
  • Firefox 25+

Contributing to Lattice

You will need to contact us to request permission to push to our development repository. If you want to be able to push to our Heroku repository and make changes to the actual release website, you will also need to set up Heroku (below).

Setting up Heroku

  1. Contact us to request server access
  2. Create Heroku account using the email you sent the request from
  3. Install Heroku from toolbelt.heroku.com
  4. Double check that this all worked correctly by running heroku info --app lattice-recipes, which should produce the following output:
=== lattice-recipes  
Addons:           heroku-postgresql:hobby-dev  
Collaborators:    < .... >  
                  <your email>  
Git URL:          [email protected]:lattice-recipes.git  
Owner Email:      <email>  
Region:           us  
Repo Size:        784k  
Slug Size:        22M  
Stack:            cedar  
Web URL:          http://lattice-recipes.herokuapp.com/  

After cloning our repository, run heroku git:remote -a lattice-recipes

Viewing Local Copy of Website

  1. Run rails server
  2. Go to localhost:3000 in your browser to view changes

Pushing to Development Repository

  1. git add and git commit as appropriate
  2. git pull --rebase
  3. git push

Deploying a Release

  1. Make sure dev repo reflects all desired changes
  2. git push heroku master -f
  3. git tag -a <version number> -m "<release name>"
  4. git push --tags
  5. Draft a new release on GitHub using the commit tagged with the above version number

Accessing Old Releases

All our releases are hosted on GitHub, and can be viewed here.

Updating Documentation

All of our developer documentation can be found and edited in this file or in lattice-recipes/docs/. There is no product website to update when deploying a new release, but the user facing documentation in lattice-recipes/app/views/about/index.html.erb should be kept up to date. All documentation prior to the feature complete release can be accessed in lattice-recipes/docs/ of our Beta Release.

Testing

Running Unit Tests

  1. cd lattice-recipes
  2. bundle exec rspec spec

Automated Testing

We are using Travis CI for automated testing. It is linked to the GitHub repository and will email our mailing list if a push breaks the build or causes a unit test to fail. Travis runs every time there is a push to the repository. Once you've gotten permission to push to the repo, you can add your email to the top level .travis.yml file to get these notifications.

Test Coverage

SimpleCov automatically runs test coverage analysis every time our test suite is executed. These results are stored in lattice-recipes/coverage/index.html. This file is not stored in our repo, but is recreated every time our unit tests are run.

Running System Tests

Manual system tests are located in lattice-recipes/tests. These text files contain step by step instructions, and should be run before deployment and whenever significant changes are made to a use case.

Directory Structure

In general, we are using the standard Rails directory structure.

  • lattice-recipes/app/
    • application specific code
    • divided into models, views, and controllers folders
  • lattice-recipes/docs/
    • requirements documentation
    • design documentation and diagrams
    • changelogs for documentation
    • feedback from customers, users, and team-members (code review)
    • postpartum reflection
  • lattice-recipes/tests/
    • text file system tests with step by step instructions
  • lattice-recipes/spec/
    • automated unit tests
  • lattice-recipes/coverage
    • only visible after running unit tests
    • contains test coverage analysis

License

MIT