Sha256: bfab0c1bf9f4760701f2c5a756b0798ace3a5e855804473572ef1f97e9bafad4

Contents?: true

Size: 1.33 KB

Versions: 11

Compression:

Stored size: 1.33 KB

Contents


# copy from https://github.com/CocoaPods/cocoapods-packager
require 'cocoapods-imy-bin/config/config_builder'

module CBin
  class LocalLibrary
    attr_reader :headers_path
    attr_reader :resources_path
    attr_reader :root_path
    attr_reader :versions_path
    attr_reader :name_path

    def initialize(name, platform, version)
      @name = name
      @platform = platform
      @version = version
    end

    def make
      make_root
      make_library
      make_headers
      make_resources
    end

    def delete_resources
      Pathname.new(@resources_path).rmtree
      (Pathname.new(@fwk_path) + Pathname.new('Resources')).delete
    end

    private

    def make_library
      @name_path = CBin::Config::Builder.instance.library_name_version(@name, @version)
      @fwk_path = @root_path + Pathname.new(@name_path)
      @fwk_path.mkdir unless @fwk_path.exist?

      @versions_path = @fwk_path
    end

    def make_headers
      @headers_path = @versions_path + Pathname.new('Headers')
      # @headers_path.mkpath unless @headers_path.exist?
    end

    def make_resources
      @resources_path = @versions_path + Pathname.new('Resources')
      # @resources_path.mkpath unless @resources_path.exist?
    end

    def make_root
      @root_path = Pathname.new(@platform)
      @root_path.mkpath unless @root_path.exist?
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
cocoapods-imy-bin-0.3.1.21 lib/cocoapods-imy-bin/helpers/local/loca_llibrary.rb
cocoapods-imy-bin-0.3.0.11 lib/cocoapods-imy-bin/helpers/local/loca_llibrary.rb
cocoapods-imy-bin-0.2.9.1 lib/cocoapods-imy-bin/helpers/local/loca_llibrary.rb
cocoapods-imy-bin-0.2.9 lib/cocoapods-imy-bin/helpers/local/loca_llibrary.rb
cocoapods-imy-bin-0.2.8 lib/cocoapods-imy-bin/helpers/local/loca_llibrary.rb
cocoapods-imy-bin-0.2.7 lib/cocoapods-imy-bin/helpers/local/loca_llibrary.rb
cocoapods-imy-bin-0.2.6 lib/cocoapods-imy-bin/helpers/local/loca_llibrary.rb
cocoapods-imy-bin-0.2.5 lib/cocoapods-imy-bin/helpers/local/loca_llibrary.rb
cocoapods-imy-bin-0.2.3 lib/cocoapods-imy-bin/helpers/local/loca_llibrary.rb
cocoapods-imy-bin-0.2.2 lib/cocoapods-imy-bin/helpers/local/loca_llibrary.rb
cocoapods-imy-bin-0.2.1 lib/cocoapods-imy-bin/helpers/local/loca_llibrary.rb