Class: DebugFile::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/fastlane/plugin/debug_file/runner.rb

Constant Summary collapse

ARCHIVE_PATH =
File.expand_path('~/Library/Developer/Xcode/Archives')

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Runner

Returns a new instance of Runner.



7
8
9
# File 'lib/fastlane/plugin/debug_file/runner.rb', line 7

def initialize(options = {})
  @options = options
end

Instance Attribute Details

#optionsObject

Returns the value of attribute options.



5
6
7
# File 'lib/fastlane/plugin/debug_file/runner.rb', line 5

def options
  @options
end

Instance Method Details

#latest_dsym(filter: :date) ⇒ Object



11
12
13
14
15
16
17
18
19
# File 'lib/fastlane/plugin/debug_file/runner.rb', line 11

def latest_dsym(filter: :date)
  dsyms = list_dsym
  case filter
  when :version
    dsyms.max_by {|v| Gem::Version.new(v[:release_version])}
  else
    dsyms.max_by {|v| v[:created_at]}
  end
end

#list_dsymObject



21
22
23
24
# File 'lib/fastlane/plugin/debug_file/runner.rb', line 21

def list_dsym
  archive_path = File.expand_path(options.fetch(:archive_path, ARCHIVE_PATH))
  search_dsym(archive_path, options[:scheme])
end