lib/cocoapods/installer/migrator.rb
def migrate_to_0_36(sandbox)
          UI.message('Migrating to CocoaPods 0.36') do
            move(sandbox.root + 'Headers/Build', sandbox.root + 'Headers/Private')

            lockfile = sandbox.manifest.to_hash
            sandbox.specifications_root.children.each do |child|
              next unless child.basename.to_s =~ /\.podspec$/
              spec = Specification.from_file(child)
              child.delete
              child = Pathname("#{child}.json")
              File.open(child, 'w') { |f| f.write spec.to_pretty_json }
              lockfile['SPEC CHECKSUMS'][spec.name] = Specification.from_file(child).checksum
            end
            sandbox.manifest = Lockfile.new(lockfile)
            sandbox.manifest.write_to_disk(sandbox.manifest_path)
          end
        end
# Migrates from CocoaPods versions prior to 0.36.
#
# @param [Sandbox] sandbox
#
Migrates from CocoaPods versions prior to 0.36.
Migrates from CocoaPods versions prior to 0 . 36 .
def migrate_to_0_36(sandbox)
          UI.message('Migrating to CocoaPods 0.36') do
            move(sandbox.root + 'Headers/Build', sandbox.root + 'Headers/Private')
            lockfile = sandbox.manifest.to_hash
            sandbox.specifications_root.children.each do |child|
              next unless child.basename.to_s =~ /\.podspec$/
              spec = Specification.from_file(child)
              child.delete
              child = Pathname("#{child}.json")
              File.open(child, 'w') { |f| f.write spec.to_pretty_json }
              lockfile['SPEC CHECKSUMS'][spec.name] = Specification.from_file(child).checksum
            end
            sandbox.manifest = Lockfile.new(lockfile)
            sandbox.manifest.write_to_disk(sandbox.manifest_path)
          end
        end
def migrate_to_0_36 ( sandbox ) UI . message ( 'Migrating to CocoaPods 0.36' ) do move ( sandbox . root + 'Headers/Build' , sandbox . root + 'Headers/Private' ) lockfile = sandbox . manifest . to_hash sandbox . specifications_root . children . each do | child | next unless child . basename . to_s =~ / \. podspec$ / spec = Specification . from_file ( child ) child . delete child = Pathname ( "#{child}.json" ) File . open ( child , 'w' ) { | f | f . write spec . to_pretty_json } lockfile [ 'SPEC CHECKSUMS' ] [ spec . name ] = Specification . from_file ( child ) . checksum end sandbox . manifest = Lockfile . new ( lockfile ) sandbox . manifest . write_to_disk ( sandbox . manifest_path ) end end
Migrates from CocoaPods versions prior to 0.36.
Migrates from CocoaPods versions prior to 0 . 36 .
sandbox
None