Sha256: f028f15e9ec8013a521f13abcd1ecf3140781a2cecd7be923b49298312c70b89

Contents?: true

Size: 869 Bytes

Versions: 32

Compression:

Stored size: 869 Bytes

Contents


require 'cocoapods-tdf-bin/native/sources_manager.rb'

module CBin
  module SourcesHelper
    def sources_manager
      Pod::Config.instance.sources_manager
    end

    def binary_source
      sources_manager.binary_source
    end

    def code_source
      sources_manager.code_source
    end

    # 优先采用对应依赖的 source
    # cocoapods 内部会先匹配前面符合的 specification
    # 只允许二进制的 specification subspec 比源码的 specification subspec 多
    #
    def valid_sources(code_dependencies = false)
      sources = [code_source]
      unless code_dependencies
        sources << binary_source
        sources.reverse!
      end
      sources
    end

    def sources_option(code_dependencies, additional_sources)
      (valid_sources(code_dependencies).map(&:url) + Array(additional_sources)).join(',')
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
cocoapods-tdf-bin-0.0.43 lib/cocoapods-tdf-bin/helpers/sources_helper.rb
cocoapods-tdf-bin-0.0.42 lib/cocoapods-tdf-bin/helpers/sources_helper.rb
cocoapods-tdf-bin-0.0.41 lib/cocoapods-tdf-bin/helpers/sources_helper.rb
cocoapods-tdf-bin-0.0.40 lib/cocoapods-tdf-bin/helpers/sources_helper.rb
cocoapods-tdf-bin-0.0.39 lib/cocoapods-tdf-bin/helpers/sources_helper.rb
cocoapods-tdf-bin-0.0.37 lib/cocoapods-tdf-bin/helpers/sources_helper.rb
cocoapods-tdf-bin-0.0.36 lib/cocoapods-tdf-bin/helpers/sources_helper.rb
cocoapods-tdf-bin-0.0.35 lib/cocoapods-tdf-bin/helpers/sources_helper.rb
cocoapods-tdf-bin-0.0.34 lib/cocoapods-tdf-bin/helpers/sources_helper.rb
cocoapods-tdf-bin-0.0.33 lib/cocoapods-tdf-bin/helpers/sources_helper.rb
cocoapods-tdf-bin-0.0.32 lib/cocoapods-tdf-bin/helpers/sources_helper.rb
cocoapods-tdf-bin-0.0.31 lib/cocoapods-tdf-bin/helpers/sources_helper.rb
cocoapods-tdf-bin-0.0.30 lib/cocoapods-tdf-bin/helpers/sources_helper.rb
cocoapods-tdf-bin-0.0.29 lib/cocoapods-tdf-bin/helpers/sources_helper.rb
cocoapods-tdf-bin-0.0.28 lib/cocoapods-tdf-bin/helpers/sources_helper.rb
cocoapods-tdf-bin-0.0.26 lib/cocoapods-tdf-bin/helpers/sources_helper.rb
cocoapods-tdf-bin-0.0.25 lib/cocoapods-tdf-bin/helpers/sources_helper.rb
cocoapods-tdf-bin-0.0.24 lib/cocoapods-tdf-bin/helpers/sources_helper.rb
cocoapods-tdf-bin-0.0.23 lib/cocoapods-tdf-bin/helpers/sources_helper.rb
cocoapods-tdf-bin-0.0.22 lib/cocoapods-tdf-bin/helpers/sources_helper.rb