Commit 0ee0ab1f authored by Bradley Grzesiak's avatar Bradley Grzesiak

Deprecate `dependency'. Use `pod' now.

parent 11ba99b4
......@@ -70,8 +70,8 @@ $ edit Podfile
```ruby
platform :ios
dependency 'JSONKit', '~> 1.4'
dependency 'Reachability', '~> 2.0.4'
pod 'JSONKit', '~> 1.4'
pod 'Reachability', '~> 2.0.4'
```
And then you [install the dependencies](https://github.com/CocoaPods/CocoaPods/wiki/Creating-a-project-that-uses-CocoaPods) in your project.
......
platform :osx
dependency 'FormatterKit'
dependency 'AFNetworking', '~> 0.7.0'
pod 'FormatterKit'
pod 'AFNetworking', '~> 0.7.0'
platform :ios
dependency 'FormatterKit'
dependency 'AFNetworking', '~> 0.7.0'
pod 'FormatterKit'
pod 'AFNetworking', '~> 0.7.0'
platform :ios
dependency 'MGSplitViewController', '1.0.0'
pod 'MGSplitViewController', '1.0.0'
platform :ios
dependency 'RestKit'
pod 'RestKit'
......@@ -11,4 +11,4 @@ platform :ios
xcodeproj "RelativePathProject/RelativePathProject.xcodeproj"
dependency "AFNetworking"
pod "AFNetworking"
platform :ios
dependency 'AFNetworking'
dependency 'SSToolkit'
pod 'AFNetworking'
pod 'SSToolkit'
......@@ -2,5 +2,5 @@ platform :ios
target :test, :exclusive => true do
link_with 'TargetTest'
dependency 'JSONKit'
pod 'JSONKit'
end
......@@ -258,7 +258,7 @@ module Pod
platform = @platform
podfile = Pod::Podfile.new do
platform(platform)
dependency name, :podspec => podspec
pod name, :podspec => podspec
end
podfile
end
......
......@@ -278,13 +278,13 @@ module Pod
# latest version of a Pod. If this is the case, simply omit the version
# requirements.
#
# dependency 'SSZipArchive'
# pod 'SSZipArchive'
#
#
# Later on in the project you may want to freeze to a specific version of a
# Pod, in which case you can specify that version number.
#
# dependency 'Objection', '0.9'
# pod 'Objection', '0.9'
#
#
# Besides no version, or a specific one, it is also possible to use operators:
......@@ -311,17 +311,17 @@ module Pod
#
# Sometimes you may want to use the bleeding edge version of a Pod. Or a
# specific revision. If this is the case, you can specify that with your
# dependency declaration.
# pod declaration.
#
#
# To use the `master` branch of the repo:
#
# dependency 'TTTFormatterKit', :git => 'https://github.com/gowalla/AFNetworking.git'
# pod 'TTTFormatterKit', :git => 'https://github.com/gowalla/AFNetworking.git'
#
#
# Or specify a commit:
#
# dependency 'TTTFormatterKit', :git => 'https://github.com/gowalla/AFNetworking.git', :commit => '082f8319af'
# pod 'TTTFormatterKit', :git => 'https://github.com/gowalla/AFNetworking.git', :commit => '082f8319af'
#
#
# It is important to note, though, that this means that the version will
......@@ -338,7 +338,7 @@ module Pod
# If a podspec is available from another source outside of the library’s
# repo. Consider, for instance, a podpsec available via HTTP:
#
# dependency 'JSONKit', :podspec => 'https://raw.github.com/gist/1346394/1d26570f68ca27377a27430c65841a0880395d72/JSONKit.podspec'
# pod 'JSONKit', :podspec => 'https://raw.github.com/gist/1346394/1d26570f68ca27377a27430c65841a0880395d72/JSONKit.podspec'
#
#
# ### For a library without any available podspec
......@@ -347,12 +347,12 @@ module Pod
# to use, yet, you will have to specify the library yourself.
#
#
# When you omit arguments and pass a block to `dependency`, an instance of
# When you omit arguments and pass a block to `pod`, an instance of
# Pod::Specification is yielded to the block. This is the same class which
# is normally used to specify a Pod.
#
# ```
# dependency do |spec|
# pod do |spec|
# spec.name = 'JSONKit'
# spec.version = '1.4'
# spec.source = { :git => 'https://github.com/johnezang/JSONKit.git', :tag => 'v1.4' }
......@@ -363,10 +363,15 @@ module Pod
#
# For more info on the definition of a Pod::Specification see:
# https://github.com/CocoaPods/CocoaPods/wiki/A-pod-specification
def dependency(*name_and_version_requirements, &block)
def pod(*name_and_version_requirements, &block)
@target_definition.target_dependencies << Dependency.new(*name_and_version_requirements, &block)
end
def dependency(*name_and_version_requirements, &block)
warn "[DEPRECATED] `dependency' is deprecated (use `pod')"
pod(*name_and_version_requirements, &block)
end
# Specifies that a BridgeSupport metadata document should be generated from
# the headers of all installed Pods.
#
......@@ -383,14 +388,14 @@ module Pod
#
# Consider the following Podfile:
#
# dependency 'ASIHTTPRequest'
# pod 'ASIHTTPRequest'
#
# target :debug do
# dependency 'SSZipArchive'
# pod 'SSZipArchive'
# end
#
# target :test, :exclusive => true do
# dependency 'JSONKit'
# pod 'JSONKit'
# end
#
# This Podfile defines three targets. The first one is the `:default` target,
......
platform :ios
dependency 'SSZipArchive', '>= 1'
dependency 'ASIHTTPRequest', '~> 1.8.0'
dependency 'Reachability' # part of ASIHTTPRequest
dependency 'ASIWebPageRequest', '< 1.8.2' # part of ASIHTTPRequest
pod 'SSZipArchive', '>= 1'
pod 'ASIHTTPRequest', '~> 1.8.0'
pod 'Reachability' # part of ASIHTTPRequest
pod 'ASIWebPageRequest', '< 1.8.2' # part of ASIHTTPRequest
......@@ -15,11 +15,11 @@ describe Pod::Installer::UserProjectIntegrator do
xcodeproj sample_project_path, 'Test' => :debug
link_with 'SampleProject' # this is an app target!
dependency 'JSONKit'
pod 'JSONKit'
target :test_runner, :exclusive => true do
link_with 'TestRunner'
dependency 'Kiwi'
pod 'Kiwi'
end
end
......
......@@ -66,7 +66,7 @@ else
podfile = Pod::Podfile.new do
self.platform :ios
xcodeproj 'dummy'
dependency 'SSToolkit', :git => url, :commit => commit
pod 'SSToolkit', :git => url, :commit => commit
end
# Note that we are *not* using the stubbed SpecHelper::Installer subclass.
......@@ -85,7 +85,7 @@ else
self.platform :ios
xcodeproj 'dummy'
# TODO use a local file instead of http?
dependency 'Reachability', :podspec => url
pod 'Reachability', :podspec => url
end
installer = SpecHelper::Installer.new(podfile)
......@@ -103,7 +103,7 @@ else
podfile = Pod::Podfile.new do
self.platform :ios
xcodeproj 'dummy'
dependency do |s|
pod do |s|
s.name = 'JSONKit'
s.version = '1.2'
s.source = { :git => SpecHelper.fixture('integration/JSONKit').to_s, :tag => 'v1.2' }
......@@ -122,13 +122,13 @@ else
podfile = Pod::Podfile.new do
self.platform :ios
xcodeproj 'dummy'
dependency do |s|
pod do |s|
s.name = 'JSONKit'
s.version = '1.2'
s.source = { :git => SpecHelper.fixture('integration/JSONKit').to_s, :tag => 'v1.2' }
s.source_files = 'JSONKit.*'
end
dependency do |s|
pod do |s|
s.name = 'SSZipArchive'
s.version = '0.1.0'
s.source = { :git => SpecHelper.fixture('integration/SSZipArchive').to_s, :tag => '0.1.0' }
......@@ -154,14 +154,14 @@ else
podfile = Pod::Podfile.new do
self.platform :ios
xcodeproj 'dummy'
dependency 'JSONKit', '1.4'
pod 'JSONKit', '1.4'
target :ios_target do
# This brings in Reachability on iOS
dependency 'ASIHTTPRequest'
pod 'ASIHTTPRequest'
end
target :osx_target do
self.platform :osx
dependency 'ASIHTTPRequest'
pod 'ASIHTTPRequest'
end
end
......@@ -201,8 +201,8 @@ else
podfile = Pod::Podfile.new do
self.platform :ios
xcodeproj 'dummy'
dependency 'JSONKit', '1.4'
dependency 'SSToolkit', '1.0.0'
pod 'JSONKit', '1.4'
pod 'SSToolkit', '1.0.0'
end
installer = SpecHelper::Installer.new(podfile)
installer.install!
......@@ -225,7 +225,7 @@ else
podfile = Pod::Podfile.new do
self.platform platform
xcodeproj 'dummy'
dependency 'SSZipArchive'
pod 'SSZipArchive'
post_install do |installer|
target = installer.project.targets.first
......@@ -248,10 +248,10 @@ else
podfile = Pod::Podfile.new do
self.platform platform
xcodeproj 'dummy'
dependency 'Reachability', '> 2.0.5' if platform == :ios
# dependency 'ASIWebPageRequest', '>= 1.8.1'
dependency 'JSONKit', '>= 1.0'
dependency 'SSZipArchive', '< 2'
pod 'Reachability', '> 2.0.5' if platform == :ios
# pod 'ASIWebPageRequest', '>= 1.8.1'
pod 'JSONKit', '>= 1.0'
pod 'SSZipArchive', '< 2'
end
installer = SpecHelper::Installer.new(podfile)
......@@ -294,7 +294,7 @@ else
spec = Pod::Podfile.new do
self.platform platform
xcodeproj 'dummy'
dependency 'Reachability', '2.0.4' # only 2.0.4 is part of ASIHTTPRequest’s source.
pod 'Reachability', '2.0.4' # only 2.0.4 is part of ASIHTTPRequest’s source.
end
installer = SpecHelper::Installer.new(spec)
......@@ -313,7 +313,7 @@ else
spec = Pod::Podfile.new do
self.platform platform
xcodeproj 'dummy'
dependency 'SSZipArchive'
pod 'SSZipArchive'
end
installer = SpecHelper::Installer.new(spec)
......@@ -331,7 +331,7 @@ else
spec = Pod::Podfile.new do
self.platform platform
xcodeproj 'dummy'
dependency 'JSONKit'
pod 'JSONKit'
end
installer = SpecHelper::Installer.new(spec)
installer.install!
......@@ -339,7 +339,7 @@ else
spec = Pod::Podfile.new do
self.platform platform
xcodeproj 'dummy'
dependency 'SSZipArchive'
pod 'SSZipArchive'
end
installer = SpecHelper::Installer.new(spec)
installer.install!
......@@ -352,9 +352,9 @@ else
podfile = Pod::Podfile.new do
self.platform platform
xcodeproj 'dummy'
target(:debug) { dependency 'SSZipArchive' }
target(:test, :exclusive => true) { dependency 'JSONKit' }
dependency 'ASIHTTPRequest'
target(:debug) { pod 'SSZipArchive' }
target(:test, :exclusive => true) { pod 'JSONKit' }
pod 'ASIHTTPRequest'
end
installer = Pod::Installer.new(podfile)
......@@ -405,7 +405,7 @@ else
podfile = Pod::Podfile.new do
self.platform platform
xcodeproj projpath
dependency 'SSZipArchive'
pod 'SSZipArchive'
end
installer = SpecHelper::Installer.new(podfile)
......@@ -430,9 +430,9 @@ else
podfile = Pod::Podfile.new do
self.platform platform
xcodeproj 'dummy'
target(:debug) { dependency 'SSZipArchive' }
target(:test, :exclusive => true) { dependency 'JSONKit' }
dependency 'ASIHTTPRequest'
target(:debug) { pod 'SSZipArchive' }
target(:test, :exclusive => true) { pod 'JSONKit' }
pod 'ASIHTTPRequest'
end
installer = Pod::Installer.new(podfile)
......
......@@ -11,10 +11,10 @@ describe Pod::Installer::UserProjectIntegrator do
@podfile = Pod::Podfile.new do
platform :ios
xcodeproj sample_project_path
dependency 'JSONKit'
pod 'JSONKit'
target :test_runner, :exclusive => true do
link_with 'TestRunner'
dependency 'Kiwi'
pod 'Kiwi'
end
end
......
......@@ -11,7 +11,7 @@ describe "Pod::Installer" do
podfile = Pod::Podfile.new do
platform :ios
xcodeproj 'MyProject'
dependency 'JSONKit'
pod 'JSONKit'
end
@xcconfig = Pod::Installer.new(podfile).target_installers.first.xcconfig.to_hash
end
......@@ -32,7 +32,7 @@ describe "Pod::Installer" do
it "generates a BridgeSupport metadata file from all the pod headers" do
podfile = Pod::Podfile.new do
platform :osx
dependency 'ASIHTTPRequest'
pod 'ASIHTTPRequest'
end
installer = Pod::Installer.new(podfile)
pods = installer.specifications.map do |spec|
......@@ -47,7 +47,7 @@ describe "Pod::Installer" do
podfile = Pod::Podfile.new do
platform :ios
target :not_empty do
dependency 'JSONKit'
pod 'JSONKit'
end
end
installer = Pod::Installer.new(podfile)
......
......@@ -17,7 +17,7 @@ describe "Pod::Podfile" do
end
it "adds dependencies" do
podfile = Pod::Podfile.new { dependency 'ASIHTTPRequest'; dependency 'SSZipArchive', '>= 0.1' }
podfile = Pod::Podfile.new { pod 'ASIHTTPRequest'; pod 'SSZipArchive', '>= 0.1' }
podfile.dependencies.size.should == 2
podfile.dependency_by_top_level_spec_name('ASIHTTPRequest').should == Pod::Dependency.new('ASIHTTPRequest')
podfile.dependency_by_top_level_spec_name('SSZipArchive').should == Pod::Dependency.new('SSZipArchive', '>= 0.1')
......@@ -25,7 +25,7 @@ describe "Pod::Podfile" do
it "adds a dependency on a Pod repo outside of a spec repo (the repo is expected to contain a podspec)" do
podfile = Pod::Podfile.new do
dependency 'SomeExternalPod', :git => 'GIT-URL', :commit => '1234'
pod 'SomeExternalPod', :git => 'GIT-URL', :commit => '1234'
end
dep = podfile.dependency_by_top_level_spec_name('SomeExternalPod')
dep.external_source.params.should == { :git => 'GIT-URL', :commit => '1234' }
......@@ -33,7 +33,7 @@ describe "Pod::Podfile" do
it "adds a subspec dependency on a Pod repo outside of a spec repo (the repo is expected to contain a podspec)" do
podfile = Pod::Podfile.new do
dependency 'MainSpec/FirstSubSpec', :git => 'GIT-URL', :commit => '1234'
pod 'MainSpec/FirstSubSpec', :git => 'GIT-URL', :commit => '1234'
end
dep = podfile.dependency_by_top_level_spec_name('MainSpec')
dep.external_source.name.should == 'MainSpec'
......@@ -41,7 +41,7 @@ describe "Pod::Podfile" do
it "adds a dependency on a library outside of a spec repo (the repo does not need to contain a podspec)" do
podfile = Pod::Podfile.new do
dependency 'SomeExternalPod', :podspec => 'http://gist/SomeExternalPod.podspec'
pod 'SomeExternalPod', :podspec => 'http://gist/SomeExternalPod.podspec'
end
dep = podfile.dependency_by_top_level_spec_name('SomeExternalPod')
dep.external_source.params.should == { :podspec => 'http://gist/SomeExternalPod.podspec' }
......@@ -49,7 +49,7 @@ describe "Pod::Podfile" do
it "adds a dependency on a library by specifying the podspec inline" do
podfile = Pod::Podfile.new do
dependency do |s|
pod do |s|
s.name = 'SomeExternalPod'
end
end
......@@ -123,7 +123,7 @@ describe "Pod::Podfile" do
Pod::Podfile.new do
end.target_definitions[:default].should.be.empty
Pod::Podfile.new do
dependency 'JSONKit'
pod 'JSONKit'
end.target_definitions[:default].should.not.be.empty
end
......@@ -133,14 +133,14 @@ describe "Pod::Podfile" do
xcodeproj 'iOS Project', 'iOS App Store' => :release, 'Test' => :debug
target :debug do
dependency 'SSZipArchive'
pod 'SSZipArchive'
end
target :test, :exclusive => true do
link_with 'TestRunner'
dependency 'JSONKit'
pod 'JSONKit'
target :subtarget do
dependency 'Reachability'
pod 'Reachability'
end
end
......@@ -148,12 +148,12 @@ describe "Pod::Podfile" do
platform :osx
xcodeproj 'OSX Project.xcodeproj', 'Mac App Store' => :release, 'Test' => :debug
link_with 'OSXTarget'
dependency 'ASIHTTPRequest'
pod 'ASIHTTPRequest'
target :nested_osx_target do
end
end
dependency 'ASIHTTPRequest'
pod 'ASIHTTPRequest'
end
end
......
......@@ -6,8 +6,8 @@ describe "Pod::Resolver" do
@podfile = Pod::Podfile.new do
platform :ios
dependency 'BlocksKit'
# dependency 'ASIWebPageRequest'
pod 'BlocksKit'
# pod 'ASIWebPageRequest'
end
@resolver = Pod::Resolver.new(@podfile, stub('sandbox'))
end
......@@ -69,8 +69,8 @@ describe "Pod::Resolver" do
it "resolves subspecs" do
@podfile = Pod::Podfile.new do
platform :ios
dependency 'RestKit/Network'
dependency 'RestKit/ObjectMapping/XML'
pod 'RestKit/Network'
pod 'RestKit/ObjectMapping/XML'
end
resolver = Pod::Resolver.new(@podfile, stub('sandbox'))
resolver.resolve.values.flatten.map(&:name).sort.should == %w{
......@@ -90,7 +90,7 @@ describe "Pod::Resolver" do
it "includes all the subspecs of a specification node" do
@podfile = Pod::Podfile.new do
platform :ios
dependency 'RestKit'
pod 'RestKit'
end
resolver = Pod::Resolver.new(@podfile, stub('sandbox'))
resolver.resolve.values.flatten.map(&:name).sort.should == %w{
......@@ -114,7 +114,7 @@ describe "Pod::Resolver" do
it "if defined it includes only the main subspec of of a specification node" do
@podfile = Pod::Podfile.new do
platform :ios
dependency do |s|
pod do |s|
s.name = 'RestKit'
s.version = '0.10.0'
......@@ -153,7 +153,7 @@ describe "Pod::Resolver" do
it "resolves subspecs with external constraints" do
@podfile = Pod::Podfile.new do
platform :ios
dependency 'MainSpec/FirstSubSpec', :git => 'GIT-URL'
pod 'MainSpec/FirstSubSpec', :git => 'GIT-URL'
end
spec = Pod::Spec.new do |s|
s.name = 'MainSpec'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment