Giter Club home page Giter Club logo

adopt-a-sidewalk's Introduction

FIXME

Adopt a Sidewalk

Claim responsibility for shoveling out a sidewalk after it snows.

Adopt a Sidewalk

You can see a running version of the application at http://adopt.chicagoshovels.org/.

git clone git://github.com/Chicago/adopt-a-sidewalk.git
cd adopt-a-sidewalk
bundle install

Setting up the database

  1. Install PostgreSQL with the PostGIS extensions: e.g. brew install postgis
  2. Download the chicagosidewalks shape file from the City of Chicago Data Portal http://data.cityofchicago.org
  3. Convert the shapefile into PostGIS SQL: shp2pgsql -s 3435:4326 -g the_geom -I chicagosidewalks.shp chicagosidewalks.sql
    • -s 3435:4326 This converts the geospatial data from the EPSG:3435 (NAD83 / Illinois East) project to ESPG:4326 (WGS84, lat/long)
    • -g the_geom name the geocolumn the_geom to match what's in the Rails code
    • -I generate a spatial index on the geocolumn.
  4. Create a database that will host your app: e.g. createdb adoptasidewalk_dev
  5. Add the PostGIS extensions to your database: e.g. psql adoptasidewalk_dev -c "CREATE EXTENSION postgis;"
    • MAGIC
  6. Load in chicagosidewalks.sql: e.g. psql adoptasidewalk_dev <chicagosidewalks.sql
  7. Configure database.yml to point to your database
  8. Run Rails migrations: rake db:migrate

Google Maps KML Endpoint

tl;dr Set the environment variable GMAPS_KML_ENDPOINT to the address of your publicly-exposed host

This part is tricky. The Rails app is designed so that a client-side call to a Google Maps function loads up KML from HTTP endpoint in the app. What this means is that your running app has to be exposed to the Internet in order to load up the sidewalk KML on the map. This is fine in production, but in development (read: on your laptop, etc) you're likely behind a firewall and Google will be unable to load the KML.

One solution to this problem is to use SSH Remote Forwarding.

  1. Have an Internet exposed Linux Server (e.g. AWS instance)
  2. Configure sshd to have "GatewayPorts yes"
  3. On development machine create a remote forward connection: ssh -nNTR *:3000:localhost:3000 your.remote.server.com
  4. Set GMAPS_KML_ENDPOINT to "your.remote.server.com:3000"

In production, this is likely the hostname or IP of your production server.

rails server

In the spirit of free software, everyone is encouraged to help improve this project.

Here are some ways you can contribute:

  • by using alpha, beta, and prerelease versions
  • by reporting bugs
  • by suggesting new features
  • by writing or editing documentation
  • by writing specifications
  • by writing code (no patch is too small: fix typos, add comments, clean up inconsistent whitespace)
  • by refactoring code
  • by reviewing patches

We use the GitHub issue tracker to track bugs and features. Before submitting a bug report or feature request, check to make sure it hasn't already been submitted. You can indicate support for an existing issuse by voting it up. When submitting a bug report, please include a Gist that includes a stack trace and any details that may be necessary to reproduce the bug, including your gem version, Ruby version, and operating system. Ideally, a bug report should include a pull request with failing specs.

  1. Fork the project.
  2. Create a topic branch.
  3. Implement your feature or bug fix.
  4. Add tests for your feature or bug fix.
  5. Run bundle exec rake test. If your changes are not 100% covered, go back to step 4.
  6. Commit and push your changes.
  7. Submit a pull request. Please do not include changes to the gemspec or version file. (If you want to create your own version for some reason, please do so in a separate commit.)
  • Ruby 1.9.3

If something doesn't work on one of these interpreters, it should be considered a bug.

This library may inadvertently work (or seem to work) on other Ruby implementations, however support will only be provided for the versions listed above.

If you would like this library to support another Ruby version, you may volunteer to be a maintainer. Being a maintainer entails making sure all tests run and pass on that implementation. When something breaks on your implementation, you will be personally responsible for providing patches in a timely fashion. If critical issues for a particular implementation exist at the time of a major release, support for that Ruby version may be dropped.

adopt-a-sidewalk's People

Contributors

cgansen avatar danmelton avatar govintrenches avatar hunterowens avatar jkriss avatar kmacedo avatar kunaldi avatar max-mapper avatar nleeper avatar rcackerman avatar ryanbriones avatar sferik avatar

Stargazers

 avatar

Watchers

 avatar  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.