Commit 028921ab authored by Eloy Durán's avatar Eloy Durán

[Analyzer] Get all configurations from the user project, including Debug and Release.

parent de4fbe83
......@@ -415,9 +415,7 @@ module Pod
def compute_user_build_configurations(target_definition, user_targets)
if user_targets
user_targets.map { |t| t.build_configurations.map(&:name) }.flatten.inject({}) do |hash, name|
unless name == 'Debug' || name == 'Release'
hash[name] = :release
end
hash[name] = name == 'Debug' ? :debug : :release
hash
end.merge(target_definition.build_configurations || {})
else
......
......@@ -89,7 +89,12 @@ module Pod
target.user_target_uuids.should == ["A346496C14F9BE9A0080D870"]
user_proj = Xcodeproj::Project.open(target.user_project_path)
user_proj.objects_by_uuid[target.user_target_uuids.first].name.should == 'SampleProject'
target.user_build_configurations.should == { "Test" => :release, "App Store" => :release }
target.user_build_configurations.should == {
"Debug" => :debug,
"Release" => :release,
"Test" => :release,
"App Store" => :release
}
target.platform.to_s.should == 'iOS 6.0'
end
......@@ -106,7 +111,13 @@ module Pod
it "returns all the configurations the user has in any of its projects and/or targets" do
target_definition = @analyzer.podfile.target_definition_list.first
target_definition.stubs(:build_configurations).returns("AdHoc" => :test)
@analyzer.analyze.all_user_build_configurations.should == { "AdHoc" => :test, "Test" => :release, "App Store" => :release }
@analyzer.analyze.all_user_build_configurations.should == {
"Debug" => :debug,
"Release" => :release,
"AdHoc" => :test,
"Test" => :release,
"App Store" => :release
}
end
#--------------------------------------#
......@@ -315,7 +326,11 @@ module Pod
user_targets = [target]
configurations = @analyzer.send(:compute_user_build_configurations, target_definition, user_targets)
configurations.should == { 'AppStore' => :release }
configurations.should == {
'Debug' => :debug,
'Release' => :release,
'AppStore' => :release
}
end
it "returns the user build configurations specified in the target definition" 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