Permalink
Browse files

Merge branch 'multiple-platforms'. Closes #63 and #79.

  • Loading branch information...
2 parents 08aa796 + dcbf5e2 commit 23626caaea8059eca36a0c5b499b0075c17a2a61 @alloy alloy committed Apr 13, 2012
Showing with 2,332 additions and 2,092 deletions.
  1. +1 −0 .gitignore
  2. +3 −0 .gitmodules
  3. +6 −6 .kick
  4. +11 −8 CHANGELOG.md
  5. +5 −5 Gemfile.lock
  6. +17 −0 Rakefile
  7. +9 −1 TODO
  8. +1 −1 examples/AFNetworking Mac Example/Podfile.lock
  9. +1 −1 examples/AFNetworking iOS Example/Podfile.lock
  10. +0 −323 examples/EmbedReader/EmbedReader.xcodeproj/project.pbxproj
  11. +0 −76 examples/EmbedReader/EmbedReader.xcodeproj/xcshareddata/xcschemes/EmbedReader.xcscheme
  12. +0 −1 examples/EmbedReader/EmbedReader.xcworkspace/contents.xcworkspacedata
  13. +0 −11 examples/EmbedReader/EmbedReader/EmbedReader-Prefix.pch
  14. +0 −21 examples/EmbedReader/EmbedReader/EmbedReaderAppDelegate.h
  15. +0 −34 examples/EmbedReader/EmbedReader/EmbedReaderAppDelegate.m
  16. +0 −22 examples/EmbedReader/EmbedReader/EmbedReaderViewController.h
  17. +0 −88 examples/EmbedReader/EmbedReader/EmbedReaderViewController.m
  18. +0 −336 examples/EmbedReader/EmbedReader/en.lproj/EmbedReaderViewController.xib
  19. +0 −444 examples/EmbedReader/EmbedReader/en.lproj/MainWindow.xib
  20. +0 −16 examples/EmbedReader/EmbedReader/main.m
  21. +0 −3 examples/EmbedReader/Podfile
  22. +0 −5 examples/EmbedReader/Podfile.lock
  23. +0 −2 examples/MacRubySample/Podfile.lock
  24. +4 −0 examples/RelativePathTest/Podfile
  25. +5 −0 examples/RelativePathTest/Podfile.lock
  26. +713 −0 examples/RelativePathTest/RelativePathProject/RelativePathProject.xcodeproj/project.pbxproj
  27. +1 −0 ...les/RelativePathTest/RelativePathProject/RelativePathProject.xcworkspace/contents.xcworkspacedata
  28. +19 −0 examples/RelativePathTest/RelativePathProject/RelativePathProject/CCPAppDelegate.h
  29. +66 −0 examples/RelativePathTest/RelativePathProject/RelativePathProject/CCPAppDelegate.m
  30. +13 −0 examples/RelativePathTest/RelativePathProject/RelativePathProject/CCPViewController.h
  31. +38 −0 examples/RelativePathTest/RelativePathProject/RelativePathProject/CCPViewController.m
  32. +12 −5 ....plist → RelativePathTest/RelativePathProject/RelativePathProject/RelativePathProject-Info.plist}
  33. +14 −0 examples/RelativePathTest/RelativePathProject/RelativePathProject/RelativePathProject-Prefix.pch
  34. +120 −0 ...ples/RelativePathTest/RelativePathProject/RelativePathProject/en.lproj/CCPViewController_iPad.xib
  35. +119 −0 ...es/RelativePathTest/RelativePathProject/RelativePathProject/en.lproj/CCPViewController_iPhone.xib
  36. 0 ...mbedReader → RelativePathTest/RelativePathProject/RelativePathProject}/en.lproj/InfoPlist.strings
  37. +18 −0 examples/RelativePathTest/RelativePathProject/RelativePathProject/main.m
  38. +1 −0 lib/cocoapods.rb
  39. +16 −5 lib/cocoapods/command.rb
  40. +28 −21 lib/cocoapods/command/install.rb
  41. +1 −2 lib/cocoapods/command/list.rb
  42. +1 −2 lib/cocoapods/command/search.rb
  43. +77 −0 lib/cocoapods/command/set_present.rb
  44. +1 −2 lib/cocoapods/command/setup.rb
  45. +22 −33 lib/cocoapods/config.rb
  46. +12 −11 lib/cocoapods/dependency.rb
  47. +4 −4 lib/cocoapods/generator/copy_resources_script.rb
  48. +83 −50 lib/cocoapods/installer.rb
  49. +6 −6 lib/cocoapods/installer/target_installer.rb
  50. +56 −34 lib/cocoapods/installer/user_project_integrator.rb
  51. +18 −10 lib/cocoapods/local_pod.rb
  52. +8 −0 lib/cocoapods/platform.rb
  53. +20 −0 lib/cocoapods/pod_path_resolver.rb
  54. +100 −17 lib/cocoapods/podfile.rb
  55. +15 −89 lib/cocoapods/project.rb
  56. +20 −13 lib/cocoapods/resolver.rb
  57. +2 −2 lib/cocoapods/sandbox.rb
  58. +97 −98 lib/cocoapods/specification.rb
  59. +1 −0 spec/fixtures/integration/Reachability
  60. +1 −1 spec/fixtures/spec-repos/master
  61. +1 −1 spec/functional/command_spec.rb
  62. +1 −1 spec/functional/downloader_spec.rb
  63. +27 −14 spec/functional/user_project_integrator_spec.rb
  64. +66 −55 spec/integration_spec.rb
  65. +16 −0 spec/spec_helper.rb
  66. +8 −0 spec/unit/command/install_command_spec.rb
  67. +0 −7 spec/unit/config_spec.rb
  68. +3 −3 spec/unit/downloader_spec.rb
  69. +1 −1 spec/unit/generator/documentation_spec.rb
  70. +14 −9 spec/unit/installer/target_installer_spec.rb
  71. +36 −10 spec/unit/installer/user_project_integrator_spec.rb
  72. +7 −7 spec/unit/installer_spec.rb
  73. +97 −3 spec/unit/local_pod_spec.rb
  74. +7 −2 spec/unit/platform_spec.rb
  75. +17 −0 spec/unit/pod_path_resolver_spec.rb
  76. +98 −7 spec/unit/podfile_spec.rb
  77. +35 −43 spec/unit/project_spec.rb
  78. +0 −2 spec/unit/resolver_spec.rb
  79. +112 −118 spec/unit/specification_spec.rb
View
@@ -3,6 +3,7 @@
*.rbo
*.gem
.DS_Store
+.rbenv-version
xcuserdata
project.xcworkspace
DerivedData
View
@@ -13,3 +13,6 @@
[submodule "spec/fixtures/spec-repos/master"]
path = spec/fixtures/spec-repos/master
url = https://github.com/CocoaPods/Specs.git
+[submodule "spec/fixtures/integration/Reachability"]
+ path = spec/fixtures/integration/Reachability
+ url = https://github.com/tonymillion/Reachability.git
View
12 .kick
@@ -4,12 +4,12 @@ Kicker::Recipes::Ruby.runner_bin = 'bacon'
process do |files|
specs = files.take_and_map do |file|
- case file
- when %r{lib/cocoapods/installer.+\.rb$}
- ['spec/unit/installer_spec.rb', 'spec/unit/target_installer_spec.rb']
- when %r{lib/cocoapods/(.+?)\.rb$}
- s = Dir.glob("spec/**/#{$1}_spec.rb")
- s unless s.empty?
+ if file =~ %r{lib/cocoapods/(.+?)\.rb$}
+ s = Dir.glob("spec/**/#{File.basename(file, '.rb')}_spec.rb")
+ if file =~ %r{lib/cocoapods/installer.*\.rb$}
+ s.concat(['spec/unit/installer_spec.rb', 'spec/unit/installer/target_installer_spec.rb'])
+ end
+ s.uniq unless s.empty?
end
end
Kicker::Recipes::Ruby.run_tests(specs)
View
@@ -13,27 +13,30 @@ with, use the `link_with` method like so:
```ruby
platform :ios
+workspace 'MyWorkspace'
+
link_with ['MyAppTarget', 'MyOtherAppTarget']
dependency 'JSONKit'
target :test, :exclusive => true do
+ xcodeproj 'TestProject'
link_with 'TestRunnerTarget'
dependency 'Kiwi'
end
```
_NOTE: As you can see it can take either one target name, or an array of names._
-Alternatively, you can also specify the target to link with in the target
-options like so:
+* If no explicit Xcode workspace is specified and only **one** project exists in
+the same directory as the Podfile, then the name of that project is used as the
+workspace’s name.
-```ruby
-target :test, :exclusive => true, :link_with => 'TestRunnerTarget' do
- dependency 'Kiwi'
-end
-```
+* If no explicit Xcode project is specified for a target, it will use the Xcode
+project of the parent target. If no target specifies an expicit Xcode project
+and there is only **one** project in the same directory as the Podfile then that
+project will be used.
-If no explicit target is specified, then the Pods target will be linked with
+* If no explicit target is specified, then the Pods target will be linked with
the first target in your project. So if you only have one target you do not
need to specify the target to link with.
View
@@ -1,6 +1,6 @@
GIT
remote: git://github.com/CocoaPods/Xcodeproj.git
- revision: 338e4d37f282121754f10f6d169256a57a64860d
+ revision: 2817d17a0ea88dba76e898a1c71cbac615d76fc2
specs:
xcodeproj (0.1.0)
@@ -15,15 +15,15 @@ GEM
kicker (2.5.0)
rb-fsevent
metaclass (0.0.1)
- mocha (0.10.4)
+ mocha (0.10.5)
metaclass (~> 0.0.1)
mocha-on-bacon (0.2.0)
mocha (>= 0.9.8)
open4 (1.3.0)
rake (0.9.2.2)
- rb-fsevent (0.9.0)
- vcr (2.0.0)
- webmock (1.8.0)
+ rb-fsevent (0.9.1)
+ vcr (2.0.1)
+ webmock (1.8.6)
addressable (>= 2.2.7)
crack (>= 0.1.7)
View
@@ -143,6 +143,13 @@ namespace :spec do
end
end
end
+
+ desc "Removes the stored VCR fixture"
+ task :clean_vcr do
+ sh "rm -f spec/fixtures/vcr/tarballs.yml"
+ end
+
+ task :clean_env => [:clean_vcr, :unpack_fixture_tarballs, "ext:cleanbuild"]
end
namespace :examples do
@@ -194,6 +201,16 @@ namespace :examples do
end
end
+desc "Initializes your working copy to run the specs"
+task :bootstrap do
+ puts "Updating submodules..."
+ `git submodule update --init --recursive`
+
+ puts "Installing gems"
+ `bundle install`
+ `cd external/XcodeProj && bundle install`
+end
+
desc "Run all specs"
task :spec => 'spec:all'
View
10 TODO
@@ -1 +1,9 @@
-* The user *has* to specify the platform of the project in the Podfile.
+* No need to pass the project path and podfile separately to UserProjectIntegrator.
+* Move Platform#xcodeproj to TargetDefinition#link_with.
+* Add multiple-platforms section to changelog.
+* Validate platforms for each target definition.
+* Validate that there are dependencies in a Podfile.
+* Validate that the dependencies in the targets don't conflict. E.g. two different versions of the same pod.
+* Move Podfile.lock generator from Installer into its own file.
+* Remove better_installer.rb file
+* One or more of the specs are changing the remote URL of the master repo in ~/.cocoapods
@@ -2,7 +2,7 @@ PODS:
- AFNetworking (0.7.0):
- JSONKit
- FormatterKit (0.7.0)
- - JSONKit (1.5pre)
+ - JSONKit (1.4)
DEPENDENCIES:
- AFNetworking (~> 0.7.0)
@@ -2,7 +2,7 @@ PODS:
- AFNetworking (0.7.0):
- JSONKit
- FormatterKit (0.7.0)
- - JSONKit (1.5pre)
+ - JSONKit (1.4)
DEPENDENCIES:
- AFNetworking (~> 0.7.0)
Oops, something went wrong.

0 comments on commit 23626ca

Please sign in to comment.