Skip to content

exygy-dev/sf-dahlia-web

 
 

Repository files navigation

Dahlia

Code Climate

Test Coverage

Build Status

Purpose

DAHLIA is the affordable housing portal for the City and County of San Francisco. It was created by the Mayor's Office of Housing and Community Development (MOHCD). This application streamlines the process of searching and applying for affordable housing, making it easier to rent, buy and stay in our City.

Dependencies

Before you install DAHLIA, your system should have the following:

  • Ruby (see Gemfile for version)
  • Homebrew
  • bundler gem install bundler
  • PostgreSQL
  • brew install node
  • npm install -g grunt-cli (To run grunt commands globally)
  • npm install bower

Getting started

We will create a Boxen for this project, but for now to get started:

How to Install

  1. Clone the repo git clone https://github.com/Exygy/sf-dahlia-web.git
  2. Open a terminal window
  3. Run bundle install in command line to download all necessary gems
  4. Run npm install to run the js style and code linters
  5. Run overcommit --install to install git hooks into the repo
  6. Run bower install
  7. Run grunt. Ensure that the latest pattern library is in the same folder as this repo. Running grunt will migrate the css over from the patter library.
  8. Run rake bower:install

Running Tests

Run thor tests. This will run syntax linters, code quality linters, rspec and jasmine specs.

Acceptance/Feature Apps

Temporary "acceptance" apps are created upon opening a pull request for a feature branch. After the pull request is closed, the acceptance app is automatically spun down. See this Heroku article for details.

Contributing changes

<3 Use the engineering workflow and coding style standards established below. <3

Engineering Workflow Overview

Dahlia's current engineering workflow has been fully documented and can be found here.

Dahlia's project backlog is in Pivotal Tracker.

Code style and quality

Javascript

Javascript code quality is ensured by two npm packages: JsHint and JSCS. They will run automatically as a pre-commit hooks. Follow the Airbnb JavaScript Style guide.

Ruby

Rubocop is configured in .rubocop.yml to enforce code quality and style standards based on the Ruby Style Guide and runs every time you commit using a pre-commit hook. Refer to the Ruby Style Guide for all Ruby style questions. To identify and have Rubocop automatically correct violations when possible, run:

  • rubocop -a [path_to_file] for individual files
  • rubocop -a for all Ruby files

JavaScript File Structure

When adding new modules to the JavaScript dirctory, please follow the example structure below to mantain a modular component structure.

- javascripts
    - applications
        - ApplicationsController.js
        - ApplicationsService.js
        - templates
            - applications.html
    - listings
        - ListingController.js
        - ListingService.js
        - templates
            - listings.html
            - listing.html
    - shared
        - SharedService.js
        - SharedController.js
        - LanguageController.js
        - LanguageService.js
        - directives
        - filters
        - templates
            - welcome.html

Changing the Style Guide settings

Any changes to Rubocop, JSCS, etc. affect the entire team, so it should be a group decision before commiting any changes. Please don't commit changes without discussing with the team first.

Credits

License

Copyright (C) 2015 City and County of San Francisco

DAHLIA is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with DAHLIA. If not, see http://choosealicense.com/licenses/gpl-2.0/

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 88.1%
  • HTML 5.5%
  • Ruby 3.1%
  • CoffeeScript 3.0%
  • JavaScript 0.3%