rails_map 1.1.0 → 1.2.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/.vscode/settings.json +2 -0
- data/AUTHENTICATION.md +10 -6
- data/CHANGELOG.md +57 -23
- data/CODE_OF_CONDUCT.md +129 -0
- data/CONTRIBUTING.md +211 -0
- data/QUICKSTART.md +16 -3
- data/README.md +12 -6
- data/RELEASE_QUICK_REFERENCE.md +114 -0
- data/RELEASE_SCRIPT_GUIDE.md +405 -0
- data/RUBYGEMS_IMPROVEMENTS.md +297 -0
- data/SECURITY.md +162 -0
- data/URL_CHANGE_SUMMARY.md +150 -0
- data/docs/index.html +1564 -1275
- data/lib/generators/rails_map/install_generator.rb +1 -1
- data/lib/generators/rails_map/templates/README +14 -12
- data/lib/rails_map/version.rb +1 -1
- data/release.sh +338 -0
- metadata +46 -6
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
# RubyGems Page Improvements
|
|
2
|
+
|
|
3
|
+
This document outlines all the improvements made to enhance the RailsMap gem's presence on RubyGems.org and GitHub.
|
|
4
|
+
|
|
5
|
+
## ✅ Completed Improvements
|
|
6
|
+
|
|
7
|
+
### 1. Enhanced Gemspec Metadata
|
|
8
|
+
|
|
9
|
+
**File**: `rails_map.gemspec`
|
|
10
|
+
|
|
11
|
+
#### Added:
|
|
12
|
+
|
|
13
|
+
- **Detailed description** with feature list and benefits
|
|
14
|
+
- **Post-install message** with quick start instructions and ASCII art
|
|
15
|
+
- **Additional metadata URIs**:
|
|
16
|
+
- `wiki_uri` - Link to GitHub wiki
|
|
17
|
+
- `funding_uri` - GitHub sponsors link
|
|
18
|
+
- `github_repo` - SSH GitHub repository URL
|
|
19
|
+
- `allowed_push_host` - Restricts gem pushing to RubyGems.org only
|
|
20
|
+
|
|
21
|
+
#### Benefits:
|
|
22
|
+
|
|
23
|
+
- Better first impression on RubyGems.org
|
|
24
|
+
- Clear feature list visible on gem page
|
|
25
|
+
- Helpful post-install message guides new users
|
|
26
|
+
- More discoverable through additional links
|
|
27
|
+
|
|
28
|
+
### 2. README Badges
|
|
29
|
+
|
|
30
|
+
**File**: `README.md`
|
|
31
|
+
|
|
32
|
+
#### Added Badges:
|
|
33
|
+
|
|
34
|
+
1. **Gem Version** - Shows current version
|
|
35
|
+
2. **Downloads** - Total download count
|
|
36
|
+
3. **License** - MIT License badge
|
|
37
|
+
4. **Ruby Version** - Minimum Ruby requirement
|
|
38
|
+
5. **Rails Version** - Minimum Rails requirement
|
|
39
|
+
|
|
40
|
+
#### Benefits:
|
|
41
|
+
|
|
42
|
+
- Quick visual status indicators
|
|
43
|
+
- Shows gem popularity and compatibility
|
|
44
|
+
- Professional appearance
|
|
45
|
+
- Auto-updating information
|
|
46
|
+
|
|
47
|
+
### 3. Community Health Files
|
|
48
|
+
|
|
49
|
+
#### CODE_OF_CONDUCT.md
|
|
50
|
+
|
|
51
|
+
- Contributor Covenant v2.0
|
|
52
|
+
- Clear community standards
|
|
53
|
+
- Enforcement guidelines
|
|
54
|
+
- Contact information
|
|
55
|
+
|
|
56
|
+
#### CONTRIBUTING.md
|
|
57
|
+
|
|
58
|
+
- Comprehensive contribution guide
|
|
59
|
+
- Development setup instructions
|
|
60
|
+
- Pull request process
|
|
61
|
+
- Style guidelines
|
|
62
|
+
- Areas for contribution
|
|
63
|
+
- Project structure overview
|
|
64
|
+
|
|
65
|
+
#### SECURITY.md
|
|
66
|
+
|
|
67
|
+
- Security policy and supported versions
|
|
68
|
+
- Vulnerability reporting process
|
|
69
|
+
- Security best practices
|
|
70
|
+
- Known security considerations
|
|
71
|
+
- Disclosure policy
|
|
72
|
+
|
|
73
|
+
#### Benefits:
|
|
74
|
+
|
|
75
|
+
- Encourages community contributions
|
|
76
|
+
- Sets clear expectations
|
|
77
|
+
- Shows project maturity
|
|
78
|
+
- Improves trust and credibility
|
|
79
|
+
|
|
80
|
+
### 4. GitHub Templates
|
|
81
|
+
|
|
82
|
+
#### Issue Templates
|
|
83
|
+
|
|
84
|
+
- **Bug Report** (`.github/ISSUE_TEMPLATE/bug_report.md`)
|
|
85
|
+
- Structured bug reporting
|
|
86
|
+
- Environment details
|
|
87
|
+
- Reproduction steps
|
|
88
|
+
- **Feature Request** (`.github/ISSUE_TEMPLATE/feature_request.md`)
|
|
89
|
+
- Problem statement
|
|
90
|
+
- Proposed solution
|
|
91
|
+
- Use cases
|
|
92
|
+
|
|
93
|
+
#### Pull Request Template
|
|
94
|
+
|
|
95
|
+
- **PR Template** (`.github/PULL_REQUEST_TEMPLATE.md`)
|
|
96
|
+
- Change description
|
|
97
|
+
- Type of change checklist
|
|
98
|
+
- Testing requirements
|
|
99
|
+
- Documentation updates
|
|
100
|
+
|
|
101
|
+
#### Benefits:
|
|
102
|
+
|
|
103
|
+
- Consistent issue and PR format
|
|
104
|
+
- Easier to triage and respond
|
|
105
|
+
- Better quality contributions
|
|
106
|
+
- Saves maintainer time
|
|
107
|
+
|
|
108
|
+
### 5. CI/CD Workflow
|
|
109
|
+
|
|
110
|
+
**File**: `.github/workflows/ci.yml`
|
|
111
|
+
|
|
112
|
+
#### Features:
|
|
113
|
+
|
|
114
|
+
- Tests across multiple Ruby versions (2.7 - 3.3)
|
|
115
|
+
- Tests across multiple Rails versions (6.0 - 7.1)
|
|
116
|
+
- Matrix testing with exclusions
|
|
117
|
+
- RuboCop linting
|
|
118
|
+
- Gem building verification
|
|
119
|
+
- Artifact upload
|
|
120
|
+
|
|
121
|
+
#### Benefits:
|
|
122
|
+
|
|
123
|
+
- Automated testing
|
|
124
|
+
- Ensures compatibility
|
|
125
|
+
- Catches issues early
|
|
126
|
+
- Shows build status badge (can be added)
|
|
127
|
+
|
|
128
|
+
## 📊 Impact on RubyGems Page
|
|
129
|
+
|
|
130
|
+
### What Users Will See:
|
|
131
|
+
|
|
132
|
+
1. **Gem Page Header**
|
|
133
|
+
- Clear, detailed description
|
|
134
|
+
- Feature bullet points
|
|
135
|
+
- Professional presentation
|
|
136
|
+
|
|
137
|
+
2. **Links Section**
|
|
138
|
+
- Homepage (rails-map.netlify.app)
|
|
139
|
+
- Source Code (GitHub)
|
|
140
|
+
- Documentation (GitHub README)
|
|
141
|
+
- Changelog (GitHub)
|
|
142
|
+
- Bug Tracker (GitHub Issues)
|
|
143
|
+
- Wiki (GitHub Wiki)
|
|
144
|
+
- Funding (GitHub Sponsors)
|
|
145
|
+
|
|
146
|
+
3. **Post-Install Message**
|
|
147
|
+
- Welcoming message with ASCII art
|
|
148
|
+
- Quick start command
|
|
149
|
+
- Documentation links
|
|
150
|
+
- Version highlights
|
|
151
|
+
|
|
152
|
+
4. **Metadata**
|
|
153
|
+
- Ruby version requirement
|
|
154
|
+
- Rails dependency
|
|
155
|
+
- License information
|
|
156
|
+
- MFA requirement badge
|
|
157
|
+
|
|
158
|
+
## 🎯 Additional Recommendations
|
|
159
|
+
|
|
160
|
+
### For RubyGems.org:
|
|
161
|
+
|
|
162
|
+
1. **Add Keywords** (if supported in future)
|
|
163
|
+
- rails, documentation, api, routes, models, controllers
|
|
164
|
+
|
|
165
|
+
2. **Maintain Changelog**
|
|
166
|
+
- Keep CHANGELOG.md updated
|
|
167
|
+
- Follow Keep a Changelog format
|
|
168
|
+
- Link from RubyGems page
|
|
169
|
+
|
|
170
|
+
3. **Regular Updates**
|
|
171
|
+
- Publish security patches promptly
|
|
172
|
+
- Announce new features
|
|
173
|
+
- Maintain backward compatibility
|
|
174
|
+
|
|
175
|
+
### For GitHub:
|
|
176
|
+
|
|
177
|
+
1. **Add More Badges to README**
|
|
178
|
+
|
|
179
|
+
```markdown
|
|
180
|
+
[](https://github.com/ArshdeepGrover/rails-map/actions)
|
|
181
|
+
[](https://codeclimate.com/github/ArshdeepGrover/rails-map)
|
|
182
|
+
[](https://codeclimate.com/github/ArshdeepGrover/rails-map/coverage)
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
2. **Create GitHub Wiki**
|
|
186
|
+
- Installation guides
|
|
187
|
+
- Configuration examples
|
|
188
|
+
- Troubleshooting
|
|
189
|
+
- FAQ
|
|
190
|
+
- Advanced usage
|
|
191
|
+
|
|
192
|
+
3. **Add GitHub Topics**
|
|
193
|
+
- rails
|
|
194
|
+
- documentation
|
|
195
|
+
- api-documentation
|
|
196
|
+
- ruby-gem
|
|
197
|
+
- rails-engine
|
|
198
|
+
- developer-tools
|
|
199
|
+
|
|
200
|
+
4. **Create Releases**
|
|
201
|
+
- Use GitHub Releases for each version
|
|
202
|
+
- Include changelog in release notes
|
|
203
|
+
- Attach gem file to releases
|
|
204
|
+
|
|
205
|
+
5. **Add Screenshots**
|
|
206
|
+
- Add to README
|
|
207
|
+
- Show in GitHub releases
|
|
208
|
+
- Include in documentation
|
|
209
|
+
|
|
210
|
+
### For Community Engagement:
|
|
211
|
+
|
|
212
|
+
1. **Social Media**
|
|
213
|
+
- Announce releases on Twitter/X
|
|
214
|
+
- Share on Reddit (r/rails, r/ruby)
|
|
215
|
+
- Post on Dev.to
|
|
216
|
+
- Share on Ruby Weekly
|
|
217
|
+
|
|
218
|
+
2. **Documentation**
|
|
219
|
+
- Create video tutorials
|
|
220
|
+
- Write blog posts
|
|
221
|
+
- Add to awesome-rails lists
|
|
222
|
+
- Submit to Ruby Toolbox
|
|
223
|
+
|
|
224
|
+
3. **Integrations**
|
|
225
|
+
- Add to Code Climate
|
|
226
|
+
- Set up Dependabot
|
|
227
|
+
- Configure CodeCov
|
|
228
|
+
- Add to Snyk
|
|
229
|
+
|
|
230
|
+
## 📈 Metrics to Track
|
|
231
|
+
|
|
232
|
+
1. **RubyGems.org**
|
|
233
|
+
- Total downloads
|
|
234
|
+
- Daily downloads
|
|
235
|
+
- Version adoption rate
|
|
236
|
+
|
|
237
|
+
2. **GitHub**
|
|
238
|
+
- Stars
|
|
239
|
+
- Forks
|
|
240
|
+
- Issues opened/closed
|
|
241
|
+
- Pull requests
|
|
242
|
+
- Contributors
|
|
243
|
+
|
|
244
|
+
3. **Community**
|
|
245
|
+
- Issue response time
|
|
246
|
+
- PR merge time
|
|
247
|
+
- Active contributors
|
|
248
|
+
- Community discussions
|
|
249
|
+
|
|
250
|
+
## 🚀 Next Steps
|
|
251
|
+
|
|
252
|
+
1. **Immediate**
|
|
253
|
+
- [x] Update gemspec with enhanced metadata
|
|
254
|
+
- [x] Add badges to README
|
|
255
|
+
- [x] Create community health files
|
|
256
|
+
- [x] Add GitHub templates
|
|
257
|
+
- [x] Set up CI workflow
|
|
258
|
+
|
|
259
|
+
2. **Short Term**
|
|
260
|
+
- [ ] Create GitHub Wiki
|
|
261
|
+
- [ ] Add more screenshots
|
|
262
|
+
- [ ] Set up Code Climate
|
|
263
|
+
- [ ] Configure Dependabot
|
|
264
|
+
- [ ] Create first GitHub Release
|
|
265
|
+
|
|
266
|
+
3. **Long Term**
|
|
267
|
+
- [ ] Reach 1000 downloads
|
|
268
|
+
- [ ] Get 100 GitHub stars
|
|
269
|
+
- [ ] Build active community
|
|
270
|
+
- [ ] Create video tutorials
|
|
271
|
+
- [ ] Write comprehensive guides
|
|
272
|
+
|
|
273
|
+
## 📝 Maintenance Checklist
|
|
274
|
+
|
|
275
|
+
- [ ] Update CHANGELOG.md for each release
|
|
276
|
+
- [ ] Test across supported Ruby/Rails versions
|
|
277
|
+
- [ ] Respond to issues within 48 hours
|
|
278
|
+
- [ ] Review PRs within 1 week
|
|
279
|
+
- [ ] Release security patches promptly
|
|
280
|
+
- [ ] Keep dependencies updated
|
|
281
|
+
- [ ] Monitor gem downloads and usage
|
|
282
|
+
- [ ] Engage with community feedback
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
## Summary
|
|
287
|
+
|
|
288
|
+
These improvements significantly enhance the RailsMap gem's professional appearance, discoverability, and community engagement potential. The gem now has:
|
|
289
|
+
|
|
290
|
+
✅ Professional RubyGems page with detailed information
|
|
291
|
+
✅ Clear community guidelines and contribution process
|
|
292
|
+
✅ Automated testing and quality checks
|
|
293
|
+
✅ Structured issue and PR templates
|
|
294
|
+
✅ Security policy and best practices
|
|
295
|
+
✅ Comprehensive documentation
|
|
296
|
+
|
|
297
|
+
This positions RailsMap as a mature, well-maintained, and community-friendly project that developers can trust and contribute to.
|
data/SECURITY.md
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Supported Versions
|
|
4
|
+
|
|
5
|
+
We release patches for security vulnerabilities. Which versions are eligible for receiving such patches depends on the CVSS v3.0 Rating:
|
|
6
|
+
|
|
7
|
+
| Version | Supported |
|
|
8
|
+
| ------- | ------------------ |
|
|
9
|
+
| 1.2.x | :white_check_mark: |
|
|
10
|
+
| 1.1.x | :white_check_mark: |
|
|
11
|
+
| 1.0.x | :x: |
|
|
12
|
+
| < 1.0 | :x: |
|
|
13
|
+
|
|
14
|
+
## Reporting a Vulnerability
|
|
15
|
+
|
|
16
|
+
We take the security of RailsMap seriously. If you believe you have found a security vulnerability, please report it to us as described below.
|
|
17
|
+
|
|
18
|
+
### Please do NOT:
|
|
19
|
+
|
|
20
|
+
- Open a public GitHub issue
|
|
21
|
+
- Discuss the vulnerability in public forums, social media, or mailing lists
|
|
22
|
+
|
|
23
|
+
### Please DO:
|
|
24
|
+
|
|
25
|
+
**Report security vulnerabilities via email to: arsh199820@gmail.com**
|
|
26
|
+
|
|
27
|
+
Please include the following information:
|
|
28
|
+
|
|
29
|
+
1. **Type of vulnerability** (e.g., authentication bypass, SQL injection, XSS, etc.)
|
|
30
|
+
2. **Full paths of source file(s)** related to the vulnerability
|
|
31
|
+
3. **Location of the affected source code** (tag/branch/commit or direct URL)
|
|
32
|
+
4. **Step-by-step instructions to reproduce** the issue
|
|
33
|
+
5. **Proof-of-concept or exploit code** (if possible)
|
|
34
|
+
6. **Impact of the vulnerability** and how an attacker might exploit it
|
|
35
|
+
|
|
36
|
+
### What to expect:
|
|
37
|
+
|
|
38
|
+
- **Acknowledgment**: We will acknowledge receipt of your vulnerability report within 48 hours
|
|
39
|
+
- **Communication**: We will keep you informed about the progress of fixing the vulnerability
|
|
40
|
+
- **Timeline**: We aim to release a fix within 30 days for critical vulnerabilities
|
|
41
|
+
- **Credit**: We will credit you in the security advisory (unless you prefer to remain anonymous)
|
|
42
|
+
|
|
43
|
+
## Security Best Practices
|
|
44
|
+
|
|
45
|
+
When using RailsMap in production:
|
|
46
|
+
|
|
47
|
+
### 1. Enable Authentication
|
|
48
|
+
|
|
49
|
+
Always enable authentication for production environments:
|
|
50
|
+
|
|
51
|
+
```ruby
|
|
52
|
+
# config/initializers/rails_map.rb
|
|
53
|
+
RailsMap.configure do |config|
|
|
54
|
+
config.authenticate_with = proc {
|
|
55
|
+
authenticate_user! # or your authentication method
|
|
56
|
+
}
|
|
57
|
+
end
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### 2. Restrict Access
|
|
61
|
+
|
|
62
|
+
Limit access to authorized users only:
|
|
63
|
+
|
|
64
|
+
```ruby
|
|
65
|
+
config.authenticate_with = proc {
|
|
66
|
+
redirect_to root_path unless current_user&.admin?
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### 3. Use Environment Variables
|
|
71
|
+
|
|
72
|
+
Store credentials in environment variables, not in code:
|
|
73
|
+
|
|
74
|
+
```ruby
|
|
75
|
+
# .env
|
|
76
|
+
RAILS_MAP_USERNAME=admin
|
|
77
|
+
RAILS_MAP_PASSWORD=secure_password_here
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### 4. Disable in Production (Optional)
|
|
81
|
+
|
|
82
|
+
If you don't need live documentation in production, disable the engine:
|
|
83
|
+
|
|
84
|
+
```ruby
|
|
85
|
+
# config/routes.rb
|
|
86
|
+
unless Rails.env.production?
|
|
87
|
+
mount RailsMap::Engine, at: '/rails-map'
|
|
88
|
+
end
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### 5. Use Static HTML Generation
|
|
92
|
+
|
|
93
|
+
For production, consider using static HTML generation instead of live documentation:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
rails doc:generate
|
|
97
|
+
# Deploy the doc/api folder to a secure location
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### 6. Keep Updated
|
|
101
|
+
|
|
102
|
+
Always use the latest version of RailsMap to ensure you have the latest security patches:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
bundle update rails_map
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Known Security Considerations
|
|
109
|
+
|
|
110
|
+
### Information Disclosure
|
|
111
|
+
|
|
112
|
+
RailsMap displays information about your application's structure:
|
|
113
|
+
|
|
114
|
+
- Route paths and HTTP methods
|
|
115
|
+
- Controller names and actions
|
|
116
|
+
- Model attributes and associations
|
|
117
|
+
- Parameter names and types
|
|
118
|
+
|
|
119
|
+
**Mitigation**: Always protect the documentation with authentication in production environments.
|
|
120
|
+
|
|
121
|
+
### Authentication Bypass
|
|
122
|
+
|
|
123
|
+
If authentication is not properly configured, unauthorized users may access your API documentation.
|
|
124
|
+
|
|
125
|
+
**Mitigation**: Follow the authentication setup guide and test your configuration.
|
|
126
|
+
|
|
127
|
+
### Cross-Site Scripting (XSS)
|
|
128
|
+
|
|
129
|
+
While we sanitize output, custom configurations might introduce XSS vulnerabilities.
|
|
130
|
+
|
|
131
|
+
**Mitigation**:
|
|
132
|
+
|
|
133
|
+
- Don't disable built-in sanitization
|
|
134
|
+
- Be careful with custom HTML in configuration
|
|
135
|
+
- Keep RailsMap updated
|
|
136
|
+
|
|
137
|
+
## Security Updates
|
|
138
|
+
|
|
139
|
+
Security updates will be released as patch versions (e.g., 1.2.1) and announced via:
|
|
140
|
+
|
|
141
|
+
- GitHub Security Advisories
|
|
142
|
+
- RubyGems security notifications
|
|
143
|
+
- CHANGELOG.md with [SECURITY] tag
|
|
144
|
+
- Email to reporters
|
|
145
|
+
|
|
146
|
+
## Disclosure Policy
|
|
147
|
+
|
|
148
|
+
When we receive a security bug report, we will:
|
|
149
|
+
|
|
150
|
+
1. Confirm the problem and determine affected versions
|
|
151
|
+
2. Audit code to find similar problems
|
|
152
|
+
3. Prepare fixes for all supported versions
|
|
153
|
+
4. Release new versions as soon as possible
|
|
154
|
+
5. Publish a security advisory
|
|
155
|
+
|
|
156
|
+
## Comments on this Policy
|
|
157
|
+
|
|
158
|
+
If you have suggestions on how this process could be improved, please submit a pull request or open an issue.
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
Thank you for helping keep RailsMap and its users safe! 🔒
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# URL Change Summary: /api-doc → /rails-map
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
All references to `/api-doc` have been changed to `/rails-map` throughout the project for better branding and clarity.
|
|
6
|
+
|
|
7
|
+
## Files Updated
|
|
8
|
+
|
|
9
|
+
### Core Files
|
|
10
|
+
|
|
11
|
+
1. ✅ `lib/generators/rails_map/install_generator.rb` - Generator now mounts at `/rails-map`
|
|
12
|
+
2. ✅ `lib/generators/rails_map/templates/README` - Installation instructions updated
|
|
13
|
+
|
|
14
|
+
### Documentation Files
|
|
15
|
+
|
|
16
|
+
3. ✅ `README.md` - All examples and instructions updated
|
|
17
|
+
4. ✅ `CHANGELOG.md` - Both v1.2.0 and v1.1.0 entries updated
|
|
18
|
+
5. ✅ `QUICKSTART.md` - Quick start guide updated
|
|
19
|
+
6. ✅ `AUTHENTICATION.md` - Authentication examples updated
|
|
20
|
+
7. ✅ `SECURITY.md` - Security examples updated
|
|
21
|
+
|
|
22
|
+
### Gem Files
|
|
23
|
+
|
|
24
|
+
8. ✅ `rails_map.gemspec` - Description and post-install message updated
|
|
25
|
+
|
|
26
|
+
### Website
|
|
27
|
+
|
|
28
|
+
9. ✅ `docs/index.html` - Homepage demo URL updated
|
|
29
|
+
|
|
30
|
+
## What Changed
|
|
31
|
+
|
|
32
|
+
### Before
|
|
33
|
+
|
|
34
|
+
```ruby
|
|
35
|
+
mount RailsMap::Engine, at: '/api-doc'
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Visit: `http://localhost:3000/api-doc`
|
|
39
|
+
|
|
40
|
+
### After
|
|
41
|
+
|
|
42
|
+
```ruby
|
|
43
|
+
mount RailsMap::Engine, at: '/rails-map'
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Visit: `http://localhost:3000/rails-map`
|
|
47
|
+
|
|
48
|
+
## Impact
|
|
49
|
+
|
|
50
|
+
### For New Users
|
|
51
|
+
|
|
52
|
+
- Generator automatically mounts at `/rails-map`
|
|
53
|
+
- All documentation shows the new URL
|
|
54
|
+
- Post-install message shows correct URL
|
|
55
|
+
|
|
56
|
+
### For Existing Users
|
|
57
|
+
|
|
58
|
+
When upgrading to v1.2.0, users will need to update their routes:
|
|
59
|
+
|
|
60
|
+
```ruby
|
|
61
|
+
# config/routes.rb
|
|
62
|
+
|
|
63
|
+
# Old (still works but deprecated)
|
|
64
|
+
mount RailsMap::Engine, at: '/api-doc'
|
|
65
|
+
|
|
66
|
+
# New (recommended)
|
|
67
|
+
mount RailsMap::Engine, at: '/rails-map'
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Migration Guide for Existing Users
|
|
71
|
+
|
|
72
|
+
If you're upgrading from a previous version:
|
|
73
|
+
|
|
74
|
+
1. **Update your routes file:**
|
|
75
|
+
|
|
76
|
+
```ruby
|
|
77
|
+
# config/routes.rb
|
|
78
|
+
mount RailsMap::Engine, at: '/rails-map' # Changed from '/api-doc'
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
2. **Update any bookmarks or documentation:**
|
|
82
|
+
- Old: `http://localhost:3000/api-doc`
|
|
83
|
+
- New: `http://localhost:3000/rails-map`
|
|
84
|
+
|
|
85
|
+
3. **Update any scripts or automation:**
|
|
86
|
+
- Search for `/api-doc` in your codebase
|
|
87
|
+
- Replace with `/rails-map`
|
|
88
|
+
|
|
89
|
+
4. **Restart your Rails server:**
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
rails server
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
5. **Visit the new URL:**
|
|
96
|
+
```
|
|
97
|
+
http://localhost:3000/rails-map
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Why This Change?
|
|
101
|
+
|
|
102
|
+
1. **Better Branding** - `/rails-map` clearly identifies the gem
|
|
103
|
+
2. **Consistency** - Matches the gem name `rails_map`
|
|
104
|
+
3. **Clarity** - More descriptive than generic `/api-doc`
|
|
105
|
+
4. **Uniqueness** - Less likely to conflict with other documentation tools
|
|
106
|
+
|
|
107
|
+
## Backward Compatibility
|
|
108
|
+
|
|
109
|
+
The change is **not backward compatible** by default. Users must update their routes file.
|
|
110
|
+
|
|
111
|
+
However, if you want to support both URLs temporarily:
|
|
112
|
+
|
|
113
|
+
```ruby
|
|
114
|
+
# config/routes.rb
|
|
115
|
+
mount RailsMap::Engine, at: '/rails-map'
|
|
116
|
+
|
|
117
|
+
# Optional: Support old URL temporarily
|
|
118
|
+
mount RailsMap::Engine, at: '/api-doc' # Deprecated, remove in future
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Testing
|
|
122
|
+
|
|
123
|
+
After making the change, verify:
|
|
124
|
+
|
|
125
|
+
1. ✅ Generator creates correct route
|
|
126
|
+
2. ✅ Documentation loads at new URL
|
|
127
|
+
3. ✅ All internal links work
|
|
128
|
+
4. ✅ Authentication works (if enabled)
|
|
129
|
+
5. ✅ Static HTML generation works
|
|
130
|
+
|
|
131
|
+
## Rollback
|
|
132
|
+
|
|
133
|
+
If you need to use the old URL:
|
|
134
|
+
|
|
135
|
+
```ruby
|
|
136
|
+
# config/routes.rb
|
|
137
|
+
mount RailsMap::Engine, at: '/api-doc'
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
The engine will work at any path you specify.
|
|
141
|
+
|
|
142
|
+
## Future Considerations
|
|
143
|
+
|
|
144
|
+
- Consider adding a deprecation warning for `/api-doc` in future versions
|
|
145
|
+
- Could add automatic redirect from old URL to new URL
|
|
146
|
+
- Update any external documentation or blog posts
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
**Note:** This change was made in version 1.2.0 and affects all new installations. Existing installations need manual update.
|