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
d08b7f95
Commit
d08b7f95
authored
Sep 06, 2013
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Analyzer] Store the sandbox state... well in the sandbox
parent
94b2a315
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
11 deletions
+14
-11
analyzer.rb
lib/cocoapods/installer/analyzer.rb
+5
-9
sandbox.rb
lib/cocoapods/sandbox.rb
+6
-0
analyzer_spec.rb
spec/unit/installer/analyzer_spec.rb
+3
-2
No files found.
lib/cocoapods/installer/analyzer.rb
View file @
d08b7f95
...
...
@@ -56,7 +56,7 @@ module Pod
@result
.
specs_by_target
=
resolve_dependencies
@result
.
specifications
=
generate_specifications
@result
.
targets
=
generate_targets
@result
.
sandbox_state
=
generate_sandbox_state
generate_sandbox_state
@result
end
...
...
@@ -81,7 +81,7 @@ module Pod
# @return [Bool] Whether the sandbox is in synch with the lockfile.
#
def
sandbox_needs_install?
(
analysis_result
)
state
=
analysis_result
.
sandbox_
state
state
=
sandbox
.
state
needing_install
=
state
.
added
+
state
.
changed
+
state
.
deleted
!
needing_install
.
empty?
end
...
...
@@ -123,8 +123,8 @@ module Pod
# the name of the Pod (root name of the dependencies) and doesn't
# group them by target definition.
#
# @todo
[CocoaPods > 0.18] If there isn't a Lockfile all the Pods should
#
be marked as added
.
# @todo
If Pod changes platform it should be marked as added. This
#
information currently is not stored in the Lockfile
.
#
def
generate_podfile_state
if
lockfile
...
...
@@ -307,6 +307,7 @@ module Pod
sandbox_state
=
sandbox_analyzer
.
analyze
sandbox_state
.
print
end
sandbox
.
state
=
sandbox_state
sandbox_state
end
...
...
@@ -478,11 +479,6 @@ module Pod
#
attr_accessor
:specifications
# @return [SpecsState] the states of the {Sandbox} respect the resolved
# specifications.
#
attr_accessor
:sandbox_state
# @return [Array<Target>] The Podfile targets containing library
# dependencies.
#
...
...
lib/cocoapods/sandbox.rb
View file @
d08b7f95
...
...
@@ -78,6 +78,12 @@ module Pod
Lockfile
.
from_file
(
manifest_path
)
if
manifest_path
.
exist?
end
# @return [Installer::Analyzer::SpecsState] The state of the sandbox
# (added, deleted, changed and unchanged pods) as computed by the
# analyzer.
#
attr_accessor
:state
# @return [Project] the Pods project.
#
attr_accessor
:project
...
...
spec/unit/installer/analyzer_spec.rb
View file @
d08b7f95
...
...
@@ -186,8 +186,9 @@ module Pod
it
"computes the state of the Sandbox respect to the resolved dependencies"
do
@analyzer
.
stubs
(
:lockfile
).
returns
(
nil
)
state
=
@analyzer
.
analyze
.
sandbox_state
state
.
added
.
sort
.
should
==
[
"AFNetworking"
,
"JSONKit"
,
"SVPullToRefresh"
,
"libextobjc"
]
@analyzer
.
analyze
added_pods
=
config
.
sandbox
.
state
.
added
.
sort
added_pods
.
should
==
[
"AFNetworking"
,
"JSONKit"
,
"SVPullToRefresh"
,
"libextobjc"
]
end
end
...
...
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