uffizzi_core 2.1.11 → 2.1.12

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: 2d07bd01d1db9c47d9db2fccc6709cbf3a35e86974012b1cb7fdadc4a39472d1
4
- data.tar.gz: 85675fb9b5fed3f7b9c2ac2848034f9bdf634b89661edf3524e05c88e6c9f670
3
+ metadata.gz: 566a4ac7c7432c2799c5ec99b9254b891b57f1dc824871ea08618c185a23b943
4
+ data.tar.gz: e873366901b73043ce453bcbec7573a6901f9652a7c06eb0d2de2e5de3c91902
5
5
  SHA512:
6
- metadata.gz: 1ba5b6a67ae28cbac577ada543853360df5da38c1287c2c77851ba38f81f89474e112effea8ae950396d964a03f9e973b9a078dfc39fcbfe97f5edc6505bd192
7
- data.tar.gz: 02e5d630212c7968754d2aed37e9afd1686498b56357f058e0e9bc805824af7b5acd428b4a4423257b62c1b0a2032b9047b6d637f9668480db5a1203fd269ee1
6
+ metadata.gz: 8f0104e86fea8ab38eeeb8b41a3b154967a1d04d7adffd923dec5aadeea9a079eb9b22c37a65b3741a3f5663359bae80c03ba3adceafe749f90e3daa7bc7fbb8
7
+ data.tar.gz: f8720202fdb34be5d0445bee562f1a76c72b133d5ad41a46d1c99dbbb53e74be51726804043c291dae6d1d7b650b757ab22e41e53bbadeaa63b2e2cad75136d7
@@ -4,6 +4,8 @@ module UffizziCore::Concerns::Models::Membership
4
4
  extend ActiveSupport::Concern
5
5
 
6
6
  included do
7
+ include AASM
8
+ include UffizziCore::StateMachineConcern
7
9
  include UffizziCore::MembershipRepo
8
10
  extend Enumerize
9
11
 
@@ -16,5 +18,18 @@ module UffizziCore::Concerns::Models::Membership
16
18
  belongs_to :user
17
19
 
18
20
  validates :role, presence: true
21
+
22
+ aasm(:state) do
23
+ state :active, initial: true
24
+ state :blocked
25
+
26
+ event :activate do
27
+ transitions from: [:blocked], to: :active
28
+ end
29
+
30
+ event :block do
31
+ transitions from: [:active], to: :blocked
32
+ end
33
+ end
19
34
  end
20
35
  end
@@ -5,5 +5,6 @@ module UffizziCore::MembershipRepo
5
5
 
6
6
  included do
7
7
  scope :by_role_admin, -> { by_role(UffizziCore::Membership.role.admin) }
8
+ scope :by_account, ->(account) { where(account_id: account.id) }
8
9
  end
9
10
  end
@@ -10,6 +10,8 @@ class UffizziCore::ContainerRegistry::AzureService
10
10
  client(credential).authenticated?
11
11
  end
12
12
 
13
+ def digest(*); end
14
+
13
15
  private
14
16
 
15
17
  def client(c)
@@ -14,6 +14,8 @@ class UffizziCore::ContainerRegistry::DockerRegistryService
14
14
  client(credential).authenticated?
15
15
  end
16
16
 
17
+ def digest(*); end
18
+
17
19
  private
18
20
 
19
21
  def client(credential)
@@ -10,6 +10,8 @@ class UffizziCore::ContainerRegistry::GithubContainerRegistryService
10
10
  client(credential).authenticated?
11
11
  end
12
12
 
13
+ def digest(*); end
14
+
13
15
  private
14
16
 
15
17
  def client(c)
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddStateToMemberships < ActiveRecord::Migration[6.1]
4
+ def change
5
+ add_column(:uffizzi_core_memberships, :state, :string)
6
+ end
7
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module UffizziCore
4
- VERSION = '2.1.11'
4
+ VERSION = '2.1.12'
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.1.11
4
+ version: 2.1.12
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-03-13 00:00:00.000000000 Z
12
+ date: 2023-03-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aasm
@@ -1027,6 +1027,7 @@ files:
1027
1027
  - db/migrate/20220901110752_create_host_volume_files.rb
1028
1028
  - db/migrate/20220901165313_create_container_host_volume_files.rb
1029
1029
  - db/migrate/20220927113647_add_additional_subdomains_to_containers.rb
1030
+ - db/migrate/20230111000000_add_state_to_memberships.rb
1030
1031
  - db/migrate/20230306142513_add_last_deploy_at_to_deployments.rb
1031
1032
  - db/seeds.rb
1032
1033
  - lib/tasks/uffizzi_core_tasks.rake