cocoapods-core 1.11.0.beta.1 → 1.11.1
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.
- checksums.yaml +4 -4
- data/lib/cocoapods-core/gem_version.rb +1 -1
- data/lib/cocoapods-core/source/manager.rb +1 -1
- data/lib/cocoapods-core/specification/consumer.rb +10 -2
- data/lib/cocoapods-core/specification/dsl.rb +35 -9
- data/lib/cocoapods-core/specification/linter/analyzer.rb +1 -0
- data/lib/cocoapods-core/specification/linter.rb +11 -0
- data/lib/cocoapods-core/specification.rb +6 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d1aeda22a44f71a0bb5c7964ed58df0632dffe07075ffe5ce77af08d83311d1
|
4
|
+
data.tar.gz: 8a3af2ba8040cf97cd7130a978e1d9e3c64f073c20476caf68212c0a2f4f9f3c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff8f362b9ae42fd57696f3bb777b18306b8bc467e6cdf189a804601437efe17e848d851785476297d6bc7099c477b6a441350df8cab2a71845915315bab7767f
|
7
|
+
data.tar.gz: d9ebd7b5a5ef23bacced8fa9965d45867936b51cfe9624151a96dee8e2b877c77a561c2de9505ac84d87498b0498ed144b5c658a4188fe8f8b1fc7fa8808966c
|
@@ -461,7 +461,7 @@ module Pod
|
|
461
461
|
# SCP-style URLs for private git repos
|
462
462
|
url = valid_scp_url[url]
|
463
463
|
base = base_from_host_and_path[url.host, url.path]
|
464
|
-
when %r{(?:git|ssh|https?|[a-z0-9_-]+@([-\w.]+)):(\/\/)?(.*?)(\.git)(\/?|\#[-\d\w._]+?)$}i
|
464
|
+
when %r{(?:git|ssh|https?|[a-z0-9_-]+@([-\w.]+)):(\/\/)?(.*?)(\.git)?(\/?|\#[-\d\w._]+?)$}i
|
465
465
|
# Additional SCP-style URLs for private git repos
|
466
466
|
host, _, path = Regexp.last_match.captures
|
467
467
|
base = base_from_host_and_path[host, path]
|
@@ -471,13 +471,21 @@ module Pod
|
|
471
471
|
# @param [String, Array, Hash] value.
|
472
472
|
# The value of the attribute as specified by the user.
|
473
473
|
#
|
474
|
-
# @return [Hash] the on demand
|
474
|
+
# @return [Hash] the on demand resources.
|
475
475
|
#
|
476
476
|
def _prepare_on_demand_resources(value)
|
477
477
|
result = {}
|
478
478
|
if value
|
479
479
|
value.each do |key, patterns|
|
480
|
-
|
480
|
+
case patterns
|
481
|
+
when String, Array
|
482
|
+
result[key] = { :paths => [*patterns].compact, :category => :download_on_demand }
|
483
|
+
when Hash
|
484
|
+
patterns = Specification.convert_keys_to_symbol(patterns, :recursive => false)
|
485
|
+
result[key] = { :paths => [*patterns[:paths]].compact, :category => patterns.fetch(:category, :download_on_demand).to_sym }
|
486
|
+
else
|
487
|
+
raise StandardError, "Unknown on demand resource value type `#{patterns}`."
|
488
|
+
end
|
481
489
|
end
|
482
490
|
end
|
483
491
|
result
|
@@ -1361,26 +1361,52 @@ module Pod
|
|
1361
1361
|
|
1362
1362
|
#------------------#
|
1363
1363
|
|
1364
|
+
# The keys accepted by the category attribute for each on demand resource entry.
|
1365
|
+
#
|
1366
|
+
ON_DEMAND_RESOURCES_CATEGORY_KEYS = [:download_on_demand, :prefetched, :initial_install].freeze
|
1367
|
+
|
1364
1368
|
# @!method on_demand_resources=(on_demand_resources)
|
1365
1369
|
#
|
1366
|
-
# A hash of
|
1367
|
-
# will automatically become part of the resources build phase of the target.
|
1370
|
+
# A hash of on demand resources that should be copied into the target bundle. Resources specified here
|
1371
|
+
# will automatically become part of the resources build phase of the target this pod is integrated into.
|
1372
|
+
#
|
1373
|
+
# If no category is specified then `:download_on_demand` is used as the default.
|
1374
|
+
#
|
1375
|
+
# @note
|
1376
|
+
#
|
1377
|
+
# Tags specified by pods are _always_ managed by CocoaPods. If a tag is renamed, changed or deleted then
|
1378
|
+
# CocoaPods will update the tag within the targets the pod was integrated into. It is highly recommended not to
|
1379
|
+
# share the same tags for your project as the ones used by the pods your project consumes.
|
1368
1380
|
#
|
1369
1381
|
# @example
|
1370
1382
|
#
|
1371
|
-
#
|
1383
|
+
# s.on_demand_resources = {
|
1372
1384
|
# 'Tag1' => 'file1.png'
|
1373
|
-
#
|
1385
|
+
# }
|
1386
|
+
#
|
1387
|
+
# @example
|
1374
1388
|
#
|
1375
|
-
#
|
1389
|
+
# s.on_demand_resources = {
|
1376
1390
|
# 'Tag1' => ['file1.png', 'file2.png']
|
1377
|
-
#
|
1391
|
+
# }
|
1378
1392
|
#
|
1379
|
-
# @
|
1380
|
-
#
|
1393
|
+
# @example
|
1394
|
+
#
|
1395
|
+
# s.on_demand_resources = {
|
1396
|
+
# 'Tag1' => { :paths => ['file1.png', 'file2.png'], :category => :download_on_demand }
|
1397
|
+
# }
|
1398
|
+
#
|
1399
|
+
# @example
|
1400
|
+
#
|
1401
|
+
# s.on_demand_resources = {
|
1402
|
+
# 'Tag1' => { :paths => ['file1.png', 'file2.png'], :category => :initial_install }
|
1403
|
+
# }
|
1404
|
+
#
|
1405
|
+
# @param [Hash{String=>String}, Hash{String=>Array<String>}, Hash{String=>Hash}] on_demand_resources
|
1406
|
+
# The on demand resources shipped with the Pod.
|
1381
1407
|
#
|
1382
1408
|
attribute :on_demand_resources,
|
1383
|
-
:types => [String, Array],
|
1409
|
+
:types => [String, Array, Hash],
|
1384
1410
|
:container => Hash,
|
1385
1411
|
:file_patterns => true,
|
1386
1412
|
:singularize => true
|
@@ -90,6 +90,7 @@ module Pod
|
|
90
90
|
|
91
91
|
if patterns.respond_to?(:each)
|
92
92
|
patterns.each do |pattern|
|
93
|
+
pattern = pattern[:paths].join if attrb.name == :on_demand_resources
|
93
94
|
if pattern.respond_to?(:start_with?) && pattern.start_with?('/')
|
94
95
|
results.add_error('File Patterns', 'File patterns must be ' \
|
95
96
|
"relative and cannot start with a slash (#{attrb.name}).")
|
@@ -434,6 +434,17 @@ module Pod
|
|
434
434
|
end
|
435
435
|
end
|
436
436
|
|
437
|
+
# Performs validations related to the `on_demand_resources` attribute.
|
438
|
+
#
|
439
|
+
def _validate_on_demand_resources(h)
|
440
|
+
h.values.each do |value|
|
441
|
+
unless Specification::ON_DEMAND_RESOURCES_CATEGORY_KEYS.include?(value[:category])
|
442
|
+
results.add_error('on_demand_resources', "Invalid on demand resources category value `#{value[:category]}`. " \
|
443
|
+
"Available options are `#{Specification::ON_DEMAND_RESOURCES_CATEGORY_KEYS.join(', ')}`.")
|
444
|
+
end
|
445
|
+
end
|
446
|
+
end
|
447
|
+
|
437
448
|
# Performs validation related to the `scheme` attribute.
|
438
449
|
#
|
439
450
|
def _validate_scheme(s)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.11.
|
4
|
+
version: 1.11.1
|
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: 2021-
|
12
|
+
date: 2021-09-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -227,11 +227,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
227
227
|
version: '2.6'
|
228
228
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
229
229
|
requirements:
|
230
|
-
- - "
|
230
|
+
- - ">="
|
231
231
|
- !ruby/object:Gem::Version
|
232
|
-
version:
|
232
|
+
version: '0'
|
233
233
|
requirements: []
|
234
|
-
rubygems_version: 3.
|
234
|
+
rubygems_version: 3.2.3
|
235
235
|
signing_key:
|
236
236
|
specification_version: 4
|
237
237
|
summary: The models of CocoaPods
|