class-metrix 1.0.1 → 1.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 +4 -4
- data/.prettierrc.json +41 -0
- data/.qlty/.gitignore +7 -0
- data/.qlty/configs/.yamllint.yaml +8 -0
- data/.qlty/qlty.toml +108 -0
- data/.rubocop.yml +31 -25
- data/.vscode/README.md +230 -78
- data/.vscode/extensions.json +1 -9
- data/.vscode/keybindings.json +0 -26
- data/.vscode/settings.json +57 -11
- data/.vscode/tasks.json +90 -0
- data/CHANGELOG.md +31 -1
- data/README.md +63 -9
- data/Rakefile +64 -1
- data/config/brakeman.yml +37 -0
- data/docs/ARCHITECTURE.md +90 -48
- data/docs/QLTY_INTEGRATION.md +181 -0
- data/docs/RELEASE_GUIDE.md +318 -0
- data/docs/SLACK_INTEGRATION.md +227 -0
- data/examples/README.md +23 -17
- data/examples/basic_usage.rb +19 -19
- data/examples/debug_levels_demo.rb +15 -16
- data/examples/debug_mode_demo.rb +12 -13
- data/examples/inheritance_and_modules.rb +45 -45
- data/lib/class_metrix/version.rb +1 -1
- data/sig/manifest.yaml +12 -12
- metadata +52 -4
- data/.vscode/rbs.code-snippets +0 -61
- data/RELEASE_GUIDE.md +0 -158
data/RELEASE_GUIDE.md
DELETED
@@ -1,158 +0,0 @@
|
|
1
|
-
# Release Guide
|
2
|
-
|
3
|
-
This guide explains how to release new versions of the ClassMetrix gem.
|
4
|
-
|
5
|
-
## 🚀 Quick Release
|
6
|
-
|
7
|
-
For a simple patch release:
|
8
|
-
|
9
|
-
```bash
|
10
|
-
# Using the release script (recommended)
|
11
|
-
./bin/release --type patch --push
|
12
|
-
|
13
|
-
# Or manually
|
14
|
-
./bin/release --type patch
|
15
|
-
# Then follow the printed instructions to commit and push
|
16
|
-
```
|
17
|
-
|
18
|
-
## 📋 Prerequisites
|
19
|
-
|
20
|
-
Before creating a release, ensure you have:
|
21
|
-
|
22
|
-
1. **RubyGems API Key**: Set up in GitHub repository secrets as `RUBYGEMS_API_KEY`
|
23
|
-
2. **Clean working directory**: All changes committed
|
24
|
-
3. **Tests passing**: Run `bundle exec rake` to verify
|
25
|
-
4. **Updated documentation**: Ensure README and docs are current
|
26
|
-
|
27
|
-
## 🛠️ Release Process
|
28
|
-
|
29
|
-
### 1. Using the Release Script (Recommended)
|
30
|
-
|
31
|
-
The `bin/release` script automates version bumping and changelog updates:
|
32
|
-
|
33
|
-
```bash
|
34
|
-
# Patch release (0.1.0 → 0.1.1)
|
35
|
-
./bin/release --type patch
|
36
|
-
|
37
|
-
# Minor release (0.1.0 → 0.2.0)
|
38
|
-
./bin/release --type minor
|
39
|
-
|
40
|
-
# Major release (0.1.0 → 1.0.0)
|
41
|
-
./bin/release --type major
|
42
|
-
|
43
|
-
# Dry run to see what would happen
|
44
|
-
./bin/release --type patch --dry-run
|
45
|
-
|
46
|
-
# Automatic commit and push
|
47
|
-
./bin/release --type patch --push
|
48
|
-
```
|
49
|
-
|
50
|
-
### 2. Manual Release Process
|
51
|
-
|
52
|
-
If you prefer to do it manually:
|
53
|
-
|
54
|
-
1. **Update Version**:
|
55
|
-
```ruby
|
56
|
-
# lib/class_metrix/version.rb
|
57
|
-
module ClassMetrix
|
58
|
-
VERSION = "0.1.1" # Increment appropriately
|
59
|
-
end
|
60
|
-
```
|
61
|
-
|
62
|
-
2. **Update CHANGELOG.md**:
|
63
|
-
```markdown
|
64
|
-
## [Unreleased]
|
65
|
-
|
66
|
-
## [0.1.1] - 2024-01-15
|
67
|
-
### Fixed
|
68
|
-
- Bug fixes and improvements
|
69
|
-
```
|
70
|
-
|
71
|
-
3. **Commit and Tag**:
|
72
|
-
```bash
|
73
|
-
git add -A
|
74
|
-
git commit -m "Release v0.1.1"
|
75
|
-
git tag v0.1.1
|
76
|
-
git push origin master
|
77
|
-
git push origin v0.1.1
|
78
|
-
```
|
79
|
-
|
80
|
-
## 🤖 Automated Release Workflow
|
81
|
-
|
82
|
-
When you push a tag (e.g., `v0.1.1`), GitHub Actions automatically:
|
83
|
-
|
84
|
-
1. **Runs tests** across Ruby 3.1, 3.2, and 3.3
|
85
|
-
2. **Verifies version consistency** between tag and gemspec
|
86
|
-
3. **Builds the gem**
|
87
|
-
4. **Publishes to RubyGems**
|
88
|
-
5. **Creates a GitHub Release**
|
89
|
-
|
90
|
-
### Workflow Files
|
91
|
-
|
92
|
-
- **`.github/workflows/main.yml`**: CI pipeline for PRs and pushes
|
93
|
-
- **`.github/workflows/release.yml`**: Release automation for tags
|
94
|
-
|
95
|
-
## 🔑 Setting Up RubyGems API Key
|
96
|
-
|
97
|
-
1. **Generate API Key**:
|
98
|
-
```bash
|
99
|
-
gem signin
|
100
|
-
# Get your API key from ~/.gem/credentials
|
101
|
-
```
|
102
|
-
|
103
|
-
2. **Add to GitHub Secrets**:
|
104
|
-
- Go to your repo → Settings → Secrets and variables → Actions
|
105
|
-
- Add secret named `RUBYGEMS_API_KEY`
|
106
|
-
- Paste your API key as the value
|
107
|
-
|
108
|
-
## 📊 Release Checklist
|
109
|
-
|
110
|
-
Before each release:
|
111
|
-
|
112
|
-
- [ ] All tests pass (`bundle exec rake`)
|
113
|
-
- [ ] RuboCop passes (`bundle exec rubocop`)
|
114
|
-
- [ ] Documentation is updated
|
115
|
-
- [ ] CHANGELOG.md reflects new changes
|
116
|
-
- [ ] Version is bumped appropriately
|
117
|
-
- [ ] No TODO items in gemspec
|
118
|
-
- [ ] GitHub secrets are configured
|
119
|
-
|
120
|
-
## 🐛 Troubleshooting
|
121
|
-
|
122
|
-
### Version Mismatch Error
|
123
|
-
|
124
|
-
If the workflow fails with a version mismatch:
|
125
|
-
|
126
|
-
```
|
127
|
-
Version mismatch! Gemspec: 0.1.0, Tag: 0.1.1
|
128
|
-
```
|
129
|
-
|
130
|
-
Ensure the version in `lib/class_metrix/version.rb` matches your git tag.
|
131
|
-
|
132
|
-
### RubyGems Push Failed
|
133
|
-
|
134
|
-
Check that:
|
135
|
-
1. `RUBYGEMS_API_KEY` secret is set correctly
|
136
|
-
2. You have push permissions for the gem
|
137
|
-
3. The version doesn't already exist on RubyGems
|
138
|
-
|
139
|
-
### GitHub Release Failed
|
140
|
-
|
141
|
-
Ensure the `GITHUB_TOKEN` has sufficient permissions (this is usually automatic).
|
142
|
-
|
143
|
-
## 📈 Semantic Versioning
|
144
|
-
|
145
|
-
This project follows [Semantic Versioning](https://semver.org/):
|
146
|
-
|
147
|
-
- **PATCH** (`0.1.0` → `0.1.1`): Bug fixes, documentation updates
|
148
|
-
- **MINOR** (`0.1.0` → `0.2.0`): New features, backwards compatible
|
149
|
-
- **MAJOR** (`0.1.0` → `1.0.0`): Breaking changes
|
150
|
-
|
151
|
-
## 🎯 Post-Release
|
152
|
-
|
153
|
-
After a successful release:
|
154
|
-
|
155
|
-
1. **Verify on RubyGems**: Check that the new version appears on [rubygems.org](https://rubygems.org/gems/class-metrix)
|
156
|
-
2. **Test installation**: `gem install class-metrix -v X.X.X`
|
157
|
-
3. **Update dependencies**: In projects using the gem
|
158
|
-
4. **Announce**: Consider announcements on relevant channels
|