Permalink
Browse files

Deprecate `dependency'. Use `pod' now.

  • Loading branch information...
1 parent 11ba99b commit 0ee0ab1f50634aaf90570c4744964470447649ec @listrophy listrophy committed Jul 8, 2012
View
@@ -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.
@@ -1,4 +1,4 @@
platform :osx
-dependency 'FormatterKit'
-dependency 'AFNetworking', '~> 0.7.0'
+pod 'FormatterKit'
+pod 'AFNetworking', '~> 0.7.0'
@@ -1,4 +1,4 @@
platform :ios
-dependency 'FormatterKit'
-dependency 'AFNetworking', '~> 0.7.0'
+pod 'FormatterKit'
+pod 'AFNetworking', '~> 0.7.0'
@@ -1,3 +1,3 @@
platform :ios
-dependency 'MGSplitViewController', '1.0.0'
+pod 'MGSplitViewController', '1.0.0'
@@ -1,3 +1,3 @@
platform :ios
-dependency 'RestKit'
+pod 'RestKit'
@@ -11,4 +11,4 @@ platform :ios
xcodeproj "RelativePathProject/RelativePathProject.xcodeproj"
-dependency "AFNetworking"
+pod "AFNetworking"
@@ -1,4 +1,4 @@
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 @@ def podfile_from_spec
platform = @platform
podfile = Pod::Podfile.new do
platform(platform)
- dependency name, :podspec => podspec
+ pod name, :podspec => podspec
end
podfile
end
View
@@ -278,13 +278,13 @@ def link_with(targets)
# 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 @@ def link_with(targets)
#
# 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 @@ def link_with(targets)
# 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 @@ def link_with(targets)
# 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 @@ def link_with(targets)
#
# 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 @@ def generate_bridge_support!
#
# 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,
View
@@ -1,5 +1,5 @@
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 @@
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
View
@@ -66,7 +66,7 @@ def should_xcodebuild(target_definition)
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 @@ def should_xcodebuild(target_definition)
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 @@ def should_xcodebuild(target_definition)
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 @@ def should_xcodebuild(target_definition)
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 @@ def should_xcodebuild(target_definition)
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 @@ def should_xcodebuild(target_definition)
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 @@ def should_xcodebuild(target_definition)
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 @@ def should_xcodebuild(target_definition)
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 @@ def should_xcodebuild(target_definition)
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 @@ def should_xcodebuild(target_definition)
spec = Pod::Podfile.new do
self.platform platform
xcodeproj 'dummy'
- dependency 'SSZipArchive'
+ pod 'SSZipArchive'
end
installer = SpecHelper::Installer.new(spec)
@@ -331,15 +331,15 @@ def should_xcodebuild(target_definition)
spec = Pod::Podfile.new do
self.platform platform
xcodeproj 'dummy'
- dependency 'JSONKit'
+ pod 'JSONKit'
end
installer = SpecHelper::Installer.new(spec)
installer.install!
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 @@ def should_xcodebuild(target_definition)
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 @@ def should_xcodebuild(target_definition)
podfile = Pod::Podfile.new do
self.platform platform
xcodeproj projpath
- dependency 'SSZipArchive'
+ pod 'SSZipArchive'
end
installer = SpecHelper::Installer.new(podfile)
@@ -430,9 +430,9 @@ def should_xcodebuild(target_definition)
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 @@
@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 @@
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 @@
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 @@
podfile = Pod::Podfile.new do
platform :ios
target :not_empty do
- dependency 'JSONKit'
+ pod 'JSONKit'
end
end
installer = Pod::Installer.new(podfile)
Oops, something went wrong.

0 comments on commit 0ee0ab1

Please sign in to comment.