Microverse Capstone Project - Ruby Module
I will keep you up with inspiring quotes and funny jokes!
Inspirational quotes are one way to help you to stay positive, productive, and happy as you move along your journey. Even saying one motivational quote to yourself in front of the mirror each day can make an enormous impact on your day-to-day life. Additionally, keep in mind that old saying: "Laughter is the Best Medicine". Laughter strengthens your immune system, boosts mood, diminishes pain, and protects you from the damaging effects of stress. So, let's keep our attitude up!
- Ruby (version 3.0.1)
- The following required Gems:
- gem 'nokogiri' (version 1.11.3)
- gem 'rspec' (version 3.10.0)
- gem 'rubocop' (version 1.14.0)
- gem 'telegram-bot-ruby' (version 0.15.0)
To avoid the disclosure of the API Token used in this project, no live demo was provided. Please follow the steps listed below to run this app on your machine.
To get a local copy up and running, follow these simple example steps:
- You should have Ruby (version 3.0.1 or higher) installed on your computer.
- Additionally, you should have an account on Telegram and you'll have to create a new robot on the platform, as shown below:
To run this project, you'll need to create your rob
- On Telegram, search for @BotFather, this is an app provided by Telegram for creating bots
- Once you've started BotFather, enter
/newbot
- Then, enter your bot name and a username. Notice that the bot's username should end with
bot
- Now, you should receive an API Token from BotFather. Save this information for later use.
- Finally, search for your newly created robot on Telegram and start it!
- On your bash, go to the directory of your preference and run
git clone git@github.com:enionsouza/Telegram-Bot.git
- Next run
cd Telegram-Bot/config
- Open the file named
robot_token-example.txt
with the editor of your preference. - Now, replace the generic example of API Token with the token you've received from BotFather, in the previous step. Save this edited file in this same directory with the name
robot_token.txt
- Next, on your bash, run
cd ..
- Finally, to run the required gems used in this project run
bundle install
- To run the tests, go to your
Telegram-Bot
directory, and runrspec
- Now that you're in
Telegram-Bot
directory, runcd bin
- To turn your Telegram Robot on, either run
./main.rb
orruby main.rb
- Now go to your Telegram Robot and enter
/help
. The other available commands should appear on your screen, as the robot's response - To stop your Telegram Robot, hit
command + Z
orCTRL + Z
on your keyboard
- For this project, the quotes and jokes were web-scraped from the following pages:
- The web scraping was automatically performed and, for testing purposes, you can also delete the directory named
src
along with all its content files. When./main.rb
is run in thebin
directory, identical newjson
files will be generated from the mentioned sources. You can also re-run the RSpec tests, just for the sake of sanity check of the newly generatedjson
files.
👤 Ênio Neves de Souza
- GitHub: @enionsouza
- Twitter: @enionsouza
- LinkedIn: LinkedIn
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if you like this project!
- My beloved family, for all the support provided!
- @fernandorpm, for the valuable tips! Thanks, my mentor!
- Microverse Team
This project is MIT licensed.