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
4429b063
Commit
4429b063
authored
Jul 27, 2012
by
Eloy Durán
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #426 from farcaller/patch-1
Fixed a bug with :head download and no prior clone
parents
5549e5f1
5adce292
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
git.rb
lib/cocoapods/downloader/git.rb
+5
-1
downloader_spec.rb
spec/functional/downloader_spec.rb
+12
-1
No files found.
lib/cocoapods/downloader/git.rb
View file @
4429b063
...
...
@@ -100,7 +100,11 @@ module Pod
end
def
download_head
update_cache
if
cache_exist?
update_cache
else
create_cache
end
clone
(
clone_url
,
target_path
)
end
...
...
spec/functional/downloader_spec.rb
View file @
4429b063
...
...
@@ -61,7 +61,7 @@ module Pod
(
@pod
.
root
+
'libPusher/README.md'
).
read
.
strip
.
should
.
match
/^libPusher/
end
it
"prepares the cache if it does not exi
ts
"
do
it
"prepares the cache if it does not exi
st
"
do
@pod
.
top_specification
.
stubs
(
:source
).
returns
(
:git
=>
fixture
(
'banana-lib'
),
:commit
=>
'fd56054'
)
...
...
@@ -72,6 +72,17 @@ module Pod
downloader
.
download
end
it
"prepares the cache if it does not exist when the HEAD is requested explicitly"
do
@pod
.
top_specification
.
stubs
(
:source
).
returns
(
:git
=>
fixture
(
'banana-lib'
)
)
downloader
=
Downloader
.
for_pod
(
@pod
)
downloader
.
cache_path
.
rmtree
if
downloader
.
cache_path
.
exist?
downloader
.
expects
(
:create_cache
).
once
downloader
.
stubs
(
:clone
)
downloader
.
download_head
end
it
"removes the oldest repo if the caches is too big"
do
@pod
.
top_specification
.
stubs
(
:source
).
returns
(
:git
=>
fixture
(
'banana-lib'
),
:commit
=>
'fd56054'
...
...
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