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
d0e5a9cd
Commit
d0e5a9cd
authored
Apr 05, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed trailing white space
parent
8f0fef0e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
git.rb
lib/cocoapods/downloader/git.rb
+11
-11
No files found.
lib/cocoapods/downloader/git.rb
View file @
d0e5a9cd
...
@@ -33,7 +33,7 @@ module Pod
...
@@ -33,7 +33,7 @@ module Pod
def
download_commit
def
download_commit
git
"clone '
#{
url
}
' '
#{
target_path
}
'"
git
"clone '
#{
url
}
' '
#{
target_path
}
'"
Dir
.
chdir
(
target_path
)
do
Dir
.
chdir
(
target_path
)
do
git
"checkout -b activated-pod-commit
#{
options
[
:commit
]
}
"
git
"checkout -b activated-pod-commit
#{
options
[
:commit
]
}
"
end
end
...
@@ -43,37 +43,37 @@ module Pod
...
@@ -43,37 +43,37 @@ module Pod
(
target_path
+
'.git'
).
rmtree
(
target_path
+
'.git'
).
rmtree
end
end
end
end
class
GitHub
<
Git
class
GitHub
<
Git
def
download_head
def
download_head
download_only?
?
download_and_extract_tarball
(
'master'
)
:
super
download_only?
?
download_and_extract_tarball
(
'master'
)
:
super
end
end
def
download_tag
def
download_tag
super
unless
download_only?
super
unless
download_only?
download_only?
?
download_and_extract_tarball
(
options
[:
tag
])
:
super
download_only?
?
download_and_extract_tarball
(
options
[:
tag
])
:
super
end
end
def
download_commit
def
download_commit
super
unless
download_only?
super
unless
download_only?
download_only?
?
download_and_extract_tarball
(
options
[:
commit
])
:
super
download_only?
?
download_and_extract_tarball
(
options
[:
commit
])
:
super
end
end
def
clean
def
clean
# no-op
# no-op
end
end
def
tarball_url_for
(
id
)
def
tarball_url_for
(
id
)
original_url
,
username
,
reponame
=
*
(
url
.
match
(
/[:\/]([\w\-]+)\/([\w\-]+)\.git/
).
to_a
)
original_url
,
username
,
reponame
=
*
(
url
.
match
(
/[:\/]([\w\-]+)\/([\w\-]+)\.git/
).
to_a
)
"https://github.com/
#{
username
}
/
#{
reponame
}
/tarball/
#{
id
}
"
"https://github.com/
#{
username
}
/
#{
reponame
}
/tarball/
#{
id
}
"
end
end
private
private
def
download_only?
def
download_only?
@options
[
:download_only
]
@options
[
:download_only
]
end
end
def
download_and_extract_tarball
(
id
)
def
download_and_extract_tarball
(
id
)
tmp_path
=
target_path
+
"tarball.tar.gz"
tmp_path
=
target_path
+
"tarball.tar.gz"
...
@@ -81,10 +81,10 @@ module Pod
...
@@ -81,10 +81,10 @@ module Pod
open
tarball_url_for
(
id
)
do
|
archive
|
open
tarball_url_for
(
id
)
do
|
archive
|
tmpfile
.
write
Zlib
::
GzipReader
.
new
(
archive
).
read
tmpfile
.
write
Zlib
::
GzipReader
.
new
(
archive
).
read
end
end
system
"tar xf
#{
tmpfile
.
path
}
-C
#{
target_path
}
--strip-components 1"
system
"tar xf
#{
tmpfile
.
path
}
-C
#{
target_path
}
--strip-components 1"
end
end
FileUtils
.
rm_f
(
tmp_path
)
FileUtils
.
rm_f
(
tmp_path
)
end
end
end
end
...
...
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