tng 0.2.1

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.
Files changed (40) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +15 -0
  3. data/LICENSE.md +32 -0
  4. data/README.md +413 -0
  5. data/Rakefile +124 -0
  6. data/bin/load_dev +22 -0
  7. data/bin/tng +888 -0
  8. data/binaries/tng.bundle +0 -0
  9. data/binaries/tng.so +0 -0
  10. data/lib/generators/tng/install_generator.rb +236 -0
  11. data/lib/tng/analyzers/controller.rb +114 -0
  12. data/lib/tng/analyzers/model.rb +131 -0
  13. data/lib/tng/analyzers/other.rb +277 -0
  14. data/lib/tng/analyzers/service.rb +150 -0
  15. data/lib/tng/api/http_client.rb +100 -0
  16. data/lib/tng/railtie.rb +11 -0
  17. data/lib/tng/services/direct_generation.rb +320 -0
  18. data/lib/tng/services/extract_methods.rb +39 -0
  19. data/lib/tng/services/test_generator.rb +287 -0
  20. data/lib/tng/services/testng.rb +100 -0
  21. data/lib/tng/services/user_app_config.rb +76 -0
  22. data/lib/tng/ui/about_display.rb +66 -0
  23. data/lib/tng/ui/authentication_warning_display.rb +172 -0
  24. data/lib/tng/ui/configuration_display.rb +52 -0
  25. data/lib/tng/ui/controller_test_flow_display.rb +79 -0
  26. data/lib/tng/ui/display_banner.rb +44 -0
  27. data/lib/tng/ui/goodbye_display.rb +41 -0
  28. data/lib/tng/ui/model_test_flow_display.rb +80 -0
  29. data/lib/tng/ui/other_test_flow_display.rb +78 -0
  30. data/lib/tng/ui/post_install_box.rb +80 -0
  31. data/lib/tng/ui/service_test_flow_display.rb +78 -0
  32. data/lib/tng/ui/show_help.rb +78 -0
  33. data/lib/tng/ui/system_status_display.rb +128 -0
  34. data/lib/tng/ui/theme.rb +258 -0
  35. data/lib/tng/ui/user_stats_display.rb +160 -0
  36. data/lib/tng/utils.rb +325 -0
  37. data/lib/tng/version.rb +5 -0
  38. data/lib/tng.rb +308 -0
  39. data/tng.gemspec +56 -0
  40. metadata +293 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: b9965672463ad576e9cb6ee27df1e6ff4861f17f80cb332473b63110a6deebff
4
+ data.tar.gz: 3d22117b140daf9636c3a15ea53542272d9f18ba68f6497b223cf3df1670bdab
5
+ SHA512:
6
+ metadata.gz: 519c42652328e661ae9ab5ed1f0cedbbbce1b5ddfbc3d7802ffd4646d943399f8290546b0a453f34075da5ce1382b661a355ab58de7223a4d6b81478c59dc266
7
+ data.tar.gz: 3b204c5a8fbeafa7df8ec3b676a2356c120bd3a7546bcd77a79e67decbd377f785440a747c04a9bdac55f85d816e4b55724675bb5675ff5d065fedcfca5f8414
data/Gemfile ADDED
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in tng.gemspec
6
+ gemspec
7
+
8
+ gem "irb"
9
+ gem "rake", "~> 13.0"
10
+
11
+ gem "rake-compiler"
12
+
13
+ gem "minitest", "~> 5.16"
14
+
15
+ gem "rubocop", "~> 1.21"
data/LICENSE.md ADDED
@@ -0,0 +1,32 @@
1
+ # Commercial License
2
+
3
+ Copyright (c) 2025 TNG. All rights reserved.
4
+
5
+ ## License Grant
6
+
7
+ This software is available under a commercial license. You may use this software if you have obtained a valid license from the copyright holder.
8
+
9
+ ## Restrictions
10
+
11
+ Without a valid commercial license, you may NOT:
12
+ - Use this software in any commercial or production environment
13
+ - Fork, copy, modify, or create derivative works
14
+ - Distribute, redistribute, sublicense, or sell copies
15
+ - Reverse engineer or decompile the software
16
+ - Remove or alter any copyright notices
17
+
18
+ ## Commercial Use
19
+
20
+ To obtain a commercial license for production use, contact: [raluca@tng.sh]
21
+
22
+ ## Evaluation Use
23
+
24
+ You may evaluate this software for a period of 30 days for non-commercial purposes only.
25
+
26
+ ## Termination
27
+
28
+ Any unauthorized use will result in immediate termination of rights and may result in legal action.
29
+
30
+ ## Disclaimer
31
+
32
+ THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED.
data/README.md ADDED
@@ -0,0 +1,413 @@
1
+ # TNG - AI-Powered Test Generation for Rails
2
+
3
+ TNG is an AI-powered test generation tool that automatically creates comprehensive tests for your Rails applications. It analyzes your code structure, authentication patterns, and configuration to generate high-quality, contextual tests that follow your project's conventions.
4
+
5
+ ## Installation
6
+
7
+ ### Standard Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'tng'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ ```bash
18
+ bundle install
19
+ ```
20
+
21
+ ## Configuration
22
+
23
+ TNG requires proper configuration to generate high-quality tests. Generate the configuration file by running:
24
+
25
+ ```bash
26
+ rails generate tng:install
27
+ ```
28
+
29
+ This creates `config/initializers/tng.rb` with a configuration template that you'll need to customize for your application. The generator will attempt to detect your existing setup and pre-configure common settings.
30
+
31
+ ### Configuration Options Explained
32
+
33
+ #### API Configuration
34
+ - **`api_key`**: Your TNG API key from https://app.tng.sh/
35
+ - **`base_url`**: TNG service endpoint (automatically configured, do not modify)
36
+
37
+ #### Code Reading
38
+ - **`read_source_code`**: Analyzes the specific code file for which tests are being generated
39
+ - **`read_test_code`**: Reads existing tests for the specific file to match your testing patterns
40
+
41
+ #### Testing Framework Settings
42
+ - **`testing_framework`**: Automatically detected. Possible values: `minitest` or `rspec`
43
+
44
+ *Note: The following settings depend on your testing framework.*
45
+
46
+ **For Minitest:**
47
+ - **`test_style`**: Test organization style. Possible options:
48
+ - `test_block` - `test "does something" do ... end`
49
+ - `spec` - `it "does something" do ... end`
50
+ - `unit` - `def test_does_something ... end`
51
+ - **`assertion_style`**: Assertion syntax preference. Possible values:
52
+ - `assert/refute` - Uses syntax like `assert`, `assert_equal`, `assert_nil`, `refute`, `refute_nil`
53
+ - `assert/assert_not` - Uses syntax like `assert`, `assert_equal`, `assert_nil`, `assert_not`, `assert_not_equl`, `assert_not_nil`
54
+ - `must/wont` - `value.must_equal`, `value.must_be_instance_of`, `value.must_raise`, `value.wont_equal`, `value.wont_be_instance_of`, `value.wont_raise`
55
+
56
+ **For RSpec:**
57
+ - **`describe_style`**: Include describe blocks. Possible values: `true`, `false`
58
+ - **`context_style`**: Context block style. Possible values: `context`, `describe`
59
+ - **`it_style`**: Example block style. Possible values: `it`, `specify`
60
+ - **`before_style`**: Setup block style. Possible values: `before`, `setup`
61
+ - **`after_style`**: Teardown block style. Possible values: `after`, `teardown`
62
+ - **`let_style`**: Use let helpers. Possible values: `true`, `false`
63
+ - **`subject_style`**: Use subject helpers. Possible values: `true`, `false`
64
+
65
+ #### Authentication Methods
66
+ Supported authentication types:
67
+ - **`session`**: Session-based authentication
68
+ - **`devise`**: Devise gem integration
69
+ - **`jwt`**: JSON Web Token authentication
70
+ - **`token_auth`**: Token-based authentication
71
+ - **`basic_auth`**: HTTP Basic Authentication
72
+ - **`oauth`**: OAuth authentication
73
+ - **`headers`**: Custom header authentication
74
+ - **`custom`**: Custom authentication logic
75
+
76
+ #### Mock and Factory Libraries
77
+ - **`mock_library`**: Mock library preference
78
+ - **For Minitest**: `minitest/mock`, `mocha`, `nil`
79
+ - **For RSpec**: `rspec-mocks`, `mocha`, `flexmock`, `nil`
80
+ - **`http_mock_library`**: HTTP mocking library. Possible values: `webmock`, `vcr`, `httparty`, `nil`
81
+ - **`factory_library`**: Factory library preference. Possible values: `factory_bot`, `factory_girl`, `fabrication`, `fabricator`, `fixtures`, `active_record`
82
+
83
+ ## Configuration Examples
84
+
85
+ ### Minitest with FactoryBot Setup
86
+
87
+ ```ruby
88
+ # config/initializers/tng.rb
89
+ Tng.configure do |config|
90
+ config.api_key = ENV["TNG_API_KEY"]
91
+ config.base_url = "https://app.tng.sh/"
92
+
93
+ config.read_source_code = true
94
+ config.read_test_code = true
95
+
96
+ config.testing_framework = "minitest"
97
+ config.test_style = "test_block"
98
+ config.assertion_style = "assert/refute"
99
+ config.setup_style = true
100
+ config.teardown_style = false
101
+
102
+ config.mock_library = "minitest/mock"
103
+ config.http_mock_library = "webmock"
104
+ config.factory_library = "factory_bot"
105
+
106
+ config.authentication_enabled = true
107
+ config.authentication_methods = [
108
+ {
109
+ method: "authenticate_user!",
110
+ file_location: "app/controllers/application_controller.rb",
111
+ auth_type: "session"
112
+ }
113
+ ]
114
+ end
115
+ ```
116
+
117
+ ### RSpec with FactoryBot Setup
118
+
119
+ ```ruby
120
+ # config/initializers/tng.rb
121
+ Tng.configure do |config|
122
+ config.api_key = ENV["TNG_API_KEY"]
123
+ config.base_url = "https://app.tng.sh/"
124
+
125
+ config.read_source_code = true
126
+ config.read_test_code = true
127
+
128
+ config.testing_framework = "rspec"
129
+ config.assertion_style = "expect"
130
+ config.describe_style = true
131
+ config.context_style = "context"
132
+ config.it_style = "it"
133
+ config.before_style = "before"
134
+ config.after_style = "after"
135
+ config.let_style = true
136
+ config.subject_style = true
137
+
138
+ config.mock_library = "rspec-mocks"
139
+ config.http_mock_library = "webmock"
140
+ config.factory_library = "factory_bot"
141
+
142
+ config.authentication_enabled = true
143
+ config.authentication_methods = [
144
+ {
145
+ method: "authenticate_user!",
146
+ file_location: "app/controllers/application_controller.rb",
147
+ auth_type: "devise"
148
+ }
149
+ ]
150
+ end
151
+ ```
152
+
153
+ ### API-Only Application with Token Authentication
154
+
155
+ ```ruby
156
+ # config/initializers/tng.rb
157
+ Tng.configure do |config|
158
+ config.api_key = ENV["TNG_API_KEY"]
159
+ config.base_url = "https://app.tng.sh/"
160
+
161
+ config.read_source_code = true
162
+ config.read_test_code = true
163
+
164
+ config.testing_framework = "minitest"
165
+ config.test_style = "test_block"
166
+ config.assertion_style = "assert/refute"
167
+
168
+ config.mock_library = "minitest/mock"
169
+ config.http_mock_library = "webmock"
170
+ config.factory_library = "fixtures"
171
+
172
+ config.authentication_enabled = true
173
+ config.authentication_methods = [
174
+ {
175
+ method: "authenticate_via_token!",
176
+ file_location: "app/controllers/application_controller.rb",
177
+ auth_type: "headers"
178
+ }
179
+ ]
180
+ end
181
+ ```
182
+
183
+ ### Multiple Authentication Methods
184
+
185
+ ```ruby
186
+ # config/initializers/tng.rb
187
+ Tng.configure do |config|
188
+ config.api_key = ENV["TNG_API_KEY"]
189
+ config.base_url = "https://app.tng.sh/"
190
+
191
+ config.read_source_code = true
192
+ config.read_test_code = true
193
+
194
+ config.testing_framework = "rspec"
195
+ config.assertion_style = "expect"
196
+ config.let_style = true
197
+
198
+ config.mock_library = "rspec-mocks"
199
+ config.http_mock_library = "webmock"
200
+ config.factory_library = "factory_bot"
201
+
202
+ config.authentication_enabled = true
203
+ config.authentication_methods = [
204
+ {
205
+ method: "authenticate_user!",
206
+ file_location: "app/controllers/application_controller.rb",
207
+ auth_type: "session"
208
+ },
209
+ {
210
+ method: "authenticate_api_user!",
211
+ file_location: "app/controllers/api/base_controller.rb",
212
+ auth_type: "token_auth"
213
+ }
214
+ ]
215
+
216
+ config.authorization_library = "pundit"
217
+ end
218
+ ```
219
+
220
+ ## Advanced Configuration
221
+
222
+ ### Custom Authentication Setup
223
+
224
+ For applications with custom authentication logic that doesn't fit standard patterns:
225
+
226
+ ```ruby
227
+ config.authentication_methods = [
228
+ {
229
+ method: "verify_custom_auth!",
230
+ file_location: "app/controllers/concerns/custom_auth.rb",
231
+ auth_type: "custom"
232
+ }
233
+ ]
234
+ ```
235
+
236
+ #### Rails API Application
237
+
238
+ ```ruby
239
+ config.authentication_enabled = true
240
+ config.authentication_methods = [
241
+ {
242
+ method: "authenticate_with_token",
243
+ file_location: "app/controllers/application_controller.rb",
244
+ auth_type: "jwt"
245
+ }
246
+ ]
247
+ config.factory_library = "fixtures" # Often simpler for API apps
248
+ ```
249
+
250
+ #### Multi-Tenant Application
251
+
252
+ ```ruby
253
+ config.authentication_methods = [
254
+ {
255
+ method: "authenticate_tenant!",
256
+ file_location: "app/controllers/application_controller.rb",
257
+ auth_type: "custom"
258
+ },
259
+ {
260
+ method: "authenticate_user!",
261
+ file_location: "app/controllers/application_controller.rb",
262
+ auth_type: "devise"
263
+ }
264
+ ]
265
+ ```
266
+
267
+ #### Legacy Application with Mixed Authentication
268
+
269
+ ```ruby
270
+ config.authentication_methods = [
271
+ {
272
+ method: "authenticate_admin!",
273
+ file_location: "app/controllers/admin/base_controller.rb",
274
+ auth_type: "basic_auth"
275
+ },
276
+ {
277
+ method: "authenticate_user!",
278
+ file_location: "app/controllers/application_controller.rb",
279
+ auth_type: "session"
280
+ },
281
+ {
282
+ method: "authenticate_api_key!",
283
+ file_location: "app/controllers/api/v1/base_controller.rb",
284
+ auth_type: "headers"
285
+ }
286
+ ]
287
+ ```
288
+
289
+ ## Usage Patterns
290
+
291
+ ### Interactive Mode
292
+
293
+ The recommended way to use TNG for beginners and exploratory testing:
294
+
295
+ ```bash
296
+ bundle exec tng
297
+ ```
298
+
299
+ This launches an interactive session where you can:
300
+ - Browse your application structure
301
+ - Select files to generate tests for
302
+ - Preview generated tests before saving
303
+ - Adjust configuration on the fly
304
+
305
+ ### Method-Specific Testing
306
+
307
+ TNG focuses on precise, method-level test generation:
308
+
309
+ - **Select specific methods** from 20+ file types including controllers, models, services, jobs, helpers, lib, policies, presenters, mailers, GraphQL components, and more
310
+ - **Interactive browsing** with search and filter capabilities
311
+ - **Focused test generation** for individual methods only
312
+ - **No bulk generation** - intentionally designed for precision
313
+
314
+ Use `bundle exec tng --help` for more options.
315
+
316
+ ### Debug Mode
317
+
318
+ For troubleshooting configuration or generation issues:
319
+
320
+ ```bash
321
+ # Interactive mode with debug on
322
+ DEBUG=1 bundle exec tng
323
+
324
+ # Direct mode with debug
325
+ DEBUG=1 bundle exec tng -t c -f ping
326
+ ```
327
+
328
+ ### Help and Options
329
+
330
+ ```bash
331
+ bundle exec tng --help # Show help message
332
+ bundle exec tng -h # Short help
333
+ ```
334
+
335
+ ## Troubleshooting
336
+
337
+ ### Configuration Issues
338
+
339
+ #### API Key Problems
340
+
341
+ **Error: "Invalid API key"**
342
+ - Verify your API key from https://app.tng.sh/
343
+ - Check environment variable: `echo $TNG_API_KEY`
344
+ - Ensure no extra spaces in `.env` file: `TNG_API_KEY=your_key_here`
345
+
346
+ **Error: "API key not found"**
347
+ - Set environment variable: `export TNG_API_KEY=your_key`
348
+ - Or add to `.env` file: `TNG_API_KEY=your_key`
349
+ - Restart Rails server after changing environment variables
350
+
351
+ #### Configuration Validation
352
+
353
+ **Error: "Invalid configuration"**
354
+ - Run configuration check: `rails console` then `Tng.configuration`
355
+ - Verify all required settings are present
356
+ - Check for typos in configuration file
357
+
358
+ **Poor Test Quality**
359
+ - Verify authentication methods are correctly configured
360
+ - Check factory library setting matches your setup
361
+ - Ensure `read_source_code` and `read_test_code` are enabled
362
+ - Review testing framework settings match your project
363
+
364
+ #### Authentication Configuration Issues
365
+
366
+ **Tests don't include authentication**
367
+ - Verify `authentication_enabled = true`
368
+ - Check authentication methods are correctly specified
369
+ - Ensure file paths exist: `ls app/controllers/application_controller.rb`
370
+ - Verify method names exist in specified files
371
+
372
+ **Authentication tests fail**
373
+ - Check auth method names match your application
374
+ - Verify file locations are correct
375
+ - Ensure auth_type matches your authentication pattern
376
+
377
+ ### Generation Issues
378
+
379
+ #### No Tests Generated
380
+
381
+ **Check these common issues:**
382
+ 1. File path is correct: `ls app/controllers/users_controller.rb`
383
+ 2. File contains valid Ruby code
384
+ 3. Configuration is valid
385
+ 4. API key is working
386
+ 5. Internet connection is available
387
+
388
+ #### Generated Tests Are Generic
389
+
390
+ **Common causes:**
391
+ - Authentication not properly configured
392
+ - Factory library setting doesn't match your setup
393
+ - `read_source_code` or `read_test_code` disabled
394
+ - File analysis failed (check DEBUG mode)
395
+
396
+ ### Debug Mode
397
+
398
+ Enable debug mode to get detailed information:
399
+
400
+ ```bash
401
+ DEBUG=1 bundle exec tng -t c -f your_controller
402
+ ```
403
+
404
+ Debug output includes:
405
+ - API request/response information
406
+
407
+ ### Getting Help
408
+
409
+ If you're still experiencing issues: Contact the gem maintainers or open a GitHub issue for support
410
+
411
+ ## License
412
+
413
+ See [LICENSE.md](LICENSE.md) for details.
data/Rakefile ADDED
@@ -0,0 +1,124 @@
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 "rb_sys/extensiontask"
13
+
14
+ task build: :compile
15
+
16
+ GEMSPEC = Gem::Specification.load("tng.gemspec")
17
+
18
+ RbSys::ExtensionTask.new("tng", GEMSPEC) do |ext|
19
+ ext.lib_dir = "lib/tng"
20
+ end
21
+
22
+ task default: %i[compile test rubocop]
23
+
24
+ desc "Recompile Rust code and copy the binary for packaging"
25
+ task redo: :compile do
26
+ puts "Copying compiled binary to binaries/ directory..."
27
+ binary_name = RUBY_PLATFORM.include?("darwin") ? "tng.bundle" : "tng.so"
28
+ source_file = File.join("lib", "tng", binary_name)
29
+ destination_dir = "binaries"
30
+
31
+ if File.exist?(source_file)
32
+ FileUtils.mkdir_p(destination_dir)
33
+ FileUtils.cp(source_file, File.join(destination_dir, binary_name))
34
+ puts "✅ Copied #{binary_name} to #{destination_dir}/"
35
+ else
36
+ puts "❌ Error: Compiled binary not found at #{source_file}"
37
+ puts "Make sure 'rake compile' ran successfully."
38
+ end
39
+ end
40
+
41
+ desc "Build binaries for both Mac and Linux platforms"
42
+ task :build_both do
43
+ puts "Building tng native extensions for both platforms..."
44
+
45
+ # Clean up and create binaries directory
46
+ puts "Cleaning up old binaries..."
47
+ FileUtils.rm_rf("binaries")
48
+ puts "Creating binaries directory..."
49
+ FileUtils.mkdir_p("binaries")
50
+ puts "Binaries directory created: #{Dir.pwd}/binaries/"
51
+
52
+ # Build Mac version
53
+ puts "Building Mac version..."
54
+ system("bundle exec rake compile") || (puts "❌ Mac build failed"
55
+ exit 1)
56
+
57
+ # Copy Mac binary
58
+ mac_binary = "lib/tng/tng.bundle"
59
+ if File.exist?(mac_binary)
60
+ FileUtils.cp(mac_binary, "binaries/tng.bundle")
61
+ puts "Mac binary copied to binaries/ for packaging"
62
+ else
63
+ puts "❌ Mac binary not found"
64
+ exit 1
65
+ end
66
+
67
+ # Ensure it's in lib/tng/ for gem loading
68
+ if File.exist?("lib/tng/tng.bundle")
69
+ puts "Mac binary confirmed in lib/tng/ for gem loading"
70
+ else
71
+ puts "Warning: Mac binary not found in lib/tng/ - copying from binaries/"
72
+ FileUtils.cp("binaries/tng.bundle", "lib/tng/tng.bundle")
73
+ end
74
+
75
+ # Build Linux version
76
+ puts "Building Linux version..."
77
+ system("./build_linux_binaries.sh") || (puts "❌ Linux build failed"
78
+ exit 1)
79
+
80
+ puts "Build complete!"
81
+ puts "Binaries for packaging:"
82
+ system("ls -la binaries/")
83
+ puts "Binaries for gem loading:"
84
+ system("ls -la lib/tng/*.bundle lib/tng/*.so 2>/dev/null || echo 'No binaries found in lib/tng/'")
85
+ end
86
+
87
+ desc "Development build: compile for current OS and build gem"
88
+ task dev: :redo do
89
+ puts "Building gem..."
90
+ system("gem build tng.gemspec") || (puts "❌ Gem build failed"
91
+ exit 1)
92
+ puts "✅ Development build complete!"
93
+ end
94
+
95
+ # Add this task to suppress the native artifact warning
96
+ task release: :build_both do
97
+ # Temporarily rename the binary to avoid the warning during gem build
98
+ puts "📦 Building gem with pre-compiled binaries..." if File.exist?("binaries/tng.bundle")
99
+ end
100
+
101
+ desc "Clean release: build binaries and release gem"
102
+ task :clean_release do
103
+ puts "🔨 Running build_both to ensure fresh binaries..."
104
+ Rake::Task[:build_both].invoke
105
+
106
+ puts "🧹 Cleaning development artifacts (keeping binaries/)..."
107
+ # Clean ext/ compiled files (development artifacts)
108
+ Dir.glob("ext/**/*.{bundle,so,dylib}").each do |file|
109
+ File.delete(file)
110
+ puts "Removed development artifact: #{file}"
111
+ end
112
+
113
+ # Clean lib/tng/ compiled files (development artifacts)
114
+ Dir.glob("lib/tng/*.{bundle,so,dylib}").each do |file|
115
+ File.delete(file)
116
+ puts "Removed development artifact: #{file}"
117
+ end
118
+
119
+ puts "📦 Binaries for distribution:"
120
+ system("ls -la binaries/")
121
+
122
+ puts "🚀 Releasing gem..."
123
+ Rake::Task["release"].invoke
124
+ end
data/bin/load_dev ADDED
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ # Development loader for TNG gem
5
+ # This script loads the local development version of the gem
6
+ # Usage: bin/load_dev
7
+
8
+ puts "🔧 Loading TNG development environment..."
9
+
10
+ # Add the lib directory to the load path
11
+ lib_path = File.expand_path("../lib", __dir__)
12
+ $LOAD_PATH.unshift(lib_path) unless $LOAD_PATH.include?(lib_path)
13
+
14
+ # Load the development version
15
+ require_relative "../lib/tng"
16
+
17
+ puts "✅ TNG development version loaded!"
18
+ puts "📍 Loaded from: #{lib_path}"
19
+
20
+ # Start IRB with the gem loaded
21
+ require "irb"
22
+ IRB.start