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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: db0b169f8f397031eecb4ff3b50a5047f12cf1bc2c1d0929a674f3b0827c7c91
4
- data.tar.gz: 5be691de8fce3047e5226f7a5d0e9f12a9410609d3de3a91f43d657dd287d6c2
3
+ metadata.gz: a16c11b82fa2d13299f79c63d58be9ddcb1c5c83406a38e037ba34acf0c2d31c
4
+ data.tar.gz: 1c2a639108ff7a8e4c77ca843c7a49c548415e2560498ffd6079c6543f144866
5
5
  SHA512:
6
- metadata.gz: 2c40baa22b05b1c652d3fd3fb617a4d81c2d5349d6aa550dc49c1a7bbd3dfdd74b576151848dc6430e6ad01ff76705000892129b5990a432429dc3a60de4b3d4
7
- data.tar.gz: 49900c83dd33dd65ccf0bf0221c130b6363a35d14eafa25403930d0990e445e94cb60d0344b0e0988485a2d4e0acdf165204a0930620b8e8dbf218486a81704a
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 !allow_external_files && defined?(Rails.root) && !file_path.start_with?(Rails.root.to_s)
20
- return
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsLens
4
- VERSION = '0.2.11'
4
+ VERSION = '0.2.12'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_lens
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.11
4
+ version: 0.2.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abdelkader Boudih