rails_lens 0.5.0 → 0.5.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/CHANGELOG.md +7 -0
- data/lib/rails_lens/schema/annotation_manager.rb +4 -2
- data/lib/rails_lens/tasks/annotate.rake +14 -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: 1bd96547bfc5ae90c3971f787bbb03cad57e8912ed25c4ea0005ab3652401408
|
|
4
|
+
data.tar.gz: 95f1bcfa75b796a22c1fd5fb861c79e41e048608648388d1d9b255b4a3466157
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 960195b484708f9904f1d96d5f52e5fca70580431deffdc9a5cb56c99ab57af3509c33ad88eb7cdfa84c75067ea04f1d542568152cc60ab6dbcb162b036d1b61
|
|
7
|
+
data.tar.gz: da71bed238e3fa5742039fa0f931d4fc625f52a6d1df3cc831678bd070b65b38e6f3ea4b01b998c7e163409764db0aebfaab83af9a10733081d99513f6a80893
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.5.1](https://github.com/seuros/rails_lens/compare/rails_lens/v0.5.0...rails_lens/v0.5.1) (2025-12-07)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* add by_source ([f6693f3](https://github.com/seuros/rails_lens/commit/f6693f384761de505eac0e525c7b70f4c053d14c))
|
|
9
|
+
|
|
3
10
|
## [0.5.0](https://github.com/seuros/rails_lens/compare/rails_lens/v0.3.0...rails_lens/v0.5.0) (2025-12-06)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -148,12 +148,13 @@ module RailsLens
|
|
|
148
148
|
end
|
|
149
149
|
|
|
150
150
|
def self.annotate_all(options = {})
|
|
151
|
-
results = { annotated: [], skipped: [], failed: [] }
|
|
151
|
+
results = { annotated: [], skipped: [], failed: [], by_source: {} }
|
|
152
152
|
|
|
153
153
|
# Iterate through all model sources
|
|
154
154
|
ModelSourceLoader.load_sources.each do |source|
|
|
155
155
|
puts "Annotating #{source.source_name} models..." if options[:verbose]
|
|
156
156
|
source_results = annotate_source(source, options)
|
|
157
|
+
results[:by_source][source.source_name] = source_results[:annotated].length
|
|
157
158
|
merge_results(results, source_results)
|
|
158
159
|
end
|
|
159
160
|
|
|
@@ -312,12 +313,13 @@ module RailsLens
|
|
|
312
313
|
end
|
|
313
314
|
|
|
314
315
|
def self.remove_all(options = {})
|
|
315
|
-
results = { removed: [], skipped: [], failed: [] }
|
|
316
|
+
results = { removed: [], skipped: [], failed: [], by_source: {} }
|
|
316
317
|
|
|
317
318
|
# Iterate through all model sources
|
|
318
319
|
ModelSourceLoader.load_sources.each do |source|
|
|
319
320
|
puts "Removing annotations from #{source.source_name} models..." if options[:verbose]
|
|
320
321
|
source_results = remove_source(source, options)
|
|
322
|
+
results[:by_source][source.source_name] = source_results[:removed].length
|
|
321
323
|
merge_remove_results(results, source_results)
|
|
322
324
|
end
|
|
323
325
|
|
|
@@ -11,7 +11,13 @@ namespace :rails_lens do
|
|
|
11
11
|
|
|
12
12
|
results = RailsLens::Schema::AnnotationManager.annotate_all(options)
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
if results[:by_source]&.any?
|
|
15
|
+
results[:by_source].each do |source_name, count|
|
|
16
|
+
puts "Annotated #{count} #{source_name} models" if count.positive?
|
|
17
|
+
end
|
|
18
|
+
else
|
|
19
|
+
puts "Annotated #{results[:annotated].length} models"
|
|
20
|
+
end
|
|
15
21
|
puts "Skipped #{results[:skipped].length} models" if results[:skipped].any?
|
|
16
22
|
if results[:failed].any?
|
|
17
23
|
puts "Failed to annotate #{results[:failed].length} models:"
|
|
@@ -27,7 +33,13 @@ namespace :rails_lens do
|
|
|
27
33
|
|
|
28
34
|
results = RailsLens::Schema::AnnotationManager.remove_all
|
|
29
35
|
|
|
30
|
-
|
|
36
|
+
if results[:by_source]&.any?
|
|
37
|
+
results[:by_source].each do |source_name, count|
|
|
38
|
+
puts "Removed annotations from #{count} #{source_name} models" if count.positive?
|
|
39
|
+
end
|
|
40
|
+
elsif results[:removed].any?
|
|
41
|
+
puts "Removed annotations from #{results[:removed].length} models"
|
|
42
|
+
end
|
|
31
43
|
puts "Skipped #{results[:skipped].length} models (no annotations)" if results[:skipped].any?
|
|
32
44
|
if results[:failed].any?
|
|
33
45
|
puts "Failed to remove annotations from #{results[:failed].length} models:"
|
data/lib/rails_lens/version.rb
CHANGED