My CLI Ruby Project- Travel Guide

“A different language is a different vision of life.”– Federico Fellini

My inspiration for building this project came from my love for cultures, cultural values, and languages spoken by different communities in the world that bring unity, better understanding, cohesiveness, progressiveness to the individual, and to the community at large.

I intend to reach as many people as I can to bring out a better understanding of the values of different cultures in different countries, their lives, their education, their day-day activities and their believes.

Having that vision in mind, I opted to create an app that would enable the User to select a language from a menu and the app would populate a list of countries that speak that language.

The CLI App and User Relationship

  1. My CLI provides data that goes ‘two’ levels deep. First, the CLI displays a welcome message and a list of 4 languages: Arabic, English, French, and Spanish(first level). The User will select a language, and a list of all countries that speak that language will be shown (second level)
  2. I created a Ruby gem using a bundle gem travel
  3. I stored my code in three files:
  • cli.rb: stores code that was providing user interface — ‘gets’ and ‘puts’
  • api.rb: stores code and data from the internet
  • travel.rb: stores attributes of the list of countries that I was getting from my API.

4. Some of the gems that I used:

  • gem ‘HTTParty’- this is a gem that helps strip the API so that we can get out data.
  • gem ‘pry’ — creates a new interactive environment in your terminal which allows programmers to play around with the code without making permanent changes to the code.
  • gem ‘colorize’ — which enables the programmer to add color to their text

For instructions of installing and using the three gems please check the links below.


The Process and The lesson

This was my first project! To be successful in the project I had to invest a lot of time creating my code and researching ways to make my code work. This required a lot of patience, especially when debugging the code. I needed to think outside the box to find solutions and be flexible with changing the codes around.

Finally, I learned that it is a process that takes time and I have to appreciate the little accomplishments I made.

I hope to expand my app to show more languages and different historical facts about the countries or different places you could visit when visiting the countries.