The Ruby Interface to the Incident Information System
Add this line to your application's Gemfile:
gem 'inciweb', git: 'git@github.com:artofthetrekcom/inciweb.git'This gem provides a very easier way to retrieve the list of recent incidents, and we can retrieve those using the following interface.
Inciweb::Incident.allThe incidents listing interface only provides the basic information, but in
some rare cases we might need the status, size of affected area, or any other
details, and that's where the find interface fits. Currently it will only
return the additional details but in the future we can add more attributes to it
Inciweb::Incident.find(incident_id)The inciweb does not provide the incident id directly with their response, we
can normally extract this from the link, but lets make it more simpler, this
interface takes the link as an argument and then extract the id and retrieve the
details for that specific incident.
Inciweb::Incident.find_by_link(incident_link)We are following Sandi Metz's Rules for this gem, you can read the description of the rules here All new code should follow these rules. If you make changes in a pre-existing file that violates these rules you should fix the violations as part of your contribution.
Clone the repository.
git clone https://github.com/artofthetrekcom/inciwebSetup your environment.
bin/setupRun the test suite
bin/rspecFirst, thank you for contributing! We love pull requests from everyone. By participating in this project, you hereby grant Art Of The Trek the right to grant or transfer an unlimited number of non exclusive licenses or sub-licenses to third parties, under the copyright covering the contribution to use the contribution by all means.
Here are a few technical guidelines to follow:
- Open an issue to discuss a new feature.
- Write tests to support your new feature.
- Make sure the entire test suite passes locally and on CI.
- Open a Pull Request.
- Squash your commits after receiving feedback.
- Party!
This gem is developed, maintained and funded by Art Of The Trek