A Simple Ruby CLI built on top of Thor to fetch domains accurately from company names.
- Language: Ruby v2.3.1p112
Depedent Gems
-
Thor: Thor is a simple and efficient tool for building self-documenting command line utilities
Run
gem install thorto install it before running the tool. -
Parallel: Parallel processing made simple and fast
Run
gem install parallelto install it before running the tool. -
Mechanize: Ruby gem built on top of Nokogiri for Web Scraping.
Run
gem install mechanizeto install it before running the tool. -
Koala: Koala is a Facebook library for Ruby, supporting the Graph API/
Run
gem install koalato install it before running the tool. -
HTTParty: HTTparty is a simple and efficient tool to handle HTTP requests.
Run
gem install httpartyto install it before running the tool. -
Rspec (optional): Behaviour Driven Development for Ruby. It is only needed if you wish to the run the tests.
Run
gem install rspecto install it before running the tests. -
Webmock (optional): Library for stubbing and setting expectations on HTTP requests in Ruby. HTTParty is supported. It is only needed if you wish to the run the tests.
Run
gem install webmockto install it before running the tests.
There are two ways to execute the program:
- Execute
ruby get_domain.rbor./get_domain.rb; if the file is denied permission for the latter, grant permission by executingchmod +x get_domain.rb
- It provides an interactive command prompt based shell where commands can be typed in.
-
It accepts company names as arguments and outputs the resultant domain names on the terminal. Company name should not have spaces between them.
Split an Atom =>
invalidSplitanAtom =>
valid
./get_domain.rb from_company_name Guru -c startups saas- Use
helpto explore further on the options of a command.get_domain_namealso takesFileas parameter to parse through it and output domains.
./get_domain.rb from_company_name Guru Microsoft -c startups saas yields both companies with similarity index based on the common categories provided.
However, if you want different category search for each company name. Use the file input.
First argument company-name and rest of the arguments can be categories. Check companies.txt for example.



