rails_lens 0.2.11 → 0.2.12
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/CHANGELOG.md +7 -0
- data/lib/rails_lens/schema/annotation_manager.rb +13 -2
- data/lib/rails_lens/version.rb +1 -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: a16c11b82fa2d13299f79c63d58be9ddcb1c5c83406a38e037ba34acf0c2d31c
|
|
4
|
+
data.tar.gz: 1c2a639108ff7a8e4c77ca843c7a49c548415e2560498ffd6079c6543f144866
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c5cff544c5dcaf6fdd5866fa130acf14e9dbc23b101355727587a6135addd2f17e65a3ac4af328f639bf5ee8e60c4302824382804de0e33ef055ef00c928f2c0
|
|
7
|
+
data.tar.gz: 31ae8d31c0040111c17af95cac84e334f92ea62837a1a1e06168de4745c1d3bc136965388b1d24c520437cb63cdc3479912e18b8232a2ffd2f58e77619090e73
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.2.12](https://github.com/seuros/rails_lens/compare/rails_lens/v0.2.11...rails_lens/v0.2.12) (2025-11-26)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* handle engine/gem dummy app file paths in annotation ([7a3dab8](https://github.com/seuros/rails_lens/commit/7a3dab83570e43cb243b7bac41afc184a27bed2c))
|
|
9
|
+
|
|
3
10
|
## [0.2.11](https://github.com/seuros/rails_lens/compare/rails_lens/v0.2.10...rails_lens/v0.2.11) (2025-11-24)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -16,8 +16,19 @@ module RailsLens
|
|
|
16
16
|
return unless file_path && File.exist?(file_path)
|
|
17
17
|
|
|
18
18
|
# Only annotate files within the Rails application (unless explicitly allowed)
|
|
19
|
-
if
|
|
20
|
-
|
|
19
|
+
# For engines/gems with dummy apps, check if the file is within the parent directory
|
|
20
|
+
if !allow_external_files && defined?(Rails.root)
|
|
21
|
+
rails_root = Rails.root.to_s
|
|
22
|
+
# Check if this is a dummy app inside a gem/engine
|
|
23
|
+
parent_root = if rails_root.include?('/test/dummy')
|
|
24
|
+
File.expand_path('../..', rails_root)
|
|
25
|
+
else
|
|
26
|
+
rails_root
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
unless file_path.start_with?(rails_root) || file_path.start_with?(parent_root)
|
|
30
|
+
return
|
|
31
|
+
end
|
|
21
32
|
end
|
|
22
33
|
|
|
23
34
|
annotation_text = generate_annotation
|
data/lib/rails_lens/version.rb
CHANGED