class CBin::Framework
Attributes
fwk_path[R]
headers_path[R]
module_map_path[R]
resources_path[R]
root_path[R]
swift_module_path[R]
versions_path[R]
Public Class Methods
new(name, platform)
click to toggle source
# File lib/cocoapods-tdf-bin/helpers/framework.rb, line 13 def initialize(name, platform) @name = name @platform = platform end
Public Instance Methods
delete_resources()
click to toggle source
# File lib/cocoapods-tdf-bin/helpers/framework.rb, line 26 def delete_resources Pathname.new(@resources_path).rmtree if File.exist? (@resources_path) (Pathname.new(@fwk_path) + Pathname.new('Resources')).delete if File.exist?(Pathname.new(@fwk_path) + Pathname.new('Resources')) end
make()
click to toggle source
# File lib/cocoapods-tdf-bin/helpers/framework.rb, line 18 def make make_root make_framework make_headers make_resources make_current_version end
remove_current_version()
click to toggle source
# File lib/cocoapods-tdf-bin/helpers/framework.rb, line 31 def remove_current_version FileUtils.rm_f(File.join(@fwk_path,@name)) FileUtils.rm_f(File.join(@fwk_path,"Headers")) FileUtils.rm_f(File.join(@fwk_path,"Resources")) FileUtils.cp_r("#{@versions_path}/.", @fwk_path) # FileUtils.remove_dir(@versions_path) FileUtils.remove_dir("#{@fwk_path}/Versions") # current_version_path = @versions_path + Pathname.new('../Current') # `ln -sf A #{current_version_path}` # `ln -sf Versions/Current/Headers #{@fwk_path}/` # `ln -sf Versions/Current/Resources #{@fwk_path}/` # `ln -sf Versions/Current/#{@name} #{@fwk_path}/` end
Private Instance Methods
make_current_version()
click to toggle source
# File lib/cocoapods-tdf-bin/helpers/framework.rb, line 49 def make_current_version current_version_path = @versions_path + Pathname.new('../Current') `ln -sf A #{current_version_path}` `ln -sf Versions/Current/Headers #{@fwk_path}/` `ln -sf Versions/Current/Resources #{@fwk_path}/` `ln -sf Versions/Current/#{@name} #{@fwk_path}/` end
make_framework()
click to toggle source
# File lib/cocoapods-tdf-bin/helpers/framework.rb, line 59 def make_framework @fwk_path = @root_path + Pathname.new(@name + '.framework') @fwk_path.mkdir unless @fwk_path.exist? @module_map_path = @fwk_path + Pathname.new('Modules') @swift_module_path = @module_map_path + Pathname.new(@name + '.swiftmodule') @versions_path = @fwk_path + Pathname.new('Versions/A') end
make_headers()
click to toggle source
# File lib/cocoapods-tdf-bin/helpers/framework.rb, line 70 def make_headers @headers_path = @versions_path + Pathname.new('Headers') @headers_path.mkpath unless @headers_path.exist? end
make_resources()
click to toggle source
# File lib/cocoapods-tdf-bin/helpers/framework.rb, line 75 def make_resources @resources_path = @versions_path + Pathname.new('Resources') @resources_path.mkpath unless @resources_path.exist? end
make_root()
click to toggle source
# File lib/cocoapods-tdf-bin/helpers/framework.rb, line 80 def make_root @root_path = Pathname.new(@platform) @root_path.mkpath unless @root_path.exist? end