uffizzi_core 2.2.21 → 2.2.23

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: 580aa60db7e1c92ca301220b524e456a0a4a1b30d744a6ab7d4f0c25e73895f7
4
- data.tar.gz: a4382ea419266fb17c45de1a95077d924960f81511b4f1d39941529cb2ce82d3
3
+ metadata.gz: 173a91720da5a1063dd5db63c18c0232a5621dd68b77a120b81341aafba4c2a8
4
+ data.tar.gz: 03f50a4669fe8688f0e3d280b0589c5123f39ad710cf24d09bdaea19235cc9d3
5
5
  SHA512:
6
- metadata.gz: 00a54a1e25ecafdab764c72656ddcc49c16b8627a560c8f2f6f94352bc30d05ce0b1ae54eda379f4f81ba90a662afd75fe755d84876c777ce4b400a3578f9071
7
- data.tar.gz: cb058554bc4eb8293a8688984aa2991da453abe757d176d5d4e4d0d670e35ae53c190813e7f77e568edaeb2d37d1a1eafee817db4512f357c7b828cc57a34ca7
6
+ metadata.gz: 75934782b7e324fa161b9968efe45454e3483f791980ba85b8342a8c93ce49951483d06250154fdba2bf212aa8ea5794531d90afcf1039825f4d4ddfc8917c82
7
+ data.tar.gz: a5c73682a9152c98c1801379c91c72fbf66212b429d9412d240731f80181d21b91349cdda6e02d51e5616a1968ebb5ea5c99baec830aa1e3fd7cd3e441078b15
@@ -3,6 +3,7 @@
3
3
  module UffizziCore::Concerns::Models::Project
4
4
  extend ActiveSupport::Concern
5
5
 
6
+ # rubocop:disable Metrics/BlockLength
6
7
  included do
7
8
  include AASM
8
9
  include UffizziCore::StateMachineConcern
@@ -25,7 +26,7 @@ module UffizziCore::Concerns::Models::Project
25
26
  has_many :clusters, dependent: :destroy
26
27
 
27
28
  validates :name, presence: true
28
- validates_uniqueness_of :name, conditions: -> { where(state: :active) }, scope: :account_id
29
+ validates_uniqueness_of :name, conditions: -> { where(state: :active) }, scope: :account_id
29
30
  validates :slug, presence: true, uniqueness: true
30
31
 
31
32
  aasm(:state) do
@@ -43,10 +44,15 @@ module UffizziCore::Concerns::Models::Project
43
44
 
44
45
  def after_disable
45
46
  disable_deployments
47
+ disable_clusters
46
48
  end
47
49
 
48
50
  def active_deployments
49
- deployments.active
51
+ deployments.enabled
52
+ end
53
+
54
+ def active_clusters
55
+ clusters.enabled
50
56
  end
51
57
 
52
58
  def disable_deployments
@@ -56,8 +62,13 @@ module UffizziCore::Concerns::Models::Project
56
62
  end
57
63
  end
58
64
 
65
+ def disable_clusters
66
+ active_clusters.each(&:disable!)
67
+ end
68
+
59
69
  def compose_file
60
70
  compose_files.main.first
61
71
  end
62
72
  end
73
+ # rubocop:enable Metrics/BlockLength
63
74
  end
@@ -70,7 +70,7 @@ class UffizziCore::ComposeFile::Parsers::ServicesParserService
70
70
  def check_and_parse_build_option(value, compose_payload)
71
71
  build_parser_module = find_build_parser_module
72
72
 
73
- raise UffizziCore::ComposeFile::ParseError, I18n.t('compose.not_implemented', option: :build) unless build_parser_module
73
+ raise UffizziCore::ComposeFile::ParseError, I18n.t('compose.build_not_implemented') unless build_parser_module
74
74
 
75
75
  build_parser_module.parse(value, compose_payload)
76
76
  end
@@ -74,6 +74,7 @@ en:
74
74
  required_start_commands: "When 'test' is a list the first item must be one of: '%{available_commands}'"
75
75
  volumes_should_be_array: Volumes '%{volumes}' should be an arra
76
76
  healthcheck_missing_required_option: "One of these options is required: %{required_options}"
77
+ build_not_implemented: "The 'build' directive is not supported by the uffizzi command-line tool. Use 'image' instead, or configure Uffizzi CI if you want Uffizzi Cloud to build your application from source. See https://docs.uffizzi.com/references/compose-spec/"
77
78
 
78
79
  secrets:
79
80
  duplicates_exists: Secret with key %{secrets} already exist.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module UffizziCore
4
- VERSION = '2.2.21'
4
+ VERSION = '2.2.23'
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.2.21
4
+ version: 2.2.23
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-09-07 00:00:00.000000000 Z
12
+ date: 2023-10-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aasm