pretty_irb 0.1.0
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/00-MANIFEST.md +356 -0
- data/ADVANCED_FEATURES.md +440 -0
- data/AI_HELP.md +408 -0
- data/AI_QUICK_START.md +247 -0
- data/COMPLETE.md +421 -0
- data/EXAMPLES.md +206 -0
- data/FEATURE_SHOWCASE.md +441 -0
- data/FILE_STRUCTURE.md +231 -0
- data/Gemfile +3 -0
- data/IMPLEMENTATION_COMPLETE.md +309 -0
- data/INDEX.md +708 -0
- data/INSTALL.md +250 -0
- data/LICENSE.txt +21 -0
- data/PUBLISH_TO_RUBYGEMS.md +466 -0
- data/QUICKSTART.md +70 -0
- data/QUICK_REFERENCE.md +253 -0
- data/README.md +251 -0
- data/Rakefile +6 -0
- data/SETUP.md +209 -0
- data/START_HERE.md +462 -0
- data/SUMMARY.md +372 -0
- data/WELCOME.md +300 -0
- data/WHAT_IS_NEW.md +324 -0
- data/exe/irb1 +6 -0
- data/exe/pretty_irb +6 -0
- data/lib/pretty_irb/ai_helper.rb +842 -0
- data/lib/pretty_irb/auto_corrector.rb +76 -0
- data/lib/pretty_irb/benchmarker.rb +94 -0
- data/lib/pretty_irb/cheat_sheet.rb +476 -0
- data/lib/pretty_irb/formatter.rb +66 -0
- data/lib/pretty_irb/history_manager.rb +97 -0
- data/lib/pretty_irb/shell.rb +387 -0
- data/lib/pretty_irb/snippet_manager.rb +119 -0
- data/lib/pretty_irb/variable_inspector.rb +146 -0
- data/lib/pretty_irb/version.rb +3 -0
- data/lib/pretty_irb.rb +26 -0
- metadata +200 -0
data/INSTALL.md
ADDED
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
# Installation & Deployment Guide
|
|
2
|
+
|
|
3
|
+
## 🔧 Development Installation
|
|
4
|
+
|
|
5
|
+
### Prerequisites
|
|
6
|
+
- Ruby 2.7.0 or higher
|
|
7
|
+
- Bundler 2.0 or higher
|
|
8
|
+
- Git (optional, for version control)
|
|
9
|
+
|
|
10
|
+
### Steps
|
|
11
|
+
|
|
12
|
+
1. **Navigate to the project directory**
|
|
13
|
+
```powershell
|
|
14
|
+
cd c:\Users\Jayesh\Music\ROR\pretty_irb
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
2. **Install dependencies**
|
|
18
|
+
```powershell
|
|
19
|
+
bundle install
|
|
20
|
+
```
|
|
21
|
+
This will install all gems specified in `Gemfile` including:
|
|
22
|
+
- irb
|
|
23
|
+
- rouge (syntax highlighting)
|
|
24
|
+
- colorize (colored output)
|
|
25
|
+
- did_you_mean (auto-correct)
|
|
26
|
+
- reline (enhanced readline)
|
|
27
|
+
|
|
28
|
+
3. **Verify installation**
|
|
29
|
+
```powershell
|
|
30
|
+
bundle list
|
|
31
|
+
```
|
|
32
|
+
You should see all gems listed.
|
|
33
|
+
|
|
34
|
+
4. **Run the development console**
|
|
35
|
+
```powershell
|
|
36
|
+
ruby bin/console
|
|
37
|
+
```
|
|
38
|
+
Or start the executable:
|
|
39
|
+
```powershell
|
|
40
|
+
ruby exe/pretty_irb
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## 📦 Building the Gem
|
|
44
|
+
|
|
45
|
+
### Option 1: Build as a local gem
|
|
46
|
+
|
|
47
|
+
```powershell
|
|
48
|
+
cd c:\Users\Jayesh\Music\ROR\pretty_irb
|
|
49
|
+
gem build pretty_irb.gemspec
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
This creates `pretty_irb-0.1.0.gem`
|
|
53
|
+
|
|
54
|
+
### Option 2: Install locally from source
|
|
55
|
+
|
|
56
|
+
```powershell
|
|
57
|
+
gem install --local pretty_irb-0.1.0.gem
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Then run from anywhere:
|
|
61
|
+
```powershell
|
|
62
|
+
pretty_irb
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## 🌐 Publishing to RubyGems (Optional)
|
|
66
|
+
|
|
67
|
+
### Prerequisites
|
|
68
|
+
- RubyGems.org account
|
|
69
|
+
- Gem credentials configured
|
|
70
|
+
|
|
71
|
+
### Steps
|
|
72
|
+
|
|
73
|
+
1. **Update version in `lib/pretty_irb/version.rb`** (if needed)
|
|
74
|
+
```ruby
|
|
75
|
+
VERSION = "0.2.0"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
2. **Update gemspec with your information**
|
|
79
|
+
Edit `pretty_irb.gemspec`:
|
|
80
|
+
```ruby
|
|
81
|
+
spec.authors = ["Your Name"]
|
|
82
|
+
spec.email = ["your.email@example.com"]
|
|
83
|
+
spec.homepage = "https://github.com/yourusername/pretty_irb"
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
3. **Build the gem**
|
|
87
|
+
```powershell
|
|
88
|
+
gem build pretty_irb.gemspec
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
4. **Push to RubyGems**
|
|
92
|
+
```powershell
|
|
93
|
+
gem push pretty_irb-0.1.0.gem
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
5. **Verify**
|
|
97
|
+
```powershell
|
|
98
|
+
gem search pretty_irb
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## 🐛 Troubleshooting Installation
|
|
102
|
+
|
|
103
|
+
### Issue: `bundle install` fails with missing Rakefile
|
|
104
|
+
|
|
105
|
+
**Solution**: The Rakefile is already created. If it's missing:
|
|
106
|
+
```powershell
|
|
107
|
+
gem install rake
|
|
108
|
+
bundle install
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Issue: `irb` not found
|
|
112
|
+
|
|
113
|
+
**Solution**: Install bundled Ruby environment:
|
|
114
|
+
```powershell
|
|
115
|
+
bundle exec irb --version
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Issue: Colorize gem not working
|
|
119
|
+
|
|
120
|
+
**Solution**: Install manually:
|
|
121
|
+
```powershell
|
|
122
|
+
gem install colorize
|
|
123
|
+
bundle install
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Issue: Port already in use (if running server)
|
|
127
|
+
|
|
128
|
+
**Solution**: The gem doesn't use ports by default. If you customize it:
|
|
129
|
+
```powershell
|
|
130
|
+
lsof -i :3000 # Check which process uses the port
|
|
131
|
+
kill -9 <PID> # Kill the process
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## ✅ Verification Steps
|
|
135
|
+
|
|
136
|
+
After installation, verify everything works:
|
|
137
|
+
|
|
138
|
+
```powershell
|
|
139
|
+
# 1. Check Ruby version
|
|
140
|
+
ruby --version
|
|
141
|
+
# Expected: ruby 2.7.0 or higher
|
|
142
|
+
|
|
143
|
+
# 2. Check Bundler
|
|
144
|
+
bundler --version
|
|
145
|
+
# Expected: Bundler version 2.0 or higher
|
|
146
|
+
|
|
147
|
+
# 3. List installed gems
|
|
148
|
+
bundle list | grep -E "(irb|rouge|colorize|did_you_mean|reline)"
|
|
149
|
+
# Should show all dependencies
|
|
150
|
+
|
|
151
|
+
# 4. Run tests
|
|
152
|
+
bundle exec rspec
|
|
153
|
+
# Should show all tests passing
|
|
154
|
+
|
|
155
|
+
# 5. Test the shell
|
|
156
|
+
ruby bin/console
|
|
157
|
+
# Should start with Pretty IRB banner
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## 🚀 First Run
|
|
161
|
+
|
|
162
|
+
```powershell
|
|
163
|
+
$ ruby bin/console
|
|
164
|
+
╔═══════════════════════════════════════════════════════════╗
|
|
165
|
+
║ 🎨 Welcome to Pretty IRB 🎨 ║
|
|
166
|
+
║ ║
|
|
167
|
+
║ Enhanced Interactive Ruby Shell with Auto-Correct ║
|
|
168
|
+
║ Type 'help' for commands or 'exit' to quit ║
|
|
169
|
+
╚═══════════════════════════════════════════════════════════╝
|
|
170
|
+
|
|
171
|
+
pretty_irb >> puts "Hello, Pretty IRB!"
|
|
172
|
+
Hello, Pretty IRB!
|
|
173
|
+
=> nil
|
|
174
|
+
|
|
175
|
+
pretty_irb >> 5 + 3
|
|
176
|
+
=> 8
|
|
177
|
+
|
|
178
|
+
pretty_irb >> exit
|
|
179
|
+
Goodbye!
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
## 📚 Development Workflow
|
|
183
|
+
|
|
184
|
+
### Running Tests
|
|
185
|
+
```powershell
|
|
186
|
+
# Run all tests
|
|
187
|
+
bundle exec rspec
|
|
188
|
+
|
|
189
|
+
# Run specific test file
|
|
190
|
+
bundle exec rspec spec/formatter_spec.rb
|
|
191
|
+
|
|
192
|
+
# Run with verbose output
|
|
193
|
+
bundle exec rspec -v
|
|
194
|
+
|
|
195
|
+
# Run with coverage
|
|
196
|
+
bundle exec rspec --coverage
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### Adding Dependencies
|
|
200
|
+
```powershell
|
|
201
|
+
# Add a new gem to Gemfile
|
|
202
|
+
bundle add colorama
|
|
203
|
+
|
|
204
|
+
# Or manually edit Gemfile and install
|
|
205
|
+
bundle install
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### Releasing a New Version
|
|
209
|
+
```powershell
|
|
210
|
+
# 1. Update version in lib/pretty_irb/version.rb
|
|
211
|
+
# 2. Update CHANGELOG (if you have one)
|
|
212
|
+
# 3. Commit changes
|
|
213
|
+
git add .
|
|
214
|
+
git commit -m "Release version 0.2.0"
|
|
215
|
+
git tag -a v0.2.0 -m "Version 0.2.0"
|
|
216
|
+
|
|
217
|
+
# 4. Build gem
|
|
218
|
+
gem build pretty_irb.gemspec
|
|
219
|
+
|
|
220
|
+
# 5. Push to RubyGems
|
|
221
|
+
gem push pretty_irb-0.2.0.gem
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
## 🔐 Security Notes
|
|
225
|
+
|
|
226
|
+
- Keep dependencies updated: `bundle update`
|
|
227
|
+
- Check for vulnerabilities: `bundle audit`
|
|
228
|
+
- Use `bundle lock` to lock versions
|
|
229
|
+
- Review dependencies before installing
|
|
230
|
+
|
|
231
|
+
## 🎯 Next Steps
|
|
232
|
+
|
|
233
|
+
1. ✅ Install the gem
|
|
234
|
+
2. ✅ Run `ruby bin/console`
|
|
235
|
+
3. ✅ Try some Ruby code
|
|
236
|
+
4. ✅ Read `EXAMPLES.md` for usage examples
|
|
237
|
+
5. ✅ Run tests: `bundle exec rspec`
|
|
238
|
+
6. ✅ Explore the code in `lib/pretty_irb/`
|
|
239
|
+
|
|
240
|
+
## 📞 Support
|
|
241
|
+
|
|
242
|
+
For issues or questions:
|
|
243
|
+
1. Check `README.md` for documentation
|
|
244
|
+
2. Review `EXAMPLES.md` for usage examples
|
|
245
|
+
3. Run `bundle exec rspec` to verify installation
|
|
246
|
+
4. Check `SETUP.md` for detailed setup information
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
**Installation complete! Enjoy using Pretty IRB! 🎉**
|
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Pretty IRB Contributors
|
|
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 all
|
|
13
|
+
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 THE
|
|
21
|
+
SOFTWARE.
|