Commit 62aecc4e authored by Fabio Pelosin's avatar Fabio Pelosin

[Project] Rename Local Pods group do Development Pods

parent 8ea1f5da
...@@ -389,7 +389,7 @@ module Pod ...@@ -389,7 +389,7 @@ module Pod
def write_pod_project def write_pod_project
UI.message "- Writing Xcode project file to #{UI.path sandbox.project_path}" do UI.message "- Writing Xcode project file to #{UI.path sandbox.project_path}" do
pods_project.pods.remove_from_project if pods_project.pods.empty? pods_project.pods.remove_from_project if pods_project.pods.empty?
pods_project.local_pods.remove_from_project if pods_project.local_pods.empty? pods_project.development_pods.remove_from_project if pods_project.development_pods.empty?
pods_project.main_group.sort_by_type! pods_project.main_group.sort_by_type!
pods_project['Frameworks'].sort_by_type! pods_project['Frameworks'].sort_by_type!
pods_project.save pods_project.save
......
...@@ -18,7 +18,7 @@ module Pod ...@@ -18,7 +18,7 @@ module Pod
@support_files_group = new_group('Targets Support Files') @support_files_group = new_group('Targets Support Files')
@refs_by_absolute_path = {} @refs_by_absolute_path = {}
@pods = new_group('Pods') @pods = new_group('Pods')
@local_pods = new_group('Local Pods') @development_pods = new_group('Development Pods')
end end
# @return [PBXGroup] The group for the support files of the aggregate # @return [PBXGroup] The group for the support files of the aggregate
...@@ -30,9 +30,9 @@ module Pod ...@@ -30,9 +30,9 @@ module Pod
# #
attr_reader :pods attr_reader :pods
# @return [PBXGroup] The group for Local Pods. # @return [PBXGroup] The group for Development Pods.
# #
attr_reader :local_pods attr_reader :development_pods
public public
...@@ -49,18 +49,18 @@ module Pod ...@@ -49,18 +49,18 @@ module Pod
# @param [#to_s] path # @param [#to_s] path
# The path to the root of the Pod. # The path to the root of the Pod.
# #
# @param [Bool] local # @param [Bool] development
# Wether the group should be added to the Local Pods group. # Wether the group should be added to the Development Pods group.
# #
# @param [Bool] absolute # @param [Bool] absolute
# Wether the path of the group should be set as absolute. # Wether the path of the group should be set as absolute.
# #
# @return [PBXGroup] The new group. # @return [PBXGroup] The new group.
# #
def add_pod_group(pod_name, path, local = false, absolute = false) def add_pod_group(pod_name, path, development = false, absolute = false)
raise "[BUG]" if pod_group(pod_name) raise "[BUG]" if pod_group(pod_name)
parent_group = local ? local_pods : pods parent_group = development ? development_pods : pods
source_tree = absolute ? :absolute : :group source_tree = absolute ? :absolute : :group
parent_group.new_group(pod_name, path, source_tree) parent_group.new_group(pod_name, path, source_tree)
end end
...@@ -68,7 +68,7 @@ module Pod ...@@ -68,7 +68,7 @@ module Pod
# @return [Array<PBXGroup>] Returns all the group of the Pods. # @return [Array<PBXGroup>] Returns all the group of the Pods.
# #
def pod_groups def pod_groups
pods.children.objects + local_pods.children.objects pods.children.objects + development_pods.children.objects
end end
# Returns the group for the Pod with the given name. # Returns the group for the Pod with the given name.
......
...@@ -67,7 +67,7 @@ module Pod ...@@ -67,7 +67,7 @@ module Pod
@predownloaded_pods = [] @predownloaded_pods = []
@head_pods = [] @head_pods = []
@checkout_sources = {} @checkout_sources = {}
@local_pods = {} @development_pods = {}
FileUtils.mkdir_p(@root) FileUtils.mkdir_p(@root)
end end
...@@ -152,7 +152,7 @@ module Pod ...@@ -152,7 +152,7 @@ module Pod
def pod_dir(name) def pod_dir(name)
root_name = Specification.root_name(name) root_name = Specification.root_name(name)
if local?(root_name) if local?(root_name)
Pathname.new(local_pods[root_name]) Pathname.new(development_pods[root_name])
else else
# root + "Sources/#{name}" # root + "Sources/#{name}"
root + root_name root + root_name
...@@ -342,7 +342,7 @@ module Pod ...@@ -342,7 +342,7 @@ module Pod
# #
def store_local_path(name, path) def store_local_path(name, path)
root_name = Specification.root_name(name) root_name = Specification.root_name(name)
local_pods[root_name] = path.to_s development_pods[root_name] = path.to_s
end end
# @return [Hash{String=>String}] The path of the Pods with a local source # @return [Hash{String=>String}] The path of the Pods with a local source
...@@ -350,7 +350,7 @@ module Pod ...@@ -350,7 +350,7 @@ module Pod
# #
# @todo Rename (e.g. `pods_with_local_path`) # @todo Rename (e.g. `pods_with_local_path`)
# #
attr_reader :local_pods attr_reader :development_pods
# Checks if a Pod is locally sourced? # Checks if a Pod is locally sourced?
# #
...@@ -361,7 +361,7 @@ module Pod ...@@ -361,7 +361,7 @@ module Pod
# #
def local?(name) def local?(name)
root_name = Specification.root_name(name) root_name = Specification.root_name(name)
!local_pods[root_name].nil? !development_pods[root_name].nil?
end end
#-------------------------------------------------------------------------# #-------------------------------------------------------------------------#
......
Subproject commit bcc200c3fee14a7506e9c865fe3b6912a955aa94 Subproject commit d989cb15e2426eeeaf5d1e4b7e9a0ea179f09906
...@@ -234,7 +234,7 @@ module Pod ...@@ -234,7 +234,7 @@ module Pod
it "marks the Pod as local in the sandbox" do it "marks the Pod as local in the sandbox" do
@external_source.fetch(config.sandbox) @external_source.fetch(config.sandbox)
config.sandbox.local_pods.should == { config.sandbox.development_pods.should == {
"Reachability" => fixture('integration/Reachability').to_s "Reachability" => fixture('integration/Reachability').to_s
} }
end end
......
...@@ -19,8 +19,8 @@ module Pod ...@@ -19,8 +19,8 @@ module Pod
@project.pods.name.should == 'Pods' @project.pods.name.should == 'Pods'
end end
it "creates the Local Pods group on initialization" do it "creates the development Pods group on initialization" do
@project.local_pods.name.should == 'Local Pods' @project.development_pods.name.should == 'Development Pods'
end end
end end
...@@ -38,10 +38,10 @@ module Pod ...@@ -38,10 +38,10 @@ module Pod
group.name.should == 'BananaLib' group.name.should == 'BananaLib'
end end
it "adds the group for a Local Pod" do it "adds the group for a development Pod" do
path = config.sandbox.pod_dir('BananaLib') path = config.sandbox.pod_dir('BananaLib')
group = @project.add_pod_group('BananaLib', path, true) group = @project.add_pod_group('BananaLib', path, true)
group.parent.should == @project.local_pods group.parent.should == @project.development_pods
group.name.should == 'BananaLib' group.name.should == 'BananaLib'
end end
...@@ -77,7 +77,7 @@ module Pod ...@@ -77,7 +77,7 @@ module Pod
it "doesn't alters the original groups" do it "doesn't alters the original groups" do
@project.pods.children.map(&:name).sort.should == ["BananaLib"] @project.pods.children.map(&:name).sort.should == ["BananaLib"]
@project.local_pods.children.map(&:name).sort.should == ["OrangeLib"] @project.development_pods.children.map(&:name).sort.should == ["OrangeLib"]
end end
end end
......
...@@ -172,12 +172,12 @@ module Pod ...@@ -172,12 +172,12 @@ module Pod
it "stores the local path of a Pod" do it "stores the local path of a Pod" do
@sandbox.store_local_path('BananaLib/Subspec', Pathname.new('Some Path')) @sandbox.store_local_path('BananaLib/Subspec', Pathname.new('Some Path'))
@sandbox.local_pods['BananaLib'].should == 'Some Path' @sandbox.development_pods['BananaLib'].should == 'Some Path'
end end
it "returns the path of the local pods grouped by name" do it "returns the path of the local pods grouped by name" do
@sandbox.store_local_path('BananaLib', 'Some Path') @sandbox.store_local_path('BananaLib', 'Some Path')
@sandbox.local_pods.should == { 'BananaLib' => 'Some Path' } @sandbox.development_pods.should == { 'BananaLib' => 'Some Path' }
end end
it "returns whether a Pod is local" do it "returns whether a Pod is local" 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