Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 68 lines (59 sloc) 2.592 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
require 'rubygems'

# Better to fail early and clear then during installation of pods.
#
# RubyGems 1.3.6 (which ships with OS X >= 10.7) up to 1.4.0 have a couple of
# bugs related to comparing prerelease versions.
#
# E.g. https://github.com/CocoaPods/CocoaPods/issues/398
unless Gem::Version::Requirement.new('>= 1.4.0').satisfied_by?(Gem::Version.new(Gem::VERSION))
  require 'colored'
  STDERR.puts "Your RubyGems version (#{Gem::VERSION}) is too old, please update with: `gem update --system`".red
  exit 1
end

module Pod
  VERSION = '0.10.0'

  class PlainInformative < StandardError
  end

  class Informative < PlainInformative
    def message
      # TODO: remove formatting from raise calls and remove conditional
      super !~ /\[!\]/ ? "[!] #{super}\n".red : super
    end
  end

  autoload :Command, 'cocoapods/command'
  autoload :Config, 'cocoapods/config'
  autoload :Dependency, 'cocoapods/dependency'
  autoload :Downloader, 'cocoapods/downloader'
  autoload :Executable, 'cocoapods/executable'
  autoload :Installer, 'cocoapods/installer'
  autoload :LocalPod, 'cocoapods/local_pod'
  autoload :Platform, 'cocoapods/platform'
  autoload :Podfile, 'cocoapods/podfile'
  autoload :Project, 'cocoapods/project'
  autoload :Resolver, 'cocoapods/resolver'
  autoload :Sandbox, 'cocoapods/sandbox'
  autoload :Source, 'cocoapods/source'
  autoload :Spec, 'cocoapods/specification'
  autoload :Specification, 'cocoapods/specification'
  autoload :Version, 'cocoapods/version'

  autoload :Pathname, 'pathname'
  autoload :FileList, 'cocoapods/file_list'

  module Generator
    autoload :BridgeSupport, 'cocoapods/generator/bridge_support'
    autoload :CopyResourcesScript, 'cocoapods/generator/copy_resources_script'
    autoload :Documentation, 'cocoapods/generator/documentation'
    autoload :Acknowledgements, 'cocoapods/generator/acknowledgements'
    autoload :Plist, 'cocoapods/generator/acknowledgements/plist'
    autoload :Markdown, 'cocoapods/generator/acknowledgements/markdown'
    autoload :DummySource, 'cocoapods/generator/dummy_source'
  end
end

class Pathname
  def glob(pattern = '')
    Dir.glob((self + pattern).to_s).map { |f| Pathname.new(f) }
  end
end

if ENV['COCOA_PODS_ENV'] == 'development'
  require 'pry'
  require 'awesome_print'
end
Something went wrong with that request. Please try again.