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: yalp/CocoaPods
  • 14 commits
  • 15 files changed
  • 3 commit comments
  • 3 contributors
23 CHANGELOG.md
View
@@ -1,12 +1,32 @@
## Master
-[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.15.0...master)
+[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.15.1...master)
+
+## 0.15.1
+
+[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.15.0...0.15.1)
+
+###### Enhancements
+
+- Show error if syntax error in Podfile or Podfile.lock.
+
+###### 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)
+- Fixed an issue that lead to excessively slow sets computation.
## 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)
###### Enhancements
+
- Pod `install` will update the specs repo only if needed.
[#533](https://github.com/CocoaPods/CocoaPods/issues/533)
- CocoaPods now searches for the highest version of a Pod on all the repos.
@@ -29,6 +49,7 @@
###### Bug fixes
+
- Subspecs namespacing has been restored.
[#541](https://github.com/CocoaPods/CocoaPods/issues/541)
- Improvements to the git cache that should be more robust.
12 Gemfile
View
@@ -4,19 +4,25 @@ gemspec
group :development do
gem "xcodeproj", :git => "git://github.com/CocoaPods/Xcodeproj.git"
-
gem "mocha", "~> 0.11.4"
gem "bacon"
- gem "kicker", :git => "https://github.com/alloy/kicker.git", :branch => "3.0.0"
gem "mocha-on-bacon"
gem "rake"
- gem "rb-fsevent"
gem "vcr"
gem "webmock"
+end
+
+group :debugging do
+ gem "rb-fsevent"
+ gem "kicker", :git => "https://github.com/alloy/kicker.git", :branch => "3.0.0"
gem "awesome_print"
gem "pry"
+ gem "letters"
+end
+group :documentation do
gem 'yard'
gem 'redcarpet'
gem 'github-markup'
end
+
19 Gemfile.lock
View
@@ -17,7 +17,7 @@ GIT
PATH
remote: .
specs:
- cocoapods (0.15.0)
+ cocoapods (0.15.1)
activesupport (~> 3.2.6)
colored (~> 1.2)
escape (~> 0.0.4)
@@ -39,7 +39,16 @@ GEM
bacon (1.1.0)
coderay (1.0.7)
colored (1.2)
+ colorize (0.5.8)
+ columnize (0.3.6)
crack (0.3.1)
+ debugger (1.2.0)
+ columnize (>= 0.3.1)
+ debugger-linecache (~> 1.1.1)
+ debugger-ruby_core_source (~> 1.1.3)
+ debugger-linecache (1.1.2)
+ debugger-ruby_core_source (>= 1.1.1)
+ debugger-ruby_core_source (1.1.3)
escape (0.0.4)
faraday (0.8.4)
multipart-post (~> 1.1)
@@ -49,6 +58,12 @@ GEM
hashie (1.2.0)
i18n (0.6.1)
json (1.7.5)
+ letters (0.2.3)
+ activesupport
+ awesome_print
+ colorize
+ debugger
+ xml-simple
listen (0.5.2)
metaclass (0.0.1)
method_source (0.8)
@@ -78,6 +93,7 @@ GEM
webmock (1.8.11)
addressable (>= 2.2.7)
crack (>= 0.1.7)
+ xml-simple (1.1.1)
yard (0.8.2.1)
PLATFORMS
@@ -89,6 +105,7 @@ DEPENDENCIES
cocoapods!
github-markup
kicker!
+ letters
mocha (~> 0.11.4)
mocha-on-bacon
pry
3  LICENSE
View
@@ -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
2  Rakefile
View
@@ -33,7 +33,7 @@ namespace :travis do
task :install do
sh "git submodule update --init"
sh "sudo apt-get install subversion"
- sh "env CFLAGS='-I#{rvm_ruby_dir}/include' bundle install"
+ sh "env CFLAGS='-I#{rvm_ruby_dir}/include' bundle install --without debugging documentation"
end
task :setup => [:install_opencflite_debs, :install]
4 cocoapods.gemspec
View
@@ -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" \
6 lib/cocoapods.rb
View
@@ -7,12 +7,12 @@
#
# 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
module Pod
- VERSION = '0.15.0'
+ VERSION = '0.15.1'
class PlainInformative < StandardError
end
@@ -64,6 +64,6 @@ def glob(pattern = '')
end
if ENV['COCOA_PODS_ENV'] == 'development'
- require 'pry'
+ require 'letters'
require 'awesome_print'
end
4 lib/cocoapods/command/outdated.rb
View
@@ -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?
8 lib/cocoapods/local_pod.rb
View
@@ -163,12 +163,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
6 lib/cocoapods/lockfile.rb
View
@@ -8,7 +8,11 @@ class Lockfile
#
def self.from_file(path)
return nil unless path.exist?
- hash = YAML.load(File.open(path))
+ begin
+ hash = YAML.load(File.open(path))
+ rescue Exception => e
+ raise Informative, "Podfile.lock syntax error: #{e.inspect}"
+ end
lockfile = Lockfile.new(hash)
lockfile.defined_in_file = path
lockfile
6 lib/cocoapods/podfile.rb
View
@@ -177,7 +177,11 @@ def self.from_file(path)
string = File.open(path, 'r:utf-8') { |f| f.read }
# TODO: work around for Rubinius incomplete encoding in 1.9 mode
string.encode!('UTF-8') if string.respond_to?(:encoding) && string.encoding.name != "UTF-8"
- eval(string, nil, path.to_s)
+ begin
+ eval(string, nil, path.to_s)
+ rescue Exception => e
+ raise Informative, "Podfile syntax error: #{e.inspect}"
+ end
end
podfile.defined_in_file = path
podfile.validate!
18 lib/cocoapods/source.rb
View
@@ -128,10 +128,22 @@ def all_pods
# @return [Array<Set>] The sets for all the pods available.
#
+ # @note Implementation detail: The sources don't cache their values
+ # because they might change in response to an update. Therefore
+ # this method to prevent slowness caches the values before
+ # processing them.
+ #
def all_sets
- all_pods.map do |pod|
- sources = all.select{ |s| s.pods.include?(pod) }.compact
- Specification::Set.new(pod, sources)
+ pods_by_source = {}
+ all.each do |source|
+ pods_by_source[source] = source.pods
+ end
+ sources = pods_by_source.keys
+ pods = pods_by_source.values.flatten.uniq
+
+ pods.map do |pod|
+ pod_sources = sources.select{ |s| pods_by_source[s].include?(pod) }.compact
+ Specification::Set.new(pod, pod_sources)
end
end
2  lib/cocoapods/specification/statistics.rb
View
@@ -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
2  lib/cocoapods/user_interface/ui_pod.rb
View
@@ -42,7 +42,7 @@ def spec
end
def authors
- spec.authors.keys.to_sentence
+ spec.authors ? spec.authors.keys.to_sentence : ''
end
def homepage
9 spec/unit/local_pod_spec.rb
View
@@ -56,11 +56,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
@@ -208,8 +208,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

Showing you all comments on commits in this comparison.

Victor Ilyukevich

nice)
thanks @irrationalfab!

Martin Schürrer

Ha, I experienced that just 5 seconds ago :)

Something went wrong with that request. Please try again.