tenant_partition 0.1.2 → 0.1.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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6f686ab0abe926917ef8f7b12e142570e6ace6943c725a6ebd93471fcbea4bfe
|
|
4
|
+
data.tar.gz: c88ed9c6d0e322314f4d80e8dec69312dd95e3d362e939d0467b9204f660c34f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5eae8613d5ed6d0d0a8fc13d44fce4b277060b0979e8486e116614c44e508afee05ff66a5302b3eade5d45cbb4d28eb32e9114c70b88dc510e48a9a05b7ea8a7
|
|
7
|
+
data.tar.gz: 4565df6b3b073849a24a3262d43a2cabc82ad268ee0a71ccfedab1ff952dcf9a86aeacb42cf6f4331fdf59b95a3647ccf81c4f6f42e90be03aa7d59fa4af9cf9
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [0.1.3] - 2026-02-03
|
|
4
|
+
### Changed
|
|
5
|
+
- Generator: Se simplificó el controlador API generado (se eliminó la acción `show` y el manejo de errores por defecto).
|
|
6
|
+
- Fix: Se restringieron las versiones de `activemodel` y `activerecord` a `< 9.0` para evitar advertencias de RubyGems.
|
|
7
|
+
|
|
3
8
|
## [0.1.2] - 2026-02-03
|
|
4
9
|
### Added
|
|
5
10
|
- Nuevo generador `rails g tenant_partition:api_controller` para crear endpoints de aprovisionamiento.
|
|
@@ -61,7 +61,6 @@ module TenantPartition
|
|
|
61
61
|
# Definición de rutas explícitas apuntando al controlador generado
|
|
62
62
|
route "post '#{folder_name}/tenant_partitions', to: '#{folder_name}/tenant_partitions#create'"
|
|
63
63
|
route "delete '#{folder_name}/tenant_partitions/:id', to: '#{folder_name}/tenant_partitions#destroy'"
|
|
64
|
-
route "get '#{folder_name}/tenant_partitions/:id', to: '#{folder_name}/tenant_partitions#show'"
|
|
65
64
|
end
|
|
66
65
|
|
|
67
66
|
# Muestra instrucciones post-generación en la consola.
|
|
@@ -2,7 +2,7 @@ module <%= @module_name %>
|
|
|
2
2
|
class TenantPartitionsController < ApplicationController
|
|
3
3
|
skip_before_action :verify_authenticity_token, raise: false
|
|
4
4
|
|
|
5
|
-
# POST
|
|
5
|
+
# POST /<%= @module_name.underscores %>/tenant_partitions
|
|
6
6
|
def create
|
|
7
7
|
partition_id = params.require(:id)
|
|
8
8
|
|
|
@@ -12,25 +12,14 @@ module <%= @module_name %>
|
|
|
12
12
|
TenantPartition.create!(partition_id)
|
|
13
13
|
render json: { message: "Tenant provisioned successfully" }, status: :created
|
|
14
14
|
end
|
|
15
|
-
rescue => e
|
|
16
|
-
render json: { error: e.message }, status: :unprocessable_entity
|
|
17
15
|
end
|
|
18
16
|
|
|
19
|
-
# DELETE
|
|
17
|
+
# DELETE /<%= @module_name.underscores %>/tenant_partitions/:id
|
|
20
18
|
def destroy
|
|
21
19
|
partition_id = params.require(:id)
|
|
22
20
|
|
|
23
21
|
TenantPartition.destroy!(partition_id)
|
|
24
22
|
head :no_content
|
|
25
23
|
end
|
|
26
|
-
|
|
27
|
-
# GET /system/tenant_partitions/:id
|
|
28
|
-
def show
|
|
29
|
-
if TenantPartition.exists?(params[:id])
|
|
30
|
-
render json: { active: true, id: params[:id] }, status: :ok
|
|
31
|
-
else
|
|
32
|
-
render json: { active: false }, status: :not_found
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
24
|
end
|
|
36
25
|
end
|