Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: CocoaPods/CocoaPods
...
head fork: CocoaPods/CocoaPods
  • 14 commits
  • 41 files changed
  • 1 commit comment
  • 2 contributors
Showing with 102 additions and 61 deletions.
  1. +20 −4 CHANGELOG.md
  2. +1 −1  Gemfile
  3. +3 −0  Rakefile
  4. +9 −5 lib/cocoapods.rb
  5. +10 −9 lib/cocoapods/command.rb
  6. +4 −2 lib/cocoapods/command/list.rb
  7. +7 −1 lib/cocoapods/command/search.rb
  8. +1 −1  lib/cocoapods/gem_version.rb
  9. +1 −1  lib/cocoapods/generator/xcconfig.rb
  10. +2 −2 lib/cocoapods/installer.rb
  11. +3 −1 lib/cocoapods/installer/user_project_integrator/target_integrator.rb
  12. +2 −2 lib/cocoapods/sources_manager.rb
  13. +2 −2 lib/cocoapods/user_interface.rb
  14. +0 −1  spec/functional/user_interface_spec.rb
  15. +1 −1  spec/integration/install_add_pod/after/Podfile.lock
  16. +1 −1  spec/integration/install_add_pod/after/Pods/Manifest.lock
  17. +1 −1  spec/integration/install_custom_workspace/after/Podfile.lock
  18. +1 −1  spec/integration/install_custom_workspace/after/Pods/Manifest.lock
  19. +1 −1  spec/integration/install_external_source/after/Podfile.lock
  20. +1 −1  spec/integration/install_external_source/after/Pods/Manifest.lock
  21. +1 −1  spec/integration/install_local_source/after/Podfile.lock
  22. +1 −1  spec/integration/install_local_source/after/Pods/Manifest.lock
  23. +1 −1  spec/integration/install_multiple_targets/after/Podfile.lock
  24. +1 −1  spec/integration/install_multiple_targets/after/Pods/Manifest.lock
  25. +1 −1  spec/integration/install_new/after/Podfile.lock
  26. +1 −1  spec/integration/install_new/after/Pods/Manifest.lock
  27. +1 −1  spec/integration/install_podfile_callbacks/after/Podfile.lock
  28. +1 −1  spec/integration/install_podfile_callbacks/after/Pods/Manifest.lock
  29. +1 −1  spec/integration/install_podspec/after/Podfile.lock
  30. +1 −1  spec/integration/install_podspec/after/Pods/Manifest.lock
  31. +1 −1  spec/integration/install_remove_pod/after/Podfile.lock
  32. +1 −1  spec/integration/install_remove_pod/after/Pods/Manifest.lock
  33. +1 −1  spec/integration/install_spec_callbacks/after/Podfile.lock
  34. +1 −1  spec/integration/install_spec_callbacks/after/Pods/Manifest.lock
  35. +1 −1  spec/integration/install_subspecs/after/Podfile.lock
  36. +1 −1  spec/integration/install_subspecs/after/Pods/Manifest.lock
  37. +1 −1  spec/integration/update/after/Podfile.lock
  38. +1 −1  spec/integration/update/after/Pods/Manifest.lock
  39. +2 −2 spec/unit/generator/xcconfig_spec.rb
  40. +8 −0 spec/unit/installer/user_project_integrator/target_integrator_spec.rb
  41. +3 −3 spec/unit/sources_manager_spec.rb
24 CHANGELOG.md
View
@@ -1,7 +1,23 @@
-## 0.18.0 (unreleased)
-[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.17.2...0.17.3)
-• [cocoapods-core](https://github.com/CocoaPods/Core/compare/0.17.2...0.17.3)
-• [Xcodeproj](https://github.com/CocoaPods/Xcodeproj/compare/0.5.2...0.5.4)
+## 0.18.1
+[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.18.0...0.18.1)
+• [cocoapods-core](https://github.com/CocoaPods/Core/compare/0.18.0...0.18.)
+
+###### Bug fixes
+
+* Fixed a bug introduced in 0.18 which cause compilation issue due to the
+ quoting of the inherited value in the xcconfigs.
+ [#956](https://github.com/CocoaPods/CocoaPods/issues/956)
+* Robustness against user targets including build files with missing file
+ references.
+ [#938](https://github.com/CocoaPods/CocoaPods/issues/938)
+* Partially fixed slow performance from the command line
+ [#919](https://github.com/CocoaPods/CocoaPods/issues/919)
+
+
+## 0.18.0
+[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.17.2...0.18.0)
+• [cocoapods-core](https://github.com/CocoaPods/Core/compare/0.17.2...0.18.0)
+• [Xcodeproj](https://github.com/CocoaPods/Xcodeproj/compare/0.5.2...0.5.5)
###### Enhancements
2  Gemfile
View
@@ -7,7 +7,7 @@ gemspec
group :development do
if ENV['COCOA_PODS_DEPENDENCIES'] == 'local'
- gem 'cocoapods-core', :path => '../Core'
+ gem 'cocoapods-core', :path => '../Core', :brach => '0.18.1'
gem 'xcodeproj', :path => '../Xcodeproj'
gem 'cocoapods-downloader', :path => '../cocoapods-downloader'
else
3  Rakefile
View
@@ -208,6 +208,9 @@ namespace :spec do
#
desc "Run all specs and build all examples"
task :ci => :unpack_fixture_tarballs do
+ sh 'git config --global user.email "cocoapods@example.com"' if `git config user.email`.empty?
+ sh 'git config --global user.name "CocoaPods"' if `git config user.name`.empty?
+
title 'Running the specs'
sh "bundle exec bacon #{specs('**')}"
14 lib/cocoapods.rb
View
@@ -1,15 +1,17 @@
require 'rubygems'
+autoload :Xcodeproj, 'xcodeproj'
+
module Pod
require 'pathname'
require 'cocoapods/gem_version'
require 'cocoapods-core'
- require 'xcodeproj'
- require 'cocoapods/downloader'
require 'cocoapods/file_list'
require 'cocoapods/config'
+ autoload :Downloader, 'cocoapods/downloader'
+
# Indicates an user error. This is defined in cocoapods-core.
#
class Informative < PlainInformative
@@ -33,7 +35,9 @@ def message
#
MAX_CACHE_SIZE = 500
- Pod::Specification::Set::Statistics.instance.cache_file = CACHE_ROOT + 'statistics.yml'
+ # @return [Pathname] The file to use a cache of the statistics provider.
+ #
+ STATISTICS_CACHE_FILE = CACHE_ROOT + 'statistics.yml'
autoload :Command, 'cocoapods/command'
autoload :Executable, 'cocoapods/executable'
@@ -69,6 +73,6 @@ module Hooks
end
if ENV['COCOA_PODS_ENV'] == 'development'
- require 'awesome_print'
- require 'pry'
+ # require 'awesome_print'
+ # require 'pry'
end
19 lib/cocoapods/command.rb
View
@@ -8,6 +8,16 @@ class PlainInformative
class Command < CLAide::Command
+ 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'
+ require 'cocoapods/command/inter_process_communication'
+
self.abstract_command = true
self.command = 'pod'
self.description = 'CocoaPods, the Objective-C library package manager.'
@@ -102,12 +112,3 @@ def verify_lockfile_exists!
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'
-require 'cocoapods/command/inter_process_communication'
6 lib/cocoapods/command/list.rb
View
@@ -48,7 +48,8 @@ def run
dates, groups = {}, {}
days.each {|d| dates[d] = Time.now - 60 * 60 * 24 * d}
sets = SourcesManager.all_sets
- creation_dates = Specification::Set::Statistics.instance.creation_dates(sets)
+ statistics_provider = Specification::Set::Statistics.new(STATISTICS_CACHE_FILE)
+ creation_dates = statistics_provider.creation_dates(sets)
sets.each do |set|
set_date = creation_dates[set.name]
@@ -65,7 +66,8 @@ def run
next unless sets
UI.section("\nPods added in the last #{"day".pluralize(d)}".yellow) do
sorted = sets.sort_by {|s| creation_dates[s.name]}
- sorted.each { |set| UI.pod(set, (@stats ? :stats : :name)) }
+ mode = @stats ? :stats : :name
+ sorted.each { |set| UI.pod(set, mode, statistics_provider) }
end
end
end
8 lib/cocoapods/command/search.rb
View
@@ -42,9 +42,15 @@ def run
if @supported_on_osx
sets.reject!{ |set| !set.specification.available_platforms.map(&:name).include?(:osx) }
end
+
+ statistics_provider = Specification::Set::Statistics.new(STATISTICS_CACHE_FILE)
sets.each do |set|
begin
- UI.pod(set, (@stats ? :stats : :normal))
+ if @stats
+ UI.pod(set, :stats, statistics_provider)
+ else
+ UI.pod(set, :normal)
+ end
rescue DSLError
UI.warn "Skipping `#{set.name}` because the podspec contains errors."
end
2  lib/cocoapods/gem_version.rb
View
@@ -2,6 +2,6 @@ module Pod
# The version of the cocoapods command line tool.
#
- VERSION = '0.18.0' unless defined? Pod::VERSION
+ VERSION = '0.18.1' unless defined? Pod::VERSION
end
2  lib/cocoapods/generator/xcconfig.rb
View
@@ -146,7 +146,7 @@ def add_spec_build_settings_to_xcconfig(consumer, xcconfig)
# @todo Inheritance should be properly handled in Xcconfigs.
#
DEVELOPER_FRAMEWORKS_SEARCH_PATHS = [
- '"$(inherited)"',
+ '$(inherited)',
'"$(SDKROOT)/Developer/Library/Frameworks"',
'"$(DEVELOPER_LIBRARY_DIR)/Frameworks"'
]
4 lib/cocoapods/installer.rb
View
@@ -368,7 +368,7 @@ def integrate_user_project
#
def run_pre_install_hooks
UI.message "- Running pre install hooks" do
- installed_specs.each do |spec|
+ analysis_result.specifications.each do |spec|
executed = false
libraries_using_spec(spec).each do |lib|
lib_representation = library_rep(lib)
@@ -427,7 +427,7 @@ def run_podfile_pre_install_hook
#
def run_post_install_hooks
UI.message "- Running post install hooks" do
- installed_specs.each do |spec|
+ analysis_result.specifications.each do |spec|
executed = false
libraries_using_spec(spec).each do |lib|
lib_representation = library_rep(lib)
4 lib/cocoapods/installer/user_project_integrator/target_integrator.rb
View
@@ -55,7 +55,9 @@ def targets
non_integrated = targets.reject do |target|
target.frameworks_build_phase.files.any? do |build_file|
file_ref = build_file.file_ref
- file_ref.isa == 'PBXFileReference' && file_ref.display_name == library.product_name
+ file_ref &&
+ file_ref.isa == 'PBXFileReference' &&
+ file_ref.display_name == library.product_name
end
end
@targets = non_integrated
4 lib/cocoapods/sources_manager.rb
View
@@ -180,11 +180,11 @@ def check_version_information(dir)
version_msg = ( min == max ) ? min : "#{min} - #{max}"
raise Informative, "The `#{dir.basename}` repo requires " \
"CocoaPods #{version_msg}\n".red +
- "Update Cocoapods, or checkout the appropriate tag in the repo."
+ "Update CocoaPods, or checkout the appropriate tag in the repo."
end
if config.new_version_message? && cocoapods_update?(versions)
- UI.puts "\nCocoapods #{versions['last']} is available.\n".green
+ UI.puts "\nCocoaPods #{versions['last']} is available.\n".green
end
end
4 lib/cocoapods/user_interface.rb
View
@@ -157,11 +157,11 @@ def path(pathname)
# Prints the textual representation of a given set.
#
- def pod(set, mode = :normal)
+ def pod(set, mode = :normal, statistics_provider = nil)
if mode == :name
puts_indented set.name
else
- pod = Specification::Set::Presenter.new(set)
+ pod = Specification::Set::Presenter.new(set, statistics_provider)
title("\n-> #{pod.name} (#{pod.version})".green, '', 1) do
puts_indented pod.summary
labeled('Homepage', pod.homepage)
1  spec/functional/user_interface_spec.rb
View
@@ -7,7 +7,6 @@ module Pod
before do
@set = SourcesManager.search(Dependency.new('CocoaLumberjack'))
- Specification::Set::Statistics.instance.cache_file = nil
end
it "presents the name, version, description, homepage and source of a specification set" do
2  spec/integration/install_add_pod/after/Podfile.lock
View
@@ -10,4 +10,4 @@ SPEC CHECKSUMS:
JSONKit: 409734ab3407fce90ef7eaa95d7168f38d9a6601
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
-COCOAPODS: 0.18.0
+COCOAPODS: 0.18.1
2  spec/integration/install_add_pod/after/Pods/Manifest.lock
View
@@ -10,4 +10,4 @@ SPEC CHECKSUMS:
JSONKit: 409734ab3407fce90ef7eaa95d7168f38d9a6601
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
-COCOAPODS: 0.18.0
+COCOAPODS: 0.18.1
2  spec/integration/install_custom_workspace/after/Podfile.lock
View
@@ -8,4 +8,4 @@ DEPENDENCIES:
SPEC CHECKSUMS:
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
-COCOAPODS: 0.18.0
+COCOAPODS: 0.18.1
2  spec/integration/install_custom_workspace/after/Pods/Manifest.lock
View
@@ -8,4 +8,4 @@ DEPENDENCIES:
SPEC CHECKSUMS:
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
-COCOAPODS: 0.18.0
+COCOAPODS: 0.18.1
2  spec/integration/install_external_source/after/Podfile.lock
View
@@ -15,4 +15,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
PodTest: 5049980a26c8960af5a42d1c7f086483c5b29d8f
-COCOAPODS: 0.18.0
+COCOAPODS: 0.18.1
2  spec/integration/install_external_source/after/Pods/Manifest.lock
View
@@ -15,4 +15,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
PodTest: 5049980a26c8960af5a42d1c7f086483c5b29d8f
-COCOAPODS: 0.18.0
+COCOAPODS: 0.18.1
2  spec/integration/install_local_source/after/Podfile.lock
View
@@ -11,4 +11,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
Reachability: b14c20321fa00f7f4600d8c9856fc57e71ef2ffe
-COCOAPODS: 0.18.0
+COCOAPODS: 0.18.1
2  spec/integration/install_local_source/after/Pods/Manifest.lock
View
@@ -11,4 +11,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
Reachability: b14c20321fa00f7f4600d8c9856fc57e71ef2ffe
-COCOAPODS: 0.18.0
+COCOAPODS: 0.18.1
2  spec/integration/install_multiple_targets/after/Podfile.lock
View
@@ -10,4 +10,4 @@ SPEC CHECKSUMS:
JSONKit: 409734ab3407fce90ef7eaa95d7168f38d9a6601
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
-COCOAPODS: 0.18.0
+COCOAPODS: 0.18.1
2  spec/integration/install_multiple_targets/after/Pods/Manifest.lock
View
@@ -10,4 +10,4 @@ SPEC CHECKSUMS:
JSONKit: 409734ab3407fce90ef7eaa95d7168f38d9a6601
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
-COCOAPODS: 0.18.0
+COCOAPODS: 0.18.1
2  spec/integration/install_new/after/Podfile.lock
View
@@ -7,4 +7,4 @@ DEPENDENCIES:
SPEC CHECKSUMS:
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
-COCOAPODS: 0.18.0
+COCOAPODS: 0.18.1
2  spec/integration/install_new/after/Pods/Manifest.lock
View
@@ -7,4 +7,4 @@ DEPENDENCIES:
SPEC CHECKSUMS:
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
-COCOAPODS: 0.18.0
+COCOAPODS: 0.18.1
2  spec/integration/install_podfile_callbacks/after/Podfile.lock
View
@@ -7,4 +7,4 @@ DEPENDENCIES:
SPEC CHECKSUMS:
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
-COCOAPODS: 0.18.0
+COCOAPODS: 0.18.1
2  spec/integration/install_podfile_callbacks/after/Pods/Manifest.lock
View
@@ -7,4 +7,4 @@ DEPENDENCIES:
SPEC CHECKSUMS:
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
-COCOAPODS: 0.18.0
+COCOAPODS: 0.18.1
2  spec/integration/install_podspec/after/Podfile.lock
View
@@ -11,4 +11,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
Reachability: b14c20321fa00f7f4600d8c9856fc57e71ef2ffe
-COCOAPODS: 0.18.0
+COCOAPODS: 0.18.1
2  spec/integration/install_podspec/after/Pods/Manifest.lock
View
@@ -11,4 +11,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
Reachability: b14c20321fa00f7f4600d8c9856fc57e71ef2ffe
-COCOAPODS: 0.18.0
+COCOAPODS: 0.18.1
2  spec/integration/install_remove_pod/after/Podfile.lock
View
@@ -7,4 +7,4 @@ DEPENDENCIES:
SPEC CHECKSUMS:
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
-COCOAPODS: 0.18.0
+COCOAPODS: 0.18.1
2  spec/integration/install_remove_pod/after/Pods/Manifest.lock
View
@@ -7,4 +7,4 @@ DEPENDENCIES:
SPEC CHECKSUMS:
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
-COCOAPODS: 0.18.0
+COCOAPODS: 0.18.1
2  spec/integration/install_spec_callbacks/after/Podfile.lock
View
@@ -11,4 +11,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
Reachability: c1e48cc25f8e7cba878c83ad1981d334ef325522
-COCOAPODS: 0.18.0
+COCOAPODS: 0.18.1
2  spec/integration/install_spec_callbacks/after/Pods/Manifest.lock
View
@@ -11,4 +11,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
Reachability: c1e48cc25f8e7cba878c83ad1981d334ef325522
-COCOAPODS: 0.18.0
+COCOAPODS: 0.18.1
2  spec/integration/install_subspecs/after/Podfile.lock
View
@@ -13,4 +13,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
PodTest: 5049980a26c8960af5a42d1c7f086483c5b29d8f
-COCOAPODS: 0.18.0
+COCOAPODS: 0.18.1
2  spec/integration/install_subspecs/after/Pods/Manifest.lock
View
@@ -13,4 +13,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
PodTest: 5049980a26c8960af5a42d1c7f086483c5b29d8f
-COCOAPODS: 0.18.0
+COCOAPODS: 0.18.1
2  spec/integration/update/after/Podfile.lock
View
@@ -7,4 +7,4 @@ DEPENDENCIES:
SPEC CHECKSUMS:
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
-COCOAPODS: 0.18.0
+COCOAPODS: 0.18.1
2  spec/integration/update/after/Pods/Manifest.lock
View
@@ -7,4 +7,4 @@ DEPENDENCIES:
SPEC CHECKSUMS:
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
-COCOAPODS: 0.18.0
+COCOAPODS: 0.18.1
4 spec/unit/generator/xcconfig_spec.rb
View
@@ -98,7 +98,7 @@ module Pod
spec.xcconfig = { 'OTHER_LDFLAGS' => '-no_compact_unwind' }
spec.frameworks = ['SenTestingKit']
xcconfig = generator.generate
- xcconfig.to_hash['FRAMEWORK_SEARCH_PATHS'].should == '"$(inherited)" "$(SDKROOT)/Developer/Library/Frameworks" "$(DEVELOPER_LIBRARY_DIR)/Frameworks"'
+ xcconfig.to_hash['FRAMEWORK_SEARCH_PATHS'].should == '$(inherited) "$(SDKROOT)/Developer/Library/Frameworks" "$(DEVELOPER_LIBRARY_DIR)/Frameworks"'
end
it "doesn't include the developer frameworks if already present" do
@@ -108,7 +108,7 @@ module Pod
generator = Generator::XCConfig.new(config.sandbox, [consumer_1, consumer_2], './Pods')
spec.frameworks = ['SenTestingKit']
xcconfig = generator.generate
- xcconfig.to_hash['FRAMEWORK_SEARCH_PATHS'].should == '"$(inherited)" "$(SDKROOT)/Developer/Library/Frameworks" "$(DEVELOPER_LIBRARY_DIR)/Frameworks"'
+ xcconfig.to_hash['FRAMEWORK_SEARCH_PATHS'].should == '$(inherited) "$(SDKROOT)/Developer/Library/Frameworks" "$(DEVELOPER_LIBRARY_DIR)/Frameworks"'
end
#-----------------------------------------------------------------------#
8 spec/unit/installer/user_project_integrator/target_integrator_spec.rb
View
@@ -45,6 +45,14 @@ module Pod
@target_integrator.targets.map(&:name).should == %w[ SampleProject ]
end
+ it 'is robust against build files with missing file references' do
+ build_file = @sample_project.new(Xcodeproj::Project::PBXBuildFile)
+ build_file.file_ref = nil
+ @target_integrator.stubs(:user_project).returns(@sample_project)
+ @target.frameworks_build_phase.files << build_file
+ @target_integrator.targets.map(&:name).should == %w[ SampleProject ]
+ end
+
it 'does not perform the integration if there are no targets to integrate' do
@target_integrator.stubs(:targets).returns([])
@target_integrator.expects(:add_xcconfig_base_configuration).never
6 spec/unit/sources_manager_spec.rb
View
@@ -102,16 +102,16 @@ module Pod
it "informs the user if there is an update for CocoaPods" do
SourcesManager.stubs(:version_information).returns({ 'last' => '999.0' })
SourcesManager.check_version_information(temporary_directory)
- UI.output.should.match /Cocoapods 999.0 is available/
+ UI.output.should.match /CocoaPods 999.0 is available/
end
it "raises while asked to version information of a source if it is not compatible" do
SourcesManager.stubs(:version_information).returns({ 'min' => '999.0' })
e = lambda { SourcesManager.check_version_information(temporary_directory) }.should.raise Informative
- e.message.should.match /Update Cocoapods/
+ e.message.should.match /Update CocoaPods/
SourcesManager.stubs(:version_information).returns({ 'max' => '0.0.1' })
e = lambda { SourcesManager.check_version_information(temporary_directory) }.should.raise Informative
- e.message.should.match /Update Cocoapods/
+ e.message.should.match /Update CocoaPods/
end
it "returns whether a repository is compatible" do

Showing you all comments on commits in this comparison.

Eloy Durán
Owner

:heart:

Something went wrong with that request. Please try again.