Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
e1d788d9
Commit
e1d788d9
authored
Nov 12, 2011
by
Eloy Duran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove activation of activesupport gem and make code work with Xcodeproj gem again.
parent
ace222ef
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
21 additions
and
24 deletions
+21
-24
pod
bin/pod
+0
-2
xcodeproj
external/xcodeproj
+1
-1
cocoapods.rb
lib/cocoapods.rb
+4
-4
installer.rb
lib/cocoapods/installer.rb
+5
-5
specification.rb
lib/cocoapods/specification.rb
+1
-1
xcodeproj_ext.rb
lib/cocoapods/xcodeproj_ext.rb
+5
-5
integration_spec.rb
spec/integration_spec.rb
+3
-3
spec_helper.rb
spec/spec_helper.rb
+0
-1
xcodeproj_ext_spec.rb
spec/unit/xcodeproj_ext_spec.rb
+2
-2
No files found.
bin/pod
View file @
e1d788d9
#!/usr/bin/env macruby
#!/usr/bin/env macruby
if $0 == __FILE__
if $0 == __FILE__
require 'rubygems'
gem 'activesupport', '~> 3.1.1'
$:.unshift File.expand_path('../../external/xcodeproj/lib', __FILE__)
$:.unshift File.expand_path('../../external/xcodeproj/lib', __FILE__)
$:.unshift File.expand_path('../../lib', __FILE__)
$:.unshift File.expand_path('../../lib', __FILE__)
end
end
...
...
xcodeproj
@
0a295208
Subproject commit 0
c41e5333bdf4ff409515815c25eb433c03c2ded
Subproject commit 0
a2952089f22bfd818bb9f5bcbb7cdff9bfaa991
lib/cocoapods.rb
View file @
e1d788d9
...
@@ -21,10 +21,10 @@ module Pod
...
@@ -21,10 +21,10 @@ module Pod
autoload
:Pathname
,
'pathname'
autoload
:Pathname
,
'pathname'
end
end
module
Xcode
module
Xcode
proj
autoload
:Config
,
'cocoapods/xcode
_projec
t'
autoload
:Config
,
'cocoapods/xcode
proj_ex
t'
autoload
:Project
,
'cocoapods/xcode
_projec
t'
autoload
:Project
,
'cocoapods/xcode
proj_ex
t'
autoload
:Workspace
,
'cocoapods/xcode
_projec
t'
autoload
:Workspace
,
'cocoapods/xcode
proj_ex
t'
end
end
class
Pathname
class
Pathname
...
...
lib/cocoapods/installer.rb
View file @
e1d788d9
...
@@ -55,7 +55,7 @@ EOS
...
@@ -55,7 +55,7 @@ EOS
end
end
def
xcconfig
def
xcconfig
@xcconfig
||=
Xcode
::
Config
.
new
({
@xcconfig
||=
Xcode
proj
::
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.
'USER_HEADER_SEARCH_PATHS'
=>
'"$(BUILT_PRODUCTS_DIR)/Pods"'
,
'USER_HEADER_SEARCH_PATHS'
=>
'"$(BUILT_PRODUCTS_DIR)/Pods"'
,
'ALWAYS_SEARCH_USER_PATHS'
=>
'YES'
,
'ALWAYS_SEARCH_USER_PATHS'
=>
'YES'
,
...
@@ -164,7 +164,7 @@ EOS
...
@@ -164,7 +164,7 @@ EOS
def
project
def
project
return
@project
if
@project
return
@project
if
@project
@project
=
Xcode
::
Project
.
for_platform
(
@podfile
.
platform
)
@project
=
Xcode
proj
::
Project
.
for_platform
(
@podfile
.
platform
)
# First we need to resolve dependencies across *all* targets, so that the
# First we need to resolve dependencies across *all* targets, so that the
# same correct versions of pods are being used for all targets. This
# same correct versions of pods are being used for all targets. This
# happens when we call `build_specifications'.
# happens when we call `build_specifications'.
...
@@ -221,7 +221,7 @@ EOS
...
@@ -221,7 +221,7 @@ EOS
def
configure_project
(
projpath
)
def
configure_project
(
projpath
)
root
=
File
.
dirname
(
projpath
)
root
=
File
.
dirname
(
projpath
)
xcworkspace
=
File
.
join
(
root
,
File
.
basename
(
projpath
,
'.xcodeproj'
)
+
'.xcworkspace'
)
xcworkspace
=
File
.
join
(
root
,
File
.
basename
(
projpath
,
'.xcodeproj'
)
+
'.xcworkspace'
)
workspace
=
Xcode
::
Workspace
.
new_from_xcworkspace
(
xcworkspace
)
workspace
=
Xcode
proj
::
Workspace
.
new_from_xcworkspace
(
xcworkspace
)
pods_projpath
=
File
.
join
(
config
.
project_pods_root
,
'Pods.xcodeproj'
)
pods_projpath
=
File
.
join
(
config
.
project_pods_root
,
'Pods.xcodeproj'
)
root
=
Pathname
.
new
(
root
).
expand_path
root
=
Pathname
.
new
(
root
).
expand_path
[
projpath
,
pods_projpath
].
each
do
|
path
|
[
projpath
,
pods_projpath
].
each
do
|
path
|
...
@@ -230,7 +230,7 @@ EOS
...
@@ -230,7 +230,7 @@ EOS
end
end
workspace
.
save_as
(
xcworkspace
)
workspace
.
save_as
(
xcworkspace
)
app_project
=
Xcode
::
Project
.
new
(
projpath
)
app_project
=
Xcode
proj
::
Project
.
new
(
projpath
)
return
if
app_project
.
files
.
find
{
|
file
|
file
.
path
=~
/libPods\.a$/
}
return
if
app_project
.
files
.
find
{
|
file
|
file
.
path
=~
/libPods\.a$/
}
configfile
=
app_project
.
files
.
new
(
'path'
=>
'Pods/Pods.xcconfig'
)
configfile
=
app_project
.
files
.
new
(
'path'
=>
'Pods/Pods.xcconfig'
)
...
@@ -242,7 +242,7 @@ EOS
...
@@ -242,7 +242,7 @@ EOS
libfile
=
app_project
.
files
.
new_static_library
(
'Pods'
)
libfile
=
app_project
.
files
.
new_static_library
(
'Pods'
)
libfile
.
group
=
app_project
.
main_group
.
groups
.
find
{
|
g
|
g
.
name
==
'Frameworks'
}
libfile
.
group
=
app_project
.
main_group
.
groups
.
find
{
|
g
|
g
.
name
==
'Frameworks'
}
app_project
.
objects
.
select_by_class
(
Xcode
::
Project
::
PBXFrameworksBuildPhase
).
each
do
|
build_phase
|
app_project
.
objects
.
select_by_class
(
Xcode
proj
::
Project
::
PBXFrameworksBuildPhase
).
each
do
|
build_phase
|
build_phase
.
files
<<
libfile
.
buildFiles
.
new
build_phase
.
files
<<
libfile
.
buildFiles
.
new
end
end
...
...
lib/cocoapods/specification.rb
View file @
e1d788d9
...
@@ -22,7 +22,7 @@ module Pod
...
@@ -22,7 +22,7 @@ module Pod
def
initialize
def
initialize
@dependencies
=
[]
@dependencies
=
[]
@xcconfig
=
Xcode
::
Config
.
new
@xcconfig
=
Xcode
proj
::
Config
.
new
yield
self
if
block_given?
yield
self
if
block_given?
end
end
...
...
lib/cocoapods/xcode
_projec
t.rb
→
lib/cocoapods/xcode
proj_ex
t.rb
View file @
e1d788d9
require
'xcodeproj'
require
'xcodeproj'
module
Xcode
module
Xcode
proj
class
Project
class
Project
# Shortcut access to the `Pods' PBXGroup.
# Shortcut access to the `Pods' PBXGroup.
def
pods
def
pods
...
@@ -22,7 +22,7 @@ module Xcode
...
@@ -22,7 +22,7 @@ module Xcode
end
end
def
self
.
for_platform
(
platform
)
def
self
.
for_platform
(
platform
)
project
=
Xcode
::
Project
.
new
project
=
Xcode
proj
::
Project
.
new
project
.
main_group
<<
project
.
groups
.
new
({
'name'
=>
'Pods'
})
project
.
main_group
<<
project
.
groups
.
new
({
'name'
=>
'Pods'
})
framework
=
project
.
add_system_framework
(
platform
==
:ios
?
'Foundation'
:
'Cocoa'
)
framework
=
project
.
add_system_framework
(
platform
==
:ios
?
'Foundation'
:
'Cocoa'
)
framework
.
group
=
project
.
groups
.
new
({
'name'
=>
'Frameworks'
})
framework
.
group
=
project
.
groups
.
new
({
'name'
=>
'Frameworks'
})
...
@@ -31,15 +31,15 @@ module Xcode
...
@@ -31,15 +31,15 @@ module Xcode
project
.
main_group
<<
products
project
.
main_group
<<
products
project
.
root_object
.
products
=
products
project
.
root_object
.
products
=
products
project
.
root_object
.
attributes
[
'buildConfigurationList'
]
=
project
.
objects
.
add
(
Xcode
::
Project
::
XCConfigurationList
,
{
project
.
root_object
.
attributes
[
'buildConfigurationList'
]
=
project
.
objects
.
add
(
Xcode
proj
::
Project
::
XCConfigurationList
,
{
'defaultConfigurationIsVisible'
=>
'0'
,
'defaultConfigurationIsVisible'
=>
'0'
,
'defaultConfigurationName'
=>
'Release'
,
'defaultConfigurationName'
=>
'Release'
,
'buildConfigurations'
=>
[
'buildConfigurations'
=>
[
project
.
objects
.
add
(
Xcode
::
Project
::
XCBuildConfiguration
,
{
project
.
objects
.
add
(
Xcode
proj
::
Project
::
XCBuildConfiguration
,
{
'name'
=>
'Debug'
,
'name'
=>
'Debug'
,
'buildSettings'
=>
build_settings
(
platform
,
:debug
)
'buildSettings'
=>
build_settings
(
platform
,
:debug
)
}),
}),
project
.
objects
.
add
(
Xcode
::
Project
::
XCBuildConfiguration
,
{
project
.
objects
.
add
(
Xcode
proj
::
Project
::
XCBuildConfiguration
,
{
'name'
=>
'Release'
,
'name'
=>
'Release'
,
'buildSettings'
=>
build_settings
(
platform
,
:release
)
'buildSettings'
=>
build_settings
(
platform
,
:release
)
})
})
...
...
spec/integration_spec.rb
View file @
e1d788d9
...
@@ -207,7 +207,7 @@ if false
...
@@ -207,7 +207,7 @@ if false
installer
=
SpecHelper
::
Installer
.
new
(
spec
)
installer
=
SpecHelper
::
Installer
.
new
(
spec
)
installer
.
install!
installer
.
install!
project
=
Pod
::
Xcode
::
Project
.
new
(
config
.
project_pods_root
+
'Pods.xcodeproj'
)
project
=
Xcodeproj
::
Project
.
new
(
config
.
project_pods_root
+
'Pods.xcodeproj'
)
project
.
source_files
.
should
==
installer
.
project
.
source_files
project
.
source_files
.
should
==
installer
.
project
.
source_files
end
end
...
@@ -264,10 +264,10 @@ if false
...
@@ -264,10 +264,10 @@ if false
installer
.
configure_project
(
projpath
)
installer
.
configure_project
(
projpath
)
xcworkspace
=
temporary_directory
+
'ASIHTTPRequest.xcworkspace'
xcworkspace
=
temporary_directory
+
'ASIHTTPRequest.xcworkspace'
workspace
=
Pod
::
Xcode
::
Workspace
.
new_from_xcworkspace
(
xcworkspace
)
workspace
=
Xcodeproj
::
Workspace
.
new_from_xcworkspace
(
xcworkspace
)
workspace
.
projpaths
.
sort
.
should
==
[
'ASIHTTPRequest.xcodeproj'
,
'Pods/Pods.xcodeproj'
]
workspace
.
projpaths
.
sort
.
should
==
[
'ASIHTTPRequest.xcodeproj'
,
'Pods/Pods.xcodeproj'
]
project
=
Pod
::
Xcode
::
Project
.
new
(
projpath
)
project
=
Xcodeproj
::
Project
.
new
(
projpath
)
libPods
=
project
.
files
.
find
{
|
f
|
f
.
name
==
'libPods.a'
}
libPods
=
project
.
files
.
find
{
|
f
|
f
.
name
==
'libPods.a'
}
project
.
targets
.
each
do
|
target
|
project
.
targets
.
each
do
|
target
|
target
.
buildConfigurations
.
each
do
|
config
|
target
.
buildConfigurations
.
each
do
|
config
|
...
...
spec/spec_helper.rb
View file @
e1d788d9
...
@@ -4,7 +4,6 @@ require 'mac_bacon'
...
@@ -4,7 +4,6 @@ require 'mac_bacon'
require
'pathname'
require
'pathname'
ROOT
=
Pathname
.
new
(
File
.
expand_path
(
'../../'
,
__FILE__
))
ROOT
=
Pathname
.
new
(
File
.
expand_path
(
'../../'
,
__FILE__
))
gem
'activesupport'
,
'~> 3.1.1'
$:
.
unshift
File
.
expand_path
(
'../../external/xcodeproj/lib'
,
__FILE__
)
$:
.
unshift
File
.
expand_path
(
'../../external/xcodeproj/lib'
,
__FILE__
)
$:
.
unshift
(
ROOT
+
'lib'
).
to_s
$:
.
unshift
(
ROOT
+
'lib'
).
to_s
require
'cocoapods'
require
'cocoapods'
...
...
spec/unit/xcode_spec.rb
→
spec/unit/xcode
proj_ext
_spec.rb
View file @
e1d788d9
require
File
.
expand_path
(
'../../spec_helper'
,
__FILE__
)
require
File
.
expand_path
(
'../../spec_helper'
,
__FILE__
)
describe
'Xcode::Project'
do
describe
'Xcode
proj
::Project'
do
before
do
before
do
@project
=
Xcode
::
Project
.
new
@project
=
Xcode
proj
::
Project
.
new
end
end
def
find_object
(
conditions
)
def
find_object
(
conditions
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment