Commit 738cf91b authored by Eloy Duran's avatar Eloy Duran

Move Xcode::Project extension to xcode_project.rb and use the xcodeproj lib from HEAD during dev.

parent be78f0dc
...@@ -13,3 +13,6 @@ ...@@ -13,3 +13,6 @@
[submodule "spec/fixtures/integration/sstoolkit"] [submodule "spec/fixtures/integration/sstoolkit"]
path = spec/fixtures/integration/sstoolkit path = spec/fixtures/integration/sstoolkit
url = https://github.com/samsoffes/sstoolkit.git url = https://github.com/samsoffes/sstoolkit.git
[submodule "external/xcodeproj"]
path = external/xcodeproj
url = git@github.com:alloy/xcodeproj.git
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
if $0 == __FILE__ if $0 == __FILE__
require 'rubygems' require 'rubygems'
gem 'activesupport', '~> 3.1.1' gem 'activesupport', '~> 3.1.1'
$:.unshift File.expand_path('../../external/xcodeproj/lib', __FILE__)
$:.unshift File.expand_path('../../lib', __FILE__) $:.unshift File.expand_path('../../lib', __FILE__)
end end
......
Subproject commit 0c41e5333bdf4ff409515815c25eb433c03c2ded
require 'rubygems'
require 'xcodeproj'
module Pod module Pod
VERSION = '0.2.0' VERSION = '0.2.0'
...@@ -25,31 +22,13 @@ module Pod ...@@ -25,31 +22,13 @@ module Pod
autoload :Pathname, 'pathname' autoload :Pathname, 'pathname'
end end
module Xcode
autoload :Config, 'cocoapods/xcode_project'
autoload :Project, 'cocoapods/xcode_project'
end
class Pathname class Pathname
def glob(pattern = '') def glob(pattern = '')
Dir.glob((self + pattern).to_s).map { |f| Pathname.new(f) } Dir.glob((self + pattern).to_s).map { |f| Pathname.new(f) }
end end
end end
# Sorry to dump these here...
class Xcode::Project
# Shortcut access to the `Pods' PBXGroup.
def pods
groups.find { |g| g.name == 'Pods' } || groups.new({ 'name' => 'Pods' })
end
# Adds a group as child to the `Pods' group.
def add_pod_group(name)
pods.groups.new('name' => name)
end
class PBXCopyFilesBuildPhase
def self.new_pod_dir(project, pod_name, path)
new(project, nil, {
"dstPath" => "$(PUBLIC_HEADERS_FOLDER_PATH)/#{path}",
"name" => "Copy #{pod_name} Public Headers",
})
end
end
end
require 'xcodeproj'
module Xcode
class Project
# Shortcut access to the `Pods' PBXGroup.
def pods
groups.find { |g| g.name == 'Pods' } || groups.new({ 'name' => 'Pods' })
end
# Adds a group as child to the `Pods' group.
def add_pod_group(name)
pods.groups.new('name' => name)
end
class PBXCopyFilesBuildPhase
def self.new_pod_dir(project, pod_name, path)
new(project, nil, {
"dstPath" => "$(PUBLIC_HEADERS_FOLDER_PATH)/#{path}",
"name" => "Copy #{pod_name} Public Headers",
})
end
end
end
end
...@@ -5,7 +5,8 @@ require 'pathname' ...@@ -5,7 +5,8 @@ require 'pathname'
ROOT = Pathname.new(File.expand_path('../../', __FILE__)) ROOT = Pathname.new(File.expand_path('../../', __FILE__))
gem 'activesupport', '~> 3.1.1' gem 'activesupport', '~> 3.1.1'
$:.unshift((ROOT + 'lib').to_s) $:.unshift File.expand_path('../../external/xcodeproj/lib', __FILE__)
$:.unshift (ROOT + 'lib').to_s
require 'cocoapods' require 'cocoapods'
$:.unshift((ROOT + 'spec').to_s) $:.unshift((ROOT + 'spec').to_s)
......
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