Method: Pod::Lockfile#dependencies_to_lock_pod_named
- Defined in:
- lib/cocoapods-core/lockfile.rb
permalink #dependencies_to_lock_pod_named(name) ⇒ Array<Dependency>
Note:
The generated dependencies used are by the Resolver from upgrading a Pod during an installation.
Generates a dependency that requires the exact version of the Pod with the given name.
160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/cocoapods-core/lockfile.rb', line 160 def dependencies_to_lock_pod_named(name) deps = dependencies.select { |d| d.root_name == name } if deps.empty? raise StandardError, "Attempt to lock the `#{name}` Pod without a " \ 'known dependency.' end deps.map do |dep| version = version(dep.name) locked_dependency = dep.dup locked_dependency.specific_version = version locked_dependency end end |