In this project, I was asked to use ruby for scraping websites and to get information. I decided to get info of ruby gems from rubygems.org. The project is capable of fetching gems right from your terminal.The gems query lists a table of gems sorted on downloads. You can select any gem from the table, scroll between gems, install them, uninstall them,view ri documentation if any or automatically open the website for the gem in the browser all right from one simple menu. Now you can view available gems for your next passion project.
- Search for ruby gems right from your terminal.
- Table menu listing fetched gems for easy selection.
- Table sorted on downloads for easy decision making.
- Critical information such as version and downloads.
- Easily select any gem from the list or option to search again.
- Gem Menu for the Ruby Gem where you can easily install or uninstall the gem.
- Short description for the gem.
- View Additional information from ri documentation for the gem from the terminal and open the rubyorgs.org gem documentation in a browser window.
- Scroll between gems.
- Intuitive menus for the ruby gem and table of gems for easy selection and navigation.
- Ruby
- 'launchy'
- 'rspec'
- 'rubocop'
- 'terminal-table'
- 'colorize'
To get a local copy up and running follow these simple example steps.
- Text editor
- GitHub
- Git
- Ruby
Clone repository from github to your local drive by following these steps:
- Go to the main page of the repository
- Above the listed files, click the green Code button
- You can clone the repository using:
- SSH:
git@github.com:SamroodAli/treasury.git
.
- SSH:
- Open Terminal
- Change the current working directory to the location you want the cloned directory
- Type one of the git clone commands listed above.
- Press Enter to create your local clone
- Install Atom or Microsoft Visual Studio text editor to view the code on your local machine.
- Install Git.
-
Open your terminal
-
Navigate to project directory
-
Enter 'bundle' in your terminal.
-
Enter
ruby ./bin/main.rb
in your terminal and press Enter. -
Enter your keyword(s) for the gems, example: terminal colors
-
If no gems are found, you can try again with other keywords
-
Or press
q
to exit -
If there are gems, it would be listed in a table with instructions below
- There are four columns with index, name of the gem, version and the number of downloads.
- Select any gem by entering the index from the gem in the first column.
- Enter
s
to search again. - Enter
q
to quit - Entering anything else would open the first gem
- Opening a gem will open the Gem menu
- In the top is the name of the gem
- The body has the description followed by four options
- Enter
1
will install the gem - Enter
2
to uninstall the gem - Enter
3
to view any ri documentation if there any. ri documentations are terminal documentations that ships with some gems. - Launch a browser and open the website for the gem in rubygems.org,you can read more about the gem here.
- The footer has the options for navigating around the program.
- Enter
h
to go to previous gem - Enter
l
to go the next gem. (My personal favourites) - Enter
t
to go back to table menu - Enter
q
to exit - Enter
s
to search for other gems.
Opening a broswer might put your terminal in waiting mode for the browser to close, You can close your terminal by pressing Control button and C together. It is also safe to exit the terminal now.
👤 SAMROOD ALI
- GitHub: @SamroodAli
- LinkedIn: Samrood Ali
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if you like this project!
- This project is MIT licensed.
- This project is creativecommons licensed.