cocoapods-downloader 0.8.1 → 0.9.0
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/api.rb +2 -0
- data/lib/cocoapods-downloader/base.rb +4 -4
- data/lib/cocoapods-downloader/bazaar.rb +4 -4
- data/lib/cocoapods-downloader/gem_version.rb +1 -1
- data/lib/cocoapods-downloader/git.rb +5 -5
- data/lib/cocoapods-downloader/http.rb +8 -10
- data/lib/cocoapods-downloader/mercurial.rb +4 -4
- data/lib/cocoapods-downloader/subversion.rb +9 -8
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b242104578fbc99f8c538ae8be3b168a36675dc3
|
4
|
+
data.tar.gz: ec05c46011c4a75379e2d6a28ad2abf5981ea89f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f06e8796132833ad69e887b86c1b005daf7ee8db83bcdbb9c728080e56b772376beb5fa0036a0dac9f48438dafadbdeda646892486d1432ed05e76b10b43e5a2
|
7
|
+
data.tar.gz: 7d9c5932b1a983cc4014bbffe126240851545259301a951b8d23be70d5acb95c464e39b188a067c7a237527e2ac89c3d5947f3098775f352b6895826ce167e92
|
@@ -8,6 +8,8 @@ module Pod
|
|
8
8
|
# @return [String] the output of the command.
|
9
9
|
#
|
10
10
|
def execute_command(executable, command, raise_on_failure = false)
|
11
|
+
require 'shellwords'
|
12
|
+
command = command.map(&:to_s).map(&:shellescape).join(' ')
|
11
13
|
output = `\n#{executable} #{command} 2>&1`
|
12
14
|
check_exit_code!(executable, command, output) if raise_on_failure
|
13
15
|
puts output
|
@@ -144,12 +144,12 @@ module Pod
|
|
144
144
|
# @return [void]
|
145
145
|
#
|
146
146
|
def self.executable(name)
|
147
|
-
define_method(name) do
|
148
|
-
execute_command(name.to_s, command, false)
|
147
|
+
define_method(name) do |*command|
|
148
|
+
execute_command(name.to_s, command.flatten, false)
|
149
149
|
end
|
150
150
|
|
151
|
-
define_method(name.to_s + '!') do
|
152
|
-
execute_command(name.to_s, command, true)
|
151
|
+
define_method(name.to_s + '!') do |*command|
|
152
|
+
execute_command(name.to_s, command.flatten, true)
|
153
153
|
end
|
154
154
|
end
|
155
155
|
end
|
@@ -36,11 +36,11 @@ module Pod
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def download_head!
|
39
|
-
bzr!
|
39
|
+
bzr! 'branch', url, *dir_opts, target_path
|
40
40
|
end
|
41
41
|
|
42
42
|
def download_revision!(rev)
|
43
|
-
bzr!
|
43
|
+
bzr! 'branch', url, *dir_opts, '-r', rev, @target_path
|
44
44
|
end
|
45
45
|
|
46
46
|
# @return [String] The command line flags to use according to whether the
|
@@ -48,9 +48,9 @@ module Pod
|
|
48
48
|
#
|
49
49
|
def dir_opts
|
50
50
|
if @target_path.exist?
|
51
|
-
|
51
|
+
%w(--use-existing-dir)
|
52
52
|
else
|
53
|
-
|
53
|
+
[]
|
54
54
|
end
|
55
55
|
end
|
56
56
|
|
@@ -62,7 +62,7 @@ module Pod
|
|
62
62
|
def clone(force_head = false, shallow_clone = true)
|
63
63
|
ui_sub_action('Git download') do
|
64
64
|
begin
|
65
|
-
git! clone_arguments(force_head, shallow_clone)
|
65
|
+
git! clone_arguments(force_head, shallow_clone)
|
66
66
|
rescue DownloaderError => e
|
67
67
|
if e.message =~ /^fatal:.*does not support --depth$/im
|
68
68
|
clone(force_head, false)
|
@@ -86,10 +86,10 @@ module Pod
|
|
86
86
|
# @return [Array<String>] arguments to pass to `git` to clone the repo.
|
87
87
|
#
|
88
88
|
def clone_arguments(force_head, shallow_clone)
|
89
|
-
command = ['clone', url
|
89
|
+
command = ['clone', url, target_path]
|
90
90
|
|
91
91
|
if shallow_clone && !options[:commit]
|
92
|
-
command +=
|
92
|
+
command += %w(--single-branch --depth 1)
|
93
93
|
end
|
94
94
|
|
95
95
|
unless force_head
|
@@ -105,7 +105,7 @@ module Pod
|
|
105
105
|
#
|
106
106
|
def checkout_commit
|
107
107
|
Dir.chdir(target_path) do
|
108
|
-
git!
|
108
|
+
git! 'checkout', '-b', 'activated-commit', options[:commit]
|
109
109
|
end
|
110
110
|
end
|
111
111
|
|
@@ -113,7 +113,7 @@ module Pod
|
|
113
113
|
#
|
114
114
|
def init_submodules
|
115
115
|
Dir.chdir(target_path) do
|
116
|
-
git!
|
116
|
+
git! %w(submodule update --init)
|
117
117
|
end
|
118
118
|
end
|
119
119
|
end
|
@@ -62,8 +62,6 @@ module Pod
|
|
62
62
|
:tbz
|
63
63
|
elsif path =~ /.(txz|tar\.xz)$/
|
64
64
|
:txz
|
65
|
-
else
|
66
|
-
nil
|
67
65
|
end
|
68
66
|
end
|
69
67
|
|
@@ -85,23 +83,23 @@ module Pod
|
|
85
83
|
end
|
86
84
|
|
87
85
|
def download_file(full_filename)
|
88
|
-
curl!
|
86
|
+
curl! '-f', '-L', '-o', full_filename, url, '--create-dirs'
|
89
87
|
end
|
90
88
|
|
91
89
|
def extract_with_type(full_filename, type = :zip)
|
92
|
-
unpack_from = full_filename
|
93
|
-
unpack_to = @target_path
|
90
|
+
unpack_from = full_filename
|
91
|
+
unpack_to = @target_path
|
94
92
|
case type
|
95
93
|
when :zip
|
96
|
-
unzip!
|
94
|
+
unzip! unpack_from, '-d', unpack_to
|
97
95
|
when :tgz
|
98
|
-
tar!
|
96
|
+
tar! 'xfz', unpack_from, '-C', unpack_to
|
99
97
|
when :tar
|
100
|
-
tar!
|
98
|
+
tar! 'xf', unpack_from, '-C', unpack_to
|
101
99
|
when :tbz
|
102
|
-
tar!
|
100
|
+
tar! 'xfj', unpack_from, '-C', unpack_to
|
103
101
|
when :txz
|
104
|
-
tar!
|
102
|
+
tar! 'xf', unpack_from, '-C', unpack_to
|
105
103
|
else
|
106
104
|
raise UnsupportedFileTypeError, "Unsupported file type: #{type}"
|
107
105
|
end
|
@@ -35,19 +35,19 @@ module Pod
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def download_head!
|
38
|
-
hg!
|
38
|
+
hg! 'clone', url, @target_path
|
39
39
|
end
|
40
40
|
|
41
41
|
def download_revision!
|
42
|
-
hg!
|
42
|
+
hg! 'clone', url, '--rev', options[:revision], @target_path
|
43
43
|
end
|
44
44
|
|
45
45
|
def download_tag!
|
46
|
-
hg!
|
46
|
+
hg! 'clone', url, '--updaterev', options[:tag], @target_path
|
47
47
|
end
|
48
48
|
|
49
49
|
def download_branch!
|
50
|
-
hg!
|
50
|
+
hg! 'clone', url, '--updaterev', options[:branch], @target_path
|
51
51
|
end
|
52
52
|
end
|
53
53
|
end
|
@@ -23,12 +23,12 @@ module Pod
|
|
23
23
|
executable :svn
|
24
24
|
|
25
25
|
def download!
|
26
|
-
output = svn!(
|
26
|
+
output = svn!(*subcommand, *reference_url, @target_path)
|
27
27
|
store_exported_revision(output)
|
28
28
|
end
|
29
29
|
|
30
30
|
def download_head!
|
31
|
-
output = svn!(
|
31
|
+
output = svn!(*subcommand, *trunk_url, @target_path)
|
32
32
|
store_exported_revision(output)
|
33
33
|
end
|
34
34
|
|
@@ -39,13 +39,13 @@ module Pod
|
|
39
39
|
|
40
40
|
def subcommand
|
41
41
|
if options[:checkout]
|
42
|
-
result =
|
42
|
+
result = %w(checkout)
|
43
43
|
else
|
44
|
-
result =
|
44
|
+
result = %w(export)
|
45
45
|
end
|
46
46
|
|
47
|
-
result
|
48
|
-
result << '
|
47
|
+
result += %w(--non-interactive --trust-server-cert --force)
|
48
|
+
result << '--ignore-externals' if options[:externals] == false
|
49
49
|
result
|
50
50
|
end
|
51
51
|
|
@@ -53,7 +53,8 @@ module Pod
|
|
53
53
|
result = url.dup
|
54
54
|
result << '/' << options[:folder] if options[:folder]
|
55
55
|
result << '/tags/' << options[:tag] if options[:tag]
|
56
|
-
result
|
56
|
+
result = [result]
|
57
|
+
result << '-r' << options[:revision] if options[:revision]
|
57
58
|
result
|
58
59
|
end
|
59
60
|
|
@@ -61,7 +62,7 @@ module Pod
|
|
61
62
|
result = url.dup
|
62
63
|
result << '/' << options[:folder] if options[:folder]
|
63
64
|
result << '/trunk'
|
64
|
-
result
|
65
|
+
[result]
|
65
66
|
end
|
66
67
|
end
|
67
68
|
end
|
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.
|
4
|
+
version: 0.9.0
|
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:
|
12
|
+
date: 2015-04-01 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description:
|
15
15
|
email:
|
@@ -19,6 +19,9 @@ executables: []
|
|
19
19
|
extensions: []
|
20
20
|
extra_rdoc_files: []
|
21
21
|
files:
|
22
|
+
- LICENSE
|
23
|
+
- README.markdown
|
24
|
+
- lib/cocoapods-downloader.rb
|
22
25
|
- lib/cocoapods-downloader/api.rb
|
23
26
|
- lib/cocoapods-downloader/api_exposable.rb
|
24
27
|
- lib/cocoapods-downloader/base.rb
|
@@ -28,9 +31,6 @@ files:
|
|
28
31
|
- lib/cocoapods-downloader/http.rb
|
29
32
|
- lib/cocoapods-downloader/mercurial.rb
|
30
33
|
- lib/cocoapods-downloader/subversion.rb
|
31
|
-
- lib/cocoapods-downloader.rb
|
32
|
-
- README.markdown
|
33
|
-
- LICENSE
|
34
34
|
homepage: https://github.com/CocoaPods/Downloader
|
35
35
|
licenses:
|
36
36
|
- MIT
|
@@ -41,17 +41,17 @@ require_paths:
|
|
41
41
|
- lib
|
42
42
|
required_ruby_version: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
|
-
- -
|
44
|
+
- - ">="
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: 2.0.0
|
47
47
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
48
48
|
requirements:
|
49
|
-
- -
|
49
|
+
- - ">="
|
50
50
|
- !ruby/object:Gem::Version
|
51
51
|
version: '0'
|
52
52
|
requirements: []
|
53
53
|
rubyforge_project:
|
54
|
-
rubygems_version: 2.
|
54
|
+
rubygems_version: 2.4.6
|
55
55
|
signing_key:
|
56
56
|
specification_version: 3
|
57
57
|
summary: A small library for downloading files from remotes in a folder.
|