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
66e926b4
Commit
66e926b4
authored
Feb 27, 2013
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ExternalSources] Cache downloads.
Closes #820
parent
218f2896
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
8 deletions
+20
-8
cocoapods.rb
lib/cocoapods.rb
+14
-0
external_sources.rb
lib/cocoapods/external_sources.rb
+6
-0
pod_source_installer.rb
lib/cocoapods/installer/pod_source_installer.rb
+0
-8
No files found.
lib/cocoapods.rb
View file @
66e926b4
...
...
@@ -16,6 +16,20 @@ module Pod
end
end
# @return [String] The directory where CocoaPods caches the downloads.
#
# @todo The {Installer::PodSourceInstaller} and the #{ExternalSources}
# classes build and configure the downloader from scratch.
#
CACHE_ROOT
=
"~/Library/Caches/CocoaPods"
# @return [Fixnum] The maximum size for the cache expressed in Mb.
#
# @todo The {Installer::PodSourceInstaller} and the #{ExternalSources}
# classes build and configure the downloader from scratch.
#
MAX_CACHE_SIZE
=
500
require
'cocoapods-core'
require
'xcodeproj'
require
'cocoapods/downloader'
...
...
lib/cocoapods/external_sources.rb
View file @
66e926b4
...
...
@@ -122,6 +122,9 @@ module Pod
# marked as pre-downloaded indicating to the installer that only
# clean operations are needed.
#
# @todo The downloader configuration is the same of the
# #{PodSourceInstaller} and it needs to be kept in sync.
#
# @return [void]
#
def
pre_download
(
sandbox
)
...
...
@@ -129,6 +132,9 @@ module Pod
target
=
sandbox
.
root
+
name
target
.
rmtree
if
target
.
exist?
downloader
=
Downloader
.
for_target
(
target
,
params
)
downloader
.
cache_root
=
CACHE_ROOT
downloader
.
max_cache_size
=
MAX_CACHE_SIZE
downloader
.
aggressive_cache
=
false
downloader
.
download
store_podspec
(
sandbox
,
target
+
"
#{
name
}
.podspec"
)
sandbox
.
store_pre_downloaded_pod
(
name
)
...
...
lib/cocoapods/installer/pod_source_installer.rb
View file @
66e926b4
...
...
@@ -152,14 +152,6 @@ module Pod
# @!group Dependencies
# @return [String] The directory where CocoaPods caches the downloads.
#
CACHE_ROOT
=
"~/Library/Caches/CocoaPods"
# @return [Fixnum] The maximum size for the cache expressed in Mb.
#
MAX_CACHE_SIZE
=
500
# @return [Downloader] The downloader to use for the retrieving the
# source.
#
...
...
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