From 38022884f422443e232c2455d4b20bbba56c3aeb Mon Sep 17 00:00:00 2001 From: Samuel Giddins Date: Mon, 4 Jan 2016 15:30:42 -0600 Subject: [PATCH 1/2] [Dependency] Allow creating from a string that has HEAD info --- lib/cocoapods-core/dependency.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/cocoapods-core/dependency.rb b/lib/cocoapods-core/dependency.rb index 589b4b3a2..73b4838c9 100644 --- a/lib/cocoapods-core/dependency.rb +++ b/lib/cocoapods-core/dependency.rb @@ -340,6 +340,8 @@ def to_s # part by clients that need to create a dependency equal to the # original one. # + # @todo Remove the `HEAD` code once everyone has migrated past 1.0. + # # @return [Dependency] the dependency described by the string. # def self.from_string(string) @@ -348,6 +350,9 @@ def self.from_string(string) version = match_data[2] version = version.gsub(/[()]/, '') if version case version + when ' HEAD' + CoreUI.warn "Ignoring obsolete `HEAD` specifier in `#{string}`" + Dependency.new(name) when nil, /from `(.*)(`|')/ Dependency.new(name) else From 1e6dc779d9dca58da2ca03a7fb4fbafbb9b4d3d3 Mon Sep 17 00:00:00 2001 From: Samuel Giddins Date: Mon, 4 Jan 2016 15:32:05 -0600 Subject: [PATCH 2/2] [CHANGELOG] Add entry for parsing dependency strings with HEAD info --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f704ec1e8..4e22749f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ ## Master +##### Enhancements + +* Dependencies created from a string that use the `HEAD` specifier are properly + parsed, ignoring the obsolete specifier. + [Samuel Giddins](https://github.com/segiddins) + [CocoaPods#4710](https://github.com/CocoaPods/CocoaPods/issues/4710) + ##### Bug Fixes * Fix specifying `configuration(s)` for a pod inside a target block.