Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' into DirList

* master:
  [Statistics] Robustness.
  [Outdated] Fixed crash.
  [LocalPod] Fixed clean paths.
  Fix RubyGems version informative crash.
  Credit where credit is due. Fabio, thanks for all the work!
  • Loading branch information...
commit 9b118f8693c9169ede44c939b23ed5ec7e48cab1 2 parents 3f15763 + 11edeba
@fabiopelosin fabiopelosin authored
View
10 CHANGELOG.md
@@ -2,6 +2,16 @@
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.15.0...master)
+###### Bug fixes
+
+- Fixed an issue that lead to empty directories for Pods.
+ [#519](https://github.com/CocoaPods/CocoaPods/issues/519)
+ [#568](https://github.com/CocoaPods/CocoaPods/issues/568)
+- Fixed a crash related to the RubyGems version informative.
+ [#570](https://github.com/CocoaPods/CocoaPods/issues/570)
+- Fixed a crash for `pod outdated`.
+ [#567](https://github.com/CocoaPods/CocoaPods/issues/567)
+
## 0.15.0
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.14.0...0.15.0) • [Xcodeproj](https://github.com/CocoaPods/Xcodeproj/compare/0.3.3...0.3.4)
View
3  LICENSE
@@ -1,4 +1,5 @@
-Copyright (c) 2012 Eloy Durán <eloy.de.enige@gmail.com>
+Copyright (c) 2011 - 2012 Eloy Durán <eloy.de.enige@gmail.com>
+Copyright (c) 2012 Fabio Pelosin <fabiopelosin@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
View
4 cocoapods.gemspec
@@ -7,9 +7,9 @@ Gem::Specification.new do |s|
s.version = Pod::VERSION
s.date = Date.today
s.license = "MIT"
- s.email = "eloy.de.enige@gmail.com"
+ s.email = ["eloy.de.enige@gmail.com", "fabiopelosin@gmail.com"]
s.homepage = "https://github.com/CocoaPods/CocoaPods"
- s.authors = ["Eloy Duran"]
+ s.authors = ["Eloy Duran", "Fabio Pelosin"]
s.summary = "An Objective-C library package manager."
s.description = "CocoaPods manages library dependencies for your Xcode project.\n\n" \
View
2  lib/cocoapods.rb
@@ -7,7 +7,7 @@
#
# E.g. https://github.com/CocoaPods/CocoaPods/issues/398
unless Gem::Version::Requirement.new('>= 1.4.0').satisfied_by?(Gem::Version.new(Gem::VERSION))
- STDERR.puts "Your RubyGems version (#{Gem::VERSION}) is too old, please update with: `gem update --system`".red
+ STDERR.puts "\e[1;31m" + "Your RubyGems version (1.8.24) is too old, please update with: `gem update --system`" + "\e[0m"
exit 1
end
View
4 lib/cocoapods/command/outdated.rb
@@ -22,7 +22,6 @@ def initialize(argv)
def run
verify_podfile_exists!
verify_lockfile_exists!
- update_spec_repos_if_necessary!
sandbox = Sandbox.new(config.project_pods_root)
resolver = Resolver.new(config.podfile, config.lockfile, sandbox)
@@ -30,6 +29,9 @@ def run
resolver.update_external_specs = false
resolver.resolve
+ #TODO: the command report new dependencies (added to by updated ones)
+ # as updates.
+
names = resolver.pods_to_install - resolver.pods_from_external_sources
specs = resolver.specs.select do |spec|
names.include?(spec.name) && !spec.version.head?
View
8 lib/cocoapods/local_pod.rb
@@ -169,12 +169,14 @@ def clean!
#
# @return [Array<Strings>] The paths that can be deleted.
#
+ # @note The Paths are downcased to prevent issues. See #568.
+ #
def clean_paths
- cached_used_paths = used_files
- files = Dir.glob(root + "**/*", File::FNM_DOTMATCH)
+ used = used_files.map(&:downcase)
+ files = Dir.glob(root + "**/*", File::FNM_DOTMATCH).map(&:downcase)
files.reject! do |candidate|
- candidate.end_with?('.', '..') || cached_used_paths.any? do |path|
+ candidate.end_with?('.', '..') || used.any? do |path|
path.include?(candidate) || candidate.include?(path)
end
end
View
2  lib/cocoapods/specification/statistics.rb
@@ -90,7 +90,7 @@ def compute_creation_date(set, save = true)
def github_stats_if_needed(set)
return if get_value(set, :gh_date) && get_value(set, :gh_date) > Time.now - cache_expiration
spec = set.specification
- url = spec.source.reject {|k,_| k == :commit || k == :tag }.values.first
+ url = spec.source[:git] || ''
repo_id = url[/github.com\/([^\/\.]*\/[^\/\.]*)\.*/, 1]
return unless repo_id
View
9 spec/unit/local_pod_spec.rb
@@ -54,11 +54,11 @@
end
it "returns an expanded list the files to clean" do
- clean_paths = @pod.clean_paths.map { |p| p.to_s.gsub(/.*Pods\/BananaLib/,'') }
+ clean_paths = @pod.clean_paths.map { |p| p.to_s.gsub(/.*pods\/bananalib/,'') }
clean_paths.should.include "/.git/config"
# * There are some hidden files on Travis
# * The submodule of the repo (libPusher) can be ignore, to reduce noise of this test
- clean_files_without_hidden = clean_paths.reject { |p| p.to_s.include?('/.') || p.to_s.include?('libPusher') }
+ clean_files_without_hidden = clean_paths.reject { |p| p.to_s.include?('/.') || p.to_s.include?('libpusher') }
clean_files_without_hidden.should == %W[ /sub-dir /sub-dir/sub-dir-2 /sub-dir/sub-dir-2/somefile.txt ]
end
@@ -206,8 +206,9 @@ def assert_array_equals(expected, computed)
/StoreKit/StoreKit_Prefix.pch
/UIKit/UIKit_Prefix.pch
]
- computed = @pod.clean_paths.each{ |p| p.gsub!(@pod.root.to_s, '') }
- assert_array_equals(expected, computed)
+ root = @pod.root.to_s.downcase
+ computed = @pod.clean_paths.each{ |p| p.gsub!(root, '') }
+ assert_array_equals(expected.map(&:downcase), computed)
end
it "resolves the used files" do
Please sign in to comment.
Something went wrong with that request. Please try again.