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
385d9b38
Commit
385d9b38
authored
Oct 21, 2011
by
Eloy Duran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don’t break when there’s no rootspec. Closes #30.
parent
78c554e3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
11 deletions
+27
-11
config.rb
lib/cocoapods/config.rb
+2
-2
integration_spec.rb
spec/integration_spec.rb
+8
-2
installer_spec.rb
spec/unit/installer_spec.rb
+11
-6
resolver_spec.rb
spec/unit/resolver_spec.rb
+6
-1
No files found.
lib/cocoapods/config.rb
View file @
385d9b38
...
@@ -55,11 +55,11 @@ module Pod
...
@@ -55,11 +55,11 @@ module Pod
end
end
def
ios?
def
ios?
rootspec
.
platform
==
:ios
rootspec
.
platform
==
:ios
if
rootspec
end
end
def
osx?
def
osx?
rootspec
.
platform
==
:osx
rootspec
.
platform
==
:osx
if
rootspec
end
end
module
Mixin
module
Mixin
...
...
spec/integration_spec.rb
View file @
385d9b38
...
@@ -32,14 +32,20 @@ else
...
@@ -32,14 +32,20 @@ else
Pod
::
Source
.
reset!
Pod
::
Source
.
reset!
Pod
::
Spec
::
Set
.
reset!
Pod
::
Spec
::
Set
.
reset!
fixture
(
'spec-repos/master'
)
# ensure the archive is unpacked
fixture
(
'spec-repos/master'
)
# ensure the archive is unpacked
@config_before
=
config
Pod
::
Config
.
instance
=
nil
config
.
silent
=
true
config
.
repos_dir
=
fixture
(
'spec-repos'
)
config
.
repos_dir
=
fixture
(
'spec-repos'
)
config
.
project_pods_root
=
temporary_directory
+
'Pods'
config
.
project_pods_root
=
temporary_directory
+
'Pods'
def
config
.
ios?
;
true
;
end
def
config
.
osx?
;
false
;
end
FileUtils
.
cp_r
(
fixture
(
'integration/.'
),
config
.
project_pods_root
)
FileUtils
.
cp_r
(
fixture
(
'integration/.'
),
config
.
project_pods_root
)
end
end
after
do
after
do
config
.
project_pods_root
=
nil
Pod
::
Config
.
instance
=
@config_before
config
.
repos_dir
=
SpecHelper
.
tmp_repos_path
end
end
# TODO add a simple source file which uses the compiled lib to check that it really really works
# TODO add a simple source file which uses the compiled lib to check that it really really works
...
...
spec/unit/installer_spec.rb
View file @
385d9b38
...
@@ -17,14 +17,19 @@ describe "Pod::Installer" do
...
@@ -17,14 +17,19 @@ describe "Pod::Installer" do
end
end
before
do
before
do
config
.
project_pods_root
=
fixture
(
'integration'
)
fixture
(
'spec-repos/master'
)
# ensure the archive is unpacked
fixture
(
'spec-repos/master'
)
# ensure the archive is unpacked
@config_before
=
config
Pod
::
Config
.
instance
=
nil
config
.
silent
=
true
config
.
repos_dir
=
fixture
(
'spec-repos'
)
config
.
repos_dir
=
fixture
(
'spec-repos'
)
config
.
project_pods_root
=
fixture
(
'integration'
)
def
config
.
ios?
;
true
;
end
def
config
.
osx?
;
false
;
end
end
end
after
do
after
do
config
.
project_pods_root
=
nil
Pod
::
Config
.
instance
=
@config_before
config
.
repos_dir
=
SpecHelper
.
tmp_repos_path
end
end
it
"generates a BridgeSupport metadata file from all the pod headers"
do
it
"generates a BridgeSupport metadata file from all the pod headers"
do
...
@@ -54,8 +59,8 @@ describe "Pod::Installer" do
...
@@ -54,8 +59,8 @@ describe "Pod::Installer" do
'"$(BUILT_PRODUCTS_DIR)/Pods/Reachability"'
,
'"$(BUILT_PRODUCTS_DIR)/Pods/Reachability"'
,
"ALWAYS_SEARCH_USER_PATHS"
=>
"YES"
,
"ALWAYS_SEARCH_USER_PATHS"
=>
"YES"
,
"OTHER_LDFLAGS"
=>
"-ObjC -all_load "
\
"OTHER_LDFLAGS"
=>
"-ObjC -all_load "
\
"-framework SystemConfiguration -framework
CFNetwork
"
\
"-framework SystemConfiguration -framework
MobileCoreServices
"
\
"-framework
MobileCoreServices -l
z.1"
"-framework
CFNetwork -l
z.1"
}
}
],
],
[
[
...
@@ -81,7 +86,7 @@ describe "Pod::Installer" do
...
@@ -81,7 +86,7 @@ describe "Pod::Installer" do
"HEADER_SEARCH_PATHS"
=>
"$(SDKROOT)/usr/include/libxml2"
,
"HEADER_SEARCH_PATHS"
=>
"$(SDKROOT)/usr/include/libxml2"
,
"OTHER_LDFLAGS"
=>
"-ObjC -all_load "
\
"OTHER_LDFLAGS"
=>
"-ObjC -all_load "
\
"-l xml2.2.7.3 -framework SystemConfiguration "
\
"-l xml2.2.7.3 -framework SystemConfiguration "
\
"-framework
CFNetwork -framework MobileCoreServices -l
z.1"
"-framework
MobileCoreServices -framework CFNetwork -l
z.1"
}
}
],
],
].
each
do
|
name
,
patterns
,
expected_patterns
,
xcconfig
|
].
each
do
|
name
,
patterns
,
expected_patterns
,
xcconfig
|
...
...
spec/unit/resolver_spec.rb
View file @
385d9b38
...
@@ -23,11 +23,16 @@ end
...
@@ -23,11 +23,16 @@ end
describe
"Pod::Resolver"
do
describe
"Pod::Resolver"
do
before
do
before
do
fixture
(
'spec-repos/master'
)
# ensure the archive is unpacked
fixture
(
'spec-repos/master'
)
# ensure the archive is unpacked
@config_before
=
config
Pod
::
Config
.
instance
=
nil
config
.
silent
=
true
config
.
repos_dir
=
fixture
(
'spec-repos'
)
config
.
repos_dir
=
fixture
(
'spec-repos'
)
def
config
.
ios?
;
true
;
end
def
config
.
osx?
;
false
;
end
end
end
after
do
after
do
config
.
repos_dir
=
SpecHelper
.
tmp_repos_path
Pod
::
Config
.
instance
=
@config_before
end
end
it
"returns all sets needed for the dependency"
do
it
"returns all sets needed for the dependency"
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