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
da121866
Commit
da121866
authored
Feb 04, 2013
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Config] #project_root -> #installation_root & project_pods_root -> sandbox_root
parent
c8060b62
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
47 additions
and
47 deletions
+47
-47
config.rb
lib/cocoapods/config.rb
+12
-10
analyzer.rb
lib/cocoapods/installer/analyzer.rb
+3
-3
user_project_integrator.rb
lib/cocoapods/installer/user_project_integrator.rb
+5
-5
validator.rb
lib/cocoapods/validator.rb
+4
-4
integration_spec.rb
spec/integration_spec.rb
+15
-15
pre_flight.rb
spec/spec_helper/pre_flight.rb
+1
-3
config_spec.rb
spec/unit/config_spec.rb
+3
-3
analyzer_spec.rb
spec/unit/installer/analyzer_spec.rb
+2
-2
user_project_integrator_spec.rb
spec/unit/installer/user_project_integrator_spec.rb
+2
-2
No files found.
lib/cocoapods/config.rb
View file @
da121866
...
@@ -121,24 +121,26 @@ module Pod
...
@@ -121,24 +121,26 @@ module Pod
# @return [Pathname] the root of the CocoaPods installation where the
# @return [Pathname] the root of the CocoaPods installation where the
# Podfile is located.
# Podfile is located.
#
#
def
project
_root
def
installation
_root
@
project
_root
||=
Pathname
.
pwd
@
installation
_root
||=
Pathname
.
pwd
end
end
attr_writer
:project_root
attr_writer
:installation_root
alias
:project_root
:installation_root
# @return [Pathname] The root of the sandbox.
# @return [Pathname] The root of the sandbox.
#
#
def
project_pods
_root
def
sandbox
_root
@
project_pods_root
||=
@project
_root
+
'Pods'
@
sandbox_root
||=
installation
_root
+
'Pods'
end
end
attr_writer
:project_pods_root
attr_writer
:sandbox_root
alias
:project_pods_root
:sandbox_root
# @return [Sandbox] The sandbox of the current project.
# @return [Sandbox] The sandbox of the current project.
#
#
def
sandbox
def
sandbox
@sandbox
||=
Sandbox
.
new
(
project_pods
_root
)
@sandbox
||=
Sandbox
.
new
(
sandbox
_root
)
end
end
# @return [Podfile] The Podfile to use for the current execution.
# @return [Podfile] The Podfile to use for the current execution.
...
@@ -190,9 +192,9 @@ module Pod
...
@@ -190,9 +192,9 @@ module Pod
#
#
def
podfile_path
def
podfile_path
unless
@podfile_path
unless
@podfile_path
@podfile_path
=
project
_root
+
'CocoaPods.podfile'
@podfile_path
=
installation
_root
+
'CocoaPods.podfile'
unless
@podfile_path
.
exist?
unless
@podfile_path
.
exist?
@podfile_path
=
project
_root
+
'Podfile'
@podfile_path
=
installation
_root
+
'Podfile'
end
end
end
end
@podfile_path
@podfile_path
...
@@ -203,7 +205,7 @@ module Pod
...
@@ -203,7 +205,7 @@ module Pod
# @note The Lockfile is named `Podfile.lock`.
# @note The Lockfile is named `Podfile.lock`.
#
#
def
lockfile_path
def
lockfile_path
@lockfile_path
||=
project
_root
+
'Podfile.lock'
@lockfile_path
||=
installation
_root
+
'Podfile.lock'
end
end
#--------------------------------------#
#--------------------------------------#
...
...
lib/cocoapods/installer/analyzer.rb
View file @
da121866
...
@@ -198,7 +198,7 @@ module Pod
...
@@ -198,7 +198,7 @@ module Pod
lib
.
user_build_configurations
=
compute_user_build_configurations
(
target_definition
,
lib
.
user_targets
)
lib
.
user_build_configurations
=
compute_user_build_configurations
(
target_definition
,
lib
.
user_targets
)
lib
.
platform
=
compute_platform_for_target_definition
(
target_definition
,
lib
.
user_targets
)
lib
.
platform
=
compute_platform_for_target_definition
(
target_definition
,
lib
.
user_targets
)
else
else
lib
.
user_project_path
=
config
.
project
_root
lib
.
user_project_path
=
config
.
installation
_root
lib
.
user_project
=
nil
lib
.
user_project
=
nil
lib
.
user_targets
=
[]
lib
.
user_targets
=
[]
lib
.
user_build_configurations
=
{}
lib
.
user_build_configurations
=
{}
...
@@ -374,7 +374,7 @@ module Pod
...
@@ -374,7 +374,7 @@ module Pod
#
#
def
compute_user_project_path
(
target_definition
)
def
compute_user_project_path
(
target_definition
)
if
target_definition
.
user_project_path
if
target_definition
.
user_project_path
path
=
config
.
project
_root
+
target_definition
.
user_project_path
path
=
config
.
installation
_root
+
target_definition
.
user_project_path
path
=
"
#{
path
}
.xcodeproj"
unless
File
.
extname
(
path
)
==
'.xcodeproj'
path
=
"
#{
path
}
.xcodeproj"
unless
File
.
extname
(
path
)
==
'.xcodeproj'
path
=
Pathname
.
new
(
path
)
path
=
Pathname
.
new
(
path
)
unless
path
.
exist?
unless
path
.
exist?
...
@@ -383,7 +383,7 @@ module Pod
...
@@ -383,7 +383,7 @@ module Pod
end
end
else
else
xcodeprojs
=
Pathname
.
glob
(
config
.
project
_root
+
'*.xcodeproj'
)
xcodeprojs
=
Pathname
.
glob
(
config
.
installation
_root
+
'*.xcodeproj'
)
if
xcodeprojs
.
size
==
1
if
xcodeprojs
.
size
==
1
path
=
xcodeprojs
.
first
path
=
xcodeprojs
.
first
else
else
...
...
lib/cocoapods/installer/user_project_integrator.rb
View file @
da121866
...
@@ -31,7 +31,7 @@ module Pod
...
@@ -31,7 +31,7 @@ module Pod
# should be inferred by the project. If the workspace should be in
# should be inferred by the project. If the workspace should be in
# the same dir of the project, this could be removed.
# the same dir of the project, this could be removed.
#
#
attr_reader
:
project
_root
attr_reader
:
installation
_root
# @return [Library] the libraries generated by the installer.
# @return [Library] the libraries generated by the installer.
#
#
...
@@ -39,15 +39,15 @@ module Pod
...
@@ -39,15 +39,15 @@ module Pod
# @param [Podfile] podfile @see #podfile
# @param [Podfile] podfile @see #podfile
# @param [Sandbox] sandbox @see #sandbox
# @param [Sandbox] sandbox @see #sandbox
# @param [Pathname]
project_root @see #project
_root
# @param [Pathname]
installation_root @see #installation
_root
# @param [Library] libraries @see #libraries
# @param [Library] libraries @see #libraries
#
#
# @todo Too many initialization arguments
# @todo Too many initialization arguments
#
#
def
initialize
(
podfile
,
sandbox
,
project
_root
,
libraries
)
def
initialize
(
podfile
,
sandbox
,
installation
_root
,
libraries
)
@podfile
=
podfile
@podfile
=
podfile
@sandbox
=
sandbox
@sandbox
=
sandbox
@
project_root
=
project
_root
@
installation_root
=
installation
_root
@libraries
=
libraries
@libraries
=
libraries
end
end
...
@@ -143,7 +143,7 @@ module Pod
...
@@ -143,7 +143,7 @@ module Pod
podfile
.
workspace_path
podfile
.
workspace_path
elsif
user_project_paths
.
count
==
1
elsif
user_project_paths
.
count
==
1
project
=
user_project_paths
.
first
.
basename
(
'.xcodeproj'
)
project
=
user_project_paths
.
first
.
basename
(
'.xcodeproj'
)
project
_root
+
"
#{
project
}
.xcworkspace"
installation
_root
+
"
#{
project
}
.xcworkspace"
else
else
raise
Informative
,
"Could not automatically select an Xcode "
\
raise
Informative
,
"Could not automatically select an Xcode "
\
"workspace. Specify one in your Podfile like so:
\n\n
"
\
"workspace. Specify one in your Podfile like so:
\n\n
"
\
...
...
lib/cocoapods/validator.rb
View file @
da121866
...
@@ -212,8 +212,8 @@ module Pod
...
@@ -212,8 +212,8 @@ module Pod
validation_dir
.
rmtree
if
validation_dir
.
exist?
validation_dir
.
rmtree
if
validation_dir
.
exist?
validation_dir
.
mkpath
validation_dir
.
mkpath
@original_config
=
Config
.
instance
.
clone
@original_config
=
Config
.
instance
.
clone
config
.
project_root
=
validation_dir
config
.
installation_root
=
validation_dir
config
.
project_pods_root
=
validation_dir
+
'Pods'
config
.
sandbox_root
=
validation_dir
+
'Pods'
config
.
silent
=
!
config
.
verbose
config
.
silent
=
!
config
.
verbose
config
.
integrate_targets
=
false
config
.
integrate_targets
=
false
config
.
generate_docs
=
false
config
.
generate_docs
=
false
...
@@ -231,7 +231,7 @@ module Pod
...
@@ -231,7 +231,7 @@ module Pod
#
#
def
install_pod
def
install_pod
podfile
=
podfile_from_spec
(
consumer
.
platform
,
spec
.
deployment_target
(
consumer
.
platform
))
podfile
=
podfile_from_spec
(
consumer
.
platform
,
spec
.
deployment_target
(
consumer
.
platform
))
sandbox
=
Sandbox
.
new
(
config
.
project_pods
_root
)
sandbox
=
Sandbox
.
new
(
config
.
sandbox
_root
)
installer
=
Installer
.
new
(
sandbox
,
podfile
)
installer
=
Installer
.
new
(
sandbox
,
podfile
)
installer
.
install!
installer
.
install!
...
@@ -254,7 +254,7 @@ module Pod
...
@@ -254,7 +254,7 @@ module Pod
else
else
UI
.
message
"
\n
Building with xcodebuild.
\n
"
.
yellow
do
UI
.
message
"
\n
Building with xcodebuild.
\n
"
.
yellow
do
messages
=
[]
messages
=
[]
output
=
Dir
.
chdir
(
config
.
project_pods
_root
)
{
`xcodebuild clean build 2>&1`
}
output
=
Dir
.
chdir
(
config
.
sandbox
_root
)
{
`xcodebuild clean build 2>&1`
}
UI
.
puts
output
UI
.
puts
output
parsed_output
=
parse_xcodebuild_output
(
output
)
parsed_output
=
parse_xcodebuild_output
(
output
)
parsed_output
.
each
do
|
message
|
parsed_output
.
each
do
|
message
|
...
...
spec/integration_spec.rb
View file @
da121866
...
@@ -14,11 +14,11 @@ puts " [!] ".red << "Skipping xcodebuild based checks, because it can't be found
...
@@ -14,11 +14,11 @@ puts " [!] ".red << "Skipping xcodebuild based checks, because it can't be found
def
should_xcodebuild
(
target_definition
)
def
should_xcodebuild
(
target_definition
)
return
if
skip_xcodebuild?
return
if
skip_xcodebuild?
target
=
target_definition
target
=
target_definition
Dir
.
chdir
(
config
.
project_pods
_root
)
do
Dir
.
chdir
(
config
.
sandbox
_root
)
do
print
"[!] Compiling
#{
target
.
label
}
...
\r
"
print
"[!] Compiling
#{
target
.
label
}
...
\r
"
should_successfully_perform
"xcodebuild -target '
#{
target
.
label
}
'"
should_successfully_perform
"xcodebuild -target '
#{
target
.
label
}
'"
product_name
=
"lib
#{
target_definition
.
label
}
.a"
product_name
=
"lib
#{
target_definition
.
label
}
.a"
lib_path
=
config
.
project_pods
_root
+
"build/Release
#{
'-iphoneos'
if
target
.
platform
==
:ios
}
"
+
product_name
lib_path
=
config
.
sandbox
_root
+
"build/Release
#{
'-iphoneos'
if
target
.
platform
==
:ios
}
"
+
product_name
`lipo -info '
#{
lib_path
}
'`
.
should
.
include
"
#{
target
.
platform
==
:ios
?
'armv7'
:
'x86_64'
}
"
`lipo -info '
#{
lib_path
}
'`
.
should
.
include
"
#{
target
.
platform
==
:ios
?
'armv7'
:
'x86_64'
}
"
end
end
end
end
...
@@ -94,7 +94,7 @@ module Pod
...
@@ -94,7 +94,7 @@ module Pod
installer
=
Installer
.
new
(
config
.
sandbox
,
podfile
)
installer
=
Installer
.
new
(
config
.
sandbox
,
podfile
)
installer
.
install!
installer
.
install!
dummy
=
(
config
.
project_pods
_root
+
'Pods-dummy.m'
).
read
dummy
=
(
config
.
sandbox
_root
+
'Pods-dummy.m'
).
read
dummy
.
should
.
include?
(
'@implementation PodsDummy_Pods'
)
dummy
.
should
.
include?
(
'@implementation PodsDummy_Pods'
)
end
end
...
@@ -113,7 +113,7 @@ module Pod
...
@@ -113,7 +113,7 @@ module Pod
installer
=
Installer
.
new
(
config
.
sandbox
,
podfile
)
installer
=
Installer
.
new
(
config
.
sandbox
,
podfile
)
installer
.
install!
installer
.
install!
dummy
=
(
config
.
project_pods
_root
+
'Pods-AnotherTarget-dummy.m'
).
read
dummy
=
(
config
.
sandbox
_root
+
'Pods-AnotherTarget-dummy.m'
).
read
dummy
.
should
.
include?
(
'@implementation PodsDummy_Pods_AnotherTarget'
)
dummy
.
should
.
include?
(
'@implementation PodsDummy_Pods_AnotherTarget'
)
end
end
...
@@ -180,9 +180,9 @@ module Pod
...
@@ -180,9 +180,9 @@ module Pod
installer
=
Installer
.
new
(
config
.
sandbox
,
podfile
)
installer
=
Installer
.
new
(
config
.
sandbox
,
podfile
)
installer
.
install!
installer
.
install!
doc
=
(
config
.
project_pods
_root
+
'Documentation/JSONKit/html/index.html'
).
read
doc
=
(
config
.
sandbox
_root
+
'Documentation/JSONKit/html/index.html'
).
read
doc
.
should
.
include?
(
'<title>JSONKit 1.4 Reference</title>'
)
doc
.
should
.
include?
(
'<title>JSONKit 1.4 Reference</title>'
)
doc
=
(
config
.
project_pods
_root
+
'Documentation/SSToolkit/html/index.html'
).
read
doc
=
(
config
.
sandbox
_root
+
'Documentation/SSToolkit/html/index.html'
).
read
doc
.
should
.
include?
(
'<title>SSToolkit 1.0.0 Reference</title>'
)
doc
.
should
.
include?
(
'<title>SSToolkit 1.0.0 Reference</title>'
)
end
end
end
end
...
@@ -195,7 +195,7 @@ module Pod
...
@@ -195,7 +195,7 @@ module Pod
describe
"Multi-platform (
#{
test_platform
}
)"
do
describe
"Multi-platform (
#{
test_platform
}
)"
do
before
do
before
do
FileUtils
.
cp_r
(
fixture
(
'integration/.'
),
config
.
project_pods
_root
)
FileUtils
.
cp_r
(
fixture
(
'integration/.'
),
config
.
sandbox
_root
)
end
end
#--------------------------------------#
#--------------------------------------#
...
@@ -208,12 +208,12 @@ module Pod
...
@@ -208,12 +208,12 @@ module Pod
pre_install
do
|
installer
|
pre_install
do
|
installer
|
memo
=
"PODS:
#{
installer
.
pods
*
', '
}
TARGETS:
#{
installer
.
project
.
targets
.
to_a
*
', '
}
"
memo
=
"PODS:
#{
installer
.
pods
*
', '
}
TARGETS:
#{
installer
.
project
.
targets
.
to_a
*
', '
}
"
File
.
open
(
installer
.
config
.
project_pods
_root
+
'memo.txt'
,
'w'
)
{
|
f
|
f
.
puts
memo
}
File
.
open
(
installer
.
config
.
sandbox
_root
+
'memo.txt'
,
'w'
)
{
|
f
|
f
.
puts
memo
}
end
end
end
end
Installer
.
new
(
config
.
sandbox
,
podfile
).
install!
Installer
.
new
(
config
.
sandbox
,
podfile
).
install!
File
.
open
(
config
.
project_pods
_root
+
'memo.txt'
,
'rb'
).
read
.
should
==
"PODS:SSZipArchive (0.1.0) TARGETS:
\n
"
File
.
open
(
config
.
sandbox
_root
+
'memo.txt'
,
'rb'
).
read
.
should
==
"PODS:SSZipArchive (0.1.0) TARGETS:
\n
"
end
end
#--------------------------------------#
#--------------------------------------#
...
@@ -280,7 +280,7 @@ module Pod
...
@@ -280,7 +280,7 @@ module Pod
lockfile
.
delete
(
"SPEC CHECKSUMS"
)
lockfile
.
delete
(
"SPEC CHECKSUMS"
)
lockfile
.
should
==
lockfile_contents
lockfile
.
should
==
lockfile_contents
root
=
config
.
project_pods
_root
root
=
config
.
sandbox
_root
(
root
+
'Pods.xcconfig'
).
read
.
should
==
installer
.
libraries
.
first
.
xcconfig
.
to_s
(
root
+
'Pods.xcconfig'
).
read
.
should
==
installer
.
libraries
.
first
.
xcconfig
.
to_s
project_file
=
(
root
+
'Pods.xcodeproj/project.pbxproj'
).
to_s
project_file
=
(
root
+
'Pods.xcodeproj/project.pbxproj'
).
to_s
saved_project
=
Xcodeproj
.
read_plist
(
project_file
)
saved_project
=
Xcodeproj
.
read_plist
(
project_file
)
...
@@ -303,7 +303,7 @@ module Pod
...
@@ -303,7 +303,7 @@ module Pod
installer
=
Installer
.
new
(
config
.
sandbox
,
podfile
)
installer
=
Installer
.
new
(
config
.
sandbox
,
podfile
)
installer
.
install!
installer
.
install!
contents
=
(
config
.
project_pods
_root
+
'Pods-resources.sh'
).
read
contents
=
(
config
.
sandbox
_root
+
'Pods-resources.sh'
).
read
contents
.
should
.
include
"install_resource 'SSZipArchive/LICENSE'
\n
"
\
contents
.
should
.
include
"install_resource 'SSZipArchive/LICENSE'
\n
"
\
"install_resource 'SSZipArchive/Readme.markdown'"
"install_resource 'SSZipArchive/Readme.markdown'"
end
end
...
@@ -327,7 +327,7 @@ module Pod
...
@@ -327,7 +327,7 @@ module Pod
installer
=
Installer
.
new
(
config
.
sandbox
,
podfile
)
installer
=
Installer
.
new
(
config
.
sandbox
,
podfile
)
installer
.
install!
installer
.
install!
project
=
Xcodeproj
::
Project
.
new
(
config
.
project_pods
_root
+
'Pods.xcodeproj'
)
project
=
Xcodeproj
::
Project
.
new
(
config
.
sandbox
_root
+
'Pods.xcodeproj'
)
disk_source_files
=
project
.
files
.
sort
.
reject
{
|
f
|
f
.
build_files
.
empty?
}
disk_source_files
=
project
.
files
.
sort
.
reject
{
|
f
|
f
.
build_files
.
empty?
}
installer_source_files
=
installer
.
pods_project
.
files
.
sort
.
reject
{
|
f
|
f
.
build_files
.
empty?
}
installer_source_files
=
installer
.
pods_project
.
files
.
sort
.
reject
{
|
f
|
f
.
build_files
.
empty?
}
disk_source_files
.
should
==
installer_source_files
disk_source_files
.
should
==
installer_source_files
...
@@ -352,7 +352,7 @@ module Pod
...
@@ -352,7 +352,7 @@ module Pod
installer
=
Installer
.
new
(
config
.
sandbox
,
podfile
)
installer
=
Installer
.
new
(
config
.
sandbox
,
podfile
)
installer
.
install!
installer
.
install!
project
=
Xcodeproj
::
Project
.
new
(
config
.
project_pods
_root
+
'Pods.xcodeproj'
)
project
=
Xcodeproj
::
Project
.
new
(
config
.
sandbox
_root
+
'Pods.xcodeproj'
)
project
.
targets
.
count
.
should
==
3
project
.
targets
.
count
.
should
==
3
project
.
targets
.
each
do
|
target
|
project
.
targets
.
each
do
|
target
|
phase
=
target
.
build_phases
.
find
{
|
phase
|
phase
.
isa
==
'PBXSourcesBuildPhase'
}
phase
=
target
.
build_phases
.
find
{
|
phase
|
phase
.
isa
==
'PBXSourcesBuildPhase'
}
...
@@ -383,7 +383,7 @@ module Pod
...
@@ -383,7 +383,7 @@ module Pod
]
]
expected_files
.
each
do
|
file
|
expected_files
.
each
do
|
file
|
(
config
.
project_pods
_root
+
file
).
should
.
exist
(
config
.
sandbox
_root
+
file
).
should
.
exist
end
end
should_xcodebuild
(
podfile
.
target_definitions
[
:default
])
should_xcodebuild
(
podfile
.
target_definitions
[
:default
])
...
@@ -439,7 +439,7 @@ module Pod
...
@@ -439,7 +439,7 @@ module Pod
installer
=
Installer
.
new
(
config
.
sandbox
,
podfile
)
installer
=
Installer
.
new
(
config
.
sandbox
,
podfile
)
installer
.
install!
installer
.
install!
root
=
config
.
project_pods
_root
root
=
config
.
sandbox
_root
(
root
+
'Pods.xcconfig'
).
should
.
exist
(
root
+
'Pods.xcconfig'
).
should
.
exist
(
root
+
'Headers'
).
should
.
exist
(
root
+
'Headers'
).
should
.
exist
(
root
+
'Headers/SSZipArchive'
).
should
.
exist
(
root
+
'Headers/SSZipArchive'
).
should
.
exist
...
...
spec/spec_helper/pre_flight.rb
View file @
da121866
...
@@ -7,12 +7,10 @@ module Bacon
...
@@ -7,12 +7,10 @@ module Bacon
define_method
(
:run_requirement
)
do
|
description
,
spec
|
define_method
(
:run_requirement
)
do
|
description
,
spec
|
::
Pod
::
Config
.
instance
=
nil
::
Pod
::
Config
.
instance
=
nil
::
Pod
::
Config
.
instance
.
tap
do
|
c
|
::
Pod
::
Config
.
instance
.
tap
do
|
c
|
# c.verbose = ENV['VERBOSE_SPECS']
# c.silent = !ENV['VERBOSE_SPECS']
c
.
verbose
=
false
c
.
verbose
=
false
c
.
silent
=
true
c
.
silent
=
true
c
.
repos_dir
=
fixture
(
'spec-repos'
)
c
.
repos_dir
=
fixture
(
'spec-repos'
)
c
.
project_root
=
SpecHelper
.
temporary_directory
c
.
installation_root
=
SpecHelper
.
temporary_directory
c
.
install_docs
=
false
c
.
install_docs
=
false
c
.
generate_docs
=
false
c
.
generate_docs
=
false
c
.
skip_repo_update
=
true
c
.
skip_repo_update
=
true
...
...
spec/unit/config_spec.rb
View file @
da121866
...
@@ -20,11 +20,11 @@ module Pod
...
@@ -20,11 +20,11 @@ module Pod
describe
"Concerning a user's project, which is expected in the current working directory"
do
describe
"Concerning a user's project, which is expected in the current working directory"
do
before
do
before
do
config
.
project
_root
=
temporary_directory
config
.
installation
_root
=
temporary_directory
end
end
it
"returns the path to the project root"
do
it
"returns the path to the project root"
do
config
.
project
_root
.
should
==
temporary_directory
config
.
installation
_root
.
should
==
temporary_directory
end
end
it
"returns the path to the project Podfile if it exists"
do
it
"returns the path to the project Podfile if it exists"
do
...
@@ -38,7 +38,7 @@ module Pod
...
@@ -38,7 +38,7 @@ module Pod
end
end
it
"returns the path to the Pods directory that holds the dependencies"
do
it
"returns the path to the Pods directory that holds the dependencies"
do
config
.
project_pods
_root
.
should
==
temporary_directory
+
'Pods'
config
.
sandbox
_root
.
should
==
temporary_directory
+
'Pods'
end
end
end
end
...
...
spec/unit/installer/analyzer_spec.rb
View file @
da121866
...
@@ -92,7 +92,7 @@ module Pod
...
@@ -92,7 +92,7 @@ module Pod
@analyzer
.
analyze
@analyzer
.
analyze
lib
=
@analyzer
.
libraries
.
first
lib
=
@analyzer
.
libraries
.
first
lib
.
user_project_path
.
should
==
config
.
project
_root
lib
.
user_project_path
.
should
==
config
.
installation
_root
lib
.
user_project
.
should
.
be
.
nil
lib
.
user_project
.
should
.
be
.
nil
lib
.
user_targets
.
map
(
&
:name
).
should
==
[]
lib
.
user_targets
.
map
(
&
:name
).
should
==
[]
lib
.
user_build_configurations
.
should
==
{}
lib
.
user_build_configurations
.
should
==
{}
...
@@ -199,7 +199,7 @@ module Pod
...
@@ -199,7 +199,7 @@ module Pod
it
"if not specified in the target definition if looks if there is only one project"
do
it
"if not specified in the target definition if looks if there is only one project"
do
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
,
nil
)
target_definition
=
Podfile
::
TargetDefinition
.
new
(
:default
,
nil
,
nil
)
config
.
project_root
=
config
.
project
_root
+
'SampleProject'
config
.
installation_root
=
config
.
installation
_root
+
'SampleProject'
path
=
@analyzer
.
send
(
:compute_user_project_path
,
target_definition
)
path
=
@analyzer
.
send
(
:compute_user_project_path
,
target_definition
)
path
.
to_s
.
should
.
include
'SampleProject/SampleProject.xcodeproj'
path
.
to_s
.
should
.
include
'SampleProject/SampleProject.xcodeproj'
...
...
spec/unit/installer/user_project_integrator_spec.rb
View file @
da121866
...
@@ -20,7 +20,7 @@ module Pod
...
@@ -20,7 +20,7 @@ module Pod
end
end
end
end
@
project
_root
=
@sample_project_path
.
dirname
@
installation
_root
=
@sample_project_path
.
dirname
@pods_project
=
Project
.
new
()
@pods_project
=
Project
.
new
()
config
.
sandbox
.
project
=
@pods_project
config
.
sandbox
.
project
=
@pods_project
@libraries
=
@podfile
.
target_definitions
.
values
.
map
do
|
target_definition
|
@libraries
=
@podfile
.
target_definitions
.
values
.
map
do
|
target_definition
|
...
@@ -32,7 +32,7 @@ module Pod
...
@@ -32,7 +32,7 @@ module Pod
lib
.
user_project
=
sample_project
lib
.
user_project
=
sample_project
lib
lib
end
end
@integrator
=
Installer
::
UserProjectIntegrator
.
new
(
@podfile
,
config
.
sandbox
,
@
project
_root
,
@libraries
)
@integrator
=
Installer
::
UserProjectIntegrator
.
new
(
@podfile
,
config
.
sandbox
,
@
installation
_root
,
@libraries
)
end
end
it
"uses the path of the workspace defined in the podfile"
do
it
"uses the path of the workspace defined in the podfile"
do
...
...
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