Commit 4a36c773 authored by Markus Koller's avatar Markus Koller

Merge branch 'issue_324629_stream' into 'master'

Fix Gitlab/DelegatePredicateMethods offenses

See merge request gitlab-org/gitlab!76010
parents e1464d93 2a2bc7c5
...@@ -5,4 +5,3 @@ Gitlab/DelegatePredicateMethods: ...@@ -5,4 +5,3 @@ Gitlab/DelegatePredicateMethods:
- app/models/concerns/integrations/base_data_fields.rb - app/models/concerns/integrations/base_data_fields.rb
- app/models/project.rb - app/models/project.rb
- ee/app/models/concerns/ee/ci/metadatable.rb - ee/app/models/concerns/ee/ci/metadatable.rb
- lib/gitlab/ci/trace/stream.rb
...@@ -11,10 +11,6 @@ module Gitlab ...@@ -11,10 +11,6 @@ module Gitlab
delegate :close, :tell, :seek, :size, :url, :truncate, to: :stream, allow_nil: true delegate :close, :tell, :seek, :size, :url, :truncate, to: :stream, allow_nil: true
delegate :valid?, to: :stream, allow_nil: true
alias_method :present?, :valid?
def initialize(metrics = Trace::Metrics.new) def initialize(metrics = Trace::Metrics.new)
@stream = yield @stream = yield
@stream&.binmode @stream&.binmode
...@@ -24,6 +20,7 @@ module Gitlab ...@@ -24,6 +20,7 @@ module Gitlab
def valid? def valid?
self.stream.present? self.stream.present?
end end
alias_method :present?, :valid?
def file? def file?
self.path.present? self.path.present?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment