Commit d2095166 authored by Ben Asher's avatar Ben Asher

Incorporated message feedback

parent af36291b
...@@ -289,16 +289,16 @@ module Pod ...@@ -289,16 +289,16 @@ module Pod
# a project for doing framework development. In that case, just warn that # a project for doing framework development. In that case, just warn that
# the frameworks that these targets depend on won't be integrated anywhere # the frameworks that these targets depend on won't be integrated anywhere
if embedded_targets_missing_hosts_product_types == [:framework] if embedded_targets_missing_hosts_product_types == [:framework]
UI.warn 'The Podfile contains framework targets, for which the Podfile does not contain host targets (where these frameworks would be installed).' \ UI.warn 'The Podfile contains framework targets, for which the Podfile does not contain host targets (targets which embed the framework).' \
"\n" \ "\n" \
'If this project is for doing framework development, you can ignore this message or add a test target that embeds these frameworks to make this message go away. Otherwise, please add the frameworks\' host targets to the Podfile.' 'If this project is for doing framework development, you can ignore this message. Otherwise, add a target to the Podfile that embeds these frameworks to make this message go away (e.g. a test target).'
else else
target_names = embedded_targets_missing_hosts.map do |target| target_names = embedded_targets_missing_hosts.map do |target|
target.name.sub('Pods-', '') # Make the target names more recognizable to the user target.name.sub('Pods-', '') # Make the target names more recognizable to the user
end.join ', ' end.join ', '
raise Informative, "Unable to find host target(s) for #{target_names}. Please add the host targets for the embedded targets to the Podfile." \ raise Informative, "Unable to find host target(s) for #{target_names}. Please add the host targets for the embedded targets to the Podfile." \
"\n" \ "\n" \
'Certain kinds of targets require a host target, in which to be embedded. These are example types of targets that need a host target:' \ 'Certain kinds of targets require a host target. A host target is a "parent" target which embeds a "child" target. These are example types of targets that need a host target:' \
"\n- Framework" \ "\n- Framework" \
"\n- App Extension" \ "\n- App Extension" \
"\n- Watch OS 1 Extension" \ "\n- Watch OS 1 Extension" \
......
...@@ -747,7 +747,7 @@ module Pod ...@@ -747,7 +747,7 @@ module Pod
analyzer = Pod::Installer::Analyzer.new(config.sandbox, podfile) analyzer = Pod::Installer::Analyzer.new(config.sandbox, podfile)
should.raise Informative do should.raise Informative do
analyzer.analyze analyzer.analyze
end.message.should.match /Unable to find host target\(s\) for Today Extension. Please add the host targets for the embedded targets to the Podfile/ end.message.should.match /Unable to find host target\(s\) for Today Extension. Please add the host targets for the embedded targets to the Podfile\./
end end
it 'warns when using a Podfile for framework-only projects' do it 'warns when using a Podfile for framework-only projects' do
...@@ -762,7 +762,7 @@ module Pod ...@@ -762,7 +762,7 @@ module Pod
end end
analyzer = Pod::Installer::Analyzer.new(config.sandbox, podfile) analyzer = Pod::Installer::Analyzer.new(config.sandbox, podfile)
analyzer.analyze analyzer.analyze
UI.warnings.should.match /The Podfile contains framework targets, for which the Podfile does not contain host targets \(where these frameworks would be installed\)\./ UI.warnings.should.match /The Podfile contains framework targets, for which the Podfile does not contain host targets \(targets which embed the framework\)\./
end end
it 'raises when the extension calls use_frameworks!, but the host target does not' do it 'raises when the extension calls use_frameworks!, but the host target does not' do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment