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
f02baaac
Commit
f02baaac
authored
Mar 09, 2016
by
Daniel Tomlinson
Committed by
Samuel Giddins
Mar 10, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address code review comments
parent
6858ddc5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
13 deletions
+8
-13
outdated.rb
lib/cocoapods/command/outdated.rb
+1
-1
sources_manager.rb
lib/cocoapods/sources_manager.rb
+1
-1
sources_manager_spec.rb
spec/unit/sources_manager_spec.rb
+6
-11
No files found.
lib/cocoapods/command/outdated.rb
View file @
f02baaac
...
...
@@ -91,7 +91,7 @@ module Pod
def
spec_sets
@spec_sets
||=
begin
analyzer
.
send
(
:update_repositories
)
unless
config
.
skip_repo_update?
aggregate
=
Source
::
Aggregate
.
new
(
analyzer
.
sources
.
map
)
aggregate
=
Source
::
Aggregate
.
new
(
analyzer
.
sources
)
installed_pods
.
map
do
|
pod_name
|
aggregate
.
search
(
Dependency
.
new
(
pod_name
))
end
.
compact
.
uniq
...
...
lib/cocoapods/sources_manager.rb
View file @
f02baaac
...
...
@@ -475,7 +475,7 @@ module Pod
#
def
source_from_path
(
path
)
return
Source
.
new
(
path
)
unless
path
.
basename
.
to_s
==
'master'
return
MasterSource
.
new
(
path
)
MasterSource
.
new
(
path
)
end
# @return [Source::Aggregate] The aggregate of the sources from repos.
...
...
spec/unit/sources_manager_spec.rb
View file @
f02baaac
...
...
@@ -296,15 +296,18 @@ module Pod
describe
'Updating Sources'
do
extend
SpecHelper
::
TemporaryRepos
before
do
WebMock
::
API
.
stub_request
(
:get
,
"https://api.github.com/repos/cocoapods/specs/commits/master"
)
.
with
(
:headers
=>
{
'Accept'
=>
'application/vnd.github.chitauri-preview+sha'
})
.
to_return
(
:status
=>
200
,
:body
=>
''
,
:headers
=>
{})
end
after
do
WebMock
.
reset!
end
it
'updates source backed by a git repository'
do
set_up_test_repo_for_update
WebMock
::
API
.
stub_request
(
:get
,
"https://api.github.com/repos/cocoapods/specs/commits/master"
)
.
with
(
:headers
=>
{
'Accept'
=>
'application/vnd.github.chitauri-preview+sha'
})
.
to_return
(
:status
=>
200
,
:body
=>
''
,
:headers
=>
{})
SourcesManager
.
expects
(
:update_search_index_if_needed_in_background
).
with
({}).
returns
(
nil
)
SourcesManager
.
update
(
test_repo_path
.
basename
.
to_s
,
true
)
UI
.
output
.
should
.
match
/is up to date/
...
...
@@ -312,20 +315,12 @@ module Pod
it
'uses the only fast forward git option'
do
set_up_test_repo_for_update
WebMock
::
API
.
stub_request
(
:get
,
"https://api.github.com/repos/cocoapods/specs/commits/master"
)
.
with
(
:headers
=>
{
'Accept'
=>
'application/vnd.github.chitauri-preview+sha'
})
.
to_return
(
:status
=>
200
,
:body
=>
''
,
:headers
=>
{})
Source
.
any_instance
.
expects
(
:git!
).
with
{
|
options
|
options
.
should
.
include?
'--ff-only'
}
SourcesManager
.
expects
(
:update_search_index_if_needed_in_background
).
with
({}).
returns
(
nil
)
SourcesManager
.
update
(
test_repo_path
.
basename
.
to_s
,
true
)
end
it
'prints a warning if the update failed'
do
WebMock
::
API
.
stub_request
(
:get
,
"https://api.github.com/repos/cocoapods/specs/commits/master"
)
.
with
(
:headers
=>
{
'Accept'
=>
'application/vnd.github.chitauri-preview+sha'
})
.
to_return
(
:status
=>
200
,
:body
=>
''
,
:headers
=>
{})
UI
.
warnings
=
''
set_up_test_repo_for_update
Dir
.
chdir
(
test_repo_path
)
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