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
c1cbd9b8
Commit
c1cbd9b8
authored
Jan 27, 2016
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SpecState] Fix initializing with a hash from a Lockfile
parent
0e98d37d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
specs_state.rb
lib/cocoapods/installer/analyzer/specs_state.rb
+7
-4
analyzer_spec.rb
spec/unit/installer/analyzer_spec.rb
+1
-1
No files found.
lib/cocoapods/installer/analyzer/specs_state.rb
View file @
c1cbd9b8
...
@@ -10,8 +10,6 @@ module Pod
...
@@ -10,8 +10,6 @@ module Pod
# subspecs are added instead of the name of the Pods.
# subspecs are added instead of the name of the Pods.
#
#
class
SpecsState
class
SpecsState
STATES
=
%i(added removed changed unchanged)
.
freeze
# Initialize a new instance
# Initialize a new instance
#
#
# @param [Hash{Symbol=>String}] pods_by_state
# @param [Hash{Symbol=>String}] pods_by_state
...
@@ -25,9 +23,14 @@ module Pod
...
@@ -25,9 +23,14 @@ module Pod
@unchanged
=
[]
@unchanged
=
[]
if
pods_by_state
if
pods_by_state
STATES
.
each
do
|
state
|
{
:added
=>
:added
,
:changed
=>
:changed
,
:removed
=>
:deleted
,
:unchanged
=>
:unchanged
,
}.
each
do
|
state
,
spec_state
|
Array
(
pods_by_state
[
state
]).
each
do
|
name
|
Array
(
pods_by_state
[
state
]).
each
do
|
name
|
add_name
(
name
,
state
)
add_name
(
name
,
s
pec_s
tate
)
end
end
end
end
end
end
...
...
spec/unit/installer/analyzer_spec.rb
View file @
c1cbd9b8
...
@@ -52,7 +52,7 @@ module Pod
...
@@ -52,7 +52,7 @@ module Pod
it
'computes the state of the Podfile respect to the Lockfile'
do
it
'computes the state of the Podfile respect to the Lockfile'
do
state
=
@analyzer
.
analyze
.
podfile_state
state
=
@analyzer
.
analyze
.
podfile_state
state
.
added
.
should
==
%w(AFNetworking libextobjc
/EXTKeyPathCoding libextobjc/EXTSynthesize
)
state
.
added
.
should
==
%w(AFNetworking libextobjc
libextobjc
)
state
.
changed
.
should
==
%w()
state
.
changed
.
should
==
%w()
state
.
unchanged
.
should
==
%w(JSONKit SVPullToRefresh)
state
.
unchanged
.
should
==
%w(JSONKit SVPullToRefresh)
state
.
deleted
.
should
==
%w(NUI)
state
.
deleted
.
should
==
%w(NUI)
...
...
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