Class: Scan::Manager

Inherits:
Object
  • Object
show all
Defined in:
scan/lib/scan/manager.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#plist_files_beforeObject

Returns the value of attribute plist_files_before


7
8
9
# File 'scan/lib/scan/manager.rb', line 7

def plist_files_before
  @plist_files_before
end

Instance Method Details

#test_summary_filenames(derived_data_path) ⇒ Object


26
27
28
29
30
31
32
33
34
35
36
# File 'scan/lib/scan/manager.rb', line 26

def test_summary_filenames(derived_data_path)
  files = []

  # Xcode < 10
  files += Dir["#{derived_data_path}/**/Logs/Test/*TestSummaries.plist"]

  # Xcode 10
  files += Dir["#{derived_data_path}/**/Logs/Test/*.xcresult/TestSummaries.plist"]

  return files
end

#work(options) ⇒ Object


9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'scan/lib/scan/manager.rb', line 9

def work(options)
  Scan.config = options # we set this here to auto-detect missing values, which we need later on
  unless options[:derived_data_path].to_s.empty?
    self.plist_files_before = test_summary_filenames(Scan.config[:derived_data_path])
  end

  # Also print out the path to the used Xcode installation
  # We go 2 folders up, to not show "Contents/Developer/"
  values = Scan.config.values(ask: false)
  values[:xcode_path] = File.expand_path("../..", FastlaneCore::Helper.xcode_path)
  FastlaneCore::PrintTable.print_values(config: values,
                                     hide_keys: [:destination, :slack_url],
                                         title: "Summary for scan #{Fastlane::VERSION}")

  return Runner.new.run
end