@@ -12,7 +12,7 @@ class PodCacheValidator
1212 def self . verify_devpod_checksum ( sandbox , lock_file )
1313 devpod_path = "#{ sandbox . root } /devpod/"
1414 target_path = sandbox . generate_framework_path
15- puts "verify_devpod_checksum: #{ devpod_path } "
15+ Pod :: UI . puts "verify_devpod_checksum: #{ devpod_path } "
1616 external_sources = lock_file . to_hash [ "EXTERNAL SOURCES" ]
1717 unless File . directory? ( target_path )
1818 FileUtils . mkdir_p ( target_path )
@@ -21,7 +21,7 @@ def self.verify_devpod_checksum(sandbox, lock_file)
2121 dev_pods_count = 0
2222 cachehit_pods_dic = Hash [ ]
2323 if !external_sources
24- puts 'No development pods!'
24+ Pod :: UI . puts 'No development pods!'
2525 return missing_pods_dic , cachehit_pods
2626 end
2727 external_sources . each do |name , attribs |
@@ -33,7 +33,7 @@ def self.verify_devpod_checksum(sandbox, lock_file)
3333 cached_path = "#{ devpod_path } #{ name } _#{ hash } "
3434 if !Dir . exists? ( cached_path )
3535 missing_pods_dic [ name ] = hash
36- puts "Missing devpod: #{ name } _#{ hash } "
36+ Pod :: UI . puts "Missing devpod: #{ name } _#{ hash } "
3737 else
3838 cachehit_pods_dic [ name ] = hash
3939 target_dir = "#{ target_path } /#{ name } "
@@ -42,10 +42,10 @@ def self.verify_devpod_checksum(sandbox, lock_file)
4242 end
4343 end
4444 else
45- puts "Error, wrong type: #{ attribs } "
45+ Pod :: UI . puts "Error, wrong type: #{ attribs } "
4646 end
4747 end
48- puts "Local pod cache miss: #{ missing_pods_dic . keys . count } / #{ dev_pods_count } "
48+ Pod :: UI . puts "Local pod cache miss: #{ missing_pods_dic . keys . count } / #{ dev_pods_count } "
4949 return missing_pods_dic , cachehit_pods_dic
5050 end
5151
@@ -55,24 +55,24 @@ def self.verify_prebuilt_vendor_pods(pod_lockfile, pod_bin_lockfile)
5555 outdated_libs = Set . new ( )
5656 cachehit_libs = Set . new ( )
5757 if not pod_lockfile
58- puts 'No pod lock file.'
58+ Pod :: UI . puts 'No pod lock file.'
5959 return outdated_libs , cachehit_libs
6060 end
6161 pod_lock_libs = get_libs_dic ( pod_lockfile )
6262 if not pod_bin_lockfile
63- puts 'No pod binary lock file.'
63+ Pod :: UI . puts 'No pod binary lock file.'
6464 return get_vendor_pods ( pod_lockfile ) , cachehit_libs
6565 end
6666 pod_bin_libs = get_libs_dic ( pod_bin_lockfile )
6767
68- dev_pods = get_dev_pods ( pod_lockfile )
68+ dev_pods = get_dev_pods ( pod_lockfile ) # TODO (thuyen): Review: Why dev_pods inside vendor_pods?
6969 pod_bin_libs . each do |name , prebuilt_ver |
7070 next if dev_pods . include? ( name )
7171 lock_ver = pod_lock_libs [ name ]
7272 if lock_ver
7373 if lock_ver != prebuilt_ver
7474 outdated_libs . add ( name )
75- puts ( "Warning: prebuilt lib was outdated: #{ name } #{ prebuilt_ver } vs #{ lock_ver } " . yellow )
75+ Pod :: UI . puts "Warning: prebuilt lib was outdated: #{ name } #{ prebuilt_ver } vs #{ lock_ver } " . yellow
7676 next
7777 end
7878 cachehit_libs . add ( name )
@@ -85,7 +85,7 @@ def self.verify_prebuilt_vendor_pods(pod_lockfile, pod_bin_lockfile)
8585
8686 def self . get_dev_pods ( lockfile )
8787 dev_pods = Set [ ]
88- external_sources = lockfile . to_hash [ " EXTERNAL SOURCES" ]
88+ external_sources = lockfile . to_hash [ ' EXTERNAL SOURCES' ] || [ ]
8989 external_sources . each do |name , attribs |
9090 if attribs . class == Hash
9191 path = attribs [ :path ]
@@ -99,7 +99,7 @@ def self.get_dev_pods(lockfile)
9999
100100 def self . get_vendor_pods ( lockfile )
101101 libs_dic = get_libs_dic ( lockfile )
102- dev_pods = get_dev_pods ( lockfile )
102+ dev_pods = get_dev_pods ( lockfile ) # TODO (thuyen): Review: Why dev_pods inside vendor_pods?
103103 vendor_libs = Set . new ( )
104104 libs_dic . each do |name , _ |
105105 next if dev_pods . include? ( name )
@@ -118,7 +118,7 @@ def self.get_libs_dic(lockfile)
118118 pods = lockfile . to_hash [ "PODS" ]
119119 libs_hash = { }
120120 if !pods
121- puts " No pod libs"
121+ Pod :: UI . puts ' No pod libs'
122122 return libs_hash
123123 end
124124 pods . each do |item |
0 commit comments