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
23c0b5dc
Commit
23c0b5dc
authored
Mar 30, 2013
by
Eloy Durán
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make CACHE_ROOT a Pathname, this is less surprising.
parent
5aae0c49
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
9 deletions
+8
-9
cocoapods.rb
lib/cocoapods.rb
+5
-5
external_sources.rb
lib/cocoapods/external_sources.rb
+1
-1
pod_source_installer.rb
lib/cocoapods/installer/pod_source_installer.rb
+1
-1
sources_manager.rb
lib/cocoapods/sources_manager.rb
+1
-2
No files found.
lib/cocoapods.rb
View file @
23c0b5dc
require
'rubygems'
require
'rubygems'
module
Pod
module
Pod
require
'pathname'
require
'cocoapods/gem_version'
require
'cocoapods/gem_version'
require
'cocoapods-core'
require
'cocoapods-core'
require
'xcodeproj'
require
'xcodeproj'
...
@@ -16,12 +18,12 @@ module Pod
...
@@ -16,12 +18,12 @@ module Pod
end
end
end
end
# @return [
String
] The directory where CocoaPods caches the downloads.
# @return [
Pathname
] The directory where CocoaPods caches the downloads.
#
#
# @todo The {Installer::PodSourceInstaller} and the #{ExternalSources}
# @todo The {Installer::PodSourceInstaller} and the #{ExternalSources}
# classes build and configure the downloader from scratch.
# classes build and configure the downloader from scratch.
#
#
CACHE_ROOT
=
"
#{
ENV
[
'HOME'
]
}
/Library/Caches/CocoaPods"
CACHE_ROOT
=
Pathname
.
new
(
File
.
join
(
ENV
[
'HOME'
],
'Library/Caches/CocoaPods'
))
# @return [Fixnum] The maximum size for the cache expressed in Mb.
# @return [Fixnum] The maximum size for the cache expressed in Mb.
#
#
...
@@ -30,7 +32,7 @@ module Pod
...
@@ -30,7 +32,7 @@ module Pod
#
#
MAX_CACHE_SIZE
=
500
MAX_CACHE_SIZE
=
500
Pod
::
Specification
::
Set
::
Statistics
.
instance
.
cache_file
=
Pathname
.
new
(
CACHE_ROOT
)
+
'statistics.yml'
Pod
::
Specification
::
Set
::
Statistics
.
instance
.
cache_file
=
CACHE_ROOT
+
'statistics.yml'
autoload
:Command
,
'cocoapods/command'
autoload
:Command
,
'cocoapods/command'
autoload
:Executable
,
'cocoapods/executable'
autoload
:Executable
,
'cocoapods/executable'
...
@@ -44,8 +46,6 @@ module Pod
...
@@ -44,8 +46,6 @@ module Pod
autoload
:UI
,
'cocoapods/user_interface'
autoload
:UI
,
'cocoapods/user_interface'
autoload
:Validator
,
'cocoapods/validator'
autoload
:Validator
,
'cocoapods/validator'
autoload
:Pathname
,
'pathname'
module
Generator
module
Generator
autoload
:Acknowledgements
,
'cocoapods/generator/acknowledgements'
autoload
:Acknowledgements
,
'cocoapods/generator/acknowledgements'
autoload
:BridgeSupport
,
'cocoapods/generator/bridge_support'
autoload
:BridgeSupport
,
'cocoapods/generator/bridge_support'
...
...
lib/cocoapods/external_sources.rb
View file @
23c0b5dc
...
@@ -132,7 +132,7 @@ module Pod
...
@@ -132,7 +132,7 @@ module Pod
target
=
sandbox
.
root
+
name
target
=
sandbox
.
root
+
name
target
.
rmtree
if
target
.
exist?
target
.
rmtree
if
target
.
exist?
downloader
=
Downloader
.
for_target
(
target
,
params
)
downloader
=
Downloader
.
for_target
(
target
,
params
)
downloader
.
cache_root
=
CACHE_ROOT
downloader
.
cache_root
=
CACHE_ROOT
.
to_s
downloader
.
max_cache_size
=
MAX_CACHE_SIZE
downloader
.
max_cache_size
=
MAX_CACHE_SIZE
downloader
.
aggressive_cache
=
false
downloader
.
aggressive_cache
=
false
downloader
.
download
downloader
.
download
...
...
lib/cocoapods/installer/pod_source_installer.rb
View file @
23c0b5dc
...
@@ -156,7 +156,7 @@ module Pod
...
@@ -156,7 +156,7 @@ module Pod
def
downloader
def
downloader
return
@downloader
if
@downloader
return
@downloader
if
@downloader
@downloader
=
Downloader
.
for_target
(
root
,
root_spec
.
source
.
dup
)
@downloader
=
Downloader
.
for_target
(
root
,
root_spec
.
source
.
dup
)
@downloader
.
cache_root
=
CACHE_ROOT
@downloader
.
cache_root
=
CACHE_ROOT
.
to_s
@downloader
.
max_cache_size
=
MAX_CACHE_SIZE
@downloader
.
max_cache_size
=
MAX_CACHE_SIZE
@downloader
.
aggressive_cache
=
aggressive_cache?
@downloader
.
aggressive_cache
=
aggressive_cache?
@downloader
@downloader
...
...
lib/cocoapods/sources_manager.rb
View file @
23c0b5dc
...
@@ -107,8 +107,7 @@ module Pod
...
@@ -107,8 +107,7 @@ module Pod
# @return [Pathname] The path where the search index should be stored.
# @return [Pathname] The path where the search index should be stored.
#
#
def
search_index_path
def
search_index_path
caches_path
=
Pathname
.
new
(
File
.
expand_path
(
CACHE_ROOT
))
CACHE_ROOT
+
'search_index.yaml'
caches_path
+
'search_index.yaml'
end
end
public
public
...
...
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