Sha256: d9edce47adf712cdd46260c9bdbd1ffb5240b66bf8db74645952c5bea0bb7fab
Contents?: true
Size: 1.4 KB
Versions: 17
Compression:
Stored size: 1.4 KB
Contents
module Pod module DirUtil def create_target_directory_path_by_spec spec,force target_dir = "#{Dir.pwd}/#{spec.name}-#{spec.version}" if File.exist? target_dir if @force Pathname.new(target_dir).rmtree else UI.warn "Target directory '#{target_dir}' already exists." end end target_dir end def create_working_directory_by_spec spec,force if spec.is_a? String return create_working_directory_by_name spec,force end target_dir = create_target_directory_path_by_spec spec,force # Pathname.new(target_dir).mkdir work_dir = Dir.tmpdir + '/frameworks-' + Array.new(8) { rand(36).to_s(36) }.join Pathname.new(work_dir).mkdir [target_dir, work_dir] end def create_target_directory_path_by_name name, force target_dir = "#{Dir.pwd}/#{name}-muti" if File.exist? target_dir if @force Pathname.new(target_dir).rmtree else UI.warn "Target directory '#{target_dir}' already exists." end end target_dir end def create_working_directory_by_name name, force target_dir = create_target_directory_path_by_name name,force # Pathname.new(target_dir).mkdir work_dir = Dir.tmpdir + '/frameworks-' + Array.new(8) { rand(36).to_s(36) }.join Pathname.new(work_dir).mkdir [target_dir, work_dir] end end end
Version data entries
17 entries across 17 versions & 3 rubygems