Skip to content

camsys/onebusaway-nyc-atstop

Repository files navigation

At Stop

A hybrid mobile app that provides information about when the next bus will arrive at your stop. The app uses free MTA Bus Time Developer API's to get the real-time location of the buses serving a particular stop. The app is built on top of Ionic Framework.

Comments/contributions are welcome.

Build Status

Setting up the project

Optionally, run

  • wget -O - https://github.com/raw/camsys/onebusaway-nyc-atstop/master/setup.sh | bash to fire off the commands below.

  • (Wait before cloning this repo)

  • First, install Ionic Framework.

  • Second, start a new project using ionic start atstop blank.

  • Then, in the project root (cd atstop):

    • Setup SASS running ionic setup sass.
    • git init
    • git remote add origin PATH/TO/THIS/REPO
    • git fetch --all
    • git reset --hard origin/master
    • rm www/img/ionic.png www/css/style.css
    • mv js/config.tmpl.js js/config.js
    • npm install to grab dependencies defined in package.json.
    • bower install to grab dependencies defined in bower.json (yes, we know).
    • Get a MTA Bus Time Developer API key. Go here to request one.
    • Insert your key into the API_KEY field of config.js.
    • Set the API end point via the API_END_POINT constant in the same file (e.g. http://bustime.mta.info/)
    • run gulp sass && gulp compress to generate CSS from SCSS and generate the scripts.js.

Running

  • Use the ionic serve function of Ionic Framework
  • In order to build the native mobile app, use ionic build [platform]

Testing

Now, we are using ng-describe. Note: SpecRunner.html will be deleted when all test cases are transformed to the ngDescribe method (For example, www/js/filters-spec.js).

  • First, install:

    • sudo npm install -g karma-cli (If this fails on Linux with a node-gyp error, you may need to install the build-essential package)
  • Default Karma Config (karma.conf.js) file located in the root directory of the project

  • Run karma start

  • To open the coverage report page in the browser, run open coverage/Chrome<...>/index.html

Building via Cordova

  • running ionic state restore will pick up plugins and platforms necessary to build via Cordova Note: If building for iOS9, you may need to update the App Transport Security parameters.

Project License

The project uses the Apache License, version 2.0.