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
864e0afa
Commit
864e0afa
authored
Mar 20, 2016
by
Marius Rackwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get completely rid of :head version support
parent
e5afc825
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
30 deletions
+8
-30
outdated.rb
lib/cocoapods/command/outdated.rb
+1
-1
downloader.rb
lib/cocoapods/downloader.rb
+5
-18
request.rb
lib/cocoapods/downloader/request.rb
+1
-10
cache_spec.rb
spec/unit/downloader/cache_spec.rb
+1
-1
No files found.
lib/cocoapods/command/outdated.rb
View file @
864e0afa
...
...
@@ -8,7 +8,7 @@ module Pod
self
.
description
=
<<-
DESC
Shows the outdated pods in the current Podfile.lock, but only those from
spec repos, not those from local/external sources
or `:head` versions
.
spec repos, not those from local/external sources.
DESC
# Run the command
...
...
lib/cocoapods/downloader.rb
View file @
864e0afa
...
...
@@ -67,7 +67,7 @@ module Pod
#
def
self
.
download_request
(
request
,
target
)
result
=
Response
.
new
result
.
checkout_options
=
download_source
(
request
.
name
,
target
,
request
.
params
,
request
.
head?
)
result
.
checkout_options
=
download_source
(
target
,
request
.
params
)
result
.
location
=
target
if
request
.
released_pod?
...
...
@@ -88,35 +88,22 @@ module Pod
private
# Downloads a pod with the given `name` and `params` to `target`.
#
# @param [String] name
# Downloads a pod with the given `params` to `target`.
#
# @param [Pathname] target
#
# @param [Hash<Symbol,String>] params
#
# @param [Boolean] head
#
# @return [Hash] The checkout options required to re-download this exact
# same source.
#
def
self
.
download_source
(
name
,
target
,
params
,
head
)
def
self
.
download_source
(
target
,
params
)
FileUtils
.
rm_rf
(
target
)
downloader
=
Downloader
.
for_target
(
target
,
params
)
if
head
unless
downloader
.
head_supported?
raise
Informative
,
"The pod '
#{
name
}
' does not "
\
"support the :head option, as it uses a
#{
downloader
.
name
}
"
\
'source. Remove that option to use this pod.'
end
downloader
.
download_head
else
downloader
.
download
end
downloader
.
download
target
.
mkpath
if
downloader
.
options_specific?
&&
!
head
if
downloader
.
options_specific?
params
else
downloader
.
checkout_options
...
...
lib/cocoapods/downloader/request.rb
View file @
864e0afa
...
...
@@ -23,11 +23,6 @@ module Pod
#
attr_reader
:params
# @return [Boolean] Whether the download request is for a head download.
#
attr_reader
:head
alias_method
:head?
,
:head
# Initialize a new instance
#
# @param [Specification,Nil] spec
...
...
@@ -42,15 +37,11 @@ module Pod
# @param [Hash<Symbol,String>,Nil] params
# see {#params}
#
# @param [Boolean] head
# see {#head}
#
def
initialize
(
spec:
nil
,
released:
false
,
name:
nil
,
params:
false
,
head:
false
)
def
initialize
(
spec:
nil
,
released:
false
,
name:
nil
,
params:
false
)
@released_pod
=
released
@spec
=
spec
@params
=
spec
?
(
spec
.
source
&&
spec
.
source
.
dup
)
:
params
@name
=
spec
?
spec
.
name
:
name
@head
=
head
validate!
end
...
...
spec/unit/downloader/cache_spec.rb
View file @
864e0afa
...
...
@@ -11,7 +11,7 @@ module Pod
@stub_download
=
lambda
do
|&
blk
|
original_download_source
=
Downloader
.
method
(
:download_source
)
Downloader
.
define_singleton_method
(
:download_source
)
do
|
_name
,
target
,
_params
,
_head
|
Downloader
.
define_singleton_method
(
:download_source
)
do
|
target
,
_params
|
FileUtils
.
mkdir_p
target
Dir
.
chdir
(
target
)
do
result
=
blk
.
call
...
...
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