This repository has been archived by the owner on Aug 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fa98109
commit 0030003
Showing
17 changed files
with
1,122 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Pod::Spec.new do |s| | ||
# Version | ||
s.version = "3.7.0" | ||
s.version = "3.7.1" | ||
s.swift_version = "5.3" | ||
|
||
# Meta | ||
|
Binary file not shown.
21 changes: 21 additions & 0 deletions
21
vendor/bundle/ruby/3.0.0/gems/cocoapods-downloader-1.6.3/LICENSE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Copyright (c) 2011 - 2012 Eloy Durán <eloy.de.enige@gmail.com> | ||
Copyright (c) 2012 Fabio Pelosin <fabiopelosin@gmail.com> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. | ||
|
81 changes: 81 additions & 0 deletions
81
vendor/bundle/ruby/3.0.0/gems/cocoapods-downloader-1.6.3/README.markdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# Downloader | ||
|
||
A small library for downloading files from remotes in a folder. | ||
|
||
[![Build Status](https://img.shields.io/github/workflow/status/CocoaPods/CocoaPods-Downloader/Spec)](https://github.com/CocoaPods/cocoapods-downloader/actions) | ||
[![Gem Version](https://img.shields.io/gem/v/cocoapods-downloader)](https://rubygems.org/gems/cocoapods-downloader) | ||
[![Maintainability](https://api.codeclimate.com/v1/badges/2253ffb0c2c98e4d1c71/maintainability)](https://codeclimate.com/github/CocoaPods/cocoapods-downloader/maintainability) | ||
|
||
## Install | ||
|
||
``` | ||
$ [sudo] gem install cocoapods-downloader | ||
``` | ||
|
||
## Usage | ||
|
||
```ruby | ||
require 'cocoapods-downloader' | ||
|
||
target_path = './Downloads/MyDownload' | ||
options = { :git => 'example.com' } | ||
options = Pod::Downloader.preprocess_options(options) | ||
downloader = Pod::Downloader.for_target(target_path, options) | ||
downloader.cache_root = '~/Library/Caches/APPNAME' | ||
downloader.max_cache_size = 500 | ||
downloader.download | ||
downloader.checkout_options #=> { :git => 'example.com', :commit => 'd7f410490dabf7a6bde665ba22da102c3acf1bd9' } | ||
``` | ||
|
||
The downloader class supports the following option keys: | ||
|
||
- git: commit, tag, branch, submodules | ||
- svn: revision, tag, folder, externals | ||
- hg: revision, tag, branch | ||
- http: type, flatten | ||
- scp: type, flatten | ||
- bzr: revision, tag | ||
|
||
The downloader also provides hooks which allow to customize its output or the way in which the commands are executed | ||
|
||
```ruby | ||
require 'cocoapods-downloader' | ||
|
||
module Pod | ||
module Downloader | ||
class Base | ||
|
||
override_api do | ||
def self.execute_command(executable, command, raise_on_failure = false) | ||
puts "Will download" | ||
super | ||
end | ||
|
||
def self.ui_action(ui_message) | ||
puts ui_message.green | ||
yield | ||
end | ||
end | ||
|
||
end | ||
end | ||
end | ||
``` | ||
|
||
## Extraction | ||
|
||
This gem was extracted from [CocoaPods](https://github.com/CocoaPods/CocoaPods). Refer to also that repository for the history and the contributors. | ||
|
||
## Collaborate | ||
|
||
All CocoaPods development happens on GitHub, there is a repository for [CocoaPods](https://github.com/CocoaPods/CocoaPods) and one for the [CocoaPods specs](https://github.com/CocoaPods/Specs). Contributing patches or Pods is really easy and gratifying and for a lot of people is their first time. | ||
|
||
Follow [@CocoaPods](http://twitter.com/CocoaPods) to get up to date information about what's going on in the CocoaPods world. | ||
|
||
## Development | ||
|
||
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. | ||
|
||
## License | ||
|
||
This gem and CocoaPods are available under the MIT license. |
102 changes: 102 additions & 0 deletions
102
vendor/bundle/ruby/3.0.0/gems/cocoapods-downloader-1.6.3/lib/cocoapods-downloader.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
module Pod | ||
module Downloader | ||
require 'cocoapods-downloader/gem_version' | ||
require 'cocoapods-downloader/api' | ||
require 'cocoapods-downloader/api_exposable' | ||
require 'cocoapods-downloader/base' | ||
|
||
autoload :Bazaar, 'cocoapods-downloader/bazaar' | ||
autoload :Git, 'cocoapods-downloader/git' | ||
autoload :Http, 'cocoapods-downloader/http' | ||
autoload :Mercurial, 'cocoapods-downloader/mercurial' | ||
autoload :Scp, 'cocoapods-downloader/scp' | ||
autoload :Subversion, 'cocoapods-downloader/subversion' | ||
|
||
# Denotes the error generated by a Downloader | ||
# | ||
class DownloaderError < StandardError; end | ||
|
||
# @return [Hash{Symbol=>Class}] The concrete classes of the supported | ||
# strategies by key. | ||
# | ||
def self.downloader_class_by_key | ||
{ | ||
:bzr => Bazaar, | ||
:git => Git, | ||
:hg => Mercurial, | ||
:http => Http, | ||
:scp => Scp, | ||
:svn => Subversion, | ||
} | ||
end | ||
|
||
# Identifies the concrete strategy for the given options. | ||
# | ||
# @param [Hash{Symbol}] options | ||
# The options for which a strategy is needed. | ||
# | ||
# @return [Symbol] The symbol associated with a concrete strategy. | ||
# @return [Nil] If no suitable concrete strategy could be selected. | ||
# | ||
def self.strategy_from_options(options) | ||
common = downloader_class_by_key.keys & options.keys | ||
if common.count == 1 | ||
common.first | ||
end | ||
end | ||
|
||
# @return [Downloader::Base] A concrete downloader according to the | ||
# options. | ||
# | ||
def self.for_target(target_path, options) | ||
options = options_to_sym(options) | ||
|
||
if target_path.nil? | ||
raise DownloaderError, 'No target path provided.' | ||
end | ||
|
||
strategy, klass = class_for_options(options) | ||
|
||
url = options[strategy] | ||
sub_options = options.dup | ||
sub_options.delete(strategy) | ||
|
||
klass.new(target_path, url, sub_options) | ||
end | ||
|
||
# Have the concrete strategy preprocess options | ||
# | ||
# @param [Hash<Symbol,String>] options | ||
# The request options to preprocess | ||
# | ||
# @return [Hash<Symbol,String>] the new options | ||
# | ||
def self.preprocess_options(options) | ||
options = options_to_sym(options) | ||
|
||
_, klass = class_for_options(options) | ||
klass.preprocess_options(options) | ||
end | ||
|
||
private_class_method | ||
|
||
def self.options_to_sym(options) | ||
Hash[options.map { |k, v| [k.to_sym, v] }] | ||
end | ||
|
||
def self.class_for_options(options) | ||
if options.nil? || options.empty? | ||
raise DownloaderError, 'No source URL provided.' | ||
end | ||
|
||
strategy = strategy_from_options(options) | ||
unless strategy | ||
raise DownloaderError, 'Unsupported download strategy ' \ | ||
"`#{options.inspect}`." | ||
end | ||
|
||
# Explicit return for multiple params, rubocop thinks it's useless but it's not | ||
return strategy, downloader_class_by_key[strategy] # rubocop:disable Style/RedundantReturn | ||
end | ||
end | ||
end |
73 changes: 73 additions & 0 deletions
73
vendor/bundle/ruby/3.0.0/gems/cocoapods-downloader-1.6.3/lib/cocoapods-downloader/api.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
module Pod | ||
module Downloader | ||
# The Downloader::Hooks module allows to adapt the Downloader to | ||
# the UI of other gems. | ||
# | ||
module API | ||
# Executes | ||
# @return [String] the output of the command. | ||
# | ||
def execute_command(executable, command, raise_on_failure = false) | ||
require 'shellwords' | ||
command = command.map(&:to_s).map(&:shellescape).join(' ') | ||
output = `\n#{executable} #{command} 2>&1` | ||
check_exit_code!(executable, command, output) if raise_on_failure | ||
puts output | ||
output | ||
end | ||
|
||
# Checks if the just executed command completed successfully. | ||
# | ||
# @raise If the command failed. | ||
# | ||
# @return [void] | ||
# | ||
def check_exit_code!(executable, command, output) | ||
if $?.exitstatus != 0 | ||
raise DownloaderError, "Error on `#{executable} #{command}`.\n#{output}" | ||
end | ||
end | ||
|
||
# Indicates that an action will be performed. The action is passed as a | ||
# block. | ||
# | ||
# @param [String] message | ||
# The message associated with the action. | ||
# | ||
# @yield The action, this block is always executed. | ||
# | ||
# @return [void] | ||
# | ||
def ui_action(message) | ||
puts message | ||
yield | ||
end | ||
|
||
# Indicates that a minor action will be performed. The action is passed as | ||
# a block. | ||
# | ||
# @param [String] message | ||
# The message associated with the action. | ||
# | ||
# @yield The action, this block is always executed. | ||
# | ||
# @return [void] | ||
# | ||
def ui_sub_action(message) | ||
puts message | ||
yield | ||
end | ||
|
||
# Prints an UI message. | ||
# | ||
# @param [String] message | ||
# The message associated with the action. | ||
# | ||
# @return [void] | ||
# | ||
def ui_message(message) | ||
puts message | ||
end | ||
end | ||
end | ||
end |
23 changes: 23 additions & 0 deletions
23
...ndle/ruby/3.0.0/gems/cocoapods-downloader-1.6.3/lib/cocoapods-downloader/api_exposable.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
module Pod | ||
module Downloader | ||
module APIExposable | ||
def expose_api(mod = nil, &block) | ||
if mod.nil? | ||
if block.nil? | ||
raise "Either a module or a block that's used to create a module is required." | ||
else | ||
mod = Module.new(&block) | ||
end | ||
elsif mod && block | ||
raise 'Only a module *or* is required, not both.' | ||
end | ||
include mod | ||
# TODO: Try to find a nicer way to do this | ||
# See https://github.com/CocoaPods/cocoapods-downloader/pull/57 | ||
extend mod | ||
end | ||
|
||
alias override_api expose_api | ||
end | ||
end | ||
end |
Oops, something went wrong.