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
d2f30d88
Commit
d2f30d88
authored
Mar 15, 2017
by
Ben Asher
Committed by
GitHub
Mar 15, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6550 from adellibovi/master
Provide progress when updating specs
parents
f5d7b5bc
bf5ae18c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
7 deletions
+11
-7
CHANGELOG.md
CHANGELOG.md
+4
-0
analyzer.rb
lib/cocoapods/installer/analyzer.rb
+1
-1
sources_manager.rb
lib/cocoapods/sources_manager.rb
+1
-1
analyzer_spec.rb
spec/unit/installer/analyzer_spec.rb
+2
-2
sources_manager_spec.rb
spec/unit/sources_manager_spec.rb
+3
-3
No files found.
CHANGELOG.md
View file @
d2f30d88
...
@@ -20,6 +20,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
...
@@ -20,6 +20,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
#6516
](
https://github.com/CocoaPods/CocoaPods/issues/6516
)
[
#6516
](
https://github.com/CocoaPods/CocoaPods/issues/6516
)
*
Support git progress for
`pod repo update`
and
`pod install --repo-update`
[
Alfredo Delli Bovi
](
https://github.com/adellibovi
)
[
#6525
](
https://github.com/CocoaPods/CocoaPods/issues/6525
)
## 1.2.1.beta.1 (2017-03-08)
## 1.2.1.beta.1 (2017-03-08)
...
...
lib/cocoapods/installer/analyzer.rb
View file @
d2f30d88
...
@@ -217,7 +217,7 @@ module Pod
...
@@ -217,7 +217,7 @@ module Pod
def
update_repositories
def
update_repositories
sources
.
each
do
|
source
|
sources
.
each
do
|
source
|
if
source
.
git?
if
source
.
git?
config
.
sources_manager
.
update
(
source
.
name
)
config
.
sources_manager
.
update
(
source
.
name
,
true
)
else
else
UI
.
message
"Skipping `
#{
source
.
name
}
` update because the repository is not a git source repository."
UI
.
message
"Skipping `
#{
source
.
name
}
` update because the repository is not a git source repository."
end
end
...
...
lib/cocoapods/sources_manager.rb
View file @
d2f30d88
...
@@ -104,7 +104,7 @@ module Pod
...
@@ -104,7 +104,7 @@ module Pod
def
update_git_repo
(
show_output
=
false
)
def
update_git_repo
(
show_output
=
false
)
Config
.
instance
.
with_changes
(
:verbose
=>
show_output
)
do
Config
.
instance
.
with_changes
(
:verbose
=>
show_output
)
do
git!
(
%W(-C
#{
repo
}
fetch origin)
)
git!
(
%W(-C
#{
repo
}
fetch origin
#{
show_output
?
'--progress'
:
''
}
)
)
current_branch
=
git!
(
%W(-C
#{
repo
}
rev-parse --abbrev-ref HEAD)
).
strip
current_branch
=
git!
(
%W(-C
#{
repo
}
rev-parse --abbrev-ref HEAD)
).
strip
git!
(
%W(-C
#{
repo
}
reset --hard origin/
#{
current_branch
}
)
)
git!
(
%W(-C
#{
repo
}
reset --hard origin/
#{
current_branch
}
)
)
end
end
...
...
spec/unit/installer/analyzer_spec.rb
View file @
d2f30d88
...
@@ -67,7 +67,7 @@ module Pod
...
@@ -67,7 +67,7 @@ module Pod
it
'does not update unused sources'
do
it
'does not update unused sources'
do
@analyzer
.
stubs
(
:sources
).
returns
(
config
.
sources_manager
.
master
)
@analyzer
.
stubs
(
:sources
).
returns
(
config
.
sources_manager
.
master
)
config
.
sources_manager
.
expects
(
:update
).
once
.
with
(
'master'
)
config
.
sources_manager
.
expects
(
:update
).
once
.
with
(
'master'
,
true
)
@analyzer
.
update_repositories
@analyzer
.
update_repositories
end
end
...
@@ -124,7 +124,7 @@ module Pod
...
@@ -124,7 +124,7 @@ module Pod
source
.
stubs
(
:repo
).
returns
(
'/repo/cache/path'
)
source
.
stubs
(
:repo
).
returns
(
'/repo/cache/path'
)
config
.
sources_manager
.
expects
(
:find_or_create_source_with_url
).
with
(
repo_url
).
returns
(
source
)
config
.
sources_manager
.
expects
(
:find_or_create_source_with_url
).
with
(
repo_url
).
returns
(
source
)
source
.
stubs
(
:git?
).
returns
(
true
)
source
.
stubs
(
:git?
).
returns
(
true
)
config
.
sources_manager
.
expects
(
:update
).
once
.
with
(
source
.
name
)
config
.
sources_manager
.
expects
(
:update
).
once
.
with
(
source
.
name
,
true
)
analyzer
=
Pod
::
Installer
::
Analyzer
.
new
(
config
.
sandbox
,
podfile
,
nil
)
analyzer
=
Pod
::
Installer
::
Analyzer
.
new
(
config
.
sandbox
,
podfile
,
nil
)
analyzer
.
update_repositories
analyzer
.
update_repositories
...
...
spec/unit/sources_manager_spec.rb
View file @
d2f30d88
...
@@ -94,7 +94,7 @@ module Pod
...
@@ -94,7 +94,7 @@ module Pod
repo_update
=
sequence
(
'repo update'
)
repo_update
=
sequence
(
'repo update'
)
MasterSource
.
any_instance
.
MasterSource
.
any_instance
.
expects
(
:git!
).
expects
(
:git!
).
with
(
%W(-C
#{
test_repo_path
}
fetch origin)
).
with
(
%W(-C
#{
test_repo_path
}
fetch origin
--progress
)
).
in_sequence
(
repo_update
)
in_sequence
(
repo_update
)
MasterSource
.
any_instance
.
MasterSource
.
any_instance
.
...
@@ -124,7 +124,7 @@ module Pod
...
@@ -124,7 +124,7 @@ module Pod
MasterSource
.
any_instance
.
MasterSource
.
any_instance
.
expects
(
:git!
).
expects
(
:git!
).
with
(
%W(-C
#{
test_repo_path
}
fetch origin)
).
with
(
%W(-C
#{
test_repo_path
}
fetch origin
--progress
)
).
in_sequence
(
repo_update
)
in_sequence
(
repo_update
)
MasterSource
.
any_instance
.
MasterSource
.
any_instance
.
...
@@ -151,7 +151,7 @@ module Pod
...
@@ -151,7 +151,7 @@ module Pod
Source
.
any_instance
.
stubs
(
:git
).
with
do
|
options
|
Source
.
any_instance
.
stubs
(
:git
).
with
do
|
options
|
options
.
join
(
' '
)
==
%W(-C
#{
test_repo_path
}
diff --name-only aabbccd..HEAD)
.
join
(
' '
)
options
.
join
(
' '
)
==
%W(-C
#{
test_repo_path
}
diff --name-only aabbccd..HEAD)
.
join
(
' '
)
end
.
returns
(
''
)
end
.
returns
(
''
)
MasterSource
.
any_instance
.
expects
(
:git!
).
with
(
%W(-C
#{
test_repo_path
}
fetch origin)
).
raises
(
<<-
EOS
)
MasterSource
.
any_instance
.
expects
(
:git!
).
with
(
%W(-C
#{
test_repo_path
}
fetch origin
--progress
)
).
raises
(
<<-
EOS
)
fatal: '/dev/null' does not appear to be a git repository
fatal: '/dev/null' does not appear to be a git repository
fatal: Could not read from remote repository.
fatal: Could not read from remote repository.
...
...
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