cocoapods-downloader 0.7.1 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of cocoapods-downloader might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/cocoapods-downloader/base.rb +1 -1
- data/lib/cocoapods-downloader/gem_version.rb +1 -1
- data/lib/cocoapods-downloader/git.rb +39 -11
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65525beb4889730013a64bf195c72153f5916fda
|
4
|
+
data.tar.gz: dcc5e05077d04952762dfc49946c062ed1406518
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f0c7598747396d1ac4f004de4e8dd8a65e19af439badd70faf861e9ce4b5f30efd089e0b2f1349241c99415aa4a7d0d54b0deb4d106fc33613d3f3d5a907ad7
|
7
|
+
data.tar.gz: 64668c107e549505955a18725c3732c63b2fd2f9b8b2326efd246c2e68606a4ab629791956b2cbfe4b139688467a617fefdc0d8f76b8df43495d2d3c1f79b3dd
|
@@ -121,7 +121,7 @@ module Pod
|
|
121
121
|
|
122
122
|
#-----------------------------------------------------------------------#
|
123
123
|
|
124
|
-
# Defines two methods for an executable, based on its name. The
|
124
|
+
# Defines two methods for an executable, based on its name. The bang
|
125
125
|
# version raises if the executable terminates with a non-zero exit code.
|
126
126
|
#
|
127
127
|
# For example
|
@@ -55,22 +55,50 @@ module Pod
|
|
55
55
|
# If any specific option should be ignored and the HEAD of the
|
56
56
|
# repo should be cloned.
|
57
57
|
#
|
58
|
-
|
58
|
+
# @param [Bool] shallow_clone
|
59
|
+
# Whether a shallow clone of the repo should be attempted, if
|
60
|
+
# possible given the specified {#options}.
|
61
|
+
#
|
62
|
+
def clone(force_head = false, shallow_clone = true)
|
59
63
|
ui_sub_action('Git download') do
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
if tag_or_branch = options[:tag] || options[:branch]
|
68
|
-
command += ['--branch', tag_or_branch]
|
64
|
+
begin
|
65
|
+
git! clone_arguments(force_head, shallow_clone).join(' ')
|
66
|
+
rescue DownloaderError => e
|
67
|
+
if e.message =~ /^fatal:.*does not support --depth$/im
|
68
|
+
clone(force_head, false)
|
69
|
+
else
|
70
|
+
raise
|
69
71
|
end
|
70
72
|
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
# The arguments to pass to `git` to clone the repo.
|
77
|
+
#
|
78
|
+
# @param [Bool] force_head
|
79
|
+
# If any specific option should be ignored and the HEAD of the
|
80
|
+
# repo should be cloned.
|
81
|
+
#
|
82
|
+
# @param [Bool] shallow_clone
|
83
|
+
# Whether a shallow clone of the repo should be attempted, if
|
84
|
+
# possible given the specified {#options}.
|
85
|
+
#
|
86
|
+
# @return [Array<String>] arguments to pass to `git` to clone the repo.
|
87
|
+
#
|
88
|
+
def clone_arguments(force_head, shallow_clone)
|
89
|
+
command = ['clone', url.shellescape, target_path.shellescape]
|
71
90
|
|
72
|
-
|
91
|
+
if shallow_clone && !options[:commit]
|
92
|
+
command += ['--single-branch', '--depth 1']
|
73
93
|
end
|
94
|
+
|
95
|
+
unless force_head
|
96
|
+
if tag_or_branch = options[:tag] || options[:branch]
|
97
|
+
command += ['--branch', tag_or_branch]
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
command
|
74
102
|
end
|
75
103
|
|
76
104
|
# Checks out a specific commit of the cloned repo.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-downloader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eloy Duran
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-10-07 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description:
|
15
15
|
email:
|
@@ -56,3 +56,4 @@ signing_key:
|
|
56
56
|
specification_version: 3
|
57
57
|
summary: A small library for downloading files from remotes in a folder.
|
58
58
|
test_files: []
|
59
|
+
has_rdoc:
|