Module: Pod::VersionMetadata

Defined in:
lib/cocoapods/version_metadata.rb

Constant Summary collapse

CACHE_VERSION =
'003'.freeze

Class Method Summary collapse

Class Method Details

.cocoapods_shaObject (private)


18
19
20
21
22
23
# File 'lib/cocoapods/version_metadata.rb', line 18

def self.cocoapods_sha
  return unless gemspec = Gem.loaded_specs['cocoapods']
  return unless source = gemspec.source
  return unless source.respond_to?(:revision)
  source.revision
end

.gem_versionObject


5
6
7
# File 'lib/cocoapods/version_metadata.rb', line 5

def self.gem_version
  Pod::VERSION
end

.project_cache_versionObject


9
10
11
12
13
14
15
16
# File 'lib/cocoapods/version_metadata.rb', line 9

def self.project_cache_version
  [
    gem_version,
    cocoapods_sha,
    'project-cache',
    CACHE_VERSION,
  ].compact.join('.')
end