-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7db1204
Showing
8 changed files
with
150 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# EditorConfig is awesome!: https://editorconfig.org | ||
|
||
# This is the main EditorConfig file: | ||
root = true | ||
|
||
# Configuration for all files: | ||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text=auto eol=lf |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @Ab20zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# How to Contribute | ||
|
||
First and foremost, thank you! We appreciate that you want to contribute to the project, your time is | ||
valuable, and your contributions mean a lot to us. | ||
|
||
## Issues | ||
|
||
Do not create issues about bumping dependencies unless a bug has been identified, and you can demonstrate that it | ||
affects this library. | ||
|
||
**Help us help you** | ||
|
||
Remember that we’re here to help, but not to make guesses about what you need help with: | ||
|
||
- Whatever bug or issue you're experiencing, assume it will not be as obvious to the maintainers as it is to you. | ||
- Explain the issue thoroughly. Remember, maintainers need to consider all potential use cases. It's crucial to | ||
detail how you're using the library so maintainers can understand and address the problem effectively. | ||
|
||
_It can't be understated how frustrating and draining it can be for maintainers to have to ask clarifying questions on | ||
the most basic things before it's even possible to start debugging. By providing this information upfront, you can | ||
make the best use of everyone's time involved, including yourself._ | ||
|
||
## General Workflow | ||
|
||
1. (External contributors only) Create a fork of the repository. | ||
2. Pull any changes from `main` to make sure you're up-to-date. | ||
3. Create a branch from `main`. | ||
* Give your branch a name that describes your change (e.g., add-cool-feature). | ||
* Focus on one change per branch. | ||
4. Commit your changes. | ||
* Keep your commits small and focused. | ||
* Write descriptive commit messages in [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/) format. | ||
5. When you're ready, create a pull request to `main`. | ||
* Keep your PRs small (preferably <300 LOC). | ||
* Format your title in [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/) format. | ||
* List any changes made in your description. | ||
* Link any issues that your pull request is related to as well. | ||
|
||
### Example: | ||
|
||
```text | ||
Add cool new feature. | ||
ADDED - New feature that does something cool. | ||
FIXED - Bug that caused the program to crash. | ||
CHANGED - The way the program handles user input. | ||
``` | ||
|
||
After the pull request has been reviewed, approved, and passes all automated checks, it will be merged into main. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright © 2024 Aarav Bundela | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# BCLMRWXY-100 | ||
|
||
This Ruby terminal application fetches motivational quotes from a free API and displays them in the terminal. | ||
|
||
## Context | ||
|
||
The purpose of this project is to create a simple terminal-based application that fetches motivational quotes from an | ||
external API and displays them directly in the terminal. It demonstrates basic HTTP request handling in Ruby and JSON | ||
parsing to extract and display the quote. | ||
|
||
## Hidden Meaning | ||
|
||
The name of this project, **BCLMRWXY-100**, holds a hidden meaning: | ||
|
||
- **B**: Believe | ||
- **C**: Create | ||
- **L**: Love | ||
- **M**: More | ||
- **R**: Reach | ||
- **W**: Wide | ||
- **X**: eXpress | ||
- **Y**: Yourself | ||
- **100**: Represents giving 100% effort and commitment to everything you do. | ||
|
||
This sequence encourages you to approach tasks and life with a mindset of belief, creativity, love, broad reach, | ||
expressive communication, and personal dedication. | ||
|
||
## Running the Application | ||
|
||
To run the application, make sure you have Ruby installed on your system. Then, execute the following command: | ||
|
||
```bash | ||
ruby bclmrwxy-100.rb | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# BCLMRWXY-100: As a developer, I need some inspiration, so that I can be motivated to work on my project. | ||
|
||
require 'net/http' | ||
require 'json' | ||
|
||
def fetch_quote | ||
url = URI("https://favqs.com/api/qotd") | ||
http = Net::HTTP.new(url.host, url.port) | ||
http.use_ssl = true | ||
request = Net::HTTP::Get.new(url) | ||
response = http.request(request) | ||
|
||
if response.code == '200' | ||
quote_data = JSON.parse(response.body) | ||
quote_data['quote']['body'] | ||
else | ||
"Failed to fetch a quote. Error: #{response.code}" | ||
end | ||
rescue StandardError => e | ||
"Error fetching quote: #{e.message}" | ||
end | ||
|
||
def display_quote | ||
quote = fetch_quote | ||
puts "Words to Live By:\n#{quote}" | ||
end | ||
|
||
display_quote |