Permalink
Browse files

Rename Xcode namespace to Xcodeproj to reflect the gem name.

  • Loading branch information...
1 parent d444dfb commit 0a2952089f22bfd818bb9f5bcbb7cdff9bfaa991 @alloy alloy committed Nov 12, 2011
View
@@ -0,0 +1 @@
+*.swp
View
@@ -1,4 +1,4 @@
-module Xcode
+module Xcodeproj
VERSION = '0.0.1'
autoload :Config, 'xcodeproj/config'
@@ -1,4 +1,4 @@
-module Xcode
+module Xcodeproj
class Config
def initialize(xcconfig = {})
@attributes = {}
@@ -11,7 +11,7 @@
require 'singleton'
-module Xcode
+module Xcodeproj
module ActiveSupport
# The Inflector transforms words from singular to plural, class names to table names, modularized class names to ones without,
# and class names to foreign keys. The default inflections for pluralization, singularization, and uncountable words are kept
@@ -347,7 +347,7 @@ def ordinalize(number)
# String inflections define new methods on the String class to transform names for different purposes.
class NSString
- include Xcode::ActiveSupport
+ include Xcodeproj::ActiveSupport
# Returns the plural form of the word in the string.
#
@@ -2,7 +2,7 @@
require 'fileutils'
require 'xcodeproj/inflector'
-module Xcode
+module Xcodeproj
class Project
class PBXObject
class AssociationReflection
@@ -282,7 +282,7 @@ class PBXGroup < PBXObject
attributes :sourceTree
has_many :children, :class => PBXFileReference do |object|
- if object.is_a?(Xcode::Project::PBXFileReference)
+ if object.is_a?(Xcodeproj::Project::PBXFileReference)
# Associating the file to this group through the inverse
# association will also remove it from the group it was in.
object.group = self
@@ -300,20 +300,20 @@ def initialize(*)
end
def files
- list_by_class(childReferences, Xcode::Project::PBXFileReference) do |file|
+ list_by_class(childReferences, Xcodeproj::Project::PBXFileReference) do |file|
file.group = self
end
end
def source_files
files = self.files.reject { |file| file.buildFiles.empty? }
- list_by_class(childReferences, Xcode::Project::PBXFileReference, files) do |file|
+ list_by_class(childReferences, Xcodeproj::Project::PBXFileReference, files) do |file|
file.group = self
end
end
def groups
- list_by_class(childReferences, Xcode::Project::PBXGroup)
+ list_by_class(childReferences, Xcodeproj::Project::PBXGroup)
end
def <<(child)
@@ -566,7 +566,7 @@ def initialize(xcodeproj = nil)
'objectVersion' => '46',
'objects' => {}
}
- self.root_object = objects.add(Xcode::Project::PBXProject, {
+ self.root_object = objects.add(Xcodeproj::Project::PBXProject, {
'attributes' => { 'LastUpgradeCheck' => '0420' },
'compatibilityVersion' => 'Xcode 3.2',
'developmentRegion' => 'English',
@@ -621,7 +621,7 @@ def add_system_framework(name)
end
def add_shell_script_build_phase(name, script_path)
- objects.add(Xcode::Project::PBXShellScriptBuildPhase, {
+ objects.add(Xcodeproj::Project::PBXShellScriptBuildPhase, {
'name' => name,
'files' => [],
'inputPaths' => [],
@@ -1,7 +1,7 @@
framework 'Foundation'
require 'fileutils'
-module Xcode
+module Xcodeproj
class Workspace
def initialize(*projpaths)
@projpaths = projpaths
View
@@ -1,10 +1,10 @@
require File.expand_path('../spec_helper', __FILE__)
-describe "Xcode::Config" do
+describe "Xcodeproj::Config" do
extend SpecHelper::TemporaryDirectory
before do
- @config = Xcode::Config.new('OTHER_LD_FLAGS' => '-framework Foundation')
+ @config = Xcodeproj::Config.new('OTHER_LD_FLAGS' => '-framework Foundation')
end
it "merges another config hash in place" do
View
@@ -1,10 +1,10 @@
require File.expand_path('../spec_helper', __FILE__)
-describe "Xcode::Project" do
+describe "Xcodeproj::Project" do
extend SpecHelper::TemporaryDirectory
before do
- @project = Xcode::Project.new
+ @project = Xcodeproj::Project.new
end
def find_objects(conditions)
@@ -27,7 +27,7 @@ def find_object(conditions)
describe "PBXObject" do
before do
- @object = Xcode::Project::PBXObject.new(@project, nil, 'name' => 'AnObject')
+ @object = Xcodeproj::Project::PBXObject.new(@project, nil, 'name' => 'AnObject')
end
it "merges the class name into the attributes" do
@@ -88,7 +88,7 @@ def find_object(conditions)
describe "a new PBXBuildPhase" do
before do
- @phase = @project.objects.add(Xcode::Project::PBXBuildPhase)
+ @phase = @project.objects.add(Xcodeproj::Project::PBXBuildPhase)
end
it "has an empty list of files" do
@@ -106,11 +106,11 @@ def find_object(conditions)
describe "a new PBXCopyFilesBuildPhase" do
before do
- @phase = @project.objects.add(Xcode::Project::PBXCopyFilesBuildPhase, 'dstPath' => 'some/path')
+ @phase = @project.objects.add(Xcodeproj::Project::PBXCopyFilesBuildPhase, 'dstPath' => 'some/path')
end
it "is a PBXBuildPhase" do
- @phase.should.be.kind_of Xcode::Project::PBXBuildPhase
+ @phase.should.be.kind_of Xcodeproj::Project::PBXBuildPhase
end
it "returns the dstPath" do
@@ -124,27 +124,27 @@ def find_object(conditions)
describe "a new PBXSourcesBuildPhase" do
before do
- @phase = @project.objects.add(Xcode::Project::PBXSourcesBuildPhase)
+ @phase = @project.objects.add(Xcodeproj::Project::PBXSourcesBuildPhase)
end
it "is a PBXBuildPhase" do
- @phase.should.be.kind_of Xcode::Project::PBXBuildPhase
+ @phase.should.be.kind_of Xcodeproj::Project::PBXBuildPhase
end
end
describe "a new PBXFrameworksBuildPhase" do
before do
- @phase = @project.objects.add(Xcode::Project::PBXFrameworksBuildPhase)
+ @phase = @project.objects.add(Xcodeproj::Project::PBXFrameworksBuildPhase)
end
it "is a PBXBuildPhase" do
- @phase.should.be.kind_of Xcode::Project::PBXBuildPhase
+ @phase.should.be.kind_of Xcodeproj::Project::PBXBuildPhase
end
end
describe "a new XCBuildConfiguration" do
before do
- @configuration = @project.objects.add(Xcode::Project::XCBuildConfiguration)
+ @configuration = @project.objects.add(Xcodeproj::Project::XCBuildConfiguration)
end
it "returns the xcconfig that this configuration is based on (baseConfigurationReference)" do
@@ -156,11 +156,11 @@ def find_object(conditions)
describe "a new XCConfigurationList" do
before do
- @list = @project.objects.add(Xcode::Project::XCConfigurationList)
+ @list = @project.objects.add(Xcodeproj::Project::XCConfigurationList)
end
it "returns the configurations" do
- configuration = @project.objects.add(Xcode::Project::XCBuildConfiguration)
+ configuration = @project.objects.add(Xcodeproj::Project::XCBuildConfiguration)
@list.buildConfigurations.to_a.should == []
@list.buildConfigurations = [configuration]
@list.buildConfigurationReferences.should == [configuration.uuid]
@@ -176,7 +176,7 @@ def find_object(conditions)
it "returns the product" do
product = @target.product
product.uuid.should == @target.productReference
- product.should.be.instance_of Xcode::Project::PBXFileReference
+ product.should.be.instance_of Xcodeproj::Project::PBXFileReference
product.path.should == "libPods.a"
product.name.should == "libPods.a"
product.group.name.should == "Products"
@@ -191,7 +191,7 @@ def find_object(conditions)
it "returns the buildConfigurationList" do
list = @target.buildConfigurationList
- list.should.be.instance_of Xcode::Project::XCConfigurationList
+ list.should.be.instance_of Xcodeproj::Project::XCConfigurationList
list.buildConfigurations.each do |configuration|
configuration.buildSettings.should == {
'DSTROOT' => '/tmp/xcodeproj.dst',
@@ -212,17 +212,17 @@ def find_object(conditions)
extend SpecHelper::TemporaryDirectory
it "returns an empty sources build phase" do
- phase = @target.buildPhases.select_by_class(Xcode::Project::PBXSourcesBuildPhase).first
+ phase = @target.buildPhases.select_by_class(Xcodeproj::Project::PBXSourcesBuildPhase).first
phase.files.to_a.should == []
end
it "returns a libraries/frameworks build phase, which by default is empty" do
- phase = @target.buildPhases.select_by_class(Xcode::Project::PBXFrameworksBuildPhase).first
+ phase = @target.buildPhases.select_by_class(Xcodeproj::Project::PBXFrameworksBuildPhase).first
phase.should.not == nil
end
it "returns an empty 'copy headers' phase" do
- phase = @target.buildPhases.select_by_class(Xcode::Project::PBXCopyFilesBuildPhase).first
+ phase = @target.buildPhases.select_by_class(Xcodeproj::Project::PBXCopyFilesBuildPhase).first
phase.dstPath.should == "$(PUBLIC_HEADERS_FOLDER_PATH)"
phase.files.to_a.should == []
end
@@ -236,7 +236,7 @@ def find_object(conditions)
end
it "adds any type of new PBXObject to the objects hash" do
- object = @project.objects.add(Xcode::Project::PBXObject, 'name' => 'An Object')
+ object = @project.objects.add(Xcodeproj::Project::PBXObject, 'name' => 'An Object')
object.name.should == 'An Object'
@project.objects_hash[object.uuid].should == object.attributes
end
@@ -273,10 +273,10 @@ def find_object(conditions)
# ensure that it was added to all objects
file = @project.objects[file.uuid]
- phase = @target.buildPhases.find { |phase| phase.is_a?(Xcode::Project::PBXSourcesBuildPhase) }
+ phase = @target.buildPhases.find { |phase| phase.is_a?(Xcodeproj::Project::PBXSourcesBuildPhase) }
phase.files.map { |buildFile| buildFile.file }.should.include file
- phase = @target.buildPhases.find { |phase| phase.is_a?(Xcode::Project::PBXCopyFilesBuildPhase) }
+ phase = @target.buildPhases.find { |phase| phase.is_a?(Xcodeproj::Project::PBXCopyFilesBuildPhase) }
phase.files.map { |buildFile| buildFile.file }.should.not.include file
end
end
@@ -302,10 +302,10 @@ def find_object(conditions)
# ensure that it was added to all objects
file = @project.objects[file.uuid]
- phase = @target.buildPhases.find { |phase| phase.is_a?(Xcode::Project::PBXSourcesBuildPhase) }
+ phase = @target.buildPhases.find { |phase| phase.is_a?(Xcodeproj::Project::PBXSourcesBuildPhase) }
phase.files.map { |buildFile| buildFile.file }.should.not.include file
- phase = @target.buildPhases.find { |phase| phase.is_a?(Xcode::Project::PBXCopyFilesBuildPhase) }
+ phase = @target.buildPhases.find { |phase| phase.is_a?(Xcodeproj::Project::PBXCopyFilesBuildPhase) }
phase.files.map { |buildFile| buildFile.file }.should.include file
end
@@ -1,8 +1,8 @@
require File.expand_path('../spec_helper', __FILE__)
-describe "Xcode::Workspace" do
+describe "Xcodeproj::Workspace" do
before do
- @workspace = Xcode::Workspace.new('Pods/Pods.xcodeproj', 'App.xcodeproj')
+ @workspace = Xcodeproj::Workspace.new('Pods/Pods.xcodeproj', 'App.xcodeproj')
end
it "accepts new projects" do

0 comments on commit 0a29520

Please sign in to comment.