Sha256: ddd0fe97657f4e604c9e214a0185c2fae60a7d3857b557c403305d35e659573c

Contents?: true

Size: 905 Bytes

Versions: 21

Compression:

Stored size: 905 Bytes

Contents

require 'cocoapods-bb-PodAssistant/config/stable_source'
require 'cocoapods-bb-PodAssistant/helpers/pod_utils'

module BB
    class Cache
        def initialize(stable_source = nil, verify_stable_env=true)
            if stable_source.nil?
                stable_source = StableSource.stable_default_source
            end
            @stable_source = stable_source
            if verify_stable_env && File.exist?(File.join(Pathname.pwd, "Podfile"))
                @bundleId = BB::PodUtils.getProjectBundleIdentifier
            end
            if @bundleId.nil?
                @bundleId = 'stable'
            end
        end

        def cachePath()
            # 缓存路径采用bundle包名区分,解决多产品同时打包问题
            File.join(File.expand_path('~/.cache'), 'cocoapods-bb-PodAssistant',@bundleId,@stable_source.split('/').last.chomp('.git').to_s)
        end
    end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
cocoapods-bb-PodAssistant-0.3.7.1 lib/cocoapods-bb-PodAssistant/config/cache_path.rb
cocoapods-bb-PodAssistant-0.3.7.0 lib/cocoapods-bb-PodAssistant/config/cache_path.rb
cocoapods-bb-PodAssistant-0.3.6.2 lib/cocoapods-bb-PodAssistant/config/cache_path.rb
cocoapods-bb-PodAssistant-0.3.6.1 lib/cocoapods-bb-PodAssistant/config/cache_path.rb
cocoapods-bb-PodAssistant-0.3.6.0 lib/cocoapods-bb-PodAssistant/config/cache_path.rb
cocoapods-bb-PodAssistant-0.3.5.2 lib/cocoapods-bb-PodAssistant/config/cache_path.rb
cocoapods-bb-PodAssistant-0.3.5.1 lib/cocoapods-bb-PodAssistant/config/cache_path.rb
cocoapods-bb-PodAssistant-0.3.5.0 lib/cocoapods-bb-PodAssistant/config/cache_path.rb
cocoapods-bb-PodAssistant-0.3.4.3 lib/cocoapods-bb-PodAssistant/config/cache_path.rb
cocoapods-bb-PodAssistant-0.3.4.2 lib/cocoapods-bb-PodAssistant/config/cache_path.rb
cocoapods-bb-PodAssistant-0.3.3 lib/cocoapods-bb-PodAssistant/config/cache_path.rb
cocoapods-bb-PodAssistant-0.3.2 lib/cocoapods-bb-PodAssistant/config/cache_path.rb
cocoapods-bb-PodAssistant-0.3.1 lib/cocoapods-bb-PodAssistant/config/cache_path.rb
cocoapods-bb-PodAssistant-0.3.0 lib/cocoapods-bb-PodAssistant/config/cache_path.rb
cocoapods-bb-PodAssistant-0.2.6 lib/cocoapods-bb-PodAssistant/config/cache_path.rb
cocoapods-bb-PodAssistant-0.2.5 lib/cocoapods-bb-PodAssistant/config/cache_path.rb
cocoapods-bb-PodAssistant-0.2.4 lib/cocoapods-bb-PodAssistant/config/cache_path.rb
cocoapods-bb-PodAssistant-0.2.3 lib/cocoapods-bb-PodAssistant/config/cache_path.rb
cocoapods-bb-PodAssistant-0.2.2 lib/cocoapods-bb-PodAssistant/config/cache_path.rb
cocoapods-bb-PodAssistant-0.2.1 lib/cocoapods-bb-PodAssistant/config/cache_path.rb