Skip to content

apurv101/new_weather

Repository files navigation

New Weather

New Weather is a simple Ruby on Rails application that shows the 7-day weather forecast for a given city using the OpenWeatherMap API. This README will guide you through setting up the application and adding a new feature to retrieve the current conditions for the city.

Prerequisites

  • Ruby 2.6.3 or higher
  • Rails 6.0.0 or higher

Setup

  1. Fork the repository by clicking the "Fork" button at the top-right corner of the repository page on GitHub.

  2. Clone your forked repository:

$ git clone https://github.com/yourusername/WeatherApp.git

  1. Change into the app directory:

$ cd new_weather

  1. Install the required gems:

$ bundle install

  1. Create an API key from OpenWeatherMap:
  1. Add your OpenWeatherMap API key to config/credentials.yml.enc:

$ EDITOR="your_editor" rails credentials:edit

Add the following content and replace YOUR_API_KEY with your API key:

open_weather_map:
  api_key: YOUR_API_KEY
  1. Start the Rails server:

$ rails server

  1. Open your browser and go to http://localhost:3000 to view the app.

Task: Add Current Conditions Feature

Your task is to add a new feature to the app that retrieves and displays the current weather conditions for the city the user submits.

Requirements

  • Only display the highest and lowest values for each day of the existing forecast. We do not want hourly entries.
  • Retrieve the current weather conditions for the submitted city using the OpenWeatherMap API.
  • Display the current temperature, humidity, and a brief weather description.
  • Update the UI to show the current conditions in a visually appealing manner.

Submission Process

  1. Commit your changes to a new branch:
git checkout -b your_feature_branch
git add .
git commit -m "Add current conditions feature"
  1. Push your changes to your forked repository:
git push origin your_feature_branch
  1. Create a tar.gz archive of the project folder, excluding any unnecessary files (e.g., .git, node_modules, etc.):
tar -czvf WeatherApp.tar.gz WeatherApp --exclude=.git --exclude=node_modules
  1. Send the zip file as an email attachment to codesubmissions@itsacheckmate.com with the subject line "WeatherApp Code Submission - Your Full Name". Replace "Your Full Name" with your actual full name.

We'll review your submission and get back to you with feedback. Good luck!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published