My first Ruby CLI App: WeatherFinder

Jesse Summer-Lavigne
2 min readNov 23, 2020

I am writing about my completed CLI Ruby Project: WeatherFinder. I finished it the day before the due date due to some hang ups with HTTParty and Rake Gems. Luckily there was enough documentation. Many professional software developers helped me out who I have known over the years. I’ll thank them with initials for privacy’s sake.

This is a win in my book that I was able to finish it this time. My previous attempt, I got too close to the sun and failed to get the gems I needed to make my idea work. Being stuck in the hospital for a week and having a hole in your back makes it difficult to code. This time around, I only spent 3 days in a hospital and the hole has finally closed up.

Anyways, the CLI can find weather in for up to 200,000 cities in OpenWeatherAPIs database.That’s a lot of places. You have to type in based on full words. Seattle, WA is invalid. Seattle Washington is Valid. You can still type Seattle or Seattle, USA.

Things it can do

  • Find the weather for any place in OpenWeatherAPIs database. I think it is 200,000 cities. Details include Location, Coordinates Google Map URL, Temperature, Sky Condition, Humidity, Wind Speed, Wind Direction, Sunrise and Sunset time.
  • Provide a google maps link for the location. (Thank you N.S. from Google)
  • Make a list of previous locations. Hopefully this fulfills the 2nd API call. Finally got the list function not to crash if you type it without holding any previous searches in memory.
  • Give a 3 day forecast. Any more and I would have to pay.
  • Give colorful script. Thanks J.B. Maybe I’ll make it more colorful later. The Paint Gem is fantastic. If I ever do any other CLI ruby stuff I am using that.
  • Tell you to wear a facemask when you exit. :P

What I tried to make it do, but failed at. It crashed when I attempted the code I had.

  • Open a Google Maps page when you type Map. I couldn’t even figure it out with good documentation. I suck at CLI stuff. This reminded me of the last project I attempted with a picture viewer. There was a deadline, so I had to pass on it to keep it simple.

I think I accomplished 2 API calls in a working Gem. The List function will give a list of previous searches. The 3 day forecast will go a step deeper in the previous query. I did a 21 minute video explaining it. I am scheduling a review of the project ASAP. Here’s hoping that this one will be good enough!

Cheers,

Jesse

--

--

Jesse Summer-Lavigne
0 Followers

Flatiron Bootcamp Student. Educator. Lifelong Learner.