Giter Club home page Giter Club logo

weather-app's Introduction

Apple Coding Assessment

Weather app that returns a current forecast given a valid address.

Requirements:

  • Must be done in Ruby on Rails
  • Accept an address as input
  • Retrieve forecast data for the given address. This should include, at minimum, the current temperature (Bonus points - Retrieve high/low and/or extended forecast)
  • Display the requested forecast details to the user
  • Cache the forecast details for 30 minutes for all subsequent requests by zip codes. Display indicator if result is pulled from cache.

Table of Contents

Prerequisites

The following tools are required to be installed on the system.

  • Github
  • Ruby [3.2.1]

Check out the repository

git clone [email protected]:organization/weather-app.git
cd weather-app

Enable Caching

By default caching is disabled. Run the following to toggle caching:

rails dev:cache

Add API key to credentials

Use an access token obtained from API Keys on the OpenWeather website after registration.

Open the credentials file for editing:

rails credentials:edit

Paste in the API key obtained above:

# Open Weather API
openweather_api_key: [your-api-key]

Install Gems

Run bundle install.

Start the Rails server

You can start the rails server using the command given below.

bundle exec rails s

And now you can visit the site with the URL http://localhost:3000

weather-app's People

Contributors

bigbadmachine 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.