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
def
download_commit
git
"clone '
#{
url
}
' '
#{
target_path
}
'"
Dir
.
chdir
(
target_path
)
do
git
"checkout -b activated-pod-commit
#{
options
[
:commit
]
}
"
end
...
...
@@ -43,37 +43,37 @@ module Pod
(
target_path
+
'.git'
).
rmtree
end
end
class
GitHub
<
Git
def
download_head
download_only?
?
download_and_extract_tarball
(
'master'
)
:
super
end
def
download_tag
super
unless
download_only?
download_only?
?
download_and_extract_tarball
(
options
[:
tag
])
:
super
end
def
download_commit
super
unless
download_only?
download_only?
?
download_and_extract_tarball
(
options
[:
commit
])
:
super
end
def
clean
# no-op
end
def
tarball_url_for
(
id
)
original_url
,
username
,
reponame
=
*
(
url
.
match
(
/[:\/]([\w\-]+)\/([\w\-]+)\.git/
).
to_a
)
"https://github.com/
#{
username
}
/
#{
reponame
}
/tarball/
#{
id
}
"
end
private
def
download_only?
@options
[
:download_only
]
end
def
download_and_extract_tarball
(
id
)
tmp_path
=
target_path
+
"tarball.tar.gz"
...
...
@@ -81,10 +81,10 @@ module Pod
open
tarball_url_for
(
id
)
do
|
archive
|
tmpfile
.
write
Zlib
::
GzipReader
.
new
(
archive
).
read
end
system
"tar xf
#{
tmpfile
.
path
}
-C
#{
target_path
}
--strip-components 1"
end
FileUtils
.
rm_f
(
tmp_path
)
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