⌚ OpenOpeningstijden main server application
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 740a0bd44a Merge branch 'feature/parse-hours' into develop 2 kuukautta sitten
app Remove week_stable as we don't need that ATM. 2 kuukautta sitten
bin Use parser to parse the Opening Hours String. 2 kuukautta sitten
config Replace hardcoded address with hstore object 2 kuukautta sitten
data Import a lookup table with country names. 10 kuukautta sitten
doc Add swagger doc and build HTML from it. 10 kuukautta sitten
images Implement basic json serialisation for events with lat-lon pairs 4 kuukautta sitten
lib Autocorrect with rubocop after upgrading. 3 kuukautta sitten
test Remove week_stable as we don't need that ATM. 2 kuukautta sitten
vendor/imposm-0.6.0-alpha.4-linux-x86-64 Add latest imposm release. 1 vuosi sitten
.gitignore Remove .env to be replaced with per-env .env files in deployment 4 kuukautta sitten
.rubocop.yml Add linter: rubocop 8 kuukautta sitten
.ruby-version Update Ruby and Rubygems. 3 kuukautta sitten
.semver Add semver. 8 kuukautta sitten
Gemfile Add a console for manual investigation and debugging 3 kuukautta sitten
Gemfile.lock Add a console for manual investigation and debugging 3 kuukautta sitten
LICENSE Add LICENSE 1 vuosi sitten
Makefile Create database through makefile. 4 kuukautta sitten
Procfile Add a Procfile to run the Web and Processors. 8 kuukautta sitten
README.md Add initial README file 10 kuukautta sitten
Rakefile Replace hardcoded address with hstore object 2 kuukautta sitten
config.ru Autocorrect with rubocop after upgrading. 3 kuukautta sitten
mapping.yml Fill a database lookup table with administrative boundaries. 10 kuukautta sitten

README.md

Hours

RESTful JSON API for opening hours

Getting Started

TODO: Finish Make Install TODO: Provide alternative in docker

Prerequisites

A Linux machine that supports apt, preferably a recent Ubuntu LTS.

make install should ensure all dependencies are installed.

For machines that do not support Make, consider getting another OS, if anything, as a virtual machine.

For machines that do not have apt, we are open to help on making the Makefile more portable. Pull requests, suggestions and help is welcome. The ideal situation would be where all common POSIX compliant systems, will be able to run the Makefile and install dependencies.

Installing

Install all dependencies with

make install

Running the tests

Running the tests with

make test

Integration tests

Integration tests, or end to end tests, are tests that run expectations on the full application. It sets up, seeds and connects to a database and then makes requests through the REST HTTP interface.

These are slow, and will, nor cannot, cover all edge-cases, paths and exceptions. They cover the happy path, common situations and important features.

Currently ran inside the entire test-suite. If the suite grows too large, we will extract these and make them runnable separately.

Unit tests

The unit tests isolate a module and test that in isolation. Unfortunately, JavaScript, nor node, nor its ecosystem of packages are very clean and test-oriented. Many features, packages or libraries will inject their behaviour in the global namespace, making it very hard, sometimes impossible to mock or stub.

There are quite some tests, but not near as much as I would like.

Deployment

Deploying depends on your environment. Anywhere where NodeJS is supported will probably run this software.

TODO: describe what config to change in order to deploy to your servers.

make deploy

Built With

Contributing

TODO: introduce CONTRIBUTING.md

Versioning

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

Authors

  • Bèr Kessels

License

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

Acknowledgments

TODO: describe YoHours, openstreetmap, imposm, opening_hours etc.