cocoapods-downloader 1.6.2 → 2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 20f16f6bb4e3cc9aa727c6a112b18667e583292c3b2acc931597809f7ff1b26b
4
- data.tar.gz: b58a2541b4a8210e8357b92cf9f532a061f39585a619484efa8ea6c83a39585a
3
+ metadata.gz: 7d0cafacec4cc5b2450f3c0f6d82bfc7d09a4ab190658ac85221b5f27721c2a7
4
+ data.tar.gz: c40665206cd37acbd64183bdad4a1f2f68a6aeb7a3e99f1da6c9d6bf69247b68
5
5
  SHA512:
6
- metadata.gz: 976e976c7c981b75242914f8be32f8c2be30e30e23d2a4c61bd7a1ea10d41cdee46c74768f1af849515a6743d5d3020dec90597ffe196eea0e48d5b2fd6c425e
7
- data.tar.gz: 147b35462c7f4c988635de9e37a0a787e0a3709c410f83788121c303ddeac0eabc34643fe4eae0fdcb72c483bc3245399c9714e7dac6284c92a2a6eb9d4b394b
6
+ metadata.gz: 14c1a6b426a722519436cb73afe4114065e4418cf9b013c75117fd6cca09512e1306d2e3da0eea1f601e73347cea6c6713905b6ac130e1d0864eda909f988038
7
+ data.tar.gz: 0c3df6280c65e83b4b1ab264d434489de160fb484852361517186000e764d8d93d8f22927d06af09382f3a24190a2fc74bcb6c333737a9a91b8a3039ebd1b1e5
data/README.markdown CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  A small library for downloading files from remotes in a folder.
4
4
 
5
- [![Build Status](https://img.shields.io/github/workflow/status/CocoaPods/CocoaPods-Downloader/Spec)](https://github.com/CocoaPods/cocoapods-downloader/actions)
5
+ [![Build Status](https://github.com/CocoaPods/cocoapods-downloader/workflows/Specs/badge.svg)](https://github.com/CocoaPods/cocoapods-downloader/actions/workflows/Specs.yml)
6
6
  [![Gem Version](https://img.shields.io/gem/v/cocoapods-downloader)](https://rubygems.org/gems/cocoapods-downloader)
7
7
  [![Maintainability](https://api.codeclimate.com/v1/badges/2253ffb0c2c98e4d1c71/maintainability)](https://codeclimate.com/github/CocoaPods/cocoapods-downloader/maintainability)
8
8
 
@@ -34,7 +34,6 @@ The downloader class supports the following option keys:
34
34
  - hg: revision, tag, branch
35
35
  - http: type, flatten
36
36
  - scp: type, flatten
37
- - bzr: revision, tag
38
37
 
39
38
  The downloader also provides hooks which allow to customize its output or the way in which the commands are executed
40
39
 
@@ -74,7 +73,7 @@ Follow [@CocoaPods](http://twitter.com/CocoaPods) to get up to date information
74
73
 
75
74
  ## Development
76
75
 
77
- You need to have `svn`, `bzr`, `hg` and `git` installed to run the specs. There are some specs which require `hdiutil` which will only run on macOS.
76
+ You need to have `svn`, `hg` and `git` installed to run the specs. There are some specs which require `hdiutil` which will only run on macOS.
78
77
 
79
78
  ## License
80
79
 
@@ -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.2'.freeze
6
+ VERSION = '2.0'.freeze
7
7
  end
8
8
  end
@@ -23,9 +23,15 @@ module Pod
23
23
  def self.preprocess_options(options)
24
24
  return options unless options[:branch]
25
25
 
26
+ input = [options[:git], options[:commit]].map(&:to_s)
27
+ invalid = input.compact.any? { |value| value.start_with?('--') || value.include?(' --') }
28
+ raise DownloaderError, "Provided unsafe input for git #{options}." if invalid
29
+
26
30
  command = ['ls-remote',
31
+ '--',
27
32
  options[:git],
28
33
  options[:branch]]
34
+
29
35
  output = Git.execute_command('git', command)
30
36
  match = commit_from_ls_remote output, options[:branch]
31
37
 
@@ -5,7 +5,6 @@ module Pod
5
5
  require 'cocoapods-downloader/api_exposable'
6
6
  require 'cocoapods-downloader/base'
7
7
 
8
- autoload :Bazaar, 'cocoapods-downloader/bazaar'
9
8
  autoload :Git, 'cocoapods-downloader/git'
10
9
  autoload :Http, 'cocoapods-downloader/http'
11
10
  autoload :Mercurial, 'cocoapods-downloader/mercurial'
@@ -21,7 +20,6 @@ module Pod
21
20
  #
22
21
  def self.downloader_class_by_key
23
22
  {
24
- :bzr => Bazaar,
25
23
  :git => Git,
26
24
  :hg => Mercurial,
27
25
  :http => Http,
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.2
4
+ version: '2.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: 2022-03-28 00:00:00.000000000 Z
12
+ date: 2023-10-26 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description:
15
15
  email:
@@ -25,7 +25,6 @@ files:
25
25
  - lib/cocoapods-downloader/api.rb
26
26
  - lib/cocoapods-downloader/api_exposable.rb
27
27
  - lib/cocoapods-downloader/base.rb
28
- - lib/cocoapods-downloader/bazaar.rb
29
28
  - lib/cocoapods-downloader/gem_version.rb
30
29
  - lib/cocoapods-downloader/git.rb
31
30
  - lib/cocoapods-downloader/http.rb
@@ -45,7 +44,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
45
44
  requirements:
46
45
  - - ">="
47
46
  - !ruby/object:Gem::Version
48
- version: 2.3.3
47
+ version: 2.7.4
49
48
  required_rubygems_version: !ruby/object:Gem::Requirement
50
49
  requirements:
51
50
  - - ">="
@@ -1,60 +0,0 @@
1
- module Pod
2
- module Downloader
3
- class Bazaar < Base
4
- def self.options
5
- [:revision, :tag]
6
- end
7
-
8
- def options_specific?
9
- !options[:revision].nil?
10
- end
11
-
12
- def checkout_options
13
- Dir.chdir(target_path) do
14
- options = {}
15
- options[:bzr] = url
16
- options[:revision] = `bzr revno`.chomp
17
- options
18
- end
19
- end
20
-
21
- private
22
-
23
- # @group Private Helpers
24
- #-----------------------------------------------------------------------#
25
-
26
- executable :bzr
27
-
28
- def download!
29
- if options[:tag]
30
- download_revision!(options[:tag])
31
- elsif options[:revision]
32
- download_revision!(options[:revision])
33
- else
34
- download_head!
35
- end
36
- end
37
-
38
- def download_head!
39
- bzr! 'branch', url, *dir_opts, target_path
40
- end
41
-
42
- def download_revision!(rev)
43
- bzr! 'branch', url, *dir_opts, '-r', rev, @target_path
44
- end
45
-
46
- # @return [String] The command line flags to use according to whether the
47
- # target path exits.
48
- #
49
- def dir_opts
50
- if @target_path.exist?
51
- %w(--use-existing-dir)
52
- else
53
- []
54
- end
55
- end
56
-
57
- #-----------------------------------------------------------------------#
58
- end
59
- end
60
- end