Class: CiToolkit::GithubSpecificFilesChangesDetector

Inherits:
Object
  • Object
show all
Defined in:
lib/ci_toolkit/github_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



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

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

#realm_module_modified(files) ⇒ Object



130
131
132
133
# File 'lib/ci_toolkit/github_pr.rb', line 130

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