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
6cbbd909
Commit
6cbbd909
authored
Dec 14, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Installer] Updated downloader.
parent
f54a0b3f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
20 deletions
+20
-20
Gemfile.lock
Gemfile.lock
+2
-2
config.rb
lib/cocoapods/config.rb
+9
-18
installer.rb
lib/cocoapods/installer.rb
+9
-0
No files found.
Gemfile.lock
View file @
6cbbd909
...
@@ -17,7 +17,7 @@ GIT
...
@@ -17,7 +17,7 @@ GIT
GIT
GIT
remote: git://github.com/CocoaPods/cocoapods-downloader
remote: git://github.com/CocoaPods/cocoapods-downloader
revision:
21f5a7b118d4071f21f810694d026c3a4e00df50
revision:
4ec997acca892f238aa8ced4edf37e95e69b5127
specs:
specs:
cocoapods-downloader (0.1.0)
cocoapods-downloader (0.1.0)
...
@@ -91,7 +91,7 @@ GEM
...
@@ -91,7 +91,7 @@ GEM
pygments.rb (0.3.2)
pygments.rb (0.3.2)
posix-spawn (~> 0.3.6)
posix-spawn (~> 0.3.6)
yajl-ruby (~> 1.1.0)
yajl-ruby (~> 1.1.0)
rake (0.9.
5
)
rake (0.9.
6
)
rb-fsevent (0.9.2)
rb-fsevent (0.9.2)
redcarpet (2.2.2)
redcarpet (2.2.2)
slop (3.3.3)
slop (3.3.3)
...
...
lib/cocoapods/config.rb
View file @
6cbbd909
require
'pathname'
require
'pathname'
module
Pod
module
Pod
# Stores the global configuration of CocoaPods.
#
class
Config
class
Config
# @!group Paths
# @!group Paths
...
@@ -38,9 +41,6 @@ module Pod
...
@@ -38,9 +41,6 @@ module Pod
# @return [Bool] Whether the generated documentation should be installed to
# @return [Bool] Whether the generated documentation should be installed to
# Xcode.
# Xcode.
#
#
# @note This is stored by the Config class so a global value value can be
# set.
#
attr_accessor
:new_version_message
attr_accessor
:new_version_message
alias_method
:new_version_message?
,
:new_version_message
alias_method
:new_version_message?
,
:new_version_message
...
@@ -50,48 +50,39 @@ module Pod
...
@@ -50,48 +50,39 @@ module Pod
# @return [Bool] Whether the installer should clean after the installation.
# @return [Bool] Whether the installer should clean after the installation.
#
#
# @note This is stored by the Config class so a global value value can be
# set.
#
attr_accessor
:clean
attr_accessor
:clean
alias_method
:clean?
,
:clean
alias_method
:clean?
,
:clean
# @return [Bool] Whether the documentation should be generated for the
# @return [Bool] Whether the documentation should be generated for the
# installed Pods.
# installed Pods.
#
#
# @note This is stored by the Config class so a global value value can be
# set.
#
attr_accessor
:generate_docs
attr_accessor
:generate_docs
alias_method
:generate_docs?
,
:generate_docs
alias_method
:generate_docs?
,
:generate_docs
# @return [Bool] Whether the generated documentation should be installed to
# @return [Bool] Whether the generated documentation should be installed to
# Xcode.
# Xcode.
#
#
# @note This is stored by the Config class so a global value value can be
# set.
#
attr_accessor
:doc_install
attr_accessor
:doc_install
alias_method
:doc_install?
,
:doc_install
alias_method
:doc_install?
,
:doc_install
# @return [Bool] Whether CocoaPods should integrate a user target and build
# @return [Bool] Whether CocoaPods should integrate a user target and build
# the workspace or just create the Pods project.
# the workspace or just create the Pods project.
#
#
# @note This is stored by the Config class so a global value value can be
# set.
#
attr_accessor
:integrate_targets
attr_accessor
:integrate_targets
alias_method
:integrate_targets?
,
:integrate_targets
alias_method
:integrate_targets?
,
:integrate_targets
# @return [Bool] Whether the installer should skip the repos update.
# @return [Bool] Whether the installer should skip the repos update.
#
#
# @note This is stored by the Config class so a global value value can be
# set.
#
attr_accessor
:skip_repo_update
attr_accessor
:skip_repo_update
alias_method
:skip_repo_update?
,
:skip_repo_update
alias_method
:skip_repo_update?
,
:skip_repo_update
# @return [Bool] Whether the donwloader should use more agressive caching
# options.
#
attr_accessor
:agressive_cache
alias_method
:agressive_cache?
,
:agressive_cache
#--------------------------------------#
#--------------------------------------#
def
initialize
def
initialize
...
...
lib/cocoapods/installer.rb
View file @
6cbbd909
...
@@ -610,18 +610,27 @@ module Pod
...
@@ -610,18 +610,27 @@ module Pod
# Downloads a Pod forcing the `bleeding edge' version if requested.
# Downloads a Pod forcing the `bleeding edge' version if requested.
#
#
# @todo store the source of non specific downloads in the lockfile.
#
# @return [void]
# @return [void]
#
#
def
download_pod
(
pod
)
def
download_pod
(
pod
)
downloader
=
Downloader
.
for_target
(
pod
.
root
,
pod
.
top_specification
.
source
.
dup
)
downloader
=
Downloader
.
for_target
(
pod
.
root
,
pod
.
top_specification
.
source
.
dup
)
downloader
.
cache_root
=
"~/Library/Caches/CocoaPods"
downloader
.
cache_root
=
"~/Library/Caches/CocoaPods"
downloader
.
max_cache_size
=
500
downloader
.
max_cache_size
=
500
downloader
.
agressive_cache
=
config
.
agressive_cache?
if
pod
.
top_specification
.
version
.
head?
if
pod
.
top_specification
.
version
.
head?
downloader
.
download_head
downloader
.
download_head
specific_source
=
downloader
.
checkout_options
else
else
downloader
.
download
downloader
.
download
specific_source
=
downloader
.
checkout_options
if
downloader
.
specific_options?
end
end
pod
.
downloaded
=
true
pod
.
downloaded
=
true
if
specific_source
# store the specific source
end
end
end
# Generates the documentation of a Pod unless it exists for a given
# Generates the documentation of a Pod unless it exists for a given
...
...
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