cocoapods-core 1.11.0.beta.1 → 1.11.0.beta.2
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/specification.rb +6 -0
- data/lib/cocoapods-core/specification/consumer.rb +10 -2
- data/lib/cocoapods-core/specification/dsl.rb +33 -7
- data/lib/cocoapods-core/specification/linter.rb +11 -0
- data/lib/cocoapods-core/specification/linter/analyzer.rb +1 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff12ddf7a1e9510d4d701b561478ca599ce262f8c8924bc9b82b0a7ba31fb127
|
4
|
+
data.tar.gz: 2416235d2edcc6bfe656057a090f54afdf96d53948ab1e6796ffbbcdef5a0036
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2312bc251e1772ea971db3512379bb3b3184437c72f1dd792f70094a8f888aa2cfc702b5e6bc1001fffb0573d3f7107bc19b872ef4229d2ad94510a608240287
|
7
|
+
data.tar.gz: 4aea2e2fcd793014741625dbcc2f7a88f8b4d7181dde1fd2952d43d267eaa00e3cda4386f3005e93ee7d81aefe104b55c5ba23d1b8f962498306267e069d0d1e
|
@@ -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.
|
1380
|
+
#
|
1381
|
+
# @example
|
1382
|
+
#
|
1383
|
+
# s.on_demand_resources = {
|
1384
|
+
# 'Tag1' => 'file1.png'
|
1385
|
+
# }
|
1386
|
+
#
|
1387
|
+
# @example
|
1388
|
+
#
|
1389
|
+
# s.on_demand_resources = {
|
1390
|
+
# 'Tag1' => ['file1.png', 'file2.png']
|
1391
|
+
# }
|
1368
1392
|
#
|
1369
1393
|
# @example
|
1370
1394
|
#
|
1371
1395
|
# s.on_demand_resources = {
|
1372
|
-
#
|
1396
|
+
# 'Tag1' => { :paths => ['file1.png', 'file2.png'], :category => :download_on_demand }
|
1373
1397
|
# }
|
1374
1398
|
#
|
1399
|
+
# @example
|
1400
|
+
#
|
1375
1401
|
# s.on_demand_resources = {
|
1376
|
-
#
|
1402
|
+
# 'Tag1' => { :paths => ['file1.png', 'file2.png'], :category => :initial_install }
|
1377
1403
|
# }
|
1378
1404
|
#
|
1379
|
-
# @param [Hash{String=>String}, Hash{String=>Array<String>}] on_demand_resources
|
1380
|
-
# The
|
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
|
@@ -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)
|
@@ -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}).")
|
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.0.beta.
|
4
|
+
version: 1.11.0.beta.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: 2021-08-
|
12
|
+
date: 2021-08-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -231,7 +231,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
231
231
|
- !ruby/object:Gem::Version
|
232
232
|
version: 1.3.1
|
233
233
|
requirements: []
|
234
|
-
rubygems_version: 3.
|
234
|
+
rubygems_version: 3.1.3
|
235
235
|
signing_key:
|
236
236
|
specification_version: 4
|
237
237
|
summary: The models of CocoaPods
|