cocoapods-binary-cache 0.1.1 → 0.1.7

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 (48) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cocoapods-binary-cache.rb +0 -2
  3. data/lib/cocoapods-binary-cache/cache/validator.rb +2 -3
  4. data/lib/cocoapods-binary-cache/cache/validator_base.rb +28 -8
  5. data/lib/cocoapods-binary-cache/cache/validator_dependencies_graph.rb +7 -2
  6. data/lib/cocoapods-binary-cache/cache/validator_dev_pods.rb +21 -13
  7. data/lib/cocoapods-binary-cache/cache/validator_non_dev_pods.rb +1 -1
  8. data/lib/cocoapods-binary-cache/diagnosis/base.rb +13 -0
  9. data/lib/cocoapods-binary-cache/diagnosis/diagnosis.rb +16 -0
  10. data/lib/cocoapods-binary-cache/diagnosis/integration.rb +21 -0
  11. data/lib/cocoapods-binary-cache/env.rb +32 -0
  12. data/lib/cocoapods-binary-cache/helper/checksum.rb +10 -4
  13. data/lib/cocoapods-binary-cache/helper/lockfile.rb +26 -3
  14. data/lib/cocoapods-binary-cache/helper/podspec.rb +1 -0
  15. data/lib/cocoapods-binary-cache/hooks/post_install.rb +19 -2
  16. data/lib/cocoapods-binary-cache/hooks/pre_install.rb +11 -14
  17. data/lib/cocoapods-binary-cache/main.rb +2 -1
  18. data/lib/cocoapods-binary-cache/pod-binary/helper/build.rb +39 -0
  19. data/lib/cocoapods-binary-cache/pod-binary/helper/detected_prebuilt_pods/installer.rb +1 -1
  20. data/lib/cocoapods-binary-cache/pod-binary/helper/detected_prebuilt_pods/target_definition.rb +3 -10
  21. data/lib/cocoapods-binary-cache/pod-binary/helper/feature_switches.rb +0 -38
  22. data/lib/cocoapods-binary-cache/pod-binary/helper/names.rb +2 -11
  23. data/lib/cocoapods-binary-cache/pod-binary/helper/prebuild_sandbox.rb +1 -2
  24. data/lib/cocoapods-binary-cache/pod-binary/integration.rb +0 -1
  25. data/lib/cocoapods-binary-cache/pod-binary/integration/alter_specs.rb +4 -1
  26. data/lib/cocoapods-binary-cache/pod-binary/integration/patch/source_installation.rb +5 -2
  27. data/lib/cocoapods-binary-cache/pod-binary/integration/remove_target_files.rb +2 -2
  28. data/lib/cocoapods-binary-cache/pod-binary/integration/source_installer.rb +42 -50
  29. data/lib/cocoapods-binary-cache/pod-binary/prebuild.rb +59 -47
  30. data/lib/cocoapods-binary-cache/pod-binary/prebuild_dsl.rb +2 -59
  31. data/lib/cocoapods-binary-cache/pod-rome/xcodebuild_command.rb +176 -0
  32. data/lib/cocoapods-binary-cache/pod-rome/xcodebuild_raw.rb +43 -0
  33. data/lib/cocoapods-binary-cache/prebuild_output/metadata.rb +16 -0
  34. data/lib/cocoapods-binary-cache/prebuild_output/output.rb +8 -37
  35. data/lib/cocoapods-binary-cache/scheme_editor.rb +1 -1
  36. data/lib/command/binary.rb +21 -2
  37. data/lib/command/config.rb +150 -9
  38. data/lib/command/executor/fetcher.rb +10 -5
  39. data/lib/command/executor/prebuilder.rb +2 -1
  40. data/lib/command/executor/pusher.rb +1 -1
  41. data/lib/command/fetch.rb +0 -1
  42. data/lib/command/helper/zip.rb +1 -1
  43. data/lib/command/prebuild.rb +14 -2
  44. data/lib/command/push.rb +22 -0
  45. metadata +19 -14
  46. data/lib/cocoapods-binary-cache/gem_version.rb +0 -6
  47. data/lib/cocoapods-binary-cache/pod-rome/build_framework.rb +0 -247
  48. data/lib/cocoapods-binary-cache/prebuild_cache.rb +0 -49
@@ -1,49 +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 'json'
5
- require 'cocoapods'
6
- require_relative "helper/checksum"
7
-
8
- class PodCacheValidator
9
-
10
- # Cache miss/hit checking for development pods
11
- # Return 2 Hashes for cache miss and cache hit libraries
12
- def self.verify_devpod_checksum(sandbox_root, generated_framework_path, lock_file)
13
- devpod_path = "#{sandbox_root}/devpod/"
14
- target_path = generated_framework_path
15
- Pod::UI.puts "verify_devpod_checksum: #{devpod_path}"
16
- external_sources = lock_file.to_hash["EXTERNAL SOURCES"]
17
- unless File.directory?(target_path)
18
- FileUtils.mkdir_p(target_path)
19
- end
20
- missing_pods_dic = Hash[]
21
- dev_pods_count = 0
22
- cachehit_pods_dic = Hash[]
23
- if !external_sources
24
- Pod::UI.puts 'No development pods!'
25
- return missing_pods_dic, cachehit_pods
26
- end
27
- external_sources.each do |name, attribs|
28
- if attribs.class == Hash
29
- path = attribs[:path]
30
- if path
31
- hash = FolderChecksum.checksum(path)
32
- dev_pods_count += 1
33
- cached_path = "#{devpod_path}#{name}_#{hash}"
34
- if !Dir.exists?(cached_path)
35
- missing_pods_dic[name] = hash
36
- else
37
- cachehit_pods_dic[name] = hash
38
- target_dir = "#{target_path}/#{name}"
39
- FileUtils.rm_r(target_dir, :force => true)
40
- FileUtils.cp_r(cached_path, target_dir)
41
- end
42
- end
43
- else
44
- Pod::UI.puts "Error, wrong type: #{attribs}"
45
- end
46
- end
47
- return missing_pods_dic, cachehit_pods_dic
48
- end
49
- end