cocoapods-binary-cache 0.1.7 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cocoapods-binary-cache/cache/validation_result.rb +4 -0
  3. data/lib/cocoapods-binary-cache/dependencies_graph/dependencies_graph.rb +20 -25
  4. data/lib/cocoapods-binary-cache/dependencies_graph/graph_visualizer.rb +29 -38
  5. data/lib/cocoapods-binary-cache/diagnosis/diagnosis.rb +9 -1
  6. data/lib/cocoapods-binary-cache/diagnosis/integration.rb +3 -1
  7. data/lib/cocoapods-binary-cache/helper/podspec.rb +4 -2
  8. data/lib/cocoapods-binary-cache/hooks/post_install.rb +2 -12
  9. data/lib/cocoapods-binary-cache/hooks/pre_install.rb +19 -36
  10. data/lib/cocoapods-binary-cache/main.rb +0 -1
  11. data/lib/cocoapods-binary-cache/pod-binary/helper/build.rb +27 -29
  12. data/lib/cocoapods-binary-cache/pod-binary/helper/detected_prebuilt_pods/installer.rb +1 -1
  13. data/lib/cocoapods-binary-cache/pod-binary/helper/prebuild_sandbox.rb +14 -13
  14. data/lib/cocoapods-binary-cache/pod-binary/helper/target_checker.rb +7 -10
  15. data/lib/cocoapods-binary-cache/pod-binary/integration.rb +1 -2
  16. data/lib/cocoapods-binary-cache/pod-binary/integration/alter_specs.rb +32 -15
  17. data/lib/cocoapods-binary-cache/pod-binary/integration/patch/embed_framework_script.rb +1 -1
  18. data/lib/cocoapods-binary-cache/pod-binary/integration/patch/resolve_dependencies.rb +0 -3
  19. data/lib/cocoapods-binary-cache/pod-binary/integration/patch/sandbox_analyzer_state.rb +29 -0
  20. data/lib/cocoapods-binary-cache/pod-binary/integration/patch/source_installation.rb +25 -11
  21. data/lib/cocoapods-binary-cache/pod-binary/integration/source_installer.rb +30 -19
  22. data/lib/cocoapods-binary-cache/pod-binary/prebuild.rb +30 -108
  23. data/lib/cocoapods-binary-cache/pod-binary/prebuild_dsl.rb +0 -2
  24. data/lib/cocoapods-binary-cache/pod-binary/prebuild_hook.rb +0 -1
  25. data/lib/cocoapods-binary-cache/pod-rome/xcodebuild_command.rb +222 -146
  26. data/lib/cocoapods-binary-cache/pod-rome/xcodebuild_raw.rb +45 -32
  27. data/lib/cocoapods-binary-cache/prebuild_output/output.rb +6 -4
  28. data/lib/cocoapods-binary-cache/state_store.rb +16 -6
  29. data/lib/command/config.rb +42 -4
  30. data/lib/command/executor/base.rb +18 -1
  31. data/lib/command/executor/fetcher.rb +21 -3
  32. data/lib/command/executor/prebuilder.rb +9 -7
  33. data/lib/command/executor/pusher.rb +20 -4
  34. data/lib/command/executor/visualizer.rb +3 -2
  35. data/lib/command/prebuild.rb +6 -0
  36. metadata +17 -7
  37. data/lib/cocoapods-binary-cache/pod-binary/helper/feature_switches.rb +0 -52
  38. data/lib/cocoapods-binary-cache/pod-binary/helper/passer.rb +0 -25
  39. data/lib/cocoapods-binary-cache/pod-binary/integration/remove_target_files.rb +0 -29
  40. data/lib/cocoapods-binary-cache/pod-binary/tool/tool.rb +0 -12
  41. data/lib/cocoapods-binary-cache/scheme_editor.rb +0 -35
@@ -1,25 +0,0 @@
1
- require_relative "../tool/tool"
2
-
3
- module Pod
4
- class Prebuild
5
- # Pass the data between the 2 steps
6
- #
7
- # At step 2, the normal pod install, it needs some info of the
8
- # prebuilt step. So we store it here.
9
- #
10
- class Passer
11
- # indicate the add/remove/update of prebuit pods
12
- # @return [Analyzer::SpecsState]
13
- #
14
- class_attr_accessor :prebuild_pods_changes
15
-
16
- # Some pod won't be build in prebuild stage even if it have `binary=>true`.
17
- # The targets of this pods have `oshould_build? == true`.
18
- # We should skip integration (patch spec) for this pods
19
- #
20
- # @return [Array<String>]
21
- class_attr_accessor :target_names_to_skip_integration_framework
22
- self.target_names_to_skip_integration_framework = []
23
- end
24
- end
25
- end
@@ -1,29 +0,0 @@
1
- module Pod
2
- class Installer
3
- # Remove the old target files if prebuild frameworks changed
4
- def remove_target_files_if_needed
5
- changes = Pod::Prebuild::Passer.prebuild_pods_changes
6
- updated_names = []
7
- if changes.nil?
8
- updated_names = PrebuildSandbox.from_standard_sandbox(sandbox).exsited_framework_pod_names
9
- else
10
- added = changes.added
11
- changed = changes.changed
12
- deleted = changes.deleted
13
- updated_names = added + changed + deleted
14
- end
15
-
16
- updated_names.each do |name|
17
- root_name = Specification.root_name(name)
18
- next if sandbox.local?(root_name)
19
-
20
- UI.message "Delete cached files: #{root_name}"
21
- target_path = sandbox.pod_dir(root_name)
22
- target_path.rmtree if target_path.exist?
23
-
24
- support_path = sandbox.target_support_files_dir(root_name)
25
- support_path.rmtree if support_path.exist?
26
- end
27
- end
28
- end
29
- end
@@ -1,12 +0,0 @@
1
- # attr_accessor for class variable.
2
- # usage:
3
- #
4
- # ```
5
- # class Pod
6
- # class_attr_accessor :is_prebuild_stage
7
- # end
8
- # ```
9
- #
10
- def class_attr_accessor(symbol)
11
- self.class.send(:attr_accessor, symbol)
12
- end
@@ -1,35 +0,0 @@
1
- # Copyright 2019 Grabtaxi Holdings PTE LTE (GRAB), All rights reserved.
2
- # Use of this source code is governed by an MIT-style license that can be found in the LICENSE file
3
-
4
- require 'rexml/document'
5
-
6
- class SchemeEditor
7
- def self.edit_to_support_code_coverage(sandbox)
8
- pod_proj_path = sandbox.project_path
9
- puts "Modify schemes of pod project to support code coverage of prebuilt local pod: #{pod_proj_path}"
10
- scheme_files = Dir["#{pod_proj_path}/**/*.xcscheme"]
11
- scheme_files.each do |file_path|
12
- scheme_name = File.basename(file_path, '.*')
13
- next unless sandbox.local?(scheme_name)
14
-
15
- Pod::UI.message "Modify scheme to enable coverage symbol when prebuild: #{scheme_name}"
16
-
17
- doc = File.open(file_path, 'r') { |f| REXML::Document.new(f) }
18
- scheme = doc.elements['Scheme']
19
- test_action = scheme.elements['TestAction']
20
- next if test_action.attributes['codeCoverageEnabled'] == 'YES'
21
-
22
- test_action.add_attribute('codeCoverageEnabled', 'YES')
23
- test_action.add_attribute('onlyGenerateCoverageForSpecifiedTargets', 'YES')
24
- coverage_targets = REXML::Element.new('CodeCoverageTargets')
25
- buildable_ref = scheme.elements['BuildAction'] \
26
- .elements['BuildActionEntries'] \
27
- .elements['BuildActionEntry'] \
28
- .elements['BuildableReference']
29
- new_buildable_ref = buildable_ref.clone # Need to clone, otherwise the original one will be move to new place
30
- coverage_targets.add_element(new_buildable_ref)
31
- test_action.add_element(coverage_targets)
32
- File.open(file_path, 'w') { |f| doc.write(f) }
33
- end
34
- end
35
- end