Commit 6333b0b2 authored by Eloy Duran's avatar Eloy Duran

Cleanup and pass a path to File.basename, not a File instance.

parent 7e2dbedd
......@@ -17,11 +17,6 @@ module Pod
config.project_root + 'Podfile.lock'
end
def dependency_specifications
# Resolve *all* dependencies first.
@dependency_specifications ||= @resolver.resolve
end
def project
return @project if @project
@project = Pod::Project.for_platform(@podfile.platform)
......
......@@ -9,10 +9,6 @@ module Pod
@podfile, @project, @target_definition = podfile, project, target_definition
end
def dependency_specifications
@dependency_specifications ||= @resolver.resolve(@definition.dependencies)
end
def xcconfig
@xcconfig ||= Xcodeproj::Config.new({
# In a workspace this is where the static library headers should be found.
......
......@@ -30,17 +30,17 @@ module Pod
xcconfig = app_project.files.new('path' => 'Pods/Pods.xcconfig')
base_project_configurations_on_xcconfig(app_project, xcconfig)
libfile = app_project.files.new_static_library('Pods')
libfile.group = app_project.group("Frameworks")
add_pods_library_to_each_target_in_project(app_project, libfile)
copy_resources = app_project.add_shell_script_build_phase(
'Copy Pods Resources', %{"${SRCROOT}/Pods/Pods-resources.sh"\n})
add_copy_resources_script_phase_to_each_target_in_project(app_project, copy_resources)
app_project.save_as(projpath)
unless config.silent?
......@@ -48,7 +48,7 @@ module Pod
puts "[!] From now on use `#{File.basename(xcworkspace)}' instead of `#{File.basename(projpath)}'."
end
end
def create_workspace(in_directory, name, project_path)
workspace_path = File.join(in_directory, name + '.xcworkspace')
workspace = Xcodeproj::Workspace.new_from_xcworkspace(workspace_path)
......@@ -59,8 +59,9 @@ module Pod
workspace << path unless workspace.include?(path)
end
workspace.save_as(workspace_path)
workspace_path
end
def project_already_integrated?(project)
project.files.find { |file| file.path =~ /libPods\.a$/ }
end
......
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