schema_reaper 1.0.2 → 1.0.3
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 +8 -0
- data/lib/schema_reaper/version.rb +1 -1
- data/schema_reaper.gemspec +38 -12
- metadata +36 -11
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 22245618558de174144cf3732fbced500e89726cafdec2ab14bdefe35d535287
|
|
4
|
+
data.tar.gz: 95a26a72863e7f603d1d6894aed3f89948f34d85959359863db83e9d01cc5d1b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f98dcbc99cf5a8527ecdfbce06dfce99f6f678971c9d60ee96a030ba0b71eeac731e39f0e8dc87e697a9d74dcfec95d1fb1cfe06549a5b3db55a36580da42a7c
|
|
7
|
+
data.tar.gz: dbcb412469b0bb09c2676706b5a11a6fb085649411d9af3c29d8e633fd208a9e83315905886cf9bc065af4d85a148cdab11101b9dc6ff09380887effbee17493
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.0.3] - 2026-09-04
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
- Richer gem metadata for the RubyGems page: expanded `description` (analyzer
|
|
7
|
+
list, safety model, gem-awareness, reporters), and added `bug_tracker_uri`,
|
|
8
|
+
`documentation_uri`, `wiki_uri` and `funding_uri` (GitHub Sponsors) link
|
|
9
|
+
metadata. No code change.
|
|
10
|
+
|
|
3
11
|
## [1.0.2] - 2026-09-04
|
|
4
12
|
|
|
5
13
|
### Changed
|
data/schema_reaper.gemspec
CHANGED
|
@@ -8,25 +8,51 @@ Gem::Specification.new do |spec|
|
|
|
8
8
|
spec.authors = ["aksshatt"]
|
|
9
9
|
spec.email = ["akshatpegwar5@gmail.com"]
|
|
10
10
|
|
|
11
|
-
spec.summary = "Find dead columns, unused indexes and schema dead-weight
|
|
11
|
+
spec.summary = "Find dead columns, dead tables, unused indexes and other schema dead-weight " \
|
|
12
|
+
"in Rails/ActiveRecord apps -- then remove it safely."
|
|
12
13
|
spec.description = <<~DESC
|
|
13
|
-
schema_reaper
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
schema_reaper reads your live PostgreSQL schema and planner statistics and
|
|
15
|
+
cross-references them against a Prism-AST static scan of your codebase
|
|
16
|
+
(models, views, SQL string literals). With an optional runtime signal -- a
|
|
17
|
+
sampled log of which columns are actually read in production -- it fuses
|
|
18
|
+
static and runtime evidence into a confidence score per finding.
|
|
19
|
+
|
|
20
|
+
Analyzers:
|
|
21
|
+
* dead_column -- column no code path references
|
|
22
|
+
* dead_table -- table with no model/query reference, zero rows
|
|
23
|
+
* unused_index -- non-unique index, idx_scan = 0 in pg_stat
|
|
24
|
+
* duplicate_index -- index that is a prefix of a wider index
|
|
25
|
+
* missing_fk_index -- foreign-key / *_id column with no covering index
|
|
26
|
+
* always_null_column -- pg_stats null_frac = 1.0, carries no data
|
|
27
|
+
* single_value_column -- one distinct value across a large table
|
|
28
|
+
|
|
29
|
+
Every finding carries a reclaimable-bytes estimate (from row counts) and a
|
|
30
|
+
concrete fix. `generate-migration` emits a staged, reversible pair:
|
|
31
|
+
ignored_columns first, remove_column after a soak. Nothing is dropped
|
|
32
|
+
automatically. Columns owned by common gems (devise, paper_trail,
|
|
33
|
+
activestorage, actiontext, friendly_id, audited, pg_search, ahoy_matey,
|
|
34
|
+
paranoia) are whitelisted when the gem is in your bundle.
|
|
35
|
+
|
|
36
|
+
Reporters: table, json, markdown (PR comments), SARIF 2.1.0 (GitHub code
|
|
37
|
+
scanning). `scan --ci` gates only findings absent from a committed baseline.
|
|
38
|
+
`trend` keeps an append-only history log for cleanup burndown. A Rails
|
|
39
|
+
railtie adds rake tasks and an opt-in runtime tracker. Custom analyzers
|
|
40
|
+
load through the `require:` config key.
|
|
41
|
+
|
|
42
|
+
PostgreSQL only for now (MySQL adapter on the roadmap). Ruby >= 2.7.
|
|
21
43
|
DESC
|
|
22
44
|
spec.homepage = "https://github.com/aksshatt/schema_reaper"
|
|
23
45
|
spec.license = "MIT"
|
|
24
46
|
spec.required_ruby_version = ">= 2.7.0"
|
|
25
47
|
|
|
26
48
|
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
|
27
|
-
spec.metadata["homepage_uri"]
|
|
28
|
-
spec.metadata["source_code_uri"]
|
|
29
|
-
spec.metadata["changelog_uri"]
|
|
49
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
|
50
|
+
spec.metadata["source_code_uri"] = spec.homepage
|
|
51
|
+
spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/main/CHANGELOG.md"
|
|
52
|
+
spec.metadata["bug_tracker_uri"] = "#{spec.homepage}/issues"
|
|
53
|
+
spec.metadata["documentation_uri"] = "#{spec.homepage}#readme"
|
|
54
|
+
spec.metadata["wiki_uri"] = "#{spec.homepage}/wiki"
|
|
55
|
+
spec.metadata["funding_uri"] = "https://github.com/sponsors/aksshatt"
|
|
30
56
|
spec.metadata["rubygems_mfa_required"] = "true"
|
|
31
57
|
|
|
32
58
|
spec.files = Dir.chdir(__dir__) do
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: schema_reaper
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- aksshatt
|
|
@@ -79,14 +79,35 @@ dependencies:
|
|
|
79
79
|
- !ruby/object:Gem::Version
|
|
80
80
|
version: '1.5'
|
|
81
81
|
description: |
|
|
82
|
-
schema_reaper
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
82
|
+
schema_reaper reads your live PostgreSQL schema and planner statistics and
|
|
83
|
+
cross-references them against a Prism-AST static scan of your codebase
|
|
84
|
+
(models, views, SQL string literals). With an optional runtime signal -- a
|
|
85
|
+
sampled log of which columns are actually read in production -- it fuses
|
|
86
|
+
static and runtime evidence into a confidence score per finding.
|
|
87
|
+
|
|
88
|
+
Analyzers:
|
|
89
|
+
* dead_column -- column no code path references
|
|
90
|
+
* dead_table -- table with no model/query reference, zero rows
|
|
91
|
+
* unused_index -- non-unique index, idx_scan = 0 in pg_stat
|
|
92
|
+
* duplicate_index -- index that is a prefix of a wider index
|
|
93
|
+
* missing_fk_index -- foreign-key / *_id column with no covering index
|
|
94
|
+
* always_null_column -- pg_stats null_frac = 1.0, carries no data
|
|
95
|
+
* single_value_column -- one distinct value across a large table
|
|
96
|
+
|
|
97
|
+
Every finding carries a reclaimable-bytes estimate (from row counts) and a
|
|
98
|
+
concrete fix. `generate-migration` emits a staged, reversible pair:
|
|
99
|
+
ignored_columns first, remove_column after a soak. Nothing is dropped
|
|
100
|
+
automatically. Columns owned by common gems (devise, paper_trail,
|
|
101
|
+
activestorage, actiontext, friendly_id, audited, pg_search, ahoy_matey,
|
|
102
|
+
paranoia) are whitelisted when the gem is in your bundle.
|
|
103
|
+
|
|
104
|
+
Reporters: table, json, markdown (PR comments), SARIF 2.1.0 (GitHub code
|
|
105
|
+
scanning). `scan --ci` gates only findings absent from a committed baseline.
|
|
106
|
+
`trend` keeps an append-only history log for cleanup burndown. A Rails
|
|
107
|
+
railtie adds rake tasks and an opt-in runtime tracker. Custom analyzers
|
|
108
|
+
load through the `require:` config key.
|
|
109
|
+
|
|
110
|
+
PostgreSQL only for now (MySQL adapter on the roadmap). Ruby >= 2.7.
|
|
90
111
|
email:
|
|
91
112
|
- akshatpegwar5@gmail.com
|
|
92
113
|
executables:
|
|
@@ -144,6 +165,10 @@ metadata:
|
|
|
144
165
|
homepage_uri: https://github.com/aksshatt/schema_reaper
|
|
145
166
|
source_code_uri: https://github.com/aksshatt/schema_reaper
|
|
146
167
|
changelog_uri: https://github.com/aksshatt/schema_reaper/blob/main/CHANGELOG.md
|
|
168
|
+
bug_tracker_uri: https://github.com/aksshatt/schema_reaper/issues
|
|
169
|
+
documentation_uri: https://github.com/aksshatt/schema_reaper#readme
|
|
170
|
+
wiki_uri: https://github.com/aksshatt/schema_reaper/wiki
|
|
171
|
+
funding_uri: https://github.com/sponsors/aksshatt
|
|
147
172
|
rubygems_mfa_required: 'true'
|
|
148
173
|
post_install_message:
|
|
149
174
|
rdoc_options: []
|
|
@@ -163,6 +188,6 @@ requirements: []
|
|
|
163
188
|
rubygems_version: 3.4.10
|
|
164
189
|
signing_key:
|
|
165
190
|
specification_version: 4
|
|
166
|
-
summary: Find dead columns, unused indexes and schema dead-weight
|
|
167
|
-
apps.
|
|
191
|
+
summary: Find dead columns, dead tables, unused indexes and other schema dead-weight
|
|
192
|
+
in Rails/ActiveRecord apps -- then remove it safely.
|
|
168
193
|
test_files: []
|