Sweater Weather is the back-end side of a Service-Oriented Architecture application, that allows users to check current, hourly and daily weather across the world as well as planning a road trip along with their end destination's weather information at their time of arrival. This app uses OpenWeather API, Mapquest API, and FLickr API to create endpoints to send to our front end, allowing users to login, create sessions, access weather information around the world, and create road trips.
To get this application running yourself, please follow these steps:
- Fork and clone this repo
- run
bundle install
- Go to OpenWeather API and sign up for an API Key
- Go to MapQuest API and sign up for an API Key
- Go to Flickr API and sign up for an API Key
- Open
config/application.yml
and store your API Keys as environment varibales - In your terminal run
rails s
to start your server - Open Postman and start hitting localhost endpoints!
To run the tests, follow these commands:
- Make sure you have run a
bundle install
- Run
bundle exec rspec
- Run
open coverage
to open your coverage file and inspect further
Rspec, VCR, ShouldaMatchers, Capybara, and SimpleCov were all used.
The full suite is currently at 100% coverage for 798 lines of code. This application is thoroughly tested through happy path, sad path and edge cases. Certain sad paths and edge cases include:
- Getting an invalid parameter (empty string, no parameters, invalid city, invalid state, invalid latitude, invalid longitude, etc)
- Routing a trip that can't be driven
- User authentication (user not existing, passwords not matching, password/email aren't correct, API Key not belonging to user, etc)
This application was built utilizing many different gems and frameworks:
- Ruby
- Rails
- Rspec
- Postman
- Active Record
- Pry
- Fast Json API
- Faraday
- JSON
- Bcrypt
- SimpleCov
- ShouldaMatchers
- Capyabra
- Figaro
- VCR
- Required parameters: :location
- Required parameters: :location
- Required header parameters as application/json and parameters: "email", "password", "password_confirmation"
- Required header parameters as application/json and parameters: "email", "password"
- Required header parameters as application/json and parameters: "origin", "destination", "api_key"
This application is currently on V1. For any changes in versioning, please check back here.
- Andrew Johnston - Sole Developer -
- My Github
- My LinkedIn
- Turing instructors
- Geocode, Flickr, OpenWeather, Mapquest