Weather graphing backend for aldroog.nl https://aldroog.nl
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Bèr Kessels 39a4c4259a Merge tag 'v0.4.0' into develop 7 months ago
bin Add a console to quickly play around with the app. 1 year ago
config Change URL to pull in capsitrano 9 months ago
data Naive implementation of a graph renderer. 2 years ago
img Send a dummy file to ensure everything is wired up correctly. 2 years ago
lib Add offline geocoding endpoint to find the name of a place. 1 year ago
public Inject place name into document title 1 year ago
test Upgrade HTTParty 7 months ago
.gitignore Add Capistrano and point to server 9 months ago
.ruby-version Pin to ruby version 2.4.1 with rbenv et al. 2 years ago
.travis.yml Ensure failing images are written to artifacts. 1 year ago
Capfile Ensure Gems are installed on server 9 months ago
Gemfile Ensure Gems are installed on server 9 months ago
Gemfile.lock Upgrade HTTParty 7 months ago
README.md Change clone repo in README 9 months ago
Rakefile Set up test-framework 2 years ago
config.ru Don't set $LOAD_PATH in rackup 9 months ago
pijpenstelen.rb Add offline geocoding endpoint to find the name of a place. 1 year ago

README.md

Project Title

Page that shows rain precipitation in a graph for your current location.

Getting Started

Ensure you have Ruby (2.x), and bundler installed.

  1. git clone https://git.webschuur.com/berkes/pijpenstelen.git
  2. bundle install
  3. rackup

Now visit http://localhost:9292, accept the location request in your browser and you should see a graph predicting rainfall in next hours.

Prerequisites

  • Ruby 2.x
  • bundler >= 1.10
  • TODO: find out what header files are required for Rmagic on Ubuntu, other Linuxes and OSX.

Running the tests

Tests are ran on Travis

To run tests locally:

bundle exec rake

Break down into Integration-tests

Integration tests (also known as end-to-end tests) are found under integration.

These tests run through rack and stub out the external weather provider. Fixed responses are found in the fixtures directory.

They mimic the experience that an end-user would have.

There is currently no quick way to run only these tests, they are ran as part of the entire test-suite, so intermixed with the unit-tests.

And unit tests

Unit tests are found under models.

These tests run classes (models) in isolation and test their isolated behaviour.

There is currently no quick way to run only these tests, they are ran as part of the entire test-suite, so intermixed with the integration-tests.

And coding style tests

TODO: houndci

Deployment

Push to heroku:

  1. heroku login
  2. heroku .... TODO: document all the steps with heroku to deploy from scratch.

Built With

  • Sinatra - Sinatra micro-framework
  • Gruff - Graphs for Ruby (using Rmagic)

Contributing

  1. Fork the repository
  2. Ensure you agree to the MIT licence
  3. Make your changes. Make them small, atomic and focused. Ensure the tests are green.
  4. Create one (or more) pull-requests. 10 small PRs are better than 1 big one contain all 10 unrelated changes.
  5. Ensure travis and houdci are green.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

  • Bèr Kessels - Initial work - berkes

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments