uffizzi_core 2.0.22 → 2.0.25

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: '08a1d3dd5708644d6bba67a98257a03a6007631da8048c00442323d8ea14e454'
4
- data.tar.gz: e91bd6898142124fcfd59a0ad794194db54085a22f67731fbb8e152e20790ab8
3
+ metadata.gz: aa7005a5115382ee954986597b0deaf564a5982ce41f8fdffd3724c4d1a1a677
4
+ data.tar.gz: f051ca13a33f8aa04a884606b9e3c937c953dccfa5abc67ade1b9021b9667487
5
5
  SHA512:
6
- metadata.gz: eeee8c6d59619b064c2ac94035abcdb931bbfde55151f65725b564118fef2cdceaa5db128df4badf362fcee5073fdc53e62541ba974c36fddc504e8ac9c7f431
7
- data.tar.gz: a213dc22b1f17b9cb1d3df69b6dba1d9b860dbf7cd0acc7be21789eef1d5b0d8e799306ec2684cbf27f070fe04747260bf25f3636ce06bf16c0747b6fe582f56
6
+ metadata.gz: 4b39d25336b04cee50b41df36552c5b911999e1a1db796a47c39fa9b65ebc467ff8b62daf343d873f3b4db5f22c77780c35cdd16d543b8aa5b99c4bc397e1a8c
7
+ data.tar.gz: ad8187b28f881fb4013bccd56b6eda7cf49ecfc553028cb6c75b8bb0552bc434a83c3e0c4b0ba83f13d90d82f3affadd38a93f7cd28aa3641266dfcb639cee9f
@@ -1,6 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class UffizziCore::DockerRegistryClient
4
+ ACCEPTED_TYPES = [
5
+ 'application/vnd.oci.image.index.v1+json',
6
+ 'application/vnd.oci.image.manifest.v1+json',
7
+ 'application/vnd.docker.distribution.manifest.v1+json',
8
+ 'application/vnd.docker.distribution.manifest.v2+json',
9
+ 'application/vnd.docker.distribution.manifest.list.v2+json',
10
+ '*/*',
11
+ ].freeze
12
+
4
13
  def initialize(registry_url:, username: nil, password: nil)
5
14
  @registry_url = registry_url
6
15
  @connection = build_connection(@registry_url, username, password)
@@ -24,6 +33,7 @@ class UffizziCore::DockerRegistryClient
24
33
 
25
34
  def build_connection(registry_url, username, password)
26
35
  connection = Faraday.new(registry_url) do |faraday|
36
+ faraday.headers['Accept'] = ACCEPTED_TYPES
27
37
  faraday.request(:basic_auth, username, password) if username.present? && password.present?
28
38
  faraday.request(:json)
29
39
  faraday.response(:json)
@@ -20,7 +20,7 @@ module UffizziCore::Concerns::Models::ComposeFile
20
20
  has_many :host_volume_files, dependent: :destroy
21
21
  has_many :deployments, dependent: :nullify
22
22
 
23
- enumerize :kind, in: [:main, :temporary], predicates: true, scope: :shallow, default: :main
23
+ enumerize :kind, in: UffizziCore.compose_file_kinds, predicates: true, scope: :shallow, default: :main
24
24
 
25
25
  validates :source, presence: true
26
26
  validate :main_compose_file_uniqueness, on: :create, if: -> { kind.main? }
@@ -27,7 +27,7 @@ module UffizziCore::Concerns::Models::Deployment
27
27
 
28
28
  validates :kind, presence: true
29
29
 
30
- enumerize :creation_source, in: [:manual, :continuous_preview, :compose_file_manual, :compose_file_continuous_preview],
30
+ enumerize :creation_source, in: [:manual, :demo, :continuous_preview, :compose_file_manual, :compose_file_continuous_preview],
31
31
  predicates: true, scope: true, default: :manual
32
32
 
33
33
  accepts_nested_attributes_for :containers, allow_destroy: true
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module UffizziCore
4
- VERSION = '2.0.22'
4
+ VERSION = '2.0.25'
5
5
  end
data/lib/uffizzi_core.rb CHANGED
@@ -64,4 +64,5 @@ module UffizziCore
64
64
  mattr_accessor :user_creation_sources, default: [:system, :online_registration, :google, :sso]
65
65
  mattr_accessor :user_project_roles, default: [:admin, :developer, :viewer]
66
66
  mattr_accessor :account_sources, default: [:manual]
67
+ mattr_accessor :compose_file_kinds, default: [:main, :temporary]
67
68
  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.22
4
+ version: 2.0.25
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-16 00:00:00.000000000 Z
12
+ date: 2023-01-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aasm