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
19ed7d8d
Commit
19ed7d8d
authored
Jun 26, 2012
by
Sam Stewart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix] unit tests now passing
parent
2408e993
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
1 deletion
+28
-1
.gitignore
.gitignore
+1
-0
git.rb
lib/cocoapods/downloader/git.rb
+2
-1
banana-lib.tar.gz
spec/fixtures/banana-lib.tar.gz
+0
-0
downloader_spec.rb
spec/functional/downloader_spec.rb
+25
-0
No files found.
.gitignore
View file @
19ed7d8d
...
@@ -18,3 +18,4 @@ spec/fixtures/integration/Headers/
...
@@ -18,3 +18,4 @@ spec/fixtures/integration/Headers/
spec/fixtures/mercurial-repo/.hg/*cache
spec/fixtures/mercurial-repo/.hg/*cache
.hg
.hg
spec/fixtures/vcr
spec/fixtures/vcr
bin/RKTwitter
lib/cocoapods/downloader/git.rb
View file @
19ed7d8d
...
@@ -129,6 +129,7 @@ module Pod
...
@@ -129,6 +129,7 @@ module Pod
git
"remote add upstream
#{
@url
}
"
# we need to add the original url, not the cache url
git
"remote add upstream
#{
@url
}
"
# we need to add the original url, not the cache url
git
"fetch -q upstream"
# refresh the branches
git
"fetch -q upstream"
# refresh the branches
git
"checkout --track -b activated-pod-commit upstream/
#{
options
[
:branch
]
}
"
# create a new tracking branch
git
"checkout --track -b activated-pod-commit upstream/
#{
options
[
:branch
]
}
"
# create a new tracking branch
puts
"Just downloaded and checked out branch:
#{
options
[
:branch
]
}
from upstream
#{
clone_url
}
"
end
end
end
end
...
@@ -151,7 +152,7 @@ module Pod
...
@@ -151,7 +152,7 @@ module Pod
end
end
def
download_branch
def
download_branch
download_only
?
download_and_extract_tarball
(
options
[:
head
])
:
super
download_only
?
?
download_and_extract_tarball
(
options
[:
branch
])
:
super
end
end
def
clean
def
clean
...
...
spec/fixtures/banana-lib.tar.gz
View file @
19ed7d8d
No preview for this file type
spec/functional/downloader_spec.rb
View file @
19ed7d8d
...
@@ -18,12 +18,23 @@ describe "Pod::Downloader" do
...
@@ -18,12 +18,23 @@ describe "Pod::Downloader" do
(
@pod
.
root
+
'README'
).
read
.
strip
.
should
==
'first commit'
(
@pod
.
root
+
'README'
).
read
.
strip
.
should
==
'first commit'
end
end
it
"check's out a specific branch"
do
@pod
.
specification
.
stubs
(
:source
).
returns
(
:git
=>
fixture
(
'banana-lib'
),
:branch
=>
'topicbranch'
)
downloader
=
Pod
::
Downloader
.
for_pod
(
@pod
)
downloader
.
download
(
@pod
.
root
+
'README'
).
read
.
strip
.
should
==
'topicbranch'
end
it
"check's out a specific tag"
do
it
"check's out a specific tag"
do
@pod
.
specification
.
stubs
(
:source
).
returns
(
@pod
.
specification
.
stubs
(
:source
).
returns
(
:git
=>
fixture
(
'banana-lib'
),
:tag
=>
'v1.0'
:git
=>
fixture
(
'banana-lib'
),
:tag
=>
'v1.0'
)
)
downloader
=
Pod
::
Downloader
.
for_pod
(
@pod
)
downloader
=
Pod
::
Downloader
.
for_pod
(
@pod
)
downloader
.
download
downloader
.
download
(
@pod
.
root
+
'README'
).
read
.
strip
.
should
==
'v1.0'
(
@pod
.
root
+
'README'
).
read
.
strip
.
should
==
'v1.0'
end
end
...
@@ -61,10 +72,24 @@ describe "Pod::Downloader" do
...
@@ -61,10 +72,24 @@ describe "Pod::Downloader" do
VCR
.
use_cassette
(
'tarballs'
,
:record
=>
:new_episodes
)
{
downloader
.
download
}
VCR
.
use_cassette
(
'tarballs'
,
:record
=>
:new_episodes
)
{
downloader
.
download
}
# deliberately keep this assertion as loose as possible for now
# deliberately keep this assertion as loose as possible for now
(
@pod
.
root
+
'libPusher.podspec'
).
readlines
.
grep
(
/1.1/
).
should
.
not
.
be
.
empty
(
@pod
.
root
+
'libPusher.podspec'
).
readlines
.
grep
(
/1.1/
).
should
.
not
.
be
.
empty
end
end
it
"downloads a specific branch when specified"
do
@pod
.
specification
.
stubs
(
:source
).
returns
(
:git
=>
"git://github.com/lukeredpath/libPusher.git"
,
:branch
=>
'gh-pages'
,
:download_only
=>
true
)
downloader
=
Pod
::
Downloader
.
for_pod
(
@pod
)
VCR
.
use_cassette
(
'tarballs'
,
:record
=>
:new_episodes
)
{
downloader
.
download
}
# deliberately keep this assertion as loose as possible for now
(
@pod
.
root
+
'index.html'
).
readlines
.
grep
(
/libPusher Documentation/
).
should
.
not
.
be
.
empty
end
it
"downloads a specific commit when specified"
do
it
"downloads a specific commit when specified"
do
@pod
.
specification
.
stubs
(
:source
).
returns
(
@pod
.
specification
.
stubs
(
:source
).
returns
(
:git
=>
"git://github.com/lukeredpath/libPusher.git"
,
:commit
=>
'eca89998d5'
,
:download_only
=>
true
:git
=>
"git://github.com/lukeredpath/libPusher.git"
,
:commit
=>
'eca89998d5'
,
:download_only
=>
true
...
...
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