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
dec60494
Commit
dec60494
authored
Sep 25, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[WIP] Installer clean up.
parent
80997638
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
33 deletions
+36
-33
install.rb
lib/cocoapods/command/install.rb
+2
-3
installer.rb
lib/cocoapods/installer.rb
+0
-0
lockfile.rb
lib/cocoapods/lockfile.rb
+5
-4
resolver.rb
lib/cocoapods/resolver.rb
+0
-0
installer_spec.rb
spec/unit/installer_spec.rb
+29
-26
No files found.
lib/cocoapods/command/install.rb
View file @
dec60494
...
...
@@ -41,9 +41,8 @@ module Pod
def
run_install_with_update
(
update
)
sandbox
=
Sandbox
.
new
(
config
.
project_pods_root
)
resolver
=
Resolver
.
new
(
config
.
podfile
,
config
.
lockfile
,
sandbox
)
resolver
.
update_mode
=
update
Installer
.
new
(
resolver
).
install!
installer
=
Installer
.
new
(
sandbox
,
config
.
podfile
,
config
.
lockfile
)
installer
.
install!
end
def
run
...
...
lib/cocoapods/installer.rb
View file @
dec60494
This diff is collapsed.
Click to expand it.
lib/cocoapods/lockfile.rb
View file @
dec60494
...
...
@@ -50,8 +50,8 @@ module Pod
end
# @return [Hash{String => Hash}] A hash where the name of the pods are
# the keys and the values are the parameters of an
{AbstractExternalSource}
# of the dependency that required the pod.
# the keys and the values are the parameters of an
#
{AbstractExternalSource}
of the dependency that required the pod.
#
def
external_sources
@external_sources
||=
to_hash
[
"EXTERNAL SOURCES"
]
||
{}
...
...
@@ -67,8 +67,8 @@ module Pod
end
# @return [Hash{String => Version}] A Hash containing the name
# of the installed Pods
as the keys and their corresponding {Version}
# as the values.
# of the installed Pods
(top spec name) as the keys and their
#
corresponding {Version}
as the values.
#
def
pods_versions
unless
@pods_versions
...
...
@@ -77,6 +77,7 @@ module Pod
pod
=
pod
.
keys
.
first
unless
pod
.
is_a?
(
String
)
name
,
version
=
name_and_version_for_pod
(
pod
)
@pods_versions
[
name
]
=
version
@pods_versions
[
name
.
split
(
'/'
).
first
]
=
version
end
end
@pods_versions
...
...
lib/cocoapods/resolver.rb
View file @
dec60494
This diff is collapsed.
Click to expand it.
spec/unit/installer_spec.rb
View file @
dec60494
...
...
@@ -8,30 +8,6 @@ module Pod
end
describe
"by default"
do
before
do
podfile
=
Podfile
.
new
do
platform
:ios
xcodeproj
'MyProject'
pod
'JSONKit'
end
sandbox
=
Sandbox
.
new
(
fixture
(
'integration'
))
resolver
=
Resolver
.
new
(
podfile
,
nil
,
sandbox
)
@xcconfig
=
Installer
.
new
(
resolver
).
target_installers
.
first
.
xcconfig
.
to_hash
end
it
"sets the header search paths where installed Pod headers can be found"
do
@xcconfig
[
'ALWAYS_SEARCH_USER_PATHS'
].
should
==
'YES'
end
it
"configures the project to load all members that implement Objective-c classes or categories from the static library"
do
@xcconfig
[
'OTHER_LDFLAGS'
].
should
==
'-ObjC'
end
it
"sets the PODS_ROOT build variable"
do
@xcconfig
[
'PODS_ROOT'
].
should
.
not
==
nil
end
it
"generates a BridgeSupport metadata file from all the pod headers"
do
podfile
=
Podfile
.
new
do
platform
:osx
...
...
@@ -39,8 +15,7 @@ module Pod
end
sandbox
=
Sandbox
.
new
(
fixture
(
'integration'
))
resolver
=
Resolver
.
new
(
podfile
,
nil
,
sandbox
)
installer
=
Installer
.
new
(
resolver
)
installer
=
Installer
.
new
(
sandbox
,
podfile
)
pods
=
installer
.
specifications
.
map
do
|
spec
|
LocalPod
.
new
(
spec
,
installer
.
sandbox
,
podfile
.
target_definitions
[
:default
].
platform
)
end
...
...
@@ -89,6 +64,34 @@ module Pod
end
end
describe
"concerning xcconfig files generation"
do
before
do
podfile
=
Podfile
.
new
do
platform
:ios
xcodeproj
'MyProject'
pod
'JSONKit'
end
sandbox
=
Sandbox
.
new
(
fixture
(
'integration'
))
installer
=
Installer
.
new
(
sandbox
,
podfile
)
@xcconfig
=
installer
.
target_installers
.
first
.
xcconfig
.
to_hash
end
it
"sets the header search paths where installed Pod headers can be found"
do
@xcconfig
[
'ALWAYS_SEARCH_USER_PATHS'
].
should
==
'YES'
end
it
"configures the project to load all members that implement Objective-c classes or categories from the static library"
do
@xcconfig
[
'OTHER_LDFLAGS'
].
should
==
'-ObjC'
end
it
"sets the PODS_ROOT build variable"
do
@xcconfig
[
'PODS_ROOT'
].
should
.
not
==
nil
end
end
describe
"concerning multiple pods originating form the same spec"
do
extend
SpecHelper
::
Fixture
...
...
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