gem_hadar 2.13.0 → 2.13.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.
- checksums.yaml +4 -4
- data/README.md +100 -12
- data/gem_hadar.gemspec +2 -2
- data/lib/gem_hadar/version.rb +1 -1
- data/lib/gem_hadar.rb +0 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 46cb64331f3aa5f93bb51121b1134547c847f07130349af38d25bdf2db16582c
|
|
4
|
+
data.tar.gz: 6cfa451785cfafda768a2aebd0594fb5059dbfcccadf29c4ba7c4d9769fab18d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 83fae17af6f0b76d6df9e50ee55ab506e3ce05947d2927dd117bf5f58a6ce1b78ae1e35458e7e87bcca09388693bbdcd7282207962e9098e9e56fe30251907a7
|
|
7
|
+
data.tar.gz: 81ccf75c79c92ed844a6e673813ae09272d9add1585fb5464733f55ff87da0447db1c82cb1c35efd7ef93222e3b3fd8f9fda46b52a14d625a729b3166eb5eebe
|
data/README.md
CHANGED
|
@@ -107,7 +107,6 @@ The following environment variables can be used to configure `gem_hadar`:
|
|
|
107
107
|
| `XDG_CONFIG_HOME` | XDG configuration directory override | System default |
|
|
108
108
|
| `MAKE` | Make program to use for building extensions | `gmake` or `make` |
|
|
109
109
|
| `VERSION` | Override the version string for some tasks | Not set |
|
|
110
|
-
| `FORCE` | Force certain operations (1 to enable) | 0 |
|
|
111
110
|
| `GIT_REMOTE` | Git remote name(s) for operations, space separated | `origin` |
|
|
112
111
|
| `GITHUB_RELEASE_ENABLED` | Enable GitHub releases (yes/no) | Auto-detected |
|
|
113
112
|
| `EDITOR` | Editor to use for interactive tasks | `vi` |
|
|
@@ -230,7 +229,7 @@ This task displays all current configuration values including:
|
|
|
230
229
|
- Repository information (gem name, version)
|
|
231
230
|
- Build parameters (MAKE, EDITOR)
|
|
232
231
|
- Git configuration (remote)
|
|
233
|
-
- Other flags (
|
|
232
|
+
- Other flags (VERSION, GITHUB_RELEASE_ENABLED)
|
|
234
233
|
- XDG/HOME directories
|
|
235
234
|
- AI prompt defaults
|
|
236
235
|
|
|
@@ -359,6 +358,17 @@ rvm do
|
|
|
359
358
|
end
|
|
360
359
|
```
|
|
361
360
|
|
|
361
|
+
#### GitHub Workflows Configuration
|
|
362
|
+
|
|
363
|
+
```ruby
|
|
364
|
+
github_workflows do
|
|
365
|
+
'ci.yml' => {
|
|
366
|
+
name: 'Continuous Integration',
|
|
367
|
+
ruby_versions: ['3.0', '3.1', '3.2']
|
|
368
|
+
}
|
|
369
|
+
end
|
|
370
|
+
```
|
|
371
|
+
|
|
362
372
|
#### Task Dependencies
|
|
363
373
|
|
|
364
374
|
- **`default_task_dependencies`** - Default: `[:gemspec, :test]`
|
|
@@ -418,7 +428,7 @@ based on your specific requirements. They are automatically derived from other
|
|
|
418
428
|
DSL accessors and provide powerful convenience features that enable `GemHadar`
|
|
419
429
|
to generate consistent, well-structured Ruby code automatically.
|
|
420
430
|
|
|
421
|
-
|
|
431
|
+
## Available Tasks
|
|
422
432
|
|
|
423
433
|
You can list all available tasks with:
|
|
424
434
|
|
|
@@ -426,12 +436,12 @@ You can list all available tasks with:
|
|
|
426
436
|
$ rake -T
|
|
427
437
|
```
|
|
428
438
|
|
|
429
|
-
|
|
439
|
+
### Core Tasks
|
|
430
440
|
|
|
431
441
|
- `rake build` - Build task (builds all packages for a release)
|
|
432
442
|
- `rake release` - Release the new version 1.2.3 for the gem foo
|
|
433
443
|
|
|
434
|
-
|
|
444
|
+
### Build Tasks
|
|
435
445
|
|
|
436
446
|
- `rake gemspec` - Create a gemspec file
|
|
437
447
|
- `rake package` - Build all the packages
|
|
@@ -440,7 +450,7 @@ $ rake -T
|
|
|
440
450
|
- `rake clobber_package` - Remove package products
|
|
441
451
|
- `rake repackage` - Force a rebuild of the package files
|
|
442
452
|
|
|
443
|
-
|
|
453
|
+
### Version Management
|
|
444
454
|
|
|
445
455
|
- `rake version` - Writing version information for foo
|
|
446
456
|
- `rake version:show` - Displaying the current version
|
|
@@ -454,7 +464,16 @@ $ rake -T
|
|
|
454
464
|
- `rake version:push` - Push version 1.2.3 to all git remotes: origin
|
|
455
465
|
- `rake version:origin:push` - Push version 1.2.3 to git remote origin
|
|
456
466
|
|
|
457
|
-
|
|
467
|
+
### Changelog Generation
|
|
468
|
+
|
|
469
|
+
- `rake changes:pending` - Show changes since last version tag
|
|
470
|
+
- `rake changes:current` - Show changes between two latest version tags
|
|
471
|
+
- `rake changes:range` - Show changes for a specific Git range (e.g., v1.0.0..v1.2.0)
|
|
472
|
+
- `rake changes:full` - Generate complete changelog from first tag
|
|
473
|
+
- `rake changes:add` - Append to existing changelog file
|
|
474
|
+
- `rake changes:added` - Check if current version was added to changelog
|
|
475
|
+
|
|
476
|
+
### Documentation
|
|
458
477
|
|
|
459
478
|
- `rake doc` - Create yard documentation (including private)
|
|
460
479
|
- `rake yard_doc` - Generate YARD Documentation
|
|
@@ -465,7 +484,7 @@ $ rake -T
|
|
|
465
484
|
- `rake yard:view` - View the yard documentation
|
|
466
485
|
- `rake yard:list-undoc` - List all undocumented classes/modules/methods
|
|
467
486
|
|
|
468
|
-
|
|
487
|
+
### Testing & Development
|
|
469
488
|
|
|
470
489
|
- `rake run_specs` - Run RSpec code examples
|
|
471
490
|
- `rake clean` - Remove any temporary products
|
|
@@ -475,12 +494,12 @@ $ rake -T
|
|
|
475
494
|
- `rake default` - Default task
|
|
476
495
|
- `rake compile` - Compile project extensions (if configured)
|
|
477
496
|
|
|
478
|
-
|
|
497
|
+
### Publishing Tasks
|
|
479
498
|
- `rake push` - Push all changes for version 1.2.3 into the internets
|
|
480
499
|
- `rake github:release` - Create a new GitHub release for the current version
|
|
481
500
|
with AI-generated changelog
|
|
482
501
|
|
|
483
|
-
|
|
502
|
+
## Code Coverage with SimpleCov
|
|
484
503
|
|
|
485
504
|
To enable detailed code coverage reporting in your project using `GemHadar`,
|
|
486
505
|
follow these steps:
|
|
@@ -524,7 +543,7 @@ follow these steps:
|
|
|
524
543
|
> branch coverage statistics per file, making it ideal for integration with CI
|
|
525
544
|
> tools or custom dashboards.
|
|
526
545
|
|
|
527
|
-
|
|
546
|
+
## Update Gem Version
|
|
528
547
|
|
|
529
548
|
Use one of the following rake tasks to bump the version:
|
|
530
549
|
|
|
@@ -535,7 +554,7 @@ Use one of the following rake tasks to bump the version:
|
|
|
535
554
|
|
|
536
555
|
Or bump your [VERSION](./VERSION) file by hand.
|
|
537
556
|
|
|
538
|
-
|
|
557
|
+
## Release
|
|
539
558
|
|
|
540
559
|
```bash
|
|
541
560
|
$ rake build
|
|
@@ -556,6 +575,75 @@ The `rake release` command performs the final publishing steps: pushing the
|
|
|
556
575
|
master branch and version tag to all git remotes, pushing the gem package to
|
|
557
576
|
RubyGems.org, and creating a GitHub release with AI-generated changelog.
|
|
558
577
|
|
|
578
|
+
## Template System
|
|
579
|
+
|
|
580
|
+
GemHadar includes a template compilation system for generating project files:
|
|
581
|
+
|
|
582
|
+
```ruby
|
|
583
|
+
# In your Rakefile
|
|
584
|
+
template 'templates/Dockerfile.erb', 'Dockerfile' do |t|
|
|
585
|
+
t.version = version
|
|
586
|
+
t.name = name
|
|
587
|
+
end
|
|
588
|
+
```
|
|
589
|
+
|
|
590
|
+
This system uses ERB templates and provides a clean way to generate files
|
|
591
|
+
during your build process.
|
|
592
|
+
|
|
593
|
+
## GitHub Workflows
|
|
594
|
+
|
|
595
|
+
Configure automated workflows with ERB templates:
|
|
596
|
+
|
|
597
|
+
```ruby
|
|
598
|
+
GemHadar do
|
|
599
|
+
github_workflows do
|
|
600
|
+
'ci.yml' => {
|
|
601
|
+
name: 'Continuous Integration',
|
|
602
|
+
ruby_versions: ['3.0', '3.1', '3.2']
|
|
603
|
+
}
|
|
604
|
+
end
|
|
605
|
+
end
|
|
606
|
+
```
|
|
607
|
+
|
|
608
|
+
This creates workflow files in `.github/workflows/` using templates from the
|
|
609
|
+
gem's internal templates directory.
|
|
610
|
+
|
|
611
|
+
## Advanced Usage Patterns
|
|
612
|
+
|
|
613
|
+
### Custom Prompt Templates
|
|
614
|
+
|
|
615
|
+
Override AI behavior by creating custom prompt files in your XDG config:
|
|
616
|
+
|
|
617
|
+
```bash
|
|
618
|
+
# Create custom prompt files
|
|
619
|
+
mkdir -p ~/.config/gem_hadar
|
|
620
|
+
cp /path/to/gem_hadar/lib/gem_hadar/default_changelog_prompt.txt ~/.config/gem_hadar/changelog_prompt.txt
|
|
621
|
+
```
|
|
622
|
+
|
|
623
|
+
### CI/CD Integration
|
|
624
|
+
|
|
625
|
+
Use the following workflow for automated releases:
|
|
626
|
+
|
|
627
|
+
```bash
|
|
628
|
+
# Build and test
|
|
629
|
+
$ rake build
|
|
630
|
+
$ rake test
|
|
631
|
+
|
|
632
|
+
# Bump version and create release
|
|
633
|
+
$ rake version:bump
|
|
634
|
+
$ rake build
|
|
635
|
+
$ rake release
|
|
636
|
+
```
|
|
637
|
+
|
|
638
|
+
### Troubleshooting
|
|
639
|
+
|
|
640
|
+
If you encounter issues with AI prompts:
|
|
641
|
+
|
|
642
|
+
1. Check that Ollama is running
|
|
643
|
+
2. Verify your model is pulled: `ollama list`
|
|
644
|
+
3. Check configuration with: `rake gem_hadar:config`
|
|
645
|
+
4. Review error messages in the console output
|
|
646
|
+
|
|
559
647
|
## Author
|
|
560
648
|
|
|
561
649
|
**GemHadar** was written by [Florian Frank](mailto:flori@ping.de).
|
data/gem_hadar.gemspec
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
|
2
|
-
# stub: gem_hadar 2.13.
|
|
2
|
+
# stub: gem_hadar 2.13.1 ruby lib
|
|
3
3
|
|
|
4
4
|
Gem::Specification.new do |s|
|
|
5
5
|
s.name = "gem_hadar".freeze
|
|
6
|
-
s.version = "2.13.
|
|
6
|
+
s.version = "2.13.1".freeze
|
|
7
7
|
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
|
9
9
|
s.require_paths = ["lib".freeze]
|
data/lib/gem_hadar/version.rb
CHANGED
data/lib/gem_hadar.rb
CHANGED
|
@@ -1635,7 +1635,6 @@ class GemHadar
|
|
|
1635
1635
|
puts "Git Remote(s): #{ENV['GIT_REMOTE'] || 'origin'}"
|
|
1636
1636
|
|
|
1637
1637
|
# Other
|
|
1638
|
-
puts "Force Operations: #{ENV['FORCE'] || '0'}"
|
|
1639
1638
|
puts "Version Override: #{ENV['VERSION'] || 'Not set'}"
|
|
1640
1639
|
puts "GitHub Release Enabled: #{ENV['GITHUB_RELEASE_ENABLED'] || 'Not set'}"
|
|
1641
1640
|
|