pg_sql_triggers 1.1.1 → 1.3.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.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +15 -0
  3. data/CHANGELOG.md +200 -0
  4. data/COVERAGE.md +45 -34
  5. data/Goal.md +276 -155
  6. data/README.md +56 -1
  7. data/app/assets/javascripts/pg_sql_triggers/trigger_actions.js +50 -0
  8. data/app/controllers/concerns/pg_sql_triggers/error_handling.rb +56 -0
  9. data/app/controllers/concerns/pg_sql_triggers/kill_switch_protection.rb +66 -0
  10. data/app/controllers/concerns/pg_sql_triggers/permission_checking.rb +117 -0
  11. data/app/controllers/pg_sql_triggers/application_controller.rb +10 -62
  12. data/app/controllers/pg_sql_triggers/audit_logs_controller.rb +102 -0
  13. data/app/controllers/pg_sql_triggers/dashboard_controller.rb +6 -1
  14. data/app/controllers/pg_sql_triggers/migrations_controller.rb +62 -10
  15. data/app/controllers/pg_sql_triggers/sql_capsules_controller.rb +161 -0
  16. data/app/controllers/pg_sql_triggers/tables_controller.rb +30 -4
  17. data/app/controllers/pg_sql_triggers/triggers_controller.rb +147 -0
  18. data/app/helpers/pg_sql_triggers/permissions_helper.rb +43 -0
  19. data/app/models/pg_sql_triggers/audit_log.rb +106 -0
  20. data/app/models/pg_sql_triggers/trigger_registry.rb +297 -5
  21. data/app/views/layouts/pg_sql_triggers/application.html.erb +26 -6
  22. data/app/views/pg_sql_triggers/audit_logs/index.html.erb +177 -0
  23. data/app/views/pg_sql_triggers/dashboard/index.html.erb +65 -2
  24. data/app/views/pg_sql_triggers/sql_capsules/new.html.erb +81 -0
  25. data/app/views/pg_sql_triggers/sql_capsules/show.html.erb +85 -0
  26. data/app/views/pg_sql_triggers/tables/index.html.erb +76 -3
  27. data/app/views/pg_sql_triggers/tables/show.html.erb +49 -2
  28. data/app/views/pg_sql_triggers/triggers/_drop_modal.html.erb +138 -0
  29. data/app/views/pg_sql_triggers/triggers/_re_execute_modal.html.erb +145 -0
  30. data/app/views/pg_sql_triggers/triggers/show.html.erb +206 -0
  31. data/config/routes.rb +11 -0
  32. data/db/migrate/20260103000001_create_pg_sql_triggers_audit_log.rb +28 -0
  33. data/docs/README.md +15 -5
  34. data/docs/api-reference.md +443 -4
  35. data/docs/audit-trail.md +413 -0
  36. data/docs/configuration.md +6 -6
  37. data/docs/permissions.md +369 -0
  38. data/docs/troubleshooting.md +486 -0
  39. data/docs/ui-guide.md +211 -0
  40. data/docs/web-ui.md +328 -40
  41. data/lib/pg_sql_triggers/errors.rb +245 -0
  42. data/lib/pg_sql_triggers/generator/service.rb +32 -0
  43. data/lib/pg_sql_triggers/permissions/checker.rb +9 -2
  44. data/lib/pg_sql_triggers/registry/manager.rb +28 -13
  45. data/lib/pg_sql_triggers/registry.rb +176 -2
  46. data/lib/pg_sql_triggers/sql/capsule.rb +79 -0
  47. data/lib/pg_sql_triggers/sql/executor.rb +200 -0
  48. data/lib/pg_sql_triggers/sql/kill_switch.rb +33 -5
  49. data/lib/pg_sql_triggers/testing/function_tester.rb +2 -0
  50. data/lib/pg_sql_triggers/version.rb +1 -1
  51. data/lib/pg_sql_triggers.rb +3 -6
  52. metadata +38 -6
  53. data/docs/screenshots/.gitkeep +0 -1
  54. data/docs/screenshots/Generate Trigger.png +0 -0
  55. data/docs/screenshots/Triggers Page.png +0 -0
  56. data/docs/screenshots/kill error.png +0 -0
  57. data/docs/screenshots/kill modal for migration down.png +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dff79b71aeff432cbe9324568f94bd358c76ca9161162f47b8513401eb783dd1
4
- data.tar.gz: 524af402547aa3ef6be32605089e177a2cde1e7cae2548affa657c2af283cbf1
3
+ metadata.gz: 6f8d9043692145293beaf91342280ca01702979a6e50190fd5930d8578170291
4
+ data.tar.gz: 18e9eaaa03de9932f9916bcc2110e9896a271c555a3b94f13348baf1e37c584c
5
5
  SHA512:
6
- metadata.gz: e57441cf88cfd3e6deb7f9523286fbe862add9c0d07eef5ac127857c20f417b34ed4dc1a307a3c5c15012afbeb8524b566a2c5a5d0ad2b9284f60010bd7be99b
7
- data.tar.gz: b216be1abbea025ff653cde512a309258e211443e86b049d74b37417ef1df3633559b274c78870fba8498fe4afbd36db72de11c45c446a4e80e717491fe72765
6
+ metadata.gz: 8ed71a10f16385f318a4a596a444c07d2cb00a7d07119043c921cf43b1d2199db6d36cc30b5ea523bcbb527a817b97fbe7c507ac81a4cec3931f887c2a4606ca
7
+ data.tar.gz: af0162bab6005904e1649619e5a68e1c1f36733e4f8d34f0306c9a64af07356e9f19165dda1a60f19606b36b517ee1ad34224a50b479b02b0b8efd340175f1fc
data/.rubocop.yml CHANGED
@@ -118,6 +118,21 @@ RSpec/MultipleExpectations:
118
118
  RSpec/SpecFilePathFormat:
119
119
  Enabled: false
120
120
 
121
+ RSpec/AnyInstance:
122
+ Enabled: false
123
+
124
+ RSpec/LetSetup:
125
+ Enabled: false
126
+
127
+ RSpec/NestedGroups:
128
+ Enabled: false
129
+
130
+ RSpec/VerifiedDoubles:
131
+ Enabled: false
132
+
133
+ RSpec/RepeatedExample:
134
+ Enabled: false
135
+
121
136
  # Capybara
122
137
  Capybara/RSpec/PredicateMatcher:
123
138
  Enabled: false
data/CHANGELOG.md CHANGED
@@ -7,6 +7,206 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.3.0] - 2026-01-05
11
+
12
+ ### Added
13
+ - **Enhanced Console API**: Added missing drift query methods to Registry API for consistency
14
+ - `PgSqlTriggers::Registry.drifted` - Returns all drifted triggers
15
+ - `PgSqlTriggers::Registry.in_sync` - Returns all in-sync triggers
16
+ - `PgSqlTriggers::Registry.unknown_triggers` - Returns all unknown (external) triggers
17
+ - `PgSqlTriggers::Registry.dropped` - Returns all dropped triggers
18
+ - All console APIs now follow consistent naming conventions (query methods vs action methods)
19
+
20
+ - **Controller Concerns**: Extracted common controller functionality into reusable concerns
21
+ - `KillSwitchProtection` concern - Handles kill switch checking and confirmation helpers
22
+ - `PermissionChecking` concern - Handles permission checks and actor management
23
+ - `ErrorHandling` concern - Handles error formatting and flash message helpers
24
+ - All controllers now inherit from `ApplicationController` which includes these concerns
25
+ - Improved code organization and maintainability
26
+
27
+ - **YARD Documentation**: Comprehensive YARD documentation added to all public APIs
28
+ - `PgSqlTriggers::Registry` module - All public methods fully documented
29
+ - `PgSqlTriggers::TriggerRegistry` model - All public methods fully documented
30
+ - `PgSqlTriggers::Generator::Service` - All public class methods fully documented
31
+ - `PgSqlTriggers::SQL::Executor` - Already had documentation (verified)
32
+ - All documentation includes parameter types, return values, and examples
33
+
34
+ ### Added
35
+ - **Complete UI Action Buttons**: All trigger operations now accessible via web UI
36
+ - Enable/Disable buttons in dashboard and table detail views
37
+ - Drop trigger button with confirmation modal (Admin permission required)
38
+ - Re-execute trigger button with drift diff display (Admin permission required)
39
+ - All buttons respect permission checks and show/hide based on user role
40
+ - Kill switch integration with confirmation modals for all actions
41
+ - Buttons styled with environment-aware colors (warning colors for production)
42
+
43
+ - **Enhanced Dashboard**:
44
+ - "Last Applied" column showing `installed_at` timestamps in human-readable format
45
+ - Tooltips with exact timestamps on hover
46
+ - Default sorting by `installed_at` (most recent first)
47
+ - Drop and Re-execute buttons in dashboard table (Admin only)
48
+ - Permission-aware button visibility throughout
49
+
50
+ - **Trigger Detail Page Enhancements**:
51
+ - Breadcrumb navigation (Dashboard → Tables → Table → Trigger)
52
+ - Enhanced `installed_at` display with relative time formatting
53
+ - `last_verified_at` timestamp display
54
+ - All action buttons (enable/disable/drop/re-execute) accessible from detail page
55
+
56
+ - **Comprehensive Audit Logging System**:
57
+ - New `pg_sql_triggers_audit_log` table for tracking all operations
58
+ - `AuditLog` model with logging methods (`log_success`, `log_failure`)
59
+ - Audit logging integrated into all trigger operations:
60
+ - `enable!` - logs success/failure with before/after state
61
+ - `disable!` - logs success/failure with before/after state
62
+ - `drop!` - logs success/failure with reason and state changes
63
+ - `re_execute!` - logs success/failure with drift diff information
64
+ - All operations track actor (who performed the action)
65
+ - Complete state capture (before/after) for all operations
66
+ - Error messages logged for failed operations
67
+ - Environment and confirmation text tracking
68
+
69
+ - **Enhanced Actor Tracking**:
70
+ - All trigger operations now accept `actor` parameter
71
+ - Console APIs updated to pass actor information
72
+ - UI controllers pass `current_actor` to all operations
73
+ - Actor information stored in audit logs for complete audit trail
74
+
75
+ - **Permissions Enforcement System**:
76
+ - Permission checks enforced across all controllers (Viewer, Operator, Admin)
77
+ - `PermissionsHelper` module for view-level permission checks
78
+ - Permission helper methods in `ApplicationController` for consistent authorization
79
+ - All UI buttons and actions respect permission levels
80
+ - Console APIs (`Registry.enable/disable/drop/re_execute`, `SQL::Executor.execute`) check permissions
81
+ - Permission errors raise `PermissionError` with clear messages
82
+ - Configurable permission checker via `permission_checker` configuration option
83
+
84
+ - **Enhanced Error Handling System**:
85
+ - Comprehensive error hierarchy with base `Error` class and specialized error types
86
+ - Error classes: `PermissionError`, `KillSwitchError`, `DriftError`, `ValidationError`, `ExecutionError`, `UnsafeMigrationError`, `NotFoundError`
87
+ - Error codes for programmatic handling (e.g., `PERMISSION_DENIED`, `KILL_SWITCH_ACTIVE`, `DRIFT_DETECTED`)
88
+ - Standardized error messages with recovery suggestions
89
+ - Enhanced error display in UI with user-friendly formatting
90
+ - Context information included in all errors for better debugging
91
+ - Error handling helpers in `ApplicationController` for consistent error formatting
92
+
93
+ - **Comprehensive Documentation**:
94
+ - New `ui-guide.md` - Quick start guide for web interface
95
+ - New `permissions.md` - Complete guide to configuring and using permissions
96
+ - New `audit-trail.md` - Guide to viewing and exporting audit logs
97
+ - New `troubleshooting.md` - Common issues and solutions with error code reference
98
+ - Updated documentation index with links to all new guides
99
+
100
+ - **Audit Log UI**:
101
+ - Web interface for viewing audit log entries (`/audit_logs`)
102
+ - Filterable by trigger name, operation, status, and environment
103
+ - Sortable by date (ascending/descending)
104
+ - Pagination support (default 50 entries per page, max 200)
105
+ - CSV export functionality with applied filters
106
+ - Comprehensive view showing operation details, actor information, status, and error messages
107
+ - Links to trigger detail pages from audit log entries
108
+ - Navigation menu integration
109
+
110
+ - **Enhanced Database Tables & Triggers Page**:
111
+ - Pagination support for tables list (default 20 per page, configurable up to 100)
112
+ - Filter functionality to view:
113
+ - All tables
114
+ - Tables with triggers only
115
+ - Tables without triggers only
116
+ - Enhanced statistics dashboard showing:
117
+ - Count of tables with triggers
118
+ - Count of tables without triggers
119
+ - Total tables count
120
+ - Filter controls with visual indicators for active filter
121
+ - Pagination controls preserve filter selection when navigating pages
122
+ - Context-aware empty state messages based on selected filter
123
+
124
+ ### Changed
125
+ - **Code Organization**: Refactored `ApplicationController` to use concerns instead of inline methods
126
+ - Reduced code duplication across controllers
127
+ - Improved separation of concerns
128
+ - Better testability and maintainability
129
+
130
+ - **Service Object Patterns**: Standardized service object patterns across all service classes
131
+ - All service objects follow consistent class method patterns
132
+ - Consistent stateless service object conventions
133
+
134
+ - **Goal.md**: Updated to reflect actual implementation status
135
+ - Added technical notes documenting improvements
136
+ - Updated console API section with all implemented methods
137
+ - Documented code organization improvements
138
+
139
+ - Dashboard default sorting changed to `installed_at` (most recent first) instead of `created_at`
140
+ - Trigger detail page breadcrumbs improved navigation flow
141
+ - All trigger action buttons use consistent styling and permission checks
142
+
143
+ ### Fixed
144
+ - Actor tracking now properly passed through all operation methods
145
+ - Improved error handling with audit log integration
146
+
147
+ ### Security
148
+ - All operations now tracked in audit log for compliance and debugging
149
+ - Actor information captured for all operations (UI, Console, CLI)
150
+ - Complete state change tracking for audit trail
151
+ - Permission enforcement ensures only authorized users can perform operations
152
+ - Permission checks enforced at controller, API, and view levels
153
+
154
+ ## [1.2.0] - 2026-01-02
155
+
156
+ ### Added
157
+ - **SQL Capsules**: Emergency SQL execution feature for critical operations
158
+ - Named SQL capsules with environment declaration and purpose description
159
+ - Capsule class for creating and managing SQL capsules
160
+ - Executor class for safe, transactional SQL execution
161
+ - Permission checks (Admin role required for execution)
162
+ - Kill switch protection for all executions
163
+ - Checksum calculation and storage in registry
164
+ - Comprehensive logging of all operations
165
+ - Web UI for creating, viewing, and executing SQL capsules
166
+ - Console API: `PgSqlTriggers::SQL::Executor.execute(capsule, actor:, confirmation:)`
167
+
168
+ - **Drop & Re-Execute Flow**: Operational controls for trigger lifecycle management
169
+ - `TriggerRegistry#drop!` method for safely dropping triggers
170
+ - Admin permission required
171
+ - Kill switch protection
172
+ - Reason field (required and logged)
173
+ - Typed confirmation required in protected environments
174
+ - Transactional execution
175
+ - Removes trigger from database and registry
176
+ - `TriggerRegistry#re_execute!` method for fixing drifted triggers
177
+ - Admin permission required
178
+ - Kill switch protection
179
+ - Shows drift diff before execution
180
+ - Reason field (required and logged)
181
+ - Typed confirmation required in protected environments
182
+ - Transactional execution
183
+ - Drops and re-creates trigger from registry definition
184
+ - Web UI buttons for drop and re-execute on trigger detail page
185
+ - Controller actions with proper permission checks and error handling
186
+ - Interactive modals with reason input and confirmation fields
187
+ - Drift comparison shown before re-execution
188
+
189
+ - **Enhanced Permissions Enforcement**:
190
+ - Console APIs with permission checks:
191
+ - `PgSqlTriggers::Registry.enable(trigger_name, actor:, confirmation:)`
192
+ - `PgSqlTriggers::Registry.disable(trigger_name, actor:, confirmation:)`
193
+ - `PgSqlTriggers::Registry.drop(trigger_name, actor:, reason:, confirmation:)`
194
+ - `PgSqlTriggers::Registry.re_execute(trigger_name, actor:, reason:, confirmation:)`
195
+ - Permission checks enforced at console API level
196
+ - Rake tasks already protected by kill switch
197
+ - Clear error messages for permission violations
198
+
199
+ ### Fixed
200
+ - Improved error handling for trigger enable/disable operations
201
+ - Better logging for drop and re-execute operations
202
+ - Fixed rubocop linting issues
203
+
204
+ ### Security
205
+ - All destructive operations (drop, re-execute, SQL capsule execution) require Admin permissions
206
+ - Kill switch protection enforced across all new features
207
+ - Typed confirmation required in protected environments
208
+ - Comprehensive audit logging for all operations
209
+
10
210
  ## [1.1.1] - 2025-12-31
11
211
 
12
212
  ### Changed
data/COVERAGE.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Code Coverage Report
2
2
 
3
- **Total Coverage: 95.4%**
3
+ **Total Coverage: 95.99%**
4
4
 
5
- Covered: 1678 / 1759 lines
5
+ Covered: 2319 / 2416 lines
6
6
 
7
7
  ---
8
8
 
@@ -10,47 +10,58 @@ Covered: 1678 / 1759 lines
10
10
 
11
11
  | File | Coverage | Covered Lines | Missed Lines | Total Lines |
12
12
  |------|----------|---------------|--------------|-------------|
13
- | `lib/pg_sql_triggers/testing/dry_run.rb` | 100.0% ✅ | 24 | 0 | 24 |
14
- | `lib/pg_sql_triggers/testing.rb` | 100.0% ✅ | 6 | 0 | 6 |
15
- | `lib/pg_sql_triggers/registry/validator.rb` | 100.0% ✅ | 5 | 0 | 5 |
16
- | `lib/pg_sql_triggers/registry.rb` | 100.0% ✅ | 18 | 0 | 18 |
17
- | `lib/pg_sql_triggers/permissions/checker.rb` | 100.0% ✅ | 15 | 0 | 15 |
18
- | `lib/pg_sql_triggers/permissions.rb` | 100.0% ✅ | 11 | 0 | 11 |
19
- | `lib/pg_sql_triggers/migrator/safety_validator.rb` | 100.0% ✅ | 110 | 0 | 110 |
20
- | `lib/pg_sql_triggers/migrator/pre_apply_diff_reporter.rb` | 100.0% ✅ | 75 | 0 | 75 |
21
- | `lib/pg_sql_triggers/migrator/pre_apply_comparator.rb` | 100.0% ✅ | 123 | 0 | 123 |
22
- | `lib/pg_sql_triggers/migration.rb` | 100.0% ✅ | 4 | 0 | 4 |
23
- | `lib/generators/trigger/migration_generator.rb` | 100.0% ✅ | 27 | 0 | 27 |
24
- | `lib/generators/pg_sql_triggers/install_generator.rb` | 100.0% ✅ | 18 | 0 | 18 |
25
- | `lib/pg_sql_triggers/generator/service.rb` | 100.0% ✅ | 93 | 0 | 93 |
26
- | `lib/pg_sql_triggers/generator/form.rb` | 100.0% ✅ | 36 | 0 | 36 |
27
- | `lib/pg_sql_triggers/generator.rb` | 100.0% ✅ | 4 | 0 | 4 |
28
- | `lib/pg_sql_triggers/dsl/trigger_definition.rb` | 100.0% ✅ | 37 | 0 | 37 |
29
- | `lib/pg_sql_triggers.rb` | 100.0% ✅ | 45 | 0 | 45 |
30
- | `config/initializers/pg_sql_triggers.rb` | 100.0% ✅ | 10 | 0 | 10 |
31
- | `app/models/pg_sql_triggers/application_record.rb` | 100.0% ✅ | 3 | 0 | 3 |
32
- | `app/controllers/pg_sql_triggers/application_controller.rb` | 100.0% ✅ | 28 | 0 | 28 |
33
- | `app/controllers/pg_sql_triggers/dashboard_controller.rb` | 100.0% ✅ | 25 | 0 | 25 |
34
- | `app/controllers/pg_sql_triggers/migrations_controller.rb` | 100.0% ✅ | 63 | 0 | 63 |
35
- | `lib/pg_sql_triggers/dsl.rb` | 100.0% ✅ | 9 | 0 | 9 |
36
13
  | `lib/pg_sql_triggers/drift.rb` | 100.0% ✅ | 13 | 0 | 13 |
37
14
  | `lib/pg_sql_triggers/drift/db_queries.rb` | 100.0% ✅ | 24 | 0 | 24 |
15
+ | `lib/pg_sql_triggers/dsl.rb` | 100.0% ✅ | 9 | 0 | 9 |
16
+ | `lib/pg_sql_triggers/dsl/trigger_definition.rb` | 100.0% ✅ | 37 | 0 | 37 |
17
+ | `lib/pg_sql_triggers/generator.rb` | 100.0% ✅ | 4 | 0 | 4 |
18
+ | `lib/pg_sql_triggers/generator/form.rb` | 100.0% ✅ | 36 | 0 | 36 |
19
+ | `lib/pg_sql_triggers/generator/service.rb` | 100.0% ✅ | 101 | 0 | 101 |
20
+ | `lib/generators/pg_sql_triggers/install_generator.rb` | 100.0% ✅ | 18 | 0 | 18 |
21
+ | `lib/generators/trigger/migration_generator.rb` | 100.0% ✅ | 27 | 0 | 27 |
22
+ | `lib/pg_sql_triggers/migration.rb` | 100.0% ✅ | 4 | 0 | 4 |
23
+ | `lib/pg_sql_triggers/migrator/pre_apply_diff_reporter.rb` | 100.0% ✅ | 75 | 0 | 75 |
24
+ | `lib/pg_sql_triggers/migrator/safety_validator.rb` | 100.0% ✅ | 110 | 0 | 110 |
25
+ | `lib/pg_sql_triggers/permissions.rb` | 100.0% ✅ | 11 | 0 | 11 |
26
+ | `lib/pg_sql_triggers/permissions/checker.rb` | 100.0% ✅ | 17 | 0 | 17 |
27
+ | `lib/pg_sql_triggers/registry/validator.rb` | 100.0% ✅ | 5 | 0 | 5 |
28
+ | `lib/pg_sql_triggers/sql/capsule.rb` | 100.0% ✅ | 28 | 0 | 28 |
29
+ | `lib/pg_sql_triggers/sql/executor.rb` | 100.0% ✅ | 63 | 0 | 63 |
30
+ | `lib/pg_sql_triggers/testing.rb` | 100.0% ✅ | 6 | 0 | 6 |
31
+ | `lib/pg_sql_triggers/testing/syntax_validator.rb` | 100.0% ✅ | 58 | 0 | 58 |
32
+ | `lib/pg_sql_triggers/testing/dry_run.rb` | 100.0% ✅ | 24 | 0 | 24 |
33
+ | `app/models/pg_sql_triggers/audit_log.rb` | 100.0% ✅ | 28 | 0 | 28 |
34
+ | `app/models/pg_sql_triggers/trigger_registry.rb` | 100.0% ✅ | 176 | 0 | 176 |
35
+ | `app/controllers/concerns/pg_sql_triggers/error_handling.rb` | 100.0% ✅ | 19 | 0 | 19 |
36
+ | `app/controllers/concerns/pg_sql_triggers/kill_switch_protection.rb` | 100.0% ✅ | 17 | 0 | 17 |
37
+ | `app/models/pg_sql_triggers/application_record.rb` | 100.0% ✅ | 3 | 0 | 3 |
38
+ | `app/controllers/pg_sql_triggers/application_controller.rb` | 100.0% ✅ | 13 | 0 | 13 |
39
+ | `app/helpers/pg_sql_triggers/permissions_helper.rb` | 100.0% ✅ | 16 | 0 | 16 |
40
+ | `app/controllers/pg_sql_triggers/dashboard_controller.rb` | 100.0% ✅ | 26 | 0 | 26 |
41
+ | `config/initializers/pg_sql_triggers.rb` | 100.0% ✅ | 10 | 0 | 10 |
42
+ | `lib/pg_sql_triggers/errors.rb` | 100.0% ✅ | 83 | 0 | 83 |
43
+ | `app/controllers/pg_sql_triggers/triggers_controller.rb` | 100.0% ✅ | 75 | 0 | 75 |
44
+ | `lib/pg_sql_triggers.rb` | 100.0% ✅ | 40 | 0 | 40 |
45
+ | `lib/pg_sql_triggers/migrator/pre_apply_comparator.rb` | 99.19% ✅ | 122 | 1 | 123 |
38
46
  | `lib/pg_sql_triggers/drift/detector.rb` | 98.48% ✅ | 65 | 1 | 66 |
39
- | `lib/pg_sql_triggers/registry/manager.rb` | 96.36% ✅ | 53 | 2 | 55 |
47
+ | `app/controllers/pg_sql_triggers/audit_logs_controller.rb` | 97.73% ✅ | 43 | 1 | 44 |
48
+ | `app/controllers/pg_sql_triggers/sql_capsules_controller.rb` | 97.14% ✅ | 68 | 2 | 70 |
40
49
  | `lib/generators/pg_sql_triggers/trigger_migration_generator.rb` | 96.3% ✅ | 26 | 1 | 27 |
41
- | `lib/pg_sql_triggers/sql/kill_switch.rb` | 96.0% ✅ | 96 | 4 | 100 |
50
+ | `lib/pg_sql_triggers/sql/kill_switch.rb` | 96.04% ✅ | 97 | 4 | 101 |
42
51
  | `lib/pg_sql_triggers/migrator.rb` | 95.42% ✅ | 125 | 6 | 131 |
43
- | `app/controllers/pg_sql_triggers/generator_controller.rb` | 94.68% ✅ | 89 | 5 | 94 |
44
- | `app/controllers/pg_sql_triggers/tables_controller.rb` | 94.44% ✅ | 17 | 1 | 18 |
52
+ | `lib/pg_sql_triggers/registry/manager.rb` | 95.08% ✅ | 58 | 3 | 61 |
53
+ | `app/controllers/pg_sql_triggers/tables_controller.rb` | 94.74% ✅ | 18 | 1 | 19 |
54
+ | `lib/pg_sql_triggers/database_introspection.rb` | 94.29% ✅ | 66 | 4 | 70 |
45
55
  | `lib/pg_sql_triggers/drift/reporter.rb` | 94.12% ✅ | 96 | 6 | 102 |
46
56
  | `lib/pg_sql_triggers/engine.rb` | 92.86% ✅ | 13 | 1 | 14 |
47
- | `lib/pg_sql_triggers/database_introspection.rb` | 92.86% ✅ | 65 | 5 | 70 |
48
57
  | `lib/pg_sql_triggers/testing/safe_executor.rb` | 91.89% ✅ | 34 | 3 | 37 |
58
+ | `lib/pg_sql_triggers/registry.rb` | 91.84% ✅ | 45 | 4 | 49 |
59
+ | `app/controllers/pg_sql_triggers/generator_controller.rb` | 91.49% ✅ | 86 | 8 | 94 |
49
60
  | `lib/pg_sql_triggers/sql.rb` | 90.91% ✅ | 10 | 1 | 11 |
50
- | `lib/pg_sql_triggers/testing/syntax_validator.rb` | 89.66% ⚠️ | 52 | 6 | 58 |
51
- | `app/models/pg_sql_triggers/trigger_registry.rb` | 84.62% ⚠️ | 55 | 10 | 65 |
52
- | `lib/pg_sql_triggers/testing/function_tester.rb` | 79.1% ⚠️ | 53 | 14 | 67 |
53
- | `config/routes.rb` | 16.67% ❌ | 3 | 15 | 18 |
61
+ | `lib/pg_sql_triggers/testing/function_tester.rb` | 89.71% ⚠️ | 61 | 7 | 68 |
62
+ | `app/controllers/concerns/pg_sql_triggers/permission_checking.rb` | 85.37% ⚠️ | 35 | 6 | 41 |
63
+ | `app/controllers/pg_sql_triggers/migrations_controller.rb` | 82.76% ⚠️ | 72 | 15 | 87 |
64
+ | `config/routes.rb` | 12.0% ❌ | 3 | 22 | 25 |
54
65
 
55
66
  ---
56
67