Skip to content

Commit

Permalink
Kubernetes plugin uses kwargs for Ruby 3 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
orien committed Feb 11, 2024
1 parent 81e0e26 commit e359899
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugins/kubernetes/app/models/kubernetes/resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,8 @@ class Pod < Immutable
end

class PodDisruptionBudget < VersionedUpdate
def initialize(*)
super
def initialize(...)
super(...)
@delete_resource ||= @template[:delete] # allow deletion through release_doc logic
end
end
Expand All @@ -427,9 +427,9 @@ def template_for_update
end
end

def self.build(*args)
def self.build(*args, **kwargs)
klass = "Kubernetes::Resource::#{args.first.fetch(:kind)}".safe_constantize || VersionedUpdate
klass.new(*args)
klass.new(*args, **kwargs)
end
end
end

0 comments on commit e359899

Please sign in to comment.