uffizzi_core 2.0.21 → 2.0.22

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3a15c5c0bf677d3135fe85ef2f8c3e786b95b1ba6c01b1c6ac41cf5141eb710c
4
- data.tar.gz: b5f34edfdbd5dd1e30a9740f79167812905926b0429acd5b597d75d874049015
3
+ metadata.gz: '08a1d3dd5708644d6bba67a98257a03a6007631da8048c00442323d8ea14e454'
4
+ data.tar.gz: e91bd6898142124fcfd59a0ad794194db54085a22f67731fbb8e152e20790ab8
5
5
  SHA512:
6
- metadata.gz: 5f40118c5f0b4b28a16aa715f4197305fd078f8da002ece6cb3806cfc6f441af30d230cdcc8a9fd4711ae7d3113a8fb441c82880d0c8ba40d3dce833d2e8ddf4
7
- data.tar.gz: 53ecd6698351c1da5edf28b5081db1ecb0bd770a930b98e7e70460db92083731b9c7470b788d051dba7414bb72f3dd9e7339e7fd443340b8c063a150ccd96084
6
+ metadata.gz: eeee8c6d59619b064c2ac94035abcdb931bbfde55151f65725b564118fef2cdceaa5db128df4badf362fcee5073fdc53e62541ba974c36fddc504e8ac9c7f431
7
+ data.tar.gz: a213dc22b1f17b9cb1d3df69b6dba1d9b860dbf7cd0acc7be21789eef1d5b0d8e799306ec2684cbf27f070fe04747260bf25f3636ce06bf16c0747b6fe582f56
@@ -57,7 +57,12 @@ class UffizziCore::Api::Cli::V1::Projects::DeploymentsController < UffizziCore::
57
57
  errors = check_credentials(compose_file)
58
58
  return render_errors(errors) if errors.present?
59
59
 
60
- deployment = UffizziCore::DeploymentService.create_from_compose(compose_file, resource_project, current_user, metadata_params)
60
+ params = {
61
+ metadata: metadata_params,
62
+ creation_source: creation_source_params,
63
+ }
64
+
65
+ deployment = UffizziCore::DeploymentService.create_from_compose(compose_file, resource_project, current_user, params)
61
66
 
62
67
  respond_with deployment
63
68
  end
@@ -182,6 +187,10 @@ class UffizziCore::Api::Cli::V1::Projects::DeploymentsController < UffizziCore::
182
187
  params[:metadata]
183
188
  end
184
189
 
190
+ def creation_source_params
191
+ params[:creation_source]
192
+ end
193
+
185
194
  def render_invalid_file
186
195
  render json: { errors: { state: ['Invalid compose file'] } }, status: :unprocessable_entity
187
196
  end
@@ -12,13 +12,13 @@ class UffizziCore::DeploymentService
12
12
  }.freeze
13
13
 
14
14
  class << self
15
- def create_from_compose(compose_file, project, user, metadata)
15
+ def create_from_compose(compose_file, project, user, params)
16
16
  deployment_attributes = ActionController::Parameters.new(compose_file.template.payload)
17
17
  deployment_form = UffizziCore::Api::Cli::V1::Deployment::CreateForm.new(deployment_attributes)
18
18
  deployment_form.assign_dependences!(project, user)
19
19
  deployment_form.compose_file = compose_file
20
- deployment_form.creation_source = UffizziCore::Deployment.creation_source.compose_file_manual
21
- deployment_form.metadata = metadata || {}
20
+ deployment_form.creation_source = params[:creation_source] || UffizziCore::Deployment.creation_source.compose_file_manual
21
+ deployment_form.metadata = params[:metadata] || {}
22
22
 
23
23
  run_deployment_creation_tasks(deployment_form) if deployment_form.save
24
24
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module UffizziCore
4
- VERSION = '2.0.21'
4
+ VERSION = '2.0.22'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uffizzi_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.21
4
+ version: 2.0.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Thurman
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-01-12 00:00:00.000000000 Z
12
+ date: 2023-01-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aasm