cocoapods-downloader 1.6.1 → 1.6.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of cocoapods-downloader might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d788d8599f683b58ee1859e835a12fd09db9aa8852ea7cf4af572cf99ca73e86
4
- data.tar.gz: 3c323bca7678037e3c03fe8942a18acf7ed44216f09bde9ce6c6773f4cebe26b
3
+ metadata.gz: 20f16f6bb4e3cc9aa727c6a112b18667e583292c3b2acc931597809f7ff1b26b
4
+ data.tar.gz: b58a2541b4a8210e8357b92cf9f532a061f39585a619484efa8ea6c83a39585a
5
5
  SHA512:
6
- metadata.gz: 166cd1b6b112c3c2a903477ab1f33b58bb6fc6ff269f0a63486a56726d110cba0d32162c9e8662109736310b5d3bb800d1de8358050125cf4974e7a33adcfff6
7
- data.tar.gz: 840d72c9021a93c9bd2e28f0bbd6fab767227f1d4f4fad9a701055022d022d6702fbca3181532eba184456a4212130e5721ca9b0739bc6043549fd88badcef46
6
+ metadata.gz: 976e976c7c981b75242914f8be32f8c2be30e30e23d2a4c61bd7a1ea10d41cdee46c74768f1af849515a6743d5d3020dec90597ffe196eea0e48d5b2fd6c425e
7
+ data.tar.gz: 147b35462c7f4c988635de9e37a0a787e0a3709c410f83788121c303ddeac0eabc34643fe4eae0fdcb72c483bc3245399c9714e7dac6284c92a2a6eb9d4b394b
@@ -77,6 +77,7 @@ module Pod
77
77
  # @return [void]
78
78
  #
79
79
  def download
80
+ validate_input
80
81
  ui_action("#{name} download") do
81
82
  target_path.mkpath
82
83
  download!
@@ -121,6 +122,14 @@ module Pod
121
122
  raise 'Abstract method'
122
123
  end
123
124
 
125
+ # Provides a before-download check for safety of the options in the
126
+ # concrete downloader.
127
+ #
128
+ # @return [void]
129
+ #
130
+ def validate_input
131
+ end
132
+
124
133
  # Returns a User-Agent string that itentifies http network requests as
125
134
  # originating from CocoaPods.
126
135
  # Contains version numbers from the CocoaPods Gem and the cocoapods-downloader Gem.
@@ -3,6 +3,6 @@ module Pod
3
3
  # @return [String] Downloader’s version, following
4
4
  # [semver](http://semver.org).
5
5
  #
6
- VERSION = '1.6.1'.freeze
6
+ VERSION = '1.6.2'.freeze
7
7
  end
8
8
  end
@@ -21,7 +21,6 @@ module Pod
21
21
  end
22
22
 
23
23
  def self.preprocess_options(options)
24
- validate_input options
25
24
  return options unless options[:branch]
26
25
 
27
26
  command = ['ls-remote',
@@ -58,13 +57,7 @@ module Pod
58
57
  match[1] unless match.nil?
59
58
  end
60
59
 
61
- def self.validate_input(options)
62
- input = [options[:git], options[:branch], options[:commit], options[:tag]].map(&:to_s)
63
- invalid = input.compact.any? { |value| value.start_with?('--') || value.include?(' --') }
64
- raise DownloaderError, "Provided unsafe input for git #{options}." if invalid
65
- end
66
-
67
- private_class_method :commit_from_ls_remote, :validate_input
60
+ private_class_method :commit_from_ls_remote
68
61
 
69
62
  private
70
63
 
@@ -160,6 +153,12 @@ module Pod
160
153
  def target_git(*args)
161
154
  git!(['-C', target_path] + args)
162
155
  end
156
+
157
+ def validate_input
158
+ input = [url, options[:branch], options[:commit], options[:tag]].map(&:to_s)
159
+ invalid = input.compact.any? { |value| value.start_with?('--') || value.include?(' --') }
160
+ raise DownloaderError, "Provided unsafe input for git #{options}." if invalid
161
+ end
163
162
  end
164
163
  end
165
164
  end
@@ -18,19 +18,6 @@ module Pod
18
18
  end
19
19
  end
20
20
 
21
- def self.preprocess_options(options)
22
- validate_input options
23
- options
24
- end
25
-
26
- def self.validate_input(options)
27
- input = [options[:hg], options[:revision], options[:branch], options[:tag]].map(&:to_s)
28
- invalid = input.compact.any? { |value| value.start_with?('--') || value.include?(' --') }
29
- raise DownloaderError, "Provided unsafe input for hg #{options}." if invalid
30
- end
31
-
32
- private_class_method :validate_input
33
-
34
21
  private
35
22
 
36
23
  executable :hg
@@ -62,6 +49,12 @@ module Pod
62
49
  def download_branch!
63
50
  hg! 'clone', url, '--updaterev', options[:branch], @target_path
64
51
  end
52
+
53
+ def validate_input
54
+ input = [url, options[:revision], options[:branch], options[:tag]].map(&:to_s)
55
+ invalid = input.compact.any? { |value| value.start_with?('--') || value.include?(' --') }
56
+ raise DownloaderError, "Provided unsafe input for hg #{options}." if invalid
57
+ end
65
58
  end
66
59
  end
67
60
  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: 1.6.1
4
+ version: 1.6.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: 2022-03-23 00:00:00.000000000 Z
12
+ date: 2022-03-28 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description:
15
15
  email: