Class: CiToolkit::GitlabSpecificFilesChangesDetector

Inherits:
Object
  • Object
show all
Defined in:
lib/ci_toolkit/gitlab_pr.rb

Overview

util class to verify modifications in app files that may have been broken in the past

Instance Method Summary collapse

Instance Method Details

#certificate_pinning_logic_modified(files) ⇒ Object



136
137
138
139
140
141
142
143
# File 'lib/ci_toolkit/gitlab_pr.rb', line 136

def certificate_pinning_logic_modified(files)
  modified_files = files.select do |file|
    contains_substring(file&.old_path,
                       %w[HttpClientFactory SecurePreferences CertificatePinningConfiguration SSLPinner
                          CertificateDateChecker])
  end
  modified_files.length.positive?
end

#realm_module_modified(files) ⇒ Object



131
132
133
134
# File 'lib/ci_toolkit/gitlab_pr.rb', line 131

def realm_module_modified(files)
  modified_files = files.select { |file| file&.old_path&.start_with? "cache/" }
  modified_files.length.positive?
end