propel_api 0.3.1.5 → 0.3.2
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 +43 -0
- data/lib/generators/propel_api/controller/controller_generator.rb +13 -7
- data/lib/generators/propel_api/core/named_base.rb +1150 -28
- data/lib/generators/propel_api/resource/resource_generator.rb +173 -61
- data/lib/generators/propel_api/templates/scaffold/facet_model_template.rb.tt +10 -0
- data/lib/generators/propel_api/templates/tests/controller_test_template.rb.tt +36 -6
- data/lib/generators/propel_api/templates/tests/fixtures_template.yml.tt +6 -0
- data/lib/generators/propel_api/templates/tests/integration_test_template.rb.tt +77 -25
- data/lib/generators/propel_api/templates/tests/model_test_template.rb.tt +17 -5
- data/lib/propel_api.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a2cc174f214b50c6e5f58829c9136661591fc142a1e14e09aaf7221c0e1ddda
|
4
|
+
data.tar.gz: ae2f7764a20f7dc8b22b35486c4d1ca68e4910321d98c624306293800326270b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ca81a75e2225c0a2bdff55f17aef1e5f6067c7b19c0e815a074201b39a508a0f46d3afa6bcbc54225e7ebc3314cedf46ecdf18cccfa11c15b2031b0afc8c168
|
7
|
+
data.tar.gz: 2bab3dadb532118c96fbdc76e8fa389be29fa4d58801fc3dc7ab6fbea90cffa9534795035f306dd470f6d89f841b055909a3e582634fbae49c5296cc3f44e335
|
data/CHANGELOG.md
CHANGED
@@ -10,6 +10,49 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
10
10
|
### Planned Features
|
11
11
|
- GraphQL adapter support
|
12
12
|
|
13
|
+
## [0.3.2] - 2025-09-15
|
14
|
+
|
15
|
+
### 🐛 Critical Bug Fixes
|
16
|
+
- **Generator Destroy/Rollback Functionality**: Fixed critical issues with resource generator destroy and rollback operations
|
17
|
+
- Fixed `propel_api:resource` generator to properly handle destroy operations and rollbacks
|
18
|
+
- Enhanced controller generator with improved destroy and rollback logic
|
19
|
+
- Completely rebuilt and improved `named_base.rb` core infrastructure with comprehensive destroy/rollback support
|
20
|
+
- Added robust error handling and cleanup procedures for failed generator operations
|
21
|
+
- Fixed edge cases where incomplete generator runs could leave orphaned files or partial configurations
|
22
|
+
- Enhanced generator infrastructure to properly track and reverse all file operations and modifications
|
23
|
+
|
24
|
+
### 🛠️ Generator Infrastructure Improvements
|
25
|
+
- **Enhanced Core Named Base**: Major improvements to the core generator infrastructure
|
26
|
+
- Comprehensive rebuild of generator tracking and rollback mechanisms
|
27
|
+
- Better state management for complex generator operations
|
28
|
+
- Improved error recovery and cleanup procedures
|
29
|
+
- Enhanced file operation tracking for reliable rollbacks
|
30
|
+
- **Resource Generator Robustness**: Significantly improved resource generator reliability
|
31
|
+
- Better handling of partial generation scenarios
|
32
|
+
- Enhanced error reporting and recovery mechanisms
|
33
|
+
- Improved coordination between controller, model, migration, and test generation
|
34
|
+
- More reliable cleanup of generated artifacts during rollbacks
|
35
|
+
|
36
|
+
## [0.3.1.6] - 2025-09-13
|
37
|
+
|
38
|
+
### 🔧 Enhanced Multi-Tenancy Support
|
39
|
+
- **Improved Template Tenancy Handling**: Enhanced template generation for better multi-tenant model and test support
|
40
|
+
- Added `has_agent_reference?` helper method to complement existing tenancy reference detection
|
41
|
+
- Enhanced model template with explicit presence validations for `agency_id`, `user_id`, and `agent_id` references
|
42
|
+
- Improved validation error messages with more specific "must exist" messaging for reference fields
|
43
|
+
- Better consistency across agency, agent, and user reference handling in generated models
|
44
|
+
- **Enhanced Test Template Generation**: Improved test templates for better multi-tenancy testing
|
45
|
+
- Enhanced controller test templates with improved tenancy reference handling
|
46
|
+
- Better fixture template generation for multi-tenant scenarios
|
47
|
+
- Improved integration test templates with enhanced tenancy support
|
48
|
+
- Enhanced model test templates with better reference validation testing
|
49
|
+
|
50
|
+
### 🛠️ Generator Infrastructure Improvements
|
51
|
+
- **Template Consistency**: Improved consistency across all template files for tenancy-related functionality
|
52
|
+
- Better coordination between model, controller, and test templates
|
53
|
+
- Enhanced generator infrastructure for detecting and handling agent references
|
54
|
+
- Improved template logic for multi-tenant application patterns
|
55
|
+
|
13
56
|
## [0.3.1.5] - 2025-09-11
|
14
57
|
|
15
58
|
### 🐛 Bug Fixes
|
@@ -76,19 +76,25 @@ module PropelApi
|
|
76
76
|
validate_attributes_exist unless should_auto_introspect?
|
77
77
|
end
|
78
78
|
|
79
|
+
def check_dependencies_before_destroy
|
80
|
+
# Only check critical dependencies during destroy operations
|
81
|
+
check_for_critical_dependencies if behavior == :revoke
|
82
|
+
end
|
83
|
+
|
79
84
|
def create_controller
|
80
|
-
|
81
|
-
create_propel_controller
|
85
|
+
create_propel_controller_template
|
82
86
|
end
|
83
87
|
|
84
|
-
def
|
85
|
-
# Use shared method from Base class
|
88
|
+
def add_routes
|
86
89
|
create_propel_routes
|
87
90
|
end
|
88
91
|
|
89
|
-
def
|
90
|
-
|
91
|
-
|
92
|
+
def create_controller_test
|
93
|
+
create_propel_controller_test
|
94
|
+
end
|
95
|
+
|
96
|
+
def create_integration_test
|
97
|
+
create_propel_integration_test
|
92
98
|
end
|
93
99
|
|
94
100
|
def show_completion_message
|