cocoapods 1.6.0.beta.1 → 1.6.0.beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +94 -4
- data/lib/cocoapods/command/cache/clean.rb +1 -1
- data/lib/cocoapods/command/init.rb +3 -1
- data/lib/cocoapods/command/outdated.rb +2 -2
- data/lib/cocoapods/executable.rb +1 -1
- data/lib/cocoapods/gem_version.rb +1 -1
- data/lib/cocoapods/generator/acknowledgements/plist.rb +3 -3
- data/lib/cocoapods/generator/app_target_helper.rb +2 -4
- data/lib/cocoapods/generator/copy_resources_script.rb +8 -3
- data/lib/cocoapods/generator/embed_frameworks_script.rb +24 -18
- data/lib/cocoapods/installer.rb +37 -21
- data/lib/cocoapods/installer/analyzer.rb +19 -13
- data/lib/cocoapods/installer/analyzer/locking_dependency_analyzer.rb +5 -0
- data/lib/cocoapods/installer/analyzer/target_inspection_result.rb +5 -0
- data/lib/cocoapods/installer/installation_options.rb +2 -0
- data/lib/cocoapods/installer/pod_source_installer.rb +1 -1
- data/lib/cocoapods/installer/post_install_hooks_context.rb +1 -1
- data/lib/cocoapods/installer/user_project_integrator.rb +6 -2
- data/lib/cocoapods/installer/user_project_integrator/target_integrator.rb +42 -12
- data/lib/cocoapods/installer/xcode/pods_project_generator.rb +2 -4
- data/lib/cocoapods/installer/xcode/pods_project_generator/app_host_installer.rb +14 -5
- data/lib/cocoapods/installer/xcode/pods_project_generator/file_references_installer.rb +12 -6
- data/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb +22 -11
- data/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_integrator.rb +29 -18
- data/lib/cocoapods/installer/xcode/target_validator.rb +1 -1
- data/lib/cocoapods/project.rb +2 -0
- data/lib/cocoapods/resolver.rb +42 -49
- data/lib/cocoapods/resolver/resolver_specification.rb +41 -0
- data/lib/cocoapods/sandbox.rb +21 -17
- data/lib/cocoapods/target/aggregate_target.rb +3 -1
- data/lib/cocoapods/target/build_settings.rb +35 -12
- data/lib/cocoapods/target/framework_paths.rb +36 -0
- data/lib/cocoapods/target/pod_target.rb +16 -17
- data/lib/cocoapods/validator.rb +18 -5
- metadata +18 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78fc10cd8ecb6e143b881badf52a7688a75a4027494be697848432c15e4ef2ea
|
4
|
+
data.tar.gz: 1193a91131a6f03a5ac7b7b52eecca0ca82d74167e7b465f08342255ba4b14d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f24e4f502e4251a6cebfb9020037af737c52094121aea6d0f26f6392f14d993ba95597249266e74c5113b0062dfc8de277a60ce6eba7e9b2213f19f907ca51cc
|
7
|
+
data.tar.gz: 949700b4fd4b5fec511390a75ad55b12d86128650833b3caf72da2c4bb3d15ecd90429d6e70177b3f67134e4cf8d7848b8c3d06504cf9dbe350b9750f7bbd164
|
data/CHANGELOG.md
CHANGED
@@ -4,18 +4,109 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
|
|
4
4
|
|
5
5
|
To install release candidates run `[sudo] gem install cocoapods --pre`
|
6
6
|
|
7
|
+
## 1.6.0.beta.2 (2018-10-17)
|
8
|
+
|
9
|
+
##### Enhancements
|
10
|
+
|
11
|
+
* Remove contraction from docs to fix rendering on the website.
|
12
|
+
[stevemoser](https://github.com/stevemoser)
|
13
|
+
[#8131](https://github.com/CocoaPods/CocoaPods/pull/8131)
|
14
|
+
|
15
|
+
* Provide an installation option to preserve folder structure
|
16
|
+
[dacaiguoguogmail](https://github.com/dacaiguoguogmail)
|
17
|
+
[#8097](https://github.com/CocoaPods/CocoaPods/pull/8097)
|
18
|
+
|
19
|
+
* Nests test specs host apps inside that Pod's directory for cleaner project
|
20
|
+
navigators.
|
21
|
+
[Derek Ostrander](https://github.com/dostrander)
|
22
|
+
|
23
|
+
* mark_ruby_file_ref add indent width and tab width config
|
24
|
+
[dacaiguoguogmail](https://github.com/dacaiguoguogmail)
|
25
|
+
|
26
|
+
* Print an error that will show up in Xcode's issue navigator upon unexpected
|
27
|
+
failures in the copy resources and embed frameworks script phases.
|
28
|
+
[Samuel Giddins](https://github.com/segiddins)
|
29
|
+
|
30
|
+
* Validate that all generated `PBXNativeTarget`s contain source files to build,
|
31
|
+
so specs (including test specs) with no source files won't fail at runtime
|
32
|
+
due to the lack of a generated executable.
|
33
|
+
[Samuel Giddins](https://github.com/segiddins)
|
34
|
+
|
35
|
+
* Print better promote message when unable to find a specification.
|
36
|
+
[Xinyu Zhao](https://github.com/X140Yu)
|
37
|
+
[#8064](https://github.com/CocoaPods/CocoaPods/issues/8064)
|
38
|
+
|
39
|
+
* Silence warnings in headers for Pods with `inhibit_warnings => true`
|
40
|
+
[Guillaume Algis](https://github.com/guillaumealgis)
|
41
|
+
[#6401](https://github.com/CocoaPods/CocoaPods/pull/6401)
|
42
|
+
|
43
|
+
* When resolving a locked dependency, source the spec from the locked
|
44
|
+
specs repository.
|
45
|
+
[Samuel Giddins](https://github.com/segiddins)
|
46
|
+
|
47
|
+
* Slightly improve resolution speed for Podfiles that contain multiple targets
|
48
|
+
with the same dependencies.
|
49
|
+
[Samuel Giddins]
|
50
|
+
|
51
|
+
##### Bug Fixes
|
52
|
+
|
53
|
+
* Don't generate unencrypted source warnings for localhost.
|
54
|
+
[Paul Beusterien](https://github.com/paulb777)
|
55
|
+
[#8156](https://github.com/CocoaPods/CocoaPods/issues/8156)
|
56
|
+
|
57
|
+
* Fix linting when armv7 is included but i386 isn't.
|
58
|
+
[Paul Beusterien](https://github.com/paulb777)
|
59
|
+
[#8129](https://github.com/CocoaPods/CocoaPods/issues/8129)
|
60
|
+
|
61
|
+
* Provide an installation option to disable usage of input/output paths.
|
62
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
63
|
+
[#8073](https://github.com/CocoaPods/CocoaPods/issues/8073)
|
64
|
+
|
65
|
+
* Scope prefix header setting to each test spec.
|
66
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
67
|
+
[#8046](https://github.com/CocoaPods/CocoaPods/pull/8046)
|
68
|
+
|
69
|
+
* Don't add incomplete subspec subset targets for extensions.
|
70
|
+
[Paul Beusterien](https://github.com/paulb777)
|
71
|
+
[#7850](https://github.com/CocoaPods/CocoaPods/issues/7850)
|
72
|
+
|
73
|
+
* Clear out `MACH_O_TYPE` for unit test bundles that use static frameworks.
|
74
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
75
|
+
[#8031](https://github.com/CocoaPods/CocoaPods/issues/8031)
|
76
|
+
|
77
|
+
* Fix `weak_frameworks` missing regression.
|
78
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
79
|
+
[#7872](https://github.com/CocoaPods/CocoaPods/issues/7872)
|
80
|
+
|
81
|
+
* Fix line spacing for Swift error message.
|
82
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
83
|
+
[#8024](https://github.com/CocoaPods/CocoaPods/pull/8024)
|
84
|
+
|
85
|
+
* Improve validation for test_specs on specific platforms
|
86
|
+
[icecrystal23](https://github.com/icecrystal23)
|
87
|
+
[#7009](https://github.com/CocoaPods/CocoaPods/issues/7009)
|
88
|
+
|
89
|
+
* Fix running `pod outdated` with externally-sourced pods.
|
90
|
+
[Samuel Giddins](https://github.com/segiddins)
|
91
|
+
[#8025](https://github.com/CocoaPods/CocoaPods/issues/8025)
|
92
|
+
|
93
|
+
* Remove codesign suppression
|
94
|
+
[Jaehong Kang](https://github.com/sinoru)
|
95
|
+
[#7606](https://github.com/CocoaPods/CocoaPods/issues/7606)
|
96
|
+
|
97
|
+
|
7
98
|
## 1.6.0.beta.1 (2018-08-16)
|
8
99
|
|
9
100
|
##### Enhancements
|
10
101
|
|
11
102
|
* Every test spec will have its own xctest bundle.
|
12
|
-
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
103
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
13
104
|
[Jenn Kaplan](https://github.com/jkap)
|
14
105
|
[#7908](https://github.com/CocoaPods/CocoaPods/pull/7908)
|
15
106
|
|
16
107
|
* Generate a separate app host per pod.
|
17
108
|
[Samuel Giddins](https://github.com/segiddins)
|
18
|
-
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
109
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
19
110
|
[#8005](https://github.com/CocoaPods/CocoaPods/pull/8005)
|
20
111
|
|
21
112
|
* Add default launch screen storyboard to test app hosts.
|
@@ -29,7 +120,7 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
|
|
29
120
|
* Warn instead of error when linting if `public_header_files` or
|
30
121
|
`private_header_files` do not match any files.
|
31
122
|
[Eric Amorde](https://github.com/amorde)
|
32
|
-
[#7427](https://github.com/CocoaPods/CocoaPods/issues/7427)
|
123
|
+
[#7427](https://github.com/CocoaPods/CocoaPods/issues/7427)
|
33
124
|
|
34
125
|
* Add `--platforms` parameter to `pod spec lint` and `pod lib lint` to specify
|
35
126
|
which platforms to lint.
|
@@ -279,7 +370,6 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
|
|
279
370
|
[Maxime Le Moine](https://github.com/MaximeLM)
|
280
371
|
[#7590](https://github.com/CocoaPods/CocoaPods/issues/7590)
|
281
372
|
|
282
|
-
|
283
373
|
## 1.5.0 (2018-04-04)
|
284
374
|
|
285
375
|
##### Enhancements
|
@@ -10,7 +10,7 @@ module Pod
|
|
10
10
|
If there is multiple cache for various versions of the requested pod,
|
11
11
|
you will be asked which one to clean. Use `--all` to clean them all.
|
12
12
|
|
13
|
-
If you
|
13
|
+
If you do not give a pod `NAME`, you need to specify the `--all`
|
14
14
|
flag (this is to avoid cleaning all the cache by mistake).
|
15
15
|
DESC
|
16
16
|
|
@@ -84,7 +84,9 @@ module Pod
|
|
84
84
|
def target_module(app, tests)
|
85
85
|
target_module = "\ntarget '#{app.name.gsub(/'/, "\\\\\'")}' do\n"
|
86
86
|
|
87
|
-
|
87
|
+
app_uses_swift = app.source_build_phase.files_references.any? { |fr| File.extname(fr.path) == '.swift' }
|
88
|
+
|
89
|
+
target_module << if app_uses_swift
|
88
90
|
<<-RUBY
|
89
91
|
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
|
90
92
|
use_frameworks!
|
@@ -22,7 +22,7 @@ module Pod
|
|
22
22
|
UI.puts "#{'<blue>'.blue}\t - Will be updated, but not to the newest version because of specified version in Podfile"
|
23
23
|
UI.puts "#{'<red>'.red}\t - Will not be updated because of specified version in Podfile"
|
24
24
|
UI.puts ''
|
25
|
-
end
|
25
|
+
end if ansi_output?
|
26
26
|
UI.section 'The following pod updates are available:' do
|
27
27
|
updates.each do |(name, from_version, matching_version, to_version)|
|
28
28
|
color = :blue
|
@@ -85,7 +85,7 @@ module Pod
|
|
85
85
|
pods = []
|
86
86
|
UI.titled_section('Analyzing dependencies') do
|
87
87
|
pods = Installer::Analyzer.new(config.sandbox, config.podfile).
|
88
|
-
analyze(
|
88
|
+
analyze(:outdated).
|
89
89
|
specs_by_target.values.flatten.uniq
|
90
90
|
end
|
91
91
|
pods
|
data/lib/cocoapods/executable.rb
CHANGED
@@ -8,19 +8,19 @@ module Pod
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def save_as(path)
|
11
|
-
Xcodeproj::Plist.write_to_path(
|
11
|
+
Xcodeproj::Plist.write_to_path(plist_hash, path)
|
12
12
|
end
|
13
13
|
|
14
14
|
# @return [String] The contents of the plist
|
15
15
|
#
|
16
16
|
def generate
|
17
|
-
plist = Nanaimo::Plist.new(
|
17
|
+
plist = Nanaimo::Plist.new(plist_hash, :xml)
|
18
18
|
contents = StringIO.new
|
19
19
|
Nanaimo::Writer::XMLWriter.new(plist, :pretty => true, :output => contents, :strict => false).write
|
20
20
|
contents.string
|
21
21
|
end
|
22
22
|
|
23
|
-
def
|
23
|
+
def plist_hash
|
24
24
|
{
|
25
25
|
:Title => plist_title,
|
26
26
|
:StringsTable => plist_title,
|
@@ -88,9 +88,8 @@ module Pod
|
|
88
88
|
#
|
89
89
|
# @return [Array<PBXBuildFile>] the created build file references.
|
90
90
|
#
|
91
|
-
def self.add_app_host_main_file(project, target, platform, name = 'App')
|
91
|
+
def self.add_app_host_main_file(project, target, platform, group, name = 'App')
|
92
92
|
source_file = AppTargetHelper.create_app_host_main_file(project, platform, name)
|
93
|
-
group = project[name] || project.new_group(name, name)
|
94
93
|
source_file_ref = group.new_file(source_file)
|
95
94
|
target.add_file_references([source_file_ref])
|
96
95
|
end
|
@@ -111,9 +110,8 @@ module Pod
|
|
111
110
|
#
|
112
111
|
# @return [PBXFileReference] the created file reference of the launchscreen storyboard.
|
113
112
|
#
|
114
|
-
def self.add_launchscreen_storyboard(project, target, name = 'App')
|
113
|
+
def self.add_launchscreen_storyboard(project, target, group, name = 'App')
|
115
114
|
launch_storyboard_file = AppTargetHelper.create_launchscreen_storyboard_file(project, name)
|
116
|
-
group = project[name] || project.new_group(name, name)
|
117
115
|
launch_storyboard_ref = group.new_file(launch_storyboard_file)
|
118
116
|
target.resources_build_phase.add_file_reference(launch_storyboard_ref)
|
119
117
|
end
|
@@ -105,10 +105,15 @@ set -e
|
|
105
105
|
set -u
|
106
106
|
set -o pipefail
|
107
107
|
|
108
|
+
function on_error {
|
109
|
+
echo "$(realpath -mq "${0}"):$1: error: Unexpected failure"
|
110
|
+
}
|
111
|
+
trap 'on_error $LINENO' ERR
|
112
|
+
|
108
113
|
if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then
|
109
|
-
|
110
|
-
|
111
|
-
|
114
|
+
# If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy
|
115
|
+
# resources to, so exit 0 (signalling the script phase was successful).
|
116
|
+
exit 0
|
112
117
|
fi
|
113
118
|
|
114
119
|
mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
|
@@ -1,12 +1,14 @@
|
|
1
|
+
require 'cocoapods/target/framework_paths'
|
2
|
+
|
1
3
|
module Pod
|
2
4
|
module Generator
|
3
5
|
class EmbedFrameworksScript
|
4
|
-
# @return [Hash{String => Array<
|
6
|
+
# @return [Hash{String => Array<FrameworkPaths>}] Multiple lists of frameworks per
|
5
7
|
# configuration.
|
6
8
|
#
|
7
9
|
attr_reader :frameworks_by_config
|
8
10
|
|
9
|
-
# @param [Hash{String => Array<
|
11
|
+
# @param [Hash{String => Array<FrameworkPaths>] frameworks_by_config
|
10
12
|
# @see #frameworks_by_config
|
11
13
|
#
|
12
14
|
def initialize(frameworks_by_config)
|
@@ -46,10 +48,15 @@ module Pod
|
|
46
48
|
set -u
|
47
49
|
set -o pipefail
|
48
50
|
|
51
|
+
function on_error {
|
52
|
+
echo "$(realpath -mq "${0}"):$1: error: Unexpected failure"
|
53
|
+
}
|
54
|
+
trap 'on_error $LINENO' ERR
|
55
|
+
|
49
56
|
if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then
|
50
|
-
|
51
|
-
|
52
|
-
|
57
|
+
# If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy
|
58
|
+
# frameworks to, so exit 0 (signalling the script phase was successful).
|
59
|
+
exit 0
|
53
60
|
fi
|
54
61
|
|
55
62
|
echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
|
@@ -79,8 +86,8 @@ module Pod
|
|
79
86
|
local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
|
80
87
|
|
81
88
|
if [ -L "${source}" ]; then
|
82
|
-
|
83
|
-
|
89
|
+
echo "Symlinked..."
|
90
|
+
source="$(readlink "${source}")"
|
84
91
|
fi
|
85
92
|
|
86
93
|
# Use filter instead of exclude so missing patterns don't throw errors.
|
@@ -110,7 +117,7 @@ module Pod
|
|
110
117
|
# Embed linked Swift runtime libraries. No longer necessary as of Xcode 7.
|
111
118
|
if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then
|
112
119
|
local swift_runtime_libs
|
113
|
-
swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\\\/\\(.+dylib\\).*/\\\\1/g | uniq -u
|
120
|
+
swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\\\/\\(.+dylib\\).*/\\\\1/g | uniq -u)
|
114
121
|
for lib in $swift_runtime_libs; do
|
115
122
|
echo "rsync -auv \\"${SWIFT_STDLIB_PATH}/${lib}\\" \\"${destination}\\""
|
116
123
|
rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}"
|
@@ -179,7 +186,7 @@ module Pod
|
|
179
186
|
for arch in $binary_archs; do
|
180
187
|
if ! [[ "${ARCHS}" == *"$arch"* ]]; then
|
181
188
|
# Strip non-valid architectures in-place
|
182
|
-
lipo -remove "$arch" -output "$binary" "$binary"
|
189
|
+
lipo -remove "$arch" -output "$binary" "$binary"
|
183
190
|
stripped="$stripped $arch"
|
184
191
|
fi
|
185
192
|
done
|
@@ -192,16 +199,15 @@ module Pod
|
|
192
199
|
SH
|
193
200
|
script << "\n" unless frameworks_by_config.values.all?(&:empty?)
|
194
201
|
frameworks_by_config.each do |config, frameworks_with_dsyms|
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
end
|
203
|
-
script << "fi\n"
|
202
|
+
next if frameworks_with_dsyms.empty?
|
203
|
+
script << %(if [[ "$CONFIGURATION" == "#{config}" ]]; then\n)
|
204
|
+
frameworks_with_dsyms.each do |framework_with_dsym|
|
205
|
+
script << %( install_framework "#{framework_with_dsym.source_path}"\n)
|
206
|
+
# Vendored frameworks might have a dSYM file next to them so ensure its copied. Frameworks built from
|
207
|
+
# sources will have their dSYM generated and copied by Xcode.
|
208
|
+
script << %( install_dsym "#{framework_with_dsym.dsym_path}"\n) unless framework_with_dsym.dsym_path.nil?
|
204
209
|
end
|
210
|
+
script << "fi\n"
|
205
211
|
end
|
206
212
|
script << <<-SH.strip_heredoc
|
207
213
|
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
|
data/lib/cocoapods/installer.rb
CHANGED
@@ -72,6 +72,7 @@ module Pod
|
|
72
72
|
|
73
73
|
@use_default_plugins = true
|
74
74
|
@has_dependencies = true
|
75
|
+
@pod_installers = []
|
75
76
|
end
|
76
77
|
|
77
78
|
# @return [Hash, Boolean, nil] Pods that have been requested to be
|
@@ -103,6 +104,19 @@ module Pod
|
|
103
104
|
attr_accessor :deployment
|
104
105
|
alias_method :deployment?, :deployment
|
105
106
|
|
107
|
+
#-------------------------------------------------------------------------#
|
108
|
+
|
109
|
+
private
|
110
|
+
|
111
|
+
# @return [Array<PodSourceInstaller>] the pod installers created
|
112
|
+
# while installing pod targets
|
113
|
+
#
|
114
|
+
attr_reader :pod_installers
|
115
|
+
|
116
|
+
#-------------------------------------------------------------------------#
|
117
|
+
|
118
|
+
public
|
119
|
+
|
106
120
|
# Installs the Pods.
|
107
121
|
#
|
108
122
|
# The installation process is mostly linear with a few minor complications
|
@@ -244,6 +258,8 @@ module Pod
|
|
244
258
|
|
245
259
|
# Performs the analysis.
|
246
260
|
#
|
261
|
+
# @param [Analyzer] analyzer the analyzer to use for analysis
|
262
|
+
#
|
247
263
|
# @return [void]
|
248
264
|
#
|
249
265
|
def analyze(analyzer = create_analyzer)
|
@@ -369,13 +385,7 @@ module Pod
|
|
369
385
|
end
|
370
386
|
|
371
387
|
def create_pod_installer(pod_name)
|
372
|
-
specs_by_platform =
|
373
|
-
pod_targets.each do |pod_target|
|
374
|
-
if pod_target.root_spec.name == pod_name
|
375
|
-
specs_by_platform[pod_target.platform] ||= []
|
376
|
-
specs_by_platform[pod_target.platform].concat(pod_target.specs)
|
377
|
-
end
|
378
|
-
end
|
388
|
+
specs_by_platform = specs_for_pod(pod_name)
|
379
389
|
|
380
390
|
if specs_by_platform.empty?
|
381
391
|
requiring_targets = pod_targets.select { |pt| pt.recursive_dependent_targets.any? { |dt| dt.pod_name == pod_name } }
|
@@ -385,12 +395,26 @@ module Pod
|
|
385
395
|
raise StandardError, message
|
386
396
|
end
|
387
397
|
|
388
|
-
@pod_installers ||= []
|
389
398
|
pod_installer = PodSourceInstaller.new(sandbox, specs_by_platform, :can_cache => installation_options.clean?)
|
390
|
-
|
399
|
+
pod_installers << pod_installer
|
391
400
|
pod_installer
|
392
401
|
end
|
393
402
|
|
403
|
+
# The specifications matching the specified pod name
|
404
|
+
#
|
405
|
+
# @param [String] pod_name the name of the pod
|
406
|
+
#
|
407
|
+
# @return [Hash{Platform => Array<Specification>}] the specifications grouped by platform
|
408
|
+
#
|
409
|
+
def specs_for_pod(pod_name)
|
410
|
+
pod_targets.each_with_object({}) do |pod_target, hash|
|
411
|
+
if pod_target.root_spec.name == pod_name
|
412
|
+
hash[pod_target.platform] ||= []
|
413
|
+
hash[pod_target.platform].concat(pod_target.specs)
|
414
|
+
end
|
415
|
+
end
|
416
|
+
end
|
417
|
+
|
394
418
|
# Install the Pods. If the resolver indicated that a Pod should be
|
395
419
|
# installed and it exits, it is removed and then reinstalled. In any case if
|
396
420
|
# the Pod doesn't exits it is installed.
|
@@ -405,21 +429,16 @@ module Pod
|
|
405
429
|
|
406
430
|
# Cleans the sources of the Pods if the config instructs to do so.
|
407
431
|
#
|
408
|
-
# @todo Why the @pod_installers might be empty?
|
409
432
|
#
|
410
433
|
def clean_pod_sources
|
411
434
|
return unless installation_options.clean?
|
412
|
-
|
413
|
-
@pod_installers.each(&:clean!)
|
435
|
+
pod_installers.each(&:clean!)
|
414
436
|
end
|
415
437
|
|
416
438
|
# Unlocks the sources of the Pods.
|
417
439
|
#
|
418
|
-
# @todo Why the @pod_installers might be empty?
|
419
|
-
#
|
420
440
|
def unlock_pod_sources
|
421
|
-
|
422
|
-
@pod_installers.each do |installer|
|
441
|
+
pod_installers.each do |installer|
|
423
442
|
pod_target = pod_targets.find { |target| target.pod_name == installer.name }
|
424
443
|
installer.unlock_files!(pod_target.file_accessors)
|
425
444
|
end
|
@@ -427,12 +446,9 @@ module Pod
|
|
427
446
|
|
428
447
|
# Locks the sources of the Pods if the config instructs to do so.
|
429
448
|
#
|
430
|
-
# @todo Why the @pod_installers might be empty?
|
431
|
-
#
|
432
449
|
def lock_pod_sources
|
433
450
|
return unless installation_options.lock_pod_sources?
|
434
|
-
|
435
|
-
@pod_installers.each do |installer|
|
451
|
+
pod_installers.each do |installer|
|
436
452
|
pod_target = pod_targets.find { |target| target.pod_name == installer.name }
|
437
453
|
installer.lock_files!(pod_target.file_accessors)
|
438
454
|
end
|
@@ -496,7 +512,7 @@ module Pod
|
|
496
512
|
|
497
513
|
# Runs the registered callbacks for the source provider plugin hooks.
|
498
514
|
#
|
499
|
-
# @return [
|
515
|
+
# @return [Array<Pod::Source>] the plugin sources
|
500
516
|
#
|
501
517
|
def run_source_provider_hooks
|
502
518
|
context = SourceProviderHooksContext.generate
|