Commit c8c89964 authored by Samuel E. Giddins's avatar Samuel E. Giddins

[IntegrationSpecs] Update for using a home-grown dir tree implementation

parent 64a9fe07
Subproject commit 3cdede7125bf8d46475a3940017fc16d5bf45bb2 Subproject commit 964bcae651605ad37cc20897e1ad1a6e84e86a2b
...@@ -48,6 +48,7 @@ require 'pretty_bacon' ...@@ -48,6 +48,7 @@ require 'pretty_bacon'
require 'colored' require 'colored'
require 'clintegracon' require 'clintegracon'
require 'fileutils' require 'fileutils'
require 'integration/file_tree'
require 'integration/xcodeproj_project_yaml' require 'integration/xcodeproj_project_yaml'
require 'tmpdir' require 'tmpdir'
...@@ -71,7 +72,7 @@ CLIntegracon.configure do |c| ...@@ -71,7 +72,7 @@ CLIntegracon.configure do |c|
end end
c.transform_produced '**/*.framework' do |path| c.transform_produced '**/*.framework' do |path|
tree = `tree '#{path}'` tree = FileTree.to_tree(path)
FileUtils.rm_rf path FileUtils.rm_rf path
File.open(path, 'w') { |f| f << tree } File.open(path, 'w') { |f| f << tree }
end end
...@@ -122,6 +123,7 @@ describe_cli 'pod' do ...@@ -122,6 +123,7 @@ describe_cli 'pod' do
s.replace_path ROOT.to_s, 'ROOT' s.replace_path ROOT.to_s, 'ROOT'
s.replace_path `which git`.chomp, 'GIT_BIN' s.replace_path `which git`.chomp, 'GIT_BIN'
s.replace_path `which hg`.chomp, 'HG_BIN' if has_mercurial s.replace_path `which hg`.chomp, 'HG_BIN' if has_mercurial
s.replace_path `which bash`.chomp, 'BASH_BIN'
s.replace_user_path 'Library/Caches/CocoaPods', 'CACHES_DIR' s.replace_user_path 'Library/Caches/CocoaPods', 'CACHES_DIR'
s.replace_pattern /#{Dir.tmpdir}\/[\w-]+/i, 'TMPDIR' s.replace_pattern /#{Dir.tmpdir}\/[\w-]+/i, 'TMPDIR'
s.replace_pattern /\d{4}-\d\d-\d\d \d\d:\d\d:\d\d [-+]\d{4}/, '<#DATE#>' s.replace_pattern /\d{4}-\d\d-\d\d \d\d:\d\d:\d\d [-+]\d{4}/, '<#DATE#>'
......
require 'pathname'
module FileTree
def to_tree(path, depth = 0)
path = Pathname(path)
indentation = ' ' * depth * 2
tree = indentation << path.to_path << "\n"
path.children.each do |child|
tree << to_tree(child, depth + 1)
end if path.directory?
tree
end
module_function :to_tree
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment