Giter Club home page Giter Club logo

sweater_weather's Introduction

Sweather Weather

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.

Summary

Getting Started

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!

Running the tests

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

Test Coverage

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)

Built With

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

Endpoints

Get Forecast

GET '/forecast'

  • Required parameters: :location

Get Backgrounds

GET '/backgrounds'

  • Required parameters: :location

Post Users

POST '/users'

  • Required header parameters as application/json and parameters: "email", "password", "password_confirmation"

Post Sessions

POST '/sessions'

  • Required header parameters as application/json and parameters: "email", "password"

Post Road Trip

POST '/road_trip'

  • Required header parameters as application/json and parameters: "origin", "destination", "api_key"

Versioning

This application is currently on V1. For any changes in versioning, please check back here.

Authors

Acknowledgments

  • Turing instructors
  • Geocode, Flickr, OpenWeather, Mapquest

sweater_weather's People

Contributors

avjohnston avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.