Commit ee854c16 authored by Fabio Pelosin's avatar Fabio Pelosin

Merge branch 'core-extraction' into installer_clean_up

* core-extraction: (92 commits)
  Minor fixes.
  [Changelog]
  [SpecHelper] More refinement for bacon support.
  [TargetInstaller] Extracted XCConfig generation to Generator::XCConfing.
  Release 0.16.0
  [RakeFile] More fixes for release task.
  [Gemspec] Require xcodeproj 0.4.0.
  [RakeFile] Minor fix for release task.
  [TargetInstaller] Fixed spec.
  [Command::Search] Catch DSL errors and present a warning.
  [UI] Minor adaptation for Core extraction.
  [List] Adapted for Core extraction.
  [Gemfile] Updated bundle.
  [Sandbox] Adapted for changes in Core.
  [LocalPod] Adapted for Core extraction.
  [Fixtures] Updates.
  [SpecHelper] Improved bacon support.
  [Sandobox] Adapted for Core extraction.
  [Resolver] adapted for Core extraction
  [Linter] Adoped Core Linter and renamed to DeepLinter (WIP).
  ...

Conflicts:
	lib/cocoapods/command/install.rb
	lib/cocoapods/command/linter.rb
	lib/cocoapods/installer.rb
	lib/cocoapods/lockfile.rb
	lib/cocoapods/resolver.rb
	spec/unit/installer_spec.rb
parents 697f8bd1 908790f5
...@@ -2,8 +2,21 @@ language: ruby ...@@ -2,8 +2,21 @@ language: ruby
rvm: rvm:
- 1.8.7 - 1.8.7
- 1.9.3 - 1.9.3
# Not in Travis non-pro yet
#- 2.0.0
# Rubinius in 1.8 mode on Travis does not work. It complains about st_data_t etc in Xcodeproj. # Rubinius in 1.8 mode on Travis does not work. It complains about st_data_t etc in Xcodeproj.
#- rbx-18mode #- rbx-18mode
- rbx-19mode - rbx-19mode
matrix:
allow_failures:
- rvm: rbx-19mode
#- rvm: 2.0.0
install: NOEXEC=skip rake travis:setup install: NOEXEC=skip rake travis:setup
script: bundle exec rake spec script: bundle exec rake spec
notifications:
# email: false
campfire:
on_success: change
on_failure: always
rooms:
- secure: "qOE5zmgaHe/qQu3W9rmj7wygA5Ivl+cx50fqWGag2bdRl8ly5yj1NVoOKk/O\nZmQc4Lze+301uvTXi+r5v8A/tF6W1kUZw7yBiKuXoYFUGmDiVR9o2I/FPwkL\ngSzPJttrXTQfkQ4PbnrkX+JO+5bLWrKaO0hKXT4B2yUu4UXLVk0="
## Master ## Branch 0.17
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.15.2...master)[Xcodeproj](https://github.com/CocoaPods/Xcodeproj/compare/0.3.5...master) ###### DSL Changes
- Deprecated header_mappings hook for specifications.
- `preferred_dependency` has been renamed to `default_subspec`.
- Added `s.exclude_source_files` and related attributes to the specification class.
- Added support for prefix_header_file in subspecs
- Added support for prefix_header_contents in subspecs
- Removed exclude_header_search_paths
- Added screenshot attribute
- Renamed preferred_dependency
###### Enhancements
- Extracted command-line command & option handling into
[CLAide](https://github.com/CocoaPods/CLAide).
- Added PathList class.
- Added Podfile to the Pods project.
[#476](https://github.com/CocoaPods/CocoaPods/issues/476)
## 0.16.0
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.16.0.rc5...master)
###### Enhancements
- Use Rake 0.9.4
[#657](https://github.com/CocoaPods/CocoaPods/issues/657)
## 0.16.0.rc5
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.16.0.rc4...0.16.0.rc5)
###### Deprecated
- The usage of specifications defined in a Podfile is deprecated. Use the
`:podspec` option with a file path instead. Complete removal will most
probably happen in 0.17.0.
[#549](https://github.com/CocoaPods/CocoaPods/issues/549)
[#616](https://github.com/CocoaPods/CocoaPods/issues/616)
[#525](https://github.com/CocoaPods/CocoaPods/issues/525)
###### Bug fixes
- Always consider inline podspecs as needing installation.
- Fix detection when the lib has already been integrated with the user’s target.
[#643](https://github.com/CocoaPods/CocoaPods/issues/643)
[#614](https://github.com/CocoaPods/CocoaPods/issues/614)
[#613](https://github.com/CocoaPods/CocoaPods/issues/613)
## 0.16.0.rc4
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.16.0.rc3...0.16.0.rc4)
###### Bug fixes
- Fix for Rake 0.9.3
[#657](https://github.com/CocoaPods/CocoaPods/issues/657)
## 0.16.0.rc3
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.16.0.rc2...0.16.0.rc3)[Xcodeproj](https://github.com/CocoaPods/Xcodeproj/compare/0.4.0.rc1...0.4.0.rc6)
###### Enhancements
- Added support for copying frameworks to the app bundle.
[#597](https://github.com/CocoaPods/CocoaPods/pull/597)
###### Bug fixes
- Ignore PBXReferenceProxy while integrating into user project.
[#626](https://github.com/CocoaPods/CocoaPods/issues/626)
- Added support for PBXAggregateTarget and PBXLegacyTarget.
[#615](https://github.com/CocoaPods/CocoaPods/issues/615)
- Added support for PBXReferenceProxy.
[#612](https://github.com/CocoaPods/CocoaPods/issues/612)
## 0.16.0.rc2
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.16.0.rc1...0.16.0.rc2)
###### Bug fixes
- Fix for uninitialized constant Xcodeproj::Constants error.
## 0.16.0.rc1
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.15.2...0.16.0.rc1)[Xcodeproj](https://github.com/CocoaPods/Xcodeproj/compare/0.3.5...0.4.0.rc1)
###### Enhancements
- Xcodeproj partial rewrite. - Xcodeproj partial rewrite.
[#576](https://github.com/CocoaPods/CocoaPods/pull/576) [#565](https://github.com/CocoaPods/CocoaPods/issues/565)
- Performance improvements in the `Generating supporting files` phase. [#561](https://github.com/CocoaPods/CocoaPods/pull/561)
- Performance improvements in the `Generating support files` phase.
- Better support for editing existing projects and sorting groups. - Better support for editing existing projects and sorting groups.
## 0.15.2 ## 0.15.2
...@@ -156,6 +241,7 @@ ...@@ -156,6 +241,7 @@
- The subversion downloader now does an export instead of a checkout, which - The subversion downloader now does an export instead of a checkout, which
makes it play nicer with SCMs that store metadata in each directory. makes it play nicer with SCMs that store metadata in each directory.
[#245](https://github.com/CocoaPods/CocoaPods/issues/245) [#245](https://github.com/CocoaPods/CocoaPods/issues/245)
- Now the Podfile is added to the Pods project for convenient editing.
###### Bug fixes ###### Bug fixes
......
...@@ -3,7 +3,8 @@ source "http://rubygems.org" ...@@ -3,7 +3,8 @@ source "http://rubygems.org"
gemspec gemspec
group :development do group :development do
gem "xcodeproj", :git => "git://github.com/CocoaPods/Xcodeproj.git", :branch => "refactor" gem "cocoapods-core", :git => "git://github.com/CocoaPods/Core.git"
gem "xcodeproj", :git => "git://github.com/CocoaPods/Xcodeproj.git"
gem "mocha", "~> 0.11.4" gem "mocha", "~> 0.11.4"
gem "bacon" gem "bacon"
gem "mocha-on-bacon" gem "mocha-on-bacon"
......
GIT
remote: git://github.com/CocoaPods/Core.git
revision: e41f3c851003589aaddde533dd6e90a81d095621
specs:
cocoapods-core (0.16.0.rc2)
activesupport (~> 3.2.6)
faraday (~> 0.8.1)
octokit (~> 1.7)
GIT GIT
remote: git://github.com/CocoaPods/Xcodeproj.git remote: git://github.com/CocoaPods/Xcodeproj.git
revision: 280a500ed5ee5a5f6bb4e3c5edcfef0240fa427b revision: d599d4ed17763aa5eb03382a17a6243e11beda2e
branch: refactor
specs: specs:
xcodeproj (0.3.5) xcodeproj (0.4.0)
activesupport (~> 3.2.6) activesupport (~> 3.2.6)
colored (~> 1.2)
GIT GIT
remote: https://github.com/alloy/kicker.git remote: https://github.com/alloy/kicker.git
...@@ -18,46 +27,49 @@ GIT ...@@ -18,46 +27,49 @@ GIT
PATH PATH
remote: . remote: .
specs: specs:
cocoapods (0.15.2) cocoapods (0.17.0.alpha)
activesupport (~> 3.2.6) activesupport (~> 3.2.6)
claide (~> 0.1)
cocoapods-core
colored (~> 1.2) colored (~> 1.2)
escape (~> 0.0.4) escape (~> 0.0.4)
faraday (~> 0.8.1) faraday (~> 0.8.1)
json (~> 1.7.3) json (~> 1.7.3)
octokit (~> 1.7) octokit (~> 1.7)
open4 (~> 1.3.0) open4 (~> 1.3.0)
rake (~> 0.9.0) rake (~> 0.9.4)
xcodeproj (~> 0.3.5) xcodeproj (~> 0.4.0)
GEM GEM
remote: http://rubygems.org/ remote: http://rubygems.org/
specs: specs:
activesupport (3.2.8) activesupport (3.2.9)
i18n (~> 0.6) i18n (~> 0.6)
multi_json (~> 1.0) multi_json (~> 1.0)
addressable (2.3.2) addressable (2.3.2)
awesome_print (1.1.0) awesome_print (1.1.0)
bacon (1.1.0) bacon (1.1.0)
claide (0.2.0)
coderay (1.0.8) coderay (1.0.8)
colored (1.2) colored (1.2)
crack (0.3.1) crack (0.3.1)
escape (0.0.4) escape (0.0.4)
faraday (0.8.4) faraday (0.8.4)
multipart-post (~> 1.1) multipart-post (~> 1.1)
faraday_middleware (0.8.8) faraday_middleware (0.9.0)
faraday (>= 0.7.4, < 0.9) faraday (>= 0.7.4, < 0.9)
github-markup (0.7.4) github-markup (0.7.4)
hashie (1.2.0) hashie (1.2.0)
i18n (0.6.1) i18n (0.6.1)
json (1.7.5) json (1.7.5)
listen (0.5.3) listen (0.6.0)
metaclass (0.0.1) metaclass (0.0.1)
method_source (0.8.1) method_source (0.8.1)
mocha (0.11.4) mocha (0.11.4)
metaclass (~> 0.0.1) metaclass (~> 0.0.1)
mocha-on-bacon (0.2.1) mocha-on-bacon (0.2.1)
mocha (>= 0.9.8) mocha (>= 0.9.8)
multi_json (1.3.6) multi_json (1.3.7)
multipart-post (1.1.5) multipart-post (1.1.5)
octokit (1.18.0) octokit (1.18.0)
addressable (~> 2.2) addressable (~> 2.2)
...@@ -70,13 +82,13 @@ GEM ...@@ -70,13 +82,13 @@ GEM
coderay (~> 1.0.5) coderay (~> 1.0.5)
method_source (~> 0.8) method_source (~> 0.8)
slop (~> 3.3.1) slop (~> 3.3.1)
rake (0.9.2.2) rake (0.9.5)
rb-fsevent (0.9.2) rb-fsevent (0.9.2)
redcarpet (2.2.2) redcarpet (2.2.2)
slop (3.3.3) slop (3.3.3)
terminal-notifier (1.4.2) terminal-notifier (1.4.2)
vcr (2.2.5) vcr (2.3.0)
webmock (1.8.11) webmock (1.9.0)
addressable (>= 2.2.7) addressable (>= 2.2.7)
crack (>= 0.1.7) crack (>= 0.1.7)
yard (0.8.3) yard (0.8.3)
...@@ -88,6 +100,7 @@ DEPENDENCIES ...@@ -88,6 +100,7 @@ DEPENDENCIES
awesome_print awesome_print
bacon bacon
cocoapods! cocoapods!
cocoapods-core!
github-markup github-markup
kicker! kicker!
mocha (~> 0.11.4) mocha (~> 0.11.4)
......
...@@ -108,9 +108,9 @@ namespace :gem do ...@@ -108,9 +108,9 @@ namespace :gem do
required_xcodeproj_version = xcodeproj.requirement.requirements.first.last.to_s required_xcodeproj_version = xcodeproj.requirement.requirements.first.last.to_s
puts "* Checking if xcodeproj #{required_xcodeproj_version} exists on the gem host" puts "* Checking if xcodeproj #{required_xcodeproj_version} exists on the gem host"
search_result = silent_sh("gem search --remote xcodeproj") search_result = silent_sh("gem search --all --remote xcodeproj")
remote_xcodeproj_version = search_result.match(/xcodeproj \(([\d\.]+)\)/m)[1] remote_xcodeproj_versions = search_result.match(/xcodeproj \((.*)\)/m)[1].split(', ')
unless Gem::Version.new(required_xcodeproj_version) <= Gem::Version.new(remote_xcodeproj_version) unless remote_xcodeproj_versions.include?(required_xcodeproj_version)
$stderr.puts "[!] The Xcodeproj version `#{required_xcodeproj_version}' required by " \ $stderr.puts "[!] The Xcodeproj version `#{required_xcodeproj_version}' required by " \
"this version of CocoaPods does not exist on the gem host. " \ "this version of CocoaPods does not exist on the gem host. " \
"Either push that first, or fix the version requirement." "Either push that first, or fix the version requirement."
...@@ -211,7 +211,7 @@ namespace :spec do ...@@ -211,7 +211,7 @@ namespace :spec do
tarballs = FileList['spec/fixtures/**/*.tar.gz'] tarballs = FileList['spec/fixtures/**/*.tar.gz']
tarballs.each do |tarball| tarballs.each do |tarball|
basename = File.basename(tarball) basename = File.basename(tarball)
sh "cd #{File.dirname(tarball)} && rm #{basename} && tar -zcf #{basename} #{basename[0..-8]}" sh "cd #{File.dirname(tarball)} && rm #{basename} && env COPYFILE_DISABLE=1 tar -zcf #{basename} #{basename[0..-8]}"
end end
end end
......
...@@ -13,4 +13,4 @@ end ...@@ -13,4 +13,4 @@ end
require 'cocoapods' require 'cocoapods'
Pod::Command.run(*ARGV) Pod::Command.run(ARGV)
# -*- encoding: utf-8 -*- # -*- encoding: utf-8 -*-
$:.unshift File.expand_path('../lib', __FILE__) $:.unshift File.expand_path('../lib', __FILE__)
require 'cocoapods' require 'cocoapods/version'
Gem::Specification.new do |s| Gem::Specification.new do |s|
s.name = "cocoapods" s.name = "cocoapods"
...@@ -26,7 +26,9 @@ Gem::Specification.new do |s| ...@@ -26,7 +26,9 @@ Gem::Specification.new do |s|
s.executables = %w{ pod } s.executables = %w{ pod }
s.require_paths = %w{ lib } s.require_paths = %w{ lib }
s.add_runtime_dependency 'xcodeproj', '~> 0.3.5' s.add_runtime_dependency 'cocoapods-core'
s.add_runtime_dependency 'claide', '~> 0.1'
s.add_runtime_dependency 'xcodeproj', '~> 0.4.0'
s.add_runtime_dependency 'faraday', '~> 0.8.1' s.add_runtime_dependency 'faraday', '~> 0.8.1'
s.add_runtime_dependency 'octokit', '~> 1.7' s.add_runtime_dependency 'octokit', '~> 1.7'
...@@ -34,7 +36,7 @@ Gem::Specification.new do |s| ...@@ -34,7 +36,7 @@ Gem::Specification.new do |s|
s.add_runtime_dependency 'escape', '~> 0.0.4' s.add_runtime_dependency 'escape', '~> 0.0.4'
s.add_runtime_dependency 'json', '~> 1.7.3' s.add_runtime_dependency 'json', '~> 1.7.3'
s.add_runtime_dependency 'open4', '~> 1.3.0' s.add_runtime_dependency 'open4', '~> 1.3.0'
s.add_runtime_dependency 'rake', '~> 0.9.0' s.add_runtime_dependency 'rake', '~> 0.9.4'
s.add_runtime_dependency 'activesupport', '~> 3.2.6' s.add_runtime_dependency 'activesupport', '~> 3.2.6'
s.add_development_dependency 'bacon', '~> 1.1' s.add_development_dependency 'bacon', '~> 1.1'
......
COCOAPODS: 0.15.1 PODS:
- AFNetworking (0.7.0):
PODS:
- AFNetworking (0.7.0):
- JSONKit - JSONKit
- FormatterKit (1.0.0): - FormatterKit (1.0.0):
- FormatterKit/ArrayFormatter (= 1.0.0) - FormatterKit/ArrayFormatter (= 1.0.0)
- FormatterKit/LocationFormatter (= 1.0.0) - FormatterKit/LocationFormatter (= 1.0.0)
- FormatterKit/OrdinalNumberFormatter (= 1.0.0) - FormatterKit/OrdinalNumberFormatter (= 1.0.0)
...@@ -19,17 +17,19 @@ PODS: ...@@ -19,17 +17,19 @@ PODS:
- FormatterKit/UnitOfInformationFormatter (1.0.0) - FormatterKit/UnitOfInformationFormatter (1.0.0)
- JSONKit (1.5pre) - JSONKit (1.5pre)
SPEC CHECKSUMS: DEPENDENCIES:
FormatterKit/UnitOfInformationFormatter: 12dea999a2df19e389f7b821962fc4088de8b821 - AFNetworking (~> 0.7.0)
FormatterKit/TimeIntervalFormatter: 12dea999a2df19e389f7b821962fc4088de8b821 - FormatterKit
SPEC CHECKSUMS:
AFNetworking: 7bf22b0ed1d9068909cd67206db78204eb63dd2c AFNetworking: 7bf22b0ed1d9068909cd67206db78204eb63dd2c
JSONKit: a01a22c75f27eae76b4badd55a91c20fe6e86477 FormatterKit: 12dea999a2df19e389f7b821962fc4088de8b821
FormatterKit/OrdinalNumberFormatter: 12dea999a2df19e389f7b821962fc4088de8b821 FormatterKit/ArrayFormatter: 12dea999a2df19e389f7b821962fc4088de8b821
FormatterKit/LocationFormatter: 12dea999a2df19e389f7b821962fc4088de8b821 FormatterKit/LocationFormatter: 12dea999a2df19e389f7b821962fc4088de8b821
FormatterKit/OrdinalNumberFormatter: 12dea999a2df19e389f7b821962fc4088de8b821
FormatterKit/TimeIntervalFormatter: 12dea999a2df19e389f7b821962fc4088de8b821
FormatterKit/URLRequestFormatter: 12dea999a2df19e389f7b821962fc4088de8b821 FormatterKit/URLRequestFormatter: 12dea999a2df19e389f7b821962fc4088de8b821
FormatterKit/ArrayFormatter: 12dea999a2df19e389f7b821962fc4088de8b821 FormatterKit/UnitOfInformationFormatter: 12dea999a2df19e389f7b821962fc4088de8b821
FormatterKit: 12dea999a2df19e389f7b821962fc4088de8b821 JSONKit: a01a22c75f27eae76b4badd55a91c20fe6e86477
DEPENDENCIES: COCOAPODS: 0.16.0.rc2
- AFNetworking (~> 0.7.0)
- FormatterKit
SPEC CHECKSUMS: PODS:
FormatterKit/UnitOfInformationFormatter: 12dea999a2df19e389f7b821962fc4088de8b821 - AFNetworking (0.7.0):
AFNetworking: 7bf22b0ed1d9068909cd67206db78204eb63dd2c
JSONKit: a01a22c75f27eae76b4badd55a91c20fe6e86477
FormatterKit/URLRequestFormatter: 12dea999a2df19e389f7b821962fc4088de8b821
FormatterKit: 12dea999a2df19e389f7b821962fc4088de8b821
FormatterKit/OrdinalNumberFormatter: 12dea999a2df19e389f7b821962fc4088de8b821
FormatterKit/TimeIntervalFormatter: 12dea999a2df19e389f7b821962fc4088de8b821
FormatterKit/ArrayFormatter: 12dea999a2df19e389f7b821962fc4088de8b821
FormatterKit/LocationFormatter: 12dea999a2df19e389f7b821962fc4088de8b821
PODS:
- AFNetworking (0.7.0):
- JSONKit - JSONKit
- FormatterKit (1.0.0): - FormatterKit (1.0.0):
- FormatterKit/ArrayFormatter (= 1.0.0) - FormatterKit/ArrayFormatter (= 1.0.0)
- FormatterKit/LocationFormatter (= 1.0.0) - FormatterKit/LocationFormatter (= 1.0.0)
- FormatterKit/OrdinalNumberFormatter (= 1.0.0) - FormatterKit/OrdinalNumberFormatter (= 1.0.0)
...@@ -28,8 +17,19 @@ PODS: ...@@ -28,8 +17,19 @@ PODS:
- FormatterKit/UnitOfInformationFormatter (1.0.0) - FormatterKit/UnitOfInformationFormatter (1.0.0)
- JSONKit (1.5pre) - JSONKit (1.5pre)
COCOAPODS: 0.15.1 DEPENDENCIES:
DEPENDENCIES:
- AFNetworking (~> 0.7.0) - AFNetworking (~> 0.7.0)
- FormatterKit - FormatterKit
SPEC CHECKSUMS:
AFNetworking: 7bf22b0ed1d9068909cd67206db78204eb63dd2c
FormatterKit: 12dea999a2df19e389f7b821962fc4088de8b821
FormatterKit/ArrayFormatter: 12dea999a2df19e389f7b821962fc4088de8b821
FormatterKit/LocationFormatter: 12dea999a2df19e389f7b821962fc4088de8b821
FormatterKit/OrdinalNumberFormatter: 12dea999a2df19e389f7b821962fc4088de8b821
FormatterKit/TimeIntervalFormatter: 12dea999a2df19e389f7b821962fc4088de8b821
FormatterKit/URLRequestFormatter: 12dea999a2df19e389f7b821962fc4088de8b821
FormatterKit/UnitOfInformationFormatter: 12dea999a2df19e389f7b821962fc4088de8b821
JSONKit: a01a22c75f27eae76b4badd55a91c20fe6e86477
COCOAPODS: 0.16.0.rc2
DEPENDENCIES: PODS:
- MGSplitViewController (1.0.0)
DEPENDENCIES:
- MGSplitViewController (= 1.0.0) - MGSplitViewController (= 1.0.0)
SPEC CHECKSUMS: SPEC CHECKSUMS:
MGSplitViewController: e0b0bc01aa81e1559765c39e7a764c890dac373a MGSplitViewController: e0b0bc01aa81e1559765c39e7a764c890dac373a
PODS: COCOAPODS: 0.16.0.rc2
- MGSplitViewController (1.0.0)
COCOAPODS: 0.15.1
...@@ -37,10 +37,10 @@ DEPENDENCIES: ...@@ -37,10 +37,10 @@ DEPENDENCIES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
FileMD5Hash: c3b015e6fb293eea0a0c276747f61f20408c2644 FileMD5Hash: c3b015e6fb293eea0a0c276747f61f20408c2644
ISO8601DateFormatter: dc05a2481edf49668d85d3ff8c466c32eb544780 ISO8601DateFormatter: dc05a2481edf49668d85d3ff8c466c32eb544780
JSONKit: 3d4708953ea7ae399a49777372d8b060a43ddd27 JSONKit: a01a22c75f27eae76b4badd55a91c20fe6e86477
LibComponentLogging-Core: c80e88f2b7fb204554de7bec13374daf394097e8 LibComponentLogging-Core: 9c2914bc501a0656450860a136b0e8e52f3e16d4
LibComponentLogging-NSLog: d8f54e7eb65bb893f91cab5864ecf8e85ebd9359 LibComponentLogging-NSLog: a4bb0f6de612eef7b5fcdbd9cc96dc868ba1f2df
NSData+Base64: be7e201540fa7805ecedc1f38d456e008be259b2 NSData+Base64: 8b910cb8a64f45daec6fb15936c36a9a911c57ca
RestKit: a9f24f857c792183bcc656f891abe93d38e342ee RestKit: a9f24f857c792183bcc656f891abe93d38e342ee
RestKit/JSON: a9f24f857c792183bcc656f891abe93d38e342ee RestKit/JSON: a9f24f857c792183bcc656f891abe93d38e342ee
RestKit/Network: a9f24f857c792183bcc656f891abe93d38e342ee RestKit/Network: a9f24f857c792183bcc656f891abe93d38e342ee
...@@ -50,4 +50,4 @@ SPEC CHECKSUMS: ...@@ -50,4 +50,4 @@ SPEC CHECKSUMS:
SOCKit: 9d71b00c699cf5aa2989d6aa12f3392b048123db SOCKit: 9d71b00c699cf5aa2989d6aa12f3392b048123db
cocoa-oauth: 8f4c8b77c77ac660de37f8125557c4ec09b0118a cocoa-oauth: 8f4c8b77c77ac660de37f8125557c4ec09b0118a
COCOAPODS: 0.13.0 COCOAPODS: 0.16.0.rc2
COCOAPODS: 0.15.1 PODS:
- AFNetworking (1.0RC1)
DEPENDENCIES: DEPENDENCIES:
- AFNetworking - AFNetworking
SPEC CHECKSUMS: SPEC CHECKSUMS:
AFNetworking: b21c1252d437fd322e7db1caa93b163d76a362cb AFNetworking: b21c1252d437fd322e7db1caa93b163d76a362cb
PODS: COCOAPODS: 0.16.0.rc2
- AFNetworking (1.0RC1)
...@@ -11,4 +11,4 @@ SPEC CHECKSUMS: ...@@ -11,4 +11,4 @@ SPEC CHECKSUMS:
AFNetworking: b21c1252d437fd322e7db1caa93b163d76a362cb AFNetworking: b21c1252d437fd322e7db1caa93b163d76a362cb
SSToolkit: 852044205c6a15586431e90f46b2ef01f693285a SSToolkit: 852044205c6a15586431e90f46b2ef01f693285a
COCOAPODS: 0.13.0 COCOAPODS: 0.16.0.rc2
...@@ -6,6 +6,6 @@ DEPENDENCIES: ...@@ -6,6 +6,6 @@ DEPENDENCIES:
- JSONKit - JSONKit
SPEC CHECKSUMS: SPEC CHECKSUMS:
JSONKit: 3d4708953ea7ae399a49777372d8b060a43ddd27 JSONKit: a01a22c75f27eae76b4badd55a91c20fe6e86477
COCOAPODS: 0.13.0 COCOAPODS: 0.16.0.rc2
...@@ -11,40 +11,31 @@ unless Gem::Version::Requirement.new('>= 1.4.0').satisfied_by?(Gem::Version.new( ...@@ -11,40 +11,31 @@ unless Gem::Version::Requirement.new('>= 1.4.0').satisfied_by?(Gem::Version.new(
exit 1 exit 1
end end
module Pod require 'cocoapods/version'
VERSION = '0.15.2'
module Pod
class PlainInformative < StandardError class PlainInformative < StandardError
end end
class Informative < PlainInformative class Informative < PlainInformative
def message def message
# TODO: remove formatting from raise calls and remove conditional # TODO: remove formatting from raise calls and remove conditional
super !~ /\[!\]/ ? "[!] #{super}\n".red : super super !~ /\[!\]/ ? "[!] #{super}".red : super
end end
end end
autoload :Command, 'cocoapods/command' autoload :Command, 'cocoapods/command'
autoload :Config, 'cocoapods/config'
autoload :Dependency, 'cocoapods/dependency'
autoload :Downloader, 'cocoapods/downloader' autoload :Downloader, 'cocoapods/downloader'
autoload :Executable, 'cocoapods/executable' autoload :Executable, 'cocoapods/executable'
autoload :ExternalSources, 'cocoapods/external_sources'
autoload :Installer, 'cocoapods/installer' autoload :Installer, 'cocoapods/installer'
autoload :LocalPod, 'cocoapods/local_pod' autoload :LocalPod, 'cocoapods/local_pod'
autoload :Lockfile, 'cocoapods/lockfile'
autoload :Platform, 'cocoapods/platform'
autoload :Podfile, 'cocoapods/podfile'
autoload :Project, 'cocoapods/project' autoload :Project, 'cocoapods/project'
autoload :Resolver, 'cocoapods/resolver' autoload :Resolver, 'cocoapods/resolver'
autoload :Sandbox, 'cocoapods/sandbox' autoload :Sandbox, 'cocoapods/sandbox'
autoload :Source, 'cocoapods/source'
autoload :Spec, 'cocoapods/specification'
autoload :Specification, 'cocoapods/specification'
autoload :UI, 'cocoapods/user_interface' autoload :UI, 'cocoapods/user_interface'
autoload :Version, 'cocoapods/version'
autoload :Pathname, 'pathname' autoload :Pathname, 'pathname'
autoload :FileList, 'cocoapods/file_list'
module Generator module Generator
autoload :BridgeSupport, 'cocoapods/generator/bridge_support' autoload :BridgeSupport, 'cocoapods/generator/bridge_support'
...@@ -54,9 +45,17 @@ module Pod ...@@ -54,9 +45,17 @@ module Pod
autoload :Plist, 'cocoapods/generator/acknowledgements/plist' autoload :Plist, 'cocoapods/generator/acknowledgements/plist'
autoload :Markdown, 'cocoapods/generator/acknowledgements/markdown' autoload :Markdown, 'cocoapods/generator/acknowledgements/markdown'
autoload :DummySource, 'cocoapods/generator/dummy_source' autoload :DummySource, 'cocoapods/generator/dummy_source'
autoload :PrefixHeader, 'cocoapods/generator/prefix_header'
autoload :XCConfig, 'cocoapods/generator/xcconfig'
end end
require 'cocoapods/file_list'
require 'cocoapods-core'
require 'cocoapods/config'
require 'cocoapods/source'
end end
if ENV['COCOA_PODS_ENV'] == 'development' if ENV['COCOA_PODS_ENV'] == 'development'
require 'awesome_print' require 'awesome_print'
require 'pry'
end end
require 'colored' require 'colored'
require 'claide'
module Pod module Pod
class Command class PlainInformative
autoload :ErrorReport, 'cocoapods/command/error_report' include CLAide::InformativeError
autoload :Install, 'cocoapods/command/install' end
autoload :List, 'cocoapods/command/list'
autoload :Linter, 'cocoapods/command/linter'
autoload :Outdated, 'cocoapods/command/outdated'
autoload :Push, 'cocoapods/command/push'
autoload :Repo, 'cocoapods/command/repo'
autoload :Search, 'cocoapods/command/search'
autoload :Setup, 'cocoapods/command/setup'
autoload :Spec, 'cocoapods/command/spec'
autoload :Update, 'cocoapods/command/update'
class Help < Informative
def initialize(command_class, argv, unrecognized_command = nil)
@command_class, @argv, @unrecognized_command = command_class, argv, unrecognized_command
end
def message
message = [
'',
@command_class.banner.gsub(/\$ pod (.*)/, '$ pod \1'.green),
'',
'Options:',
'',
options,
"\n",
].join("\n")
message << "[!] Unrecognized command: `#{@unrecognized_command}'\n".red if @unrecognized_command
message << "[!] Unrecognized argument#{@argv.count > 1 ? 's' : ''}: `#{@argv.join(' - ')}'\n".red unless @argv.empty?
message
end
private
def options
options = @command_class.options
keys = options.map(&:first)
key_size = keys.inject(0) { |size, key| key.size > size ? key.size : size }
options.map { |key, desc| " #{key.ljust(key_size)} #{desc}" }.join("\n")
end
end
class ARGV < Array class Command < CLAide::Command
def options; select { |x| x.to_s[0,1] == '-' }; end autoload :ErrorReport, 'cocoapods/command/error_report'
def arguments; self - options; end autoload :DeepLinter, 'cocoapods/command/deep_linter'
def option(name); !!delete(name); end
def shift_argument; (arg = arguments[0]) && delete(arg); end
end
def self.banner self.abstract_command = true
commands = ['install', 'update', 'outdated', 'list', 'push', 'repo', 'search', 'setup', 'spec'].sort self.command = 'pod'
banner = "To see help for the available commands run:\n\n" self.description = 'CocoaPods, the Objective-C library package manager.'
banner + commands.map { |cmd| " * $ pod #{cmd.green} --help" }.join("\n")
end
def self.options def self.options
[ [
['--help', 'Show help information'], ['--silent', 'Show nothing'],
['--silent', 'Print nothing'], ['--version', 'Show the version of CocoaPods'],
['--no-color', 'Print output without color'], ].concat(super)
['--verbose', 'Print more information while working'],
['--version', 'Prints the version of CocoaPods'],
]
end end
def self.run(*argv) def self.parse(argv)
sub_command = parse(*argv) command = super
unless sub_command.is_a?(Setup) || ENV['SKIP_SETUP'] unless command.is_a?(Setup) || ENV['SKIP_SETUP']
Setup.new(ARGV.new).run_if_needed Setup.new(CLAide::ARGV.new([])).run_if_needed
end end
sub_command.run command
UI.puts
rescue Interrupt
puts "[!] Cancelled".red
Config.instance.verbose? ? raise : exit(1)
rescue Exception => e
if e.is_a?(PlainInformative) || ENV['COCOA_PODS_ENV'] == 'development' # also catches Informative
puts e.message
puts *e.backtrace if Config.instance.verbose? || ENV['COCOA_PODS_ENV'] == 'development'
else
puts ErrorReport.report(e)
end
exit 1
end end
def self.parse(*argv) def self.run(argv)
argv = ARGV.new(argv) argv = CLAide::ARGV.new(argv)
if argv.option('--version') if argv.flag?('version')
puts VERSION puts VERSION
exit!(0) exit!(0)
end end
super(argv)
end
show_help = argv.option('--help') def self.report_error(error)
Config.instance.silent = argv.option('--silent') if error.is_a?(Interrupt)
Config.instance.verbose = argv.option('--verbose') puts "[!] Cancelled".red
Config.instance.verbose? ? raise : exit(1)
String.send(:define_method, :colorize) { |string , _| string } if argv.option( '--no-color' )
command_class = case command_argument = argv.shift_argument
when 'install' then Install
when 'list' then List
when 'outdated' then Outdated
when 'push' then Push
when 'repo' then Repo
when 'search' then Search
when 'setup' then Setup
when 'spec' then Spec
when 'update' then Update
end
if command_class.nil?
raise Help.new(self, argv, command_argument)
elsif show_help
raise Help.new(command_class, argv)
else else
command_class.new(argv) puts ErrorReport.report(error)
exit 1
end end
end end
include Config::Mixin
def initialize(argv) def initialize(argv)
raise Help.new(self.class, argv) config.silent = argv.flag?('silent')
super
config.verbose = self.verbose?
# TODO we should probably not even load colored unless needed
String.send(:define_method, :colorize) { |string , _| string } unless self.colorize_output?
end end
include Config::Mixin
private private
def verify_podfile_exists! def verify_podfile_exists!
...@@ -145,3 +74,11 @@ module Pod ...@@ -145,3 +74,11 @@ module Pod
end end
end end
require 'cocoapods/command/list'
require 'cocoapods/command/outdated'
require 'cocoapods/command/project'
require 'cocoapods/command/push'
require 'cocoapods/command/repo'
require 'cocoapods/command/search'
require 'cocoapods/command/setup'
require 'cocoapods/command/spec'
module Pod
class Command
class DeepLinter < Specification::Linter
include Config::Mixin
# Lints the specification adding a {Result} for any failed check to the
# {#results} list.
#
# @return [Bool] whether the specification passed validation.
#
def lint
super
unless quick
check_repo_path
spec.available_platforms.each do |platform|
UI.section "\n\n#{spec} - Analyzing on #{platform} platform.".green.reversed do
current_platform = platform
set_up_lint_environment
install_pod
build_pod
check_file_patterns
tear_down_lint_environment
end
end
end
errors.empty? && warnings.empty? && deprecations.empty?
end
# @return [Bool] whether the lint should skip the checks that requires
# the download or the build of the library.
#
attr_accessor :quick
# @return [Bool] whether the linter should not clean up temporary files
# for inspection.
#
attr_accessor :no_clean
# @return [Pathname] whether the lint should be performed
#
attr_accessor :repo_path
# @return [Bool] whether the lint should be performed against the root of
# the podspec instead to its original source. Uses the `:local` option
# of the Podfile.
#
attr_writer :local
def local?; @local; end
#-----------------------------------------------------------------------#
# !@group Lint results
public
# @return [Array<Result>] all the notes generated by the Linter.
#
def notes
@errors ||= results.select { |r| r.type == :note }
end
#-----------------------------------------------------------------------#
private
# !@group Lint steps
def check_repo_path
return unless repo_path
expected_path = "#{spec.name}/#{spec.version}/#{spec.name}.podspec"
path = file.relative_path_from(repo_path).to_s
unless path.end_with?(expected_path)
error "Incorrect path, the path is `#{file}` and should be `#{expected_path}`"
end
end
def set_up_lint_environment
tmp_dir.rmtree if tmp_dir.exist?
tmp_dir.mkpath
@original_config = Config.instance.clone
config.project_root = tmp_dir
config.project_pods_root = tmp_dir + 'Pods'
config.silent = !config.verbose
config.integrate_targets = false
config.generate_docs = false
end
def tear_down_lint_environment
tmp_dir.rmtree unless no_clean
Config.instance = @original_config
end
# It creates a podfile in memory and builds a library containing
# the pod for all available platforms with xcodebuild.
#
def install_pod
spec.activate_platform(current_platform)
podfile = podfile_from_spec
config.verbose
config.skip_repo_update = true
sandbox = Sandbox.new(config.project_pods_root)
resolver = Resolver.new(podfile, nil, sandbox)
installer = Installer.new(resolver)
installer.install!
@pod = installer.pods.find { |pod| pod.top_specification == spec }
config.silent
end
# Performs platform specific analysis.
# It requires to download the source at each iteration
#
# @note Treat xcodebuild warnings as notes because the spec maintainer
# might not be the author of the library
#
def build_pod
if `which xcodebuild`.strip.empty?
UI.warn "Skipping compilation with `xcodebuild' because it can't be found.\n".yellow
else
UI.message "\nBuilding with xcodebuild.\n".yellow if config.verbose? do
messages = []
output = Dir.chdir(config.project_pods_root) { `xcodebuild clean build 2>&1` }
clean_output = parse_xcodebuild_output(output)
messages += clean_output
puts(output) if config.verbose?
messages.each { |msg| ( msg.include?('error: ') ? @platform_errors[@platform] : @platform_notes[@platform] ) << msg }
end
end
end
# It checks that every file pattern specified in a spec yields
# at least one file. It requires the pods to be already present
# in the current working directory under Pods/spec.name.
#
# @return [Array<String>]
#
def check_file_patterns
error "The sources did not match any file" if !spec.source_files.empty? && @pod.source_files.empty?
error "The resources did not match any file" if !spec.resources.empty? && @pod.resource_files.empty?
error "The preserve_paths did not match any file" if !spec.preserve_paths.empty? && @pod.preserve_files.empty?
error "The exclude_header_search_paths did not match any file" if !spec.exclude_header_search_paths.empty? && @pod.headers_excluded_from_search_paths.empty?
unless @pod.license_file || spec.license && ( spec.license[:type] == 'Public Domain' || spec.license[:text] )
warning "Unable to find a license file"
end
end
# @errors += (@platform_errors[platform] - @errors).map {|m| "[#{platform}] #{m}"}
#-----------------------------------------------------------------------#
private
# !@group Helpers
# @return [Podfile] a podfile that requires the specification on the
# current platform.
#
# @note The generated podfile takes into account whether the linter is
# in local mode.
#
def podfile_from_spec
name = spec.name
podspec = file.realpath
platform = current_platform
local = local?
podfile = Pod::Podfile.new do
platform(platform.to_sym, platform.deployment_target)
if (local)
pod name, :local => podspec.dirname.to_s
else
pod name, :podspec => podspec.to_s
end
end
podfile
end
# @return [Pathname] the temporary directory used by the linter.
#
def tmp_dir
Pathname.new('/tmp/CocoaPods/Lint')
end
# @return [Pathname] the root of the installed pod.
#
def pod_dir
tmp_dir + 'Pods' + spec.name
end
# Parse the xcode build output to identify the lines which are relevant
# to the linter. It also removes the indentation and the temporary path.
#
# @param [String] output
# the output generated by the xcodebuild tool.
#
# @return [Array<String>] the lines that are relevant to the linter.
#
def parse_xcodebuild_output(output)
lines = output.split("\n")
selected_lines = lines.select do |l|
l.include?('error: ') &&
(l !~ /errors? generated\./) && (l !~ /error: \(null\)/) ||
l.include?('warning: ') && (l !~ /warnings? generated\./) ||
l.include?('note: ') && (l !~ /expanded from macro/)
end
selected_lines.map do |l|
new = l.gsub(/\/tmp\/CocoaPods\/Lint\/Pods\//,'') # Remove the unnecessary tmp path
new.gsub!(/^ */,' ') # Remove indentation
"XCODEBUILD > " << new # Mark
end
end
end
end
end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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