Class: XcodeArchiveCache::BuildSettings::Loader
- Inherits:
-
Object
- Object
- XcodeArchiveCache::BuildSettings::Loader
- Defined in:
- lib/build_settings/loader.rb
Instance Method Summary collapse
-
#get_settings(project_path, target_name) ⇒ Hash{String => String}
Build settings for target or nil.
-
#initialize(executor) ⇒ Loader
constructor
A new instance of Loader.
- #load_settings(project_paths) ⇒ Object
Constructor Details
Instance Method Details
#get_settings(project_path, target_name) ⇒ Hash{String => String}
Returns build settings for target or nil.
82 83 84 85 86 87 |
# File 'lib/build_settings/loader.rb', line 82 def get_settings(project_path, target_name) project_settings = get_project_settings(project_path) return nil unless project_settings project_settings[target_name] end |
#load_settings(project_paths) ⇒ Object
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/build_settings/loader.rb', line 58 def load_settings(project_paths) paths_without_settings = project_paths.select {|path| get_project_settings(path) == nil} threads = paths_without_settings.map do |path| Thread.new(path) do |project_path| Thread.current.abort_on_exception = true [project_path, executor.load_build_settings(project_path)] end end should_fix_settings = executor.set_up_for_simulator? threads.each do |thread| project_path, all_targets_settings = thread.value per_target_settings = extractor.extract_per_target(all_targets_settings, should_fix_settings) set_project_settings(project_path, per_target_settings) end end |