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