-
Notifications
You must be signed in to change notification settings - Fork 352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.34 rc #160
0.34 rc #160
Changes from all commits
43c64bc
346a446
f9b3a85
2a6ec4c
9d98426
85ef1bf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,4 @@ spec/fixtures/vcr | |
coverage/ | ||
.coveralls.yml | ||
.idea/ | ||
documentation/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -135,18 +135,21 @@ def dependencies | |
# | ||
# @return [Dependency] the generated dependency. | ||
# | ||
def dependency_to_lock_pod_named(name) | ||
dep = dependencies.find { |d| d.name == name || d.root_name == name } | ||
version = version(name) | ||
|
||
unless dep && version | ||
def dependencies_to_lock_pod_named(name) | ||
result = [] | ||
deps = dependencies.select { |d| d.root_name == name } | ||
if deps.empty? | ||
raise StandardError, "Attempt to lock the `#{name}` Pod without an " \ | ||
'known dependency.' | ||
end | ||
|
||
locked_dependency = dep.dup | ||
locked_dependency.specific_version = version | ||
locked_dependency | ||
deps.each do |dep| | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this can be done with a fold |
||
version = version(dep.name) | ||
locked_dependency = dep.dup | ||
locked_dependency.specific_version = version | ||
result << locked_dependency | ||
end | ||
result | ||
end | ||
|
||
# @return [Version] The version of CocoaPods which generated this lockfile. | ||
|
@@ -233,8 +236,8 @@ def detect_changes_with_podfile(podfile) | |
[:added, :changed, :removed, :unchanged].each { |k| result[k] = [] } | ||
|
||
installed_deps = dependencies.map do |dep| | ||
dependency_to_lock_pod_named(dep.name) | ||
end | ||
dependencies_to_lock_pod_named(dep.name) | ||
end.flatten | ||
all_dep_names = (dependencies + podfile.dependencies).map(&:name).uniq | ||
all_dep_names.each do |name| | ||
installed_dep = installed_deps.find { |d| d.name == name } | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -468,6 +468,44 @@ def set_arc_compatibility_flag! | |
|
||
#-----------------------------------------------------------------------# | ||
|
||
# @!group Sources | ||
# | ||
# The Podfile retrieves specs from a given list of sources (repos). | ||
# | ||
# Sources are __global__ and they are not stored per target definition. | ||
|
||
#-----------------------------------------------------------------------# | ||
|
||
# Specifies the location of specs | ||
# | ||
# ----- | ||
# | ||
# By default, the github Cocoapods/specs repository is used. Use this | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Where is this set? I can't find it anywhere (and no tests to prove it is). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The default is responsibility of the CocoaPods proper gem. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
# method to specify (an) other(s) source(s). The order of the sources is | ||
# relevant. CocoaPods will use the highest version of a Pod of the first | ||
# source which includes the Pod (regardless whether other sources have a | ||
# higher version). | ||
# | ||
# @param [String] source | ||
# The name of a specs repo. Previously specified by user | ||
# via pod repo add command | ||
# | ||
# @example Specifying to use first `my_private_repo` and then the | ||
# CocoaPods Master Repo | ||
# | ||
# source 'my_private_repo' | ||
# source 'master' | ||
# | ||
# @return [void] | ||
# | ||
def source(source) | ||
hash_sources = get_hash_value('sources') || [] | ||
hash_sources << source | ||
set_hash_value('sources', hash_sources.uniq) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should it |
||
end | ||
|
||
#-----------------------------------------------------------------------# | ||
|
||
# @!group Hooks | ||
# The Podfile provides hooks that will be called during the | ||
# installation process. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
source 'myrepo1' | ||
source 'myrepo2' | ||
platform :ios | ||
pod 'SSZipArchive', '>= 1' | ||
pod 'ASIHTTPRequest', '~> 1.8.0' | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Attempted
orAttempting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a
notan