greeenboii 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.idea/greeenboii.iml +33 -0
- data/.idea/material_theme_project_new.xml +12 -0
- data/.idea/modules.xml +8 -0
- data/.idea/vcs.xml +6 -0
- data/.idea/workspace.xml +111 -0
- data/.rubocop.yml +11 -0
- data/CHANGELOG.md +5 -0
- data/CODE_OF_CONDUCT.md +132 -0
- data/CONTRIBUTING.md +50 -0
- data/LICENSE.txt +21 -0
- data/README.md +37 -0
- data/Rakefile +22 -0
- data/exe/greeenboii +4 -0
- data/ext/greeenboii/extconf.rb +10 -0
- data/ext/greeenboii/greeenboii.c +9 -0
- data/ext/greeenboii/greeenboii.h +6 -0
- data/lib/greeenboii/version.rb +5 -0
- data/lib/greeenboii.rb +146 -0
- data/sig/greeenboii/options.rbs +5 -0
- data/sig/greeenboii/search.rbs +11 -0
- data/sig/greeenboii.rbs +5 -0
- data/sorbet/config +4 -0
- data/sorbet/rbi/annotations/.gitattributes +1 -0
- data/sorbet/rbi/annotations/minitest.rbi +119 -0
- data/sorbet/rbi/annotations/rainbow.rbi +269 -0
- data/sorbet/tapioca/config.yml +13 -0
- data/sorbet/tapioca/require.rb +4 -0
- metadata +132 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2347306febab2fa04e43f8dfa11283238df91df753cac0ddcadf4410ba6adc4d
|
4
|
+
data.tar.gz: b1389683f5036e9c935f259c2505fa1ba89da4721610652842e0d8cf9a5282ab
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 0c244f1d3d8224d97867ec1efc0a97fcba13e283c10e0e099dd632385292fee9cfbdbf5ccc6628b8131573efa75808792cad84bd71a8260da8e06782c13cbcf4
|
7
|
+
data.tar.gz: 03306ada69d98ecdb33a8393cb6fc2171e896282a4981970faff87f4d45fce21d1e146711d70ec035ae54cd31158f3f7c2c4e4369bf38a56710d3ed2f1c34041
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<module type="RUBY_MODULE" version="4">
|
3
|
+
<component name="ModuleRunConfigurationManager">
|
4
|
+
<shared />
|
5
|
+
</component>
|
6
|
+
<component name="NewModuleRootManager">
|
7
|
+
<content url="file://$MODULE_DIR$">
|
8
|
+
<sourceFolder url="file://$MODULE_DIR$/features" isTestSource="true" />
|
9
|
+
<sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
|
10
|
+
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
|
11
|
+
</content>
|
12
|
+
<orderEntry type="jdk" jdkName="ruby-3.2.4-p170" jdkType="RUBY_SDK" />
|
13
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
14
|
+
<orderEntry type="library" scope="PROVIDED" name="ast (v2.4.2, ruby-3.2.4-p170) [gem]" level="application" />
|
15
|
+
<orderEntry type="library" scope="PROVIDED" name="bundler (v2.6.3, ruby-3.2.4-p170) [gem]" level="application" />
|
16
|
+
<orderEntry type="library" scope="PROVIDED" name="cli-ui (v2.3.0, ruby-3.2.4-p170) [gem]" level="application" />
|
17
|
+
<orderEntry type="library" scope="PROVIDED" name="json (v2.10.1, ruby-3.2.4-p170) [gem]" level="application" />
|
18
|
+
<orderEntry type="library" scope="PROVIDED" name="language_server-protocol (v3.17.0.4, ruby-3.2.4-p170) [gem]" level="application" />
|
19
|
+
<orderEntry type="library" scope="PROVIDED" name="mini_mime (v1.1.5, ruby-3.2.4-p170) [gem]" level="application" />
|
20
|
+
<orderEntry type="library" scope="PROVIDED" name="minitest (v5.25.4, ruby-3.2.4-p170) [gem]" level="application" />
|
21
|
+
<orderEntry type="library" scope="PROVIDED" name="parallel (v1.26.3, ruby-3.2.4-p170) [gem]" level="application" />
|
22
|
+
<orderEntry type="library" scope="PROVIDED" name="parser (v3.3.7.1, ruby-3.2.4-p170) [gem]" level="application" />
|
23
|
+
<orderEntry type="library" scope="PROVIDED" name="racc (v1.8.1, ruby-3.2.4-p170) [gem]" level="application" />
|
24
|
+
<orderEntry type="library" scope="PROVIDED" name="rainbow (v3.1.1, ruby-3.2.4-p170) [gem]" level="application" />
|
25
|
+
<orderEntry type="library" scope="PROVIDED" name="rake (v13.2.1, ruby-3.2.4-p170) [gem]" level="application" />
|
26
|
+
<orderEntry type="library" scope="PROVIDED" name="regexp_parser (v2.10.0, ruby-3.2.4-p170) [gem]" level="application" />
|
27
|
+
<orderEntry type="library" scope="PROVIDED" name="rubocop-ast (v1.38.0, ruby-3.2.4-p170) [gem]" level="application" />
|
28
|
+
<orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.13.0, ruby-3.2.4-p170) [gem]" level="application" />
|
29
|
+
<orderEntry type="library" scope="PROVIDED" name="thor (v1.3.2, ruby-3.2.4-p170) [gem]" level="application" />
|
30
|
+
<orderEntry type="library" scope="PROVIDED" name="unicode-display_width (v3.1.4, ruby-3.2.4-p170) [gem]" level="application" />
|
31
|
+
<orderEntry type="library" scope="PROVIDED" name="unicode-emoji (v4.0.4, ruby-3.2.4-p170) [gem]" level="application" />
|
32
|
+
</component>
|
33
|
+
</module>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project version="4">
|
3
|
+
<component name="MaterialThemeProjectNewConfig">
|
4
|
+
<option name="metadata">
|
5
|
+
<MTProjectMetadataState>
|
6
|
+
<option name="migrated" value="true" />
|
7
|
+
<option name="pristineConfig" value="false" />
|
8
|
+
<option name="userId" value="1c3d9eb4:1904b29008d:-7ffe" />
|
9
|
+
</MTProjectMetadataState>
|
10
|
+
</option>
|
11
|
+
</component>
|
12
|
+
</project>
|
data/.idea/modules.xml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project version="4">
|
3
|
+
<component name="ProjectModuleManager">
|
4
|
+
<modules>
|
5
|
+
<module fileurl="file://$PROJECT_DIR$/.idea/greeenboii.iml" filepath="$PROJECT_DIR$/.idea/greeenboii.iml" />
|
6
|
+
</modules>
|
7
|
+
</component>
|
8
|
+
</project>
|
data/.idea/vcs.xml
ADDED
data/.idea/workspace.xml
ADDED
@@ -0,0 +1,111 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project version="4">
|
3
|
+
<component name="AutoImportSettings">
|
4
|
+
<option name="autoReloadType" value="SELECTIVE" />
|
5
|
+
</component>
|
6
|
+
<component name="ChangeListManager">
|
7
|
+
<list default="true" id="0fa98f61-8369-4575-be76-5316c7df88b7" name="Changes" comment="Add RBS classes for Error, Options, and Search modules">
|
8
|
+
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
9
|
+
<change beforePath="$PROJECT_DIR$/Gemfile" beforeDir="false" afterPath="$PROJECT_DIR$/Gemfile" afterDir="false" />
|
10
|
+
<change beforePath="$PROJECT_DIR$/Gemfile.lock" beforeDir="false" afterPath="$PROJECT_DIR$/Gemfile.lock" afterDir="false" />
|
11
|
+
<change beforePath="$PROJECT_DIR$/exe/greeenboii" beforeDir="false" afterPath="$PROJECT_DIR$/exe/greeenboii" afterDir="false" />
|
12
|
+
<change beforePath="$PROJECT_DIR$/greeenboii.gemspec" beforeDir="false" afterPath="$PROJECT_DIR$/greeenboii.gemspec" afterDir="false" />
|
13
|
+
<change beforePath="$PROJECT_DIR$/lib/greeenboii/version.rb" beforeDir="false" afterPath="$PROJECT_DIR$/lib/greeenboii/version.rb" afterDir="false" />
|
14
|
+
</list>
|
15
|
+
<option name="SHOW_DIALOG" value="false" />
|
16
|
+
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
17
|
+
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
18
|
+
<option name="LAST_RESOLUTION" value="IGNORE" />
|
19
|
+
</component>
|
20
|
+
<component name="FileTemplateManagerImpl">
|
21
|
+
<option name="RECENT_TEMPLATES">
|
22
|
+
<list>
|
23
|
+
<option value="RBS Class" />
|
24
|
+
</list>
|
25
|
+
</option>
|
26
|
+
</component>
|
27
|
+
<component name="Git.Settings">
|
28
|
+
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
29
|
+
</component>
|
30
|
+
<component name="GitHubPullRequestSearchHistory"><![CDATA[{
|
31
|
+
"lastFilter": {
|
32
|
+
"state": "OPEN",
|
33
|
+
"assignee": "greeenboi"
|
34
|
+
}
|
35
|
+
}]]></component>
|
36
|
+
<component name="GithubPullRequestsUISettings"><![CDATA[{
|
37
|
+
"selectedUrlAndAccountId": {
|
38
|
+
"url": "https://github.com/greeenboi/greeenboii.git",
|
39
|
+
"accountId": "978466ca-1190-4215-a801-ef0a654296e3"
|
40
|
+
}
|
41
|
+
}]]></component>
|
42
|
+
<component name="ProjectColorInfo"><![CDATA[{
|
43
|
+
"associatedIndex": 4
|
44
|
+
}]]></component>
|
45
|
+
<component name="ProjectId" id="2tRLehb4s0tbSzZEro6guxVspsh" />
|
46
|
+
<component name="ProjectViewState">
|
47
|
+
<option name="hideEmptyMiddlePackages" value="true" />
|
48
|
+
<option name="showLibraryContents" value="true" />
|
49
|
+
</component>
|
50
|
+
<component name="PropertiesComponent"><![CDATA[{
|
51
|
+
"keyToString": {
|
52
|
+
"RunOnceActivity.ShowReadmeOnStart": "true",
|
53
|
+
"RunOnceActivity.git.unshallow": "true",
|
54
|
+
"git-widget-placeholder": "main",
|
55
|
+
"last_opened_file_path": "C:/Users/suvan/Downloads/cli-kit-example-main-yee/cli-kit-example-main",
|
56
|
+
"node.js.detected.package.eslint": "true",
|
57
|
+
"node.js.detected.package.tslint": "true",
|
58
|
+
"node.js.selected.package.eslint": "(autodetect)",
|
59
|
+
"node.js.selected.package.tslint": "(autodetect)",
|
60
|
+
"nodejs_package_manager_path": "npm",
|
61
|
+
"ruby.structure.view.model.defaults.configured": "true",
|
62
|
+
"settings.editor.selected.configurable": "preferences.pluginManager",
|
63
|
+
"vue.rearranger.settings.migration": "true"
|
64
|
+
}
|
65
|
+
}]]></component>
|
66
|
+
<component name="SharedIndexes">
|
67
|
+
<attachedChunks>
|
68
|
+
<set>
|
69
|
+
<option value="bundled-js-predefined-d6986cc7102b-822845ee3bb5-JavaScript-RM-243.23654.167" />
|
70
|
+
</set>
|
71
|
+
</attachedChunks>
|
72
|
+
</component>
|
73
|
+
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
74
|
+
<component name="SpringUtil" SPRING_PRE_LOADER_OPTION="true" RAKE_SPRING_PRE_LOADER_OPTION="true" RAILS_SPRING_PRE_LOADER_OPTION="true" />
|
75
|
+
<component name="TaskManager">
|
76
|
+
<task active="true" id="Default" summary="Default task">
|
77
|
+
<changelist id="0fa98f61-8369-4575-be76-5316c7df88b7" name="Changes" comment="" />
|
78
|
+
<created>1740310037191</created>
|
79
|
+
<option name="number" value="Default" />
|
80
|
+
<option name="presentableId" value="Default" />
|
81
|
+
<updated>1740310037191</updated>
|
82
|
+
<workItem from="1740310038341" duration="12118000" />
|
83
|
+
</task>
|
84
|
+
<task id="LOCAL-00001" summary="update branch for push events from master to production">
|
85
|
+
<option name="closed" value="true" />
|
86
|
+
<created>1740319769137</created>
|
87
|
+
<option name="number" value="00001" />
|
88
|
+
<option name="presentableId" value="LOCAL-00001" />
|
89
|
+
<option name="project" value="LOCAL" />
|
90
|
+
<updated>1740319769137</updated>
|
91
|
+
</task>
|
92
|
+
<task id="LOCAL-00002" summary="Add RBS classes for Error, Options, and Search modules">
|
93
|
+
<option name="closed" value="true" />
|
94
|
+
<created>1740331580301</created>
|
95
|
+
<option name="number" value="00002" />
|
96
|
+
<option name="presentableId" value="LOCAL-00002" />
|
97
|
+
<option name="project" value="LOCAL" />
|
98
|
+
<updated>1740331580301</updated>
|
99
|
+
</task>
|
100
|
+
<option name="localTasksCounter" value="3" />
|
101
|
+
<servers />
|
102
|
+
</component>
|
103
|
+
<component name="TypeScriptGeneratedFilesManager">
|
104
|
+
<option name="version" value="3" />
|
105
|
+
</component>
|
106
|
+
<component name="VcsManagerConfiguration">
|
107
|
+
<MESSAGE value="update branch for push events from master to production" />
|
108
|
+
<MESSAGE value="Add RBS classes for Error, Options, and Search modules" />
|
109
|
+
<option name="LAST_COMMIT_MESSAGE" value="Add RBS classes for Error, Options, and Search modules" />
|
110
|
+
</component>
|
111
|
+
</project>
|
data/.rubocop.yml
ADDED
data/CHANGELOG.md
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,132 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
9
|
+
nationality, personal appearance, race, caste, color, religion, or sexual
|
10
|
+
identity and orientation.
|
11
|
+
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
13
|
+
diverse, inclusive, and healthy community.
|
14
|
+
|
15
|
+
## Our Standards
|
16
|
+
|
17
|
+
Examples of behavior that contributes to a positive environment for our
|
18
|
+
community include:
|
19
|
+
|
20
|
+
* Demonstrating empathy and kindness toward other people
|
21
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
22
|
+
* Giving and gracefully accepting constructive feedback
|
23
|
+
* Accepting responsibility and apologizing to those affected by our mistakes,
|
24
|
+
and learning from the experience
|
25
|
+
* Focusing on what is best not just for us as individuals, but for the overall
|
26
|
+
community
|
27
|
+
|
28
|
+
Examples of unacceptable behavior include:
|
29
|
+
|
30
|
+
* The use of sexualized language or imagery, and sexual attention or advances of
|
31
|
+
any kind
|
32
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
33
|
+
* Public or private harassment
|
34
|
+
* Publishing others' private information, such as a physical or email address,
|
35
|
+
without their explicit permission
|
36
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
37
|
+
professional setting
|
38
|
+
|
39
|
+
## Enforcement Responsibilities
|
40
|
+
|
41
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
42
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
43
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
44
|
+
or harmful.
|
45
|
+
|
46
|
+
Community leaders have the right and responsibility to remove, edit, or reject
|
47
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
48
|
+
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
49
|
+
decisions when appropriate.
|
50
|
+
|
51
|
+
## Scope
|
52
|
+
|
53
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
54
|
+
an individual is officially representing the community in public spaces.
|
55
|
+
Examples of representing our community include using an official email address,
|
56
|
+
posting via an official social media account, or acting as an appointed
|
57
|
+
representative at an online or offline event.
|
58
|
+
|
59
|
+
## Enforcement
|
60
|
+
|
61
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
62
|
+
reported to the community leaders responsible for enforcement at
|
63
|
+
[INSERT CONTACT METHOD].
|
64
|
+
All complaints will be reviewed and investigated promptly and fairly.
|
65
|
+
|
66
|
+
All community leaders are obligated to respect the privacy and security of the
|
67
|
+
reporter of any incident.
|
68
|
+
|
69
|
+
## Enforcement Guidelines
|
70
|
+
|
71
|
+
Community leaders will follow these Community Impact Guidelines in determining
|
72
|
+
the consequences for any action they deem in violation of this Code of Conduct:
|
73
|
+
|
74
|
+
### 1. Correction
|
75
|
+
|
76
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed
|
77
|
+
unprofessional or unwelcome in the community.
|
78
|
+
|
79
|
+
**Consequence**: A private, written warning from community leaders, providing
|
80
|
+
clarity around the nature of the violation and an explanation of why the
|
81
|
+
behavior was inappropriate. A public apology may be requested.
|
82
|
+
|
83
|
+
### 2. Warning
|
84
|
+
|
85
|
+
**Community Impact**: A violation through a single incident or series of
|
86
|
+
actions.
|
87
|
+
|
88
|
+
**Consequence**: A warning with consequences for continued behavior. No
|
89
|
+
interaction with the people involved, including unsolicited interaction with
|
90
|
+
those enforcing the Code of Conduct, for a specified period of time. This
|
91
|
+
includes avoiding interactions in community spaces as well as external channels
|
92
|
+
like social media. Violating these terms may lead to a temporary or permanent
|
93
|
+
ban.
|
94
|
+
|
95
|
+
### 3. Temporary Ban
|
96
|
+
|
97
|
+
**Community Impact**: A serious violation of community standards, including
|
98
|
+
sustained inappropriate behavior.
|
99
|
+
|
100
|
+
**Consequence**: A temporary ban from any sort of interaction or public
|
101
|
+
communication with the community for a specified period of time. No public or
|
102
|
+
private interaction with the people involved, including unsolicited interaction
|
103
|
+
with those enforcing the Code of Conduct, is allowed during this period.
|
104
|
+
Violating these terms may lead to a permanent ban.
|
105
|
+
|
106
|
+
### 4. Permanent Ban
|
107
|
+
|
108
|
+
**Community Impact**: Demonstrating a pattern of violation of community
|
109
|
+
standards, including sustained inappropriate behavior, harassment of an
|
110
|
+
individual, or aggression toward or disparagement of classes of individuals.
|
111
|
+
|
112
|
+
**Consequence**: A permanent ban from any sort of public interaction within the
|
113
|
+
community.
|
114
|
+
|
115
|
+
## Attribution
|
116
|
+
|
117
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
118
|
+
version 2.1, available at
|
119
|
+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
120
|
+
|
121
|
+
Community Impact Guidelines were inspired by
|
122
|
+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
123
|
+
|
124
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
125
|
+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
|
126
|
+
[https://www.contributor-covenant.org/translations][translations].
|
127
|
+
|
128
|
+
[homepage]: https://www.contributor-covenant.org
|
129
|
+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
130
|
+
[Mozilla CoC]: https://github.com/mozilla/diversity
|
131
|
+
[FAQ]: https://www.contributor-covenant.org/faq
|
132
|
+
[translations]: https://www.contributor-covenant.org/translations
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
# Contributing to Greeenboii CLI Tool
|
2
|
+
|
3
|
+
First off, thank you for considering contributing to Greeenboii! Your contributions are greatly appreciated.
|
4
|
+
|
5
|
+
## How to Contribute
|
6
|
+
|
7
|
+
### Reporting Bugs
|
8
|
+
|
9
|
+
- Ensure the bug was not already reported by searching on GitHub under [Issues](https://github.com/greeenboi/greeenboii/issues).
|
10
|
+
- If you're unable to find an open issue addressing the problem, open a new one. Be sure to include a title and clear description, as much relevant information as possible, and a code sample or an executable test case demonstrating the expected behavior that is not occurring.
|
11
|
+
|
12
|
+
### Suggesting Enhancements
|
13
|
+
|
14
|
+
- Search the existing enhancement issues to ensure that your idea is not already listed.
|
15
|
+
- If your enhancement is not listed, create a new one. Provide a clear and detailed explanation of your suggestion and why it would be beneficial to the project.
|
16
|
+
|
17
|
+
### Pull Requests
|
18
|
+
|
19
|
+
1. Fork the repo and create your branch from `main`.
|
20
|
+
2. If you've added code that should be tested, add tests.
|
21
|
+
3. If you've changed APIs, update the documentation.
|
22
|
+
4. Ensure the test suite passes.
|
23
|
+
5. Make sure your code lints.
|
24
|
+
6. Issue that pull request!
|
25
|
+
|
26
|
+
### Code Style
|
27
|
+
|
28
|
+
- Follow the existing code style in the project.
|
29
|
+
- Ensure your code passes all linting and formatting checks.
|
30
|
+
|
31
|
+
### Commit Messages
|
32
|
+
|
33
|
+
- Use clear and descriptive commit messages.
|
34
|
+
- Follow the format `type(scope): subject` (e.g., `fix(parser): correct edge case handling`).
|
35
|
+
|
36
|
+
### Running Tests
|
37
|
+
|
38
|
+
- Tests are located in the `test` directory.
|
39
|
+
- Run the test suite using `rake test`.
|
40
|
+
|
41
|
+
### Documentation
|
42
|
+
|
43
|
+
- Documentation is maintained in the `docs` directory.
|
44
|
+
- Update documentation for any new features or changes to existing features.
|
45
|
+
|
46
|
+
## Code of Conduct
|
47
|
+
|
48
|
+
This project adheres to a [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [greeenboi@example.com].
|
49
|
+
|
50
|
+
Thank you for contributing!
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2025 greeenboi
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
# Greeenboii
|
2
|
+
|
3
|
+
Greeeenboii is a very helpful cli tool that i use for myself. It has all the different things that I consider to be cool to have inside your terminal
|
4
|
+
|
5
|
+
## Upcoming
|
6
|
+
|
7
|
+

|
8
|
+
|
9
|
+
|
10
|
+
## Installation
|
11
|
+
|
12
|
+
For now the gem is not for public use, though you are free to clone the repo and build it yourself
|
13
|
+
|
14
|
+
## Usage
|
15
|
+
|
16
|
+
Just write the command and you will see an interface.
|
17
|
+
```sh
|
18
|
+
greeenboii
|
19
|
+
```
|
20
|
+
|
21
|
+
## Development
|
22
|
+
|
23
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
24
|
+
|
25
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
26
|
+
|
27
|
+
## Contributing
|
28
|
+
|
29
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/greeenboi/greeenboii. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/greeenboii/blob/master/CODE_OF_CONDUCT.md) and the [contributing guidelines](https://github.com/greeenboi/greeenboii/blob/main/CONTRIBUTING.md).
|
30
|
+
|
31
|
+
## License
|
32
|
+
|
33
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
34
|
+
|
35
|
+
## Code of Conduct
|
36
|
+
|
37
|
+
Everyone interacting in the Greeenboii project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/greeenboii/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "bundler/gem_tasks"
|
4
|
+
require "minitest/test_task"
|
5
|
+
|
6
|
+
Minitest::TestTask.create
|
7
|
+
|
8
|
+
require "rubocop/rake_task"
|
9
|
+
|
10
|
+
RuboCop::RakeTask.new
|
11
|
+
|
12
|
+
require "rake/extensiontask"
|
13
|
+
|
14
|
+
task build: :compile
|
15
|
+
|
16
|
+
GEMSPEC = Gem::Specification.load("greeenboii.gemspec")
|
17
|
+
|
18
|
+
Rake::ExtensionTask.new("greeenboii", GEMSPEC) do |ext|
|
19
|
+
ext.lib_dir = "lib/greeenboii"
|
20
|
+
end
|
21
|
+
|
22
|
+
task default: %i[clobber compile test rubocop]
|
data/exe/greeenboii
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "mkmf"
|
4
|
+
|
5
|
+
# Makes all symbols private by default to avoid unintended conflict
|
6
|
+
# with other gems. To explicitly export symbols you can use RUBY_FUNC_EXPORTED
|
7
|
+
# selectively, or entirely remove this flag.
|
8
|
+
append_cflags("-fvisibility=hidden")
|
9
|
+
|
10
|
+
create_makefile("greeenboii/greeenboii")
|
data/lib/greeenboii.rb
ADDED
@@ -0,0 +1,146 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "greeenboii/version"
|
4
|
+
require "cli/ui"
|
5
|
+
require "date"
|
6
|
+
require "console_table"
|
7
|
+
|
8
|
+
require "nokogiri"
|
9
|
+
require "httparty"
|
10
|
+
|
11
|
+
module Greeenboii
|
12
|
+
class Error < StandardError; end
|
13
|
+
|
14
|
+
class Search
|
15
|
+
SEARCH_ENGINES = {
|
16
|
+
"Google" => "https://www.google.com/search?client=opera-gx&q= ",
|
17
|
+
"Bing" => "https://www.bing.com/search?q=",
|
18
|
+
"DuckDuckGo" => "https://duckduckgo.com/?q="
|
19
|
+
}.freeze
|
20
|
+
|
21
|
+
def self.perform_search
|
22
|
+
query = CLI::UI.ask("Enter your search query:", default: "")
|
23
|
+
return if query.empty?
|
24
|
+
|
25
|
+
results = []
|
26
|
+
CLI::UI::SpinGroup.new do |spin_group|
|
27
|
+
SEARCH_ENGINES.each do |engine, base_url|
|
28
|
+
spin_group.add("Searching #{engine}...") do |spinner|
|
29
|
+
suffix = case engine
|
30
|
+
when "Google"
|
31
|
+
"&sourceid=opera&ie=UTF-8&oe=UTF-8"
|
32
|
+
when "Bing"
|
33
|
+
"&sp=-1&pq=test&sc=6-4&qs=n&sk=&cvid=#{SecureRandom.hex(16)}"
|
34
|
+
when "DuckDuckGo"
|
35
|
+
"&t=h_&ia=web"
|
36
|
+
end
|
37
|
+
search_url = "#{base_url}#{URI.encode_www_form_component(query)}#{suffix}"
|
38
|
+
links = scrape_links(engine, search_url)
|
39
|
+
results << { engine: engine, links: links }
|
40
|
+
sleep 1.0 # Simulating search delay
|
41
|
+
spinner.update_title("#{engine} search complete!")
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
display_results(results)
|
47
|
+
end
|
48
|
+
|
49
|
+
def self.scrape_links(engine, url)
|
50
|
+
headers = {
|
51
|
+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36",
|
52
|
+
"Accept-Language" => "en-US,en;q=0.5"
|
53
|
+
}
|
54
|
+
|
55
|
+
response = HTTParty.get(url, headers: headers)
|
56
|
+
puts "Debug: HTTP Status: #{response.code}"
|
57
|
+
|
58
|
+
doc = Nokogiri::HTML(response.body)
|
59
|
+
puts "Debug: Page title: #{doc.title}"
|
60
|
+
|
61
|
+
results = []
|
62
|
+
|
63
|
+
case engine
|
64
|
+
when "Google"
|
65
|
+
doc.css("div.g").each do |result|
|
66
|
+
link = result.css(".yuRUbf > a").first
|
67
|
+
next unless link
|
68
|
+
|
69
|
+
title = result.css("h3").text.strip
|
70
|
+
url = link["href"]
|
71
|
+
snippet = result.css(".VwiC3b").text.strip
|
72
|
+
|
73
|
+
puts "Debug: Found Google result - Title: #{title}"
|
74
|
+
results << url if url.start_with?("http")
|
75
|
+
end
|
76
|
+
|
77
|
+
when "Bing"
|
78
|
+
doc.css("#b_results li.b_algo").each do |result|
|
79
|
+
link = result.css("h2 a").first
|
80
|
+
next unless link
|
81
|
+
|
82
|
+
url = link["href"]
|
83
|
+
puts "Debug: Found Bing result - URL: #{url}"
|
84
|
+
results << url if url.start_with?("http")
|
85
|
+
end
|
86
|
+
|
87
|
+
else # DuckDuckGo
|
88
|
+
doc.css(".result__body").each do |result|
|
89
|
+
link = result.css(".result__title a").first
|
90
|
+
next unless link
|
91
|
+
|
92
|
+
url = link["href"]
|
93
|
+
puts "Debug: Found DuckDuckGo result - URL: #{url}"
|
94
|
+
results << url if url.start_with?("http")
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
puts "Debug: Total results found: #{results.length}"
|
99
|
+
results.take(8)
|
100
|
+
end
|
101
|
+
def self.display_results(results)
|
102
|
+
CLI::UI.frame_style = :bracket
|
103
|
+
CLI::UI::Frame.open(CLI::UI.fmt("{{green:Search Results}}")) do
|
104
|
+
results.each do |result|
|
105
|
+
puts CLI::UI.fmt("{{v}} {{cyan:#{result[:engine]}}}")
|
106
|
+
result[:links].each_with_index do |link, idx|
|
107
|
+
puts CLI::UI.fmt(" {{*}} ##{idx + 1}: #{link}")
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
class Options
|
115
|
+
def self.show_options
|
116
|
+
CLI::UI::Prompt.instructions_color = CLI::UI::Color::GRAY
|
117
|
+
|
118
|
+
CLI::UI::Prompt.ask("Choose an option:") do |handler|
|
119
|
+
handler.option("{{gray:Search Files}}") { |selection| puts "Placeholder, Replaced soon. #{selection}" }
|
120
|
+
handler.option("{{gray:Search Directory}}") { |selection| puts "Placeholder, Replaced soon. #{selection}" }
|
121
|
+
handler.option("{{gray:Search Content}}") { |selection| puts "Placeholder, Replaced soon. #{selection}" }
|
122
|
+
handler.option("{{gray:Search History}}") { |selection| puts "Placeholder, Replaced soon. #{selection}" }
|
123
|
+
handler.option("{{cyan:Network Search}}") { |_selection| Search.perform_search }
|
124
|
+
handler.option("{{red:Exit}}") { |_selection| exit }
|
125
|
+
end
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
class Main
|
130
|
+
CLI::UI::StdoutRouter.enable
|
131
|
+
current_time = DateTime.now.strftime("%d-%m-%Y %H:%M:%S")
|
132
|
+
CLI::UI::Frame.open("{{v}} Greeenboi : #{current_time}") do
|
133
|
+
puts "Welcome to Greeenboii"
|
134
|
+
puts "Lets do some magic!"
|
135
|
+
CLI::UI.frame_style = :bracket
|
136
|
+
CLI::UI::Frame.open(CLI::UI.fmt("{{green:Welcome to Greeenboii CLI}}")) do
|
137
|
+
puts CLI::UI.fmt("{{cyan:Version}}: #{Greeenboii::VERSION}")
|
138
|
+
# ConsoleTable.define(%w[Name Version]) do |table|
|
139
|
+
# table << ["Greeenboii", Greeenboii::VERSION]
|
140
|
+
# end
|
141
|
+
puts CLI::UI.fmt("{{yellow:Type 'help' to see available commands}}")
|
142
|
+
Options.show_options
|
143
|
+
end
|
144
|
+
end
|
145
|
+
end
|
146
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
module Greeenboii
|
2
|
+
class Search
|
3
|
+
SEARCH_ENGINES: Hash[String, String]
|
4
|
+
|
5
|
+
def self.scrape_links: (String engine, String url) -> Array[String]
|
6
|
+
|
7
|
+
def self.display_results: (Array[{ engine: String, links: Array[String] }]) -> void
|
8
|
+
|
9
|
+
def self.perform_search: () -> void
|
10
|
+
end
|
11
|
+
end
|
data/sig/greeenboii.rbs
ADDED
data/sorbet/config
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
**/*.rbi linguist-vendored=true
|
@@ -0,0 +1,119 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This file was pulled from a central RBI files repository.
|
5
|
+
# Please run `bin/tapioca annotations` to update it.
|
6
|
+
|
7
|
+
module Minitest::Assertions
|
8
|
+
sig { params(test: T.anything, msg: T.anything).returns(TrueClass) }
|
9
|
+
def assert(test, msg = nil); end
|
10
|
+
|
11
|
+
sig { params(obj: T.anything, msg: T.anything).returns(TrueClass) }
|
12
|
+
def assert_empty(obj, msg = nil); end
|
13
|
+
|
14
|
+
sig { params(exp: T.anything, act: T.anything, msg: T.anything).returns(TrueClass) }
|
15
|
+
def assert_equal(exp, act, msg = nil); end
|
16
|
+
|
17
|
+
sig { params(exp: T.anything, act: T.anything, delta: Numeric, msg: T.anything).returns(TrueClass) }
|
18
|
+
def assert_in_delta(exp, act, delta = T.unsafe(nil), msg = nil); end
|
19
|
+
|
20
|
+
sig { params(a: T.anything, b: T.anything, epsilon: Numeric, msg: T.anything).returns(TrueClass) }
|
21
|
+
def assert_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = nil); end
|
22
|
+
|
23
|
+
sig { params(collection: T.anything, obj: T.anything, msg: T.anything).returns(TrueClass) }
|
24
|
+
def assert_includes(collection, obj, msg = nil); end
|
25
|
+
|
26
|
+
sig { params(cls: T.anything, obj: T.anything, msg: T.anything).returns(TrueClass) }
|
27
|
+
def assert_instance_of(cls, obj, msg = nil); end
|
28
|
+
|
29
|
+
sig { params(cls: T.anything, obj: T.anything, msg: T.anything).returns(TrueClass) }
|
30
|
+
def assert_kind_of(cls, obj, msg = nil); end
|
31
|
+
|
32
|
+
sig { params(matcher: T.any(String, Regexp), obj: T.anything, msg: T.anything).returns(MatchData) }
|
33
|
+
def assert_match(matcher, obj, msg = nil); end
|
34
|
+
|
35
|
+
sig { params(obj: T.anything, msg: T.anything).returns(TrueClass) }
|
36
|
+
def assert_nil(obj, msg = nil); end
|
37
|
+
|
38
|
+
sig { params(o1: T.anything, op: T.any(Symbol, String), o2: T.anything, msg: T.anything).returns(TrueClass) }
|
39
|
+
def assert_operator(o1, op, o2 = T.unsafe(nil), msg = nil); end
|
40
|
+
|
41
|
+
sig { params(stdout: T.nilable(T.any(String, Regexp)), stderr: T.nilable(T.any(String, Regexp)), block: T.proc.void).returns(T::Boolean) }
|
42
|
+
def assert_output(stdout = nil, stderr = nil, &block); end
|
43
|
+
|
44
|
+
sig { params(path: T.any(String, Pathname), msg: T.anything).returns(TrueClass) }
|
45
|
+
def assert_path_exists(path, msg = nil); end
|
46
|
+
|
47
|
+
sig { params(block: T.proc.void).returns(TrueClass) }
|
48
|
+
def assert_pattern(&block); end
|
49
|
+
|
50
|
+
sig { params(o1: T.anything, op: T.any(String, Symbol), msg: T.anything).returns(TrueClass) }
|
51
|
+
def assert_predicate(o1, op, msg = nil); end
|
52
|
+
|
53
|
+
sig { params(exp: NilClass, block: T.proc.void).returns(StandardError) }
|
54
|
+
sig { type_parameters(:T).params(exp: T.any(T::Class[T.type_parameter(:T)], Regexp, String), block: T.proc.void).returns(T.type_parameter(:T)) }
|
55
|
+
def assert_raises(*exp, &block); end
|
56
|
+
|
57
|
+
sig { params(obj: T.anything, meth: T.any(String, Symbol), msg: T.anything, include_all: T::Boolean).returns(TrueClass) }
|
58
|
+
def assert_respond_to(obj, meth, msg = nil, include_all: false); end
|
59
|
+
|
60
|
+
sig { params(exp: T.anything, act: T.anything, msg: T.anything).returns(TrueClass) }
|
61
|
+
def assert_same(exp, act, msg = nil); end
|
62
|
+
|
63
|
+
sig { params(send_ary: T::Array[T.anything], m: T.anything).returns(T::Boolean) }
|
64
|
+
def assert_send(send_ary, m = nil); end
|
65
|
+
|
66
|
+
sig { params(block: T.proc.void).returns(T::Boolean) }
|
67
|
+
def assert_silent(&block); end
|
68
|
+
|
69
|
+
sig { params(sym: Symbol, msg: T.anything, block: T.proc.void).returns(T.anything) }
|
70
|
+
def assert_throws(sym, msg = nil, &block); end
|
71
|
+
|
72
|
+
sig { params(test: T.anything, msg: T.anything).returns(TrueClass) }
|
73
|
+
def refute(test, msg = nil); end
|
74
|
+
|
75
|
+
sig { params(obj: T.anything, msg: T.anything).returns(TrueClass) }
|
76
|
+
def refute_empty(obj, msg = nil); end
|
77
|
+
|
78
|
+
sig { params(exp: T.anything, act: T.anything, msg: T.anything).returns(TrueClass) }
|
79
|
+
def refute_equal(exp, act, msg = nil); end
|
80
|
+
|
81
|
+
sig { params(exp: T.anything, act: T.anything, delta: Numeric, msg: T.anything).returns(TrueClass) }
|
82
|
+
def refute_in_delta(exp, act, delta = T.unsafe(nil), msg = nil); end
|
83
|
+
|
84
|
+
sig { params(a: T.anything, b: T.anything, epsilon: Numeric, msg: T.anything).returns(TrueClass) }
|
85
|
+
def refute_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = nil); end
|
86
|
+
|
87
|
+
sig { params(collection: T.anything, obj: T.anything, msg: T.anything).returns(TrueClass) }
|
88
|
+
def refute_includes(collection, obj, msg = nil); end
|
89
|
+
|
90
|
+
sig { params(cls: T.anything, obj: T.anything, msg: T.anything).returns(TrueClass) }
|
91
|
+
def refute_instance_of(cls, obj, msg = nil); end
|
92
|
+
|
93
|
+
sig { params(cls: T.anything, obj: T.anything, msg: T.anything).returns(TrueClass) }
|
94
|
+
def refute_kind_of(cls, obj, msg = nil); end
|
95
|
+
|
96
|
+
sig { params(matcher: T.any(String, Regexp), obj: T.anything, msg: T.anything).returns(TrueClass) }
|
97
|
+
def refute_match(matcher, obj, msg = nil); end
|
98
|
+
|
99
|
+
sig { params(obj: T.anything, msg: T.anything).returns(TrueClass) }
|
100
|
+
def refute_nil(obj, msg = nil); end
|
101
|
+
|
102
|
+
sig { params(block: T.proc.void).returns(TrueClass) }
|
103
|
+
def refute_pattern(&block); end
|
104
|
+
|
105
|
+
sig { params(o1: T.anything, op: T.any(Symbol, String), o2: T.anything, msg: T.anything).returns(TrueClass) }
|
106
|
+
def refute_operator(o1, op, o2 = T.unsafe(nil), msg = nil); end
|
107
|
+
|
108
|
+
sig { params(path: T.any(String, Pathname), msg: T.anything).returns(TrueClass) }
|
109
|
+
def refute_path_exists(path, msg = nil); end
|
110
|
+
|
111
|
+
sig { params(o1: T.anything, op: T.any(String, Symbol), msg: T.anything).returns(TrueClass) }
|
112
|
+
def refute_predicate(o1, op, msg = nil); end
|
113
|
+
|
114
|
+
sig { params(obj: T.anything, meth: T.any(String, Symbol), msg: T.anything, include_all: T::Boolean).returns(TrueClass) }
|
115
|
+
def refute_respond_to(obj, meth, msg = nil, include_all: false); end
|
116
|
+
|
117
|
+
sig { params(exp: T.anything, act: T.anything, msg: T.anything).returns(TrueClass) }
|
118
|
+
def refute_same(exp, act, msg = nil); end
|
119
|
+
end
|
@@ -0,0 +1,269 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This file was pulled from a central RBI files repository.
|
5
|
+
# Please run `bin/tapioca annotations` to update it.
|
6
|
+
|
7
|
+
module Rainbow
|
8
|
+
# @shim: https://github.com/sickill/rainbow/blob/master/lib/rainbow.rb#L10-L12
|
9
|
+
sig { returns(T::Boolean) }
|
10
|
+
attr_accessor :enabled
|
11
|
+
|
12
|
+
class Color
|
13
|
+
sig { returns(Symbol) }
|
14
|
+
attr_reader :ground
|
15
|
+
|
16
|
+
sig { params(ground: Symbol, values: T.any([Integer], [Integer, Integer, Integer])).returns(Color) }
|
17
|
+
def self.build(ground, values); end
|
18
|
+
|
19
|
+
sig { params(hex: String).returns([Integer, Integer, Integer]) }
|
20
|
+
def self.parse_hex_color(hex); end
|
21
|
+
|
22
|
+
class Indexed < Rainbow::Color
|
23
|
+
sig { returns(Integer) }
|
24
|
+
attr_reader :num
|
25
|
+
|
26
|
+
sig { params(ground: Symbol, num: Integer).void }
|
27
|
+
def initialize(ground, num); end
|
28
|
+
|
29
|
+
sig { returns(T::Array[Integer]) }
|
30
|
+
def codes; end
|
31
|
+
end
|
32
|
+
|
33
|
+
class Named < Rainbow::Color::Indexed
|
34
|
+
NAMES = T.let(nil, T::Hash[Symbol, Integer])
|
35
|
+
|
36
|
+
sig { params(ground: Symbol, name: Symbol).void }
|
37
|
+
def initialize(ground, name); end
|
38
|
+
|
39
|
+
sig { returns(T::Array[Symbol]) }
|
40
|
+
def self.color_names; end
|
41
|
+
|
42
|
+
sig { returns(String) }
|
43
|
+
def self.valid_names; end
|
44
|
+
end
|
45
|
+
|
46
|
+
class RGB < Rainbow::Color::Indexed
|
47
|
+
sig { returns(Integer) }
|
48
|
+
attr_reader :r, :g, :b
|
49
|
+
|
50
|
+
sig { params(ground: Symbol, values: Integer).void }
|
51
|
+
def initialize(ground, *values); end
|
52
|
+
|
53
|
+
sig { returns(T::Array[Integer]) }
|
54
|
+
def codes; end
|
55
|
+
|
56
|
+
sig { params(value: Numeric).returns(Integer) }
|
57
|
+
def self.to_ansi_domain(value); end
|
58
|
+
end
|
59
|
+
|
60
|
+
class X11Named < Rainbow::Color::RGB
|
61
|
+
include Rainbow::X11ColorNames
|
62
|
+
|
63
|
+
sig { params(ground: Symbol, name: Symbol).void }
|
64
|
+
def initialize(ground, name); end
|
65
|
+
|
66
|
+
sig { returns(T::Array[Symbol]) }
|
67
|
+
def self.color_names; end
|
68
|
+
|
69
|
+
sig { returns(String) }
|
70
|
+
def self.valid_names; end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
sig { returns(Wrapper) }
|
75
|
+
def self.global; end
|
76
|
+
|
77
|
+
sig { returns(T::Boolean) }
|
78
|
+
def self.enabled; end
|
79
|
+
|
80
|
+
sig { params(value: T::Boolean).returns(T::Boolean) }
|
81
|
+
def self.enabled=(value); end
|
82
|
+
|
83
|
+
sig { params(string: String).returns(String) }
|
84
|
+
def self.uncolor(string); end
|
85
|
+
|
86
|
+
class NullPresenter < String
|
87
|
+
sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) }
|
88
|
+
def color(*values); end
|
89
|
+
|
90
|
+
sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) }
|
91
|
+
def foreground(*values); end
|
92
|
+
|
93
|
+
sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) }
|
94
|
+
def fg(*values); end
|
95
|
+
|
96
|
+
sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) }
|
97
|
+
def background(*values); end
|
98
|
+
|
99
|
+
sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) }
|
100
|
+
def bg(*values); end
|
101
|
+
|
102
|
+
sig { returns(NullPresenter) }
|
103
|
+
def reset; end
|
104
|
+
|
105
|
+
sig { returns(NullPresenter) }
|
106
|
+
def bright; end
|
107
|
+
|
108
|
+
sig { returns(NullPresenter) }
|
109
|
+
def faint; end
|
110
|
+
|
111
|
+
sig { returns(NullPresenter) }
|
112
|
+
def italic; end
|
113
|
+
|
114
|
+
sig { returns(NullPresenter) }
|
115
|
+
def underline; end
|
116
|
+
|
117
|
+
sig { returns(NullPresenter) }
|
118
|
+
def blink; end
|
119
|
+
|
120
|
+
sig { returns(NullPresenter) }
|
121
|
+
def inverse; end
|
122
|
+
|
123
|
+
sig { returns(NullPresenter) }
|
124
|
+
def hide; end
|
125
|
+
|
126
|
+
sig { returns(NullPresenter) }
|
127
|
+
def cross_out; end
|
128
|
+
|
129
|
+
sig { returns(NullPresenter) }
|
130
|
+
def black; end
|
131
|
+
|
132
|
+
sig { returns(NullPresenter) }
|
133
|
+
def red; end
|
134
|
+
|
135
|
+
sig { returns(NullPresenter) }
|
136
|
+
def green; end
|
137
|
+
|
138
|
+
sig { returns(NullPresenter) }
|
139
|
+
def yellow; end
|
140
|
+
|
141
|
+
sig { returns(NullPresenter) }
|
142
|
+
def blue; end
|
143
|
+
|
144
|
+
sig { returns(NullPresenter) }
|
145
|
+
def magenta; end
|
146
|
+
|
147
|
+
sig { returns(NullPresenter) }
|
148
|
+
def cyan; end
|
149
|
+
|
150
|
+
sig { returns(NullPresenter) }
|
151
|
+
def white; end
|
152
|
+
|
153
|
+
sig { returns(NullPresenter) }
|
154
|
+
def bold; end
|
155
|
+
|
156
|
+
sig { returns(NullPresenter) }
|
157
|
+
def dark; end
|
158
|
+
|
159
|
+
sig { returns(NullPresenter) }
|
160
|
+
def strike; end
|
161
|
+
end
|
162
|
+
|
163
|
+
class Presenter < String
|
164
|
+
TERM_EFFECTS = T.let(nil, T::Hash[Symbol, Integer])
|
165
|
+
|
166
|
+
sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) }
|
167
|
+
def color(*values); end
|
168
|
+
|
169
|
+
sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) }
|
170
|
+
def foreground(*values); end
|
171
|
+
|
172
|
+
sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) }
|
173
|
+
def fg(*values); end
|
174
|
+
|
175
|
+
sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) }
|
176
|
+
def background(*values); end
|
177
|
+
|
178
|
+
sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) }
|
179
|
+
def bg(*values); end
|
180
|
+
|
181
|
+
sig { returns(Presenter) }
|
182
|
+
def reset; end
|
183
|
+
|
184
|
+
sig { returns(Presenter) }
|
185
|
+
def bright; end
|
186
|
+
|
187
|
+
sig { returns(Presenter) }
|
188
|
+
def faint; end
|
189
|
+
|
190
|
+
sig { returns(Presenter) }
|
191
|
+
def italic; end
|
192
|
+
|
193
|
+
sig { returns(Presenter) }
|
194
|
+
def underline; end
|
195
|
+
|
196
|
+
sig { returns(Presenter) }
|
197
|
+
def blink; end
|
198
|
+
|
199
|
+
sig { returns(Presenter) }
|
200
|
+
def inverse; end
|
201
|
+
|
202
|
+
sig { returns(Presenter) }
|
203
|
+
def hide; end
|
204
|
+
|
205
|
+
sig { returns(Presenter) }
|
206
|
+
def cross_out; end
|
207
|
+
|
208
|
+
sig { returns(Presenter) }
|
209
|
+
def black; end
|
210
|
+
|
211
|
+
sig { returns(Presenter) }
|
212
|
+
def red; end
|
213
|
+
|
214
|
+
sig { returns(Presenter) }
|
215
|
+
def green; end
|
216
|
+
|
217
|
+
sig { returns(Presenter) }
|
218
|
+
def yellow; end
|
219
|
+
|
220
|
+
sig { returns(Presenter) }
|
221
|
+
def blue; end
|
222
|
+
|
223
|
+
sig { returns(Presenter) }
|
224
|
+
def magenta; end
|
225
|
+
|
226
|
+
sig { returns(Presenter) }
|
227
|
+
def cyan; end
|
228
|
+
|
229
|
+
sig { returns(Presenter) }
|
230
|
+
def white; end
|
231
|
+
|
232
|
+
sig { returns(Presenter) }
|
233
|
+
def bold; end
|
234
|
+
|
235
|
+
sig { returns(Presenter) }
|
236
|
+
def dark; end
|
237
|
+
|
238
|
+
sig { returns(Presenter) }
|
239
|
+
def strike; end
|
240
|
+
end
|
241
|
+
|
242
|
+
class StringUtils
|
243
|
+
sig { params(string: String, codes: T::Array[Integer]).returns(String) }
|
244
|
+
def self.wrap_with_sgr(string, codes); end
|
245
|
+
|
246
|
+
sig { params(string: String).returns(String) }
|
247
|
+
def self.uncolor(string); end
|
248
|
+
end
|
249
|
+
|
250
|
+
VERSION = T.let(nil, String)
|
251
|
+
|
252
|
+
class Wrapper
|
253
|
+
sig { returns(T::Boolean) }
|
254
|
+
attr_accessor :enabled
|
255
|
+
|
256
|
+
sig { params(enabled: T::Boolean).void }
|
257
|
+
def initialize(enabled = true); end
|
258
|
+
|
259
|
+
sig { params(string: String).returns(T.any(Rainbow::Presenter, Rainbow::NullPresenter)) }
|
260
|
+
def wrap(string); end
|
261
|
+
end
|
262
|
+
|
263
|
+
module X11ColorNames
|
264
|
+
NAMES = T.let(nil, T::Hash[Symbol, [Integer, Integer, Integer]])
|
265
|
+
end
|
266
|
+
end
|
267
|
+
|
268
|
+
sig { params(string: String).returns(Rainbow::Presenter) }
|
269
|
+
def Rainbow(string); end
|
metadata
ADDED
@@ -0,0 +1,132 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: greeenboii
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- greeenboi
|
8
|
+
bindir: exe
|
9
|
+
cert_chain: []
|
10
|
+
date: 2025-02-23 00:00:00.000000000 Z
|
11
|
+
dependencies:
|
12
|
+
- !ruby/object:Gem::Dependency
|
13
|
+
name: cli-ui
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
15
|
+
requirements:
|
16
|
+
- - "~>"
|
17
|
+
- !ruby/object:Gem::Version
|
18
|
+
version: 2.3.0
|
19
|
+
type: :runtime
|
20
|
+
prerelease: false
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
requirements:
|
23
|
+
- - "~>"
|
24
|
+
- !ruby/object:Gem::Version
|
25
|
+
version: 2.3.0
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: console_table
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - "~>"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 0.3.1
|
33
|
+
type: :runtime
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: 0.3.1
|
40
|
+
- !ruby/object:Gem::Dependency
|
41
|
+
name: nokogiri
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 1.18.3
|
47
|
+
type: :runtime
|
48
|
+
prerelease: false
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 1.18.3
|
54
|
+
- !ruby/object:Gem::Dependency
|
55
|
+
name: httparty
|
56
|
+
requirement: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: 0.22.0
|
61
|
+
type: :runtime
|
62
|
+
prerelease: false
|
63
|
+
version_requirements: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: 0.22.0
|
68
|
+
description: Greeenboii will have several features that i will use to perform daily
|
69
|
+
tasks
|
70
|
+
email:
|
71
|
+
- suvan.gowrishanker.204@gmail.com
|
72
|
+
executables:
|
73
|
+
- greeenboii
|
74
|
+
extensions:
|
75
|
+
- ext/greeenboii/extconf.rb
|
76
|
+
extra_rdoc_files: []
|
77
|
+
files:
|
78
|
+
- ".idea/greeenboii.iml"
|
79
|
+
- ".idea/material_theme_project_new.xml"
|
80
|
+
- ".idea/modules.xml"
|
81
|
+
- ".idea/vcs.xml"
|
82
|
+
- ".idea/workspace.xml"
|
83
|
+
- ".rubocop.yml"
|
84
|
+
- CHANGELOG.md
|
85
|
+
- CODE_OF_CONDUCT.md
|
86
|
+
- CONTRIBUTING.md
|
87
|
+
- LICENSE.txt
|
88
|
+
- README.md
|
89
|
+
- Rakefile
|
90
|
+
- exe/greeenboii
|
91
|
+
- ext/greeenboii/extconf.rb
|
92
|
+
- ext/greeenboii/greeenboii.c
|
93
|
+
- ext/greeenboii/greeenboii.h
|
94
|
+
- lib/greeenboii.rb
|
95
|
+
- lib/greeenboii/version.rb
|
96
|
+
- sig/greeenboii.rbs
|
97
|
+
- sig/greeenboii/options.rbs
|
98
|
+
- sig/greeenboii/search.rbs
|
99
|
+
- sorbet/config
|
100
|
+
- sorbet/rbi/annotations/.gitattributes
|
101
|
+
- sorbet/rbi/annotations/minitest.rbi
|
102
|
+
- sorbet/rbi/annotations/rainbow.rbi
|
103
|
+
- sorbet/tapioca/config.yml
|
104
|
+
- sorbet/tapioca/require.rb
|
105
|
+
homepage: https://www.suvangs.tech
|
106
|
+
licenses:
|
107
|
+
- MIT
|
108
|
+
metadata:
|
109
|
+
homepage_uri: https://www.suvangs.tech
|
110
|
+
github_repo: ssh://https://github.com/greeenboi/greeenboii
|
111
|
+
source_code_uri: https://github.com/greeenboi/greeenboii
|
112
|
+
changelog_uri: https://github.com/greeenboi/greeenboii/blob/main/CHANGELOG.md
|
113
|
+
rubygems_mfa_required: 'true'
|
114
|
+
rdoc_options: []
|
115
|
+
require_paths:
|
116
|
+
- lib
|
117
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
118
|
+
requirements:
|
119
|
+
- - ">="
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
version: 3.2.0
|
122
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
123
|
+
requirements:
|
124
|
+
- - ">="
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: '0'
|
127
|
+
requirements: []
|
128
|
+
rubygems_version: 3.6.3
|
129
|
+
specification_version: 4
|
130
|
+
summary: Greeenboii is a cli tool that i will use to perform all kinds of scripts
|
131
|
+
that i use daily
|
132
|
+
test_files: []
|