cocoapods-core 1.10.2 → 1.11.0
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/cdn_source.rb +1 -1
- data/lib/cocoapods-core/dependency.rb +12 -7
- data/lib/cocoapods-core/gem_version.rb +1 -1
- data/lib/cocoapods-core/podfile/dsl.rb +23 -11
- data/lib/cocoapods-core/podfile/target_definition.rb +1 -1
- data/lib/cocoapods-core/podfile.rb +19 -2
- data/lib/cocoapods-core/requirement.rb +1 -1
- data/lib/cocoapods-core/source/manager.rb +43 -17
- data/lib/cocoapods-core/source.rb +8 -1
- data/lib/cocoapods-core/specification/consumer.rb +37 -1
- data/lib/cocoapods-core/specification/dsl.rb +95 -5
- data/lib/cocoapods-core/specification/linter/analyzer.rb +2 -1
- data/lib/cocoapods-core/specification/linter.rb +11 -16
- data/lib/cocoapods-core/specification.rb +8 -2
- data/lib/cocoapods-core/yaml_helper.rb +4 -6
- metadata +15 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac62610d80f5d93b07a3007a58a3e0e395f970a00eefdf90eca991a9b25d516a
|
4
|
+
data.tar.gz: 973935b5f4f56d887830b2087e430e7a2bd7a6c3df3d2d2040619b0597b9d5c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03a20bb85f68e48b818653ccbd76075591c9c68cd28c49fb1e4384df9ce695e7d48e4805d73c445e255f8ec4d88bd7b41cdea72777069f861af866d525bba8fd
|
7
|
+
data.tar.gz: ffbe9bcc9d1a12717ece5df19cdefdbb0f3977d8ffc5906a08cb10c3b728b190355e47885ee8889dda6a3f29ae494fd214daa6d8cba484c295b0f30d2a68fb85
|
@@ -350,7 +350,7 @@ module Pod
|
|
350
350
|
end
|
351
351
|
|
352
352
|
unless @check_existing_files_for_update
|
353
|
-
debug "CDN: #{name} Relative path: #{partial_url} exists! Returning local because checking is only
|
353
|
+
debug "CDN: #{name} Relative path: #{partial_url} exists! Returning local because checking is only performed in repo update"
|
354
354
|
return Promises.fulfilled_future(partial_url, HYDRA_EXECUTOR)
|
355
355
|
end
|
356
356
|
end
|
@@ -109,11 +109,16 @@ module Pod
|
|
109
109
|
# one or more version restrictions).
|
110
110
|
#
|
111
111
|
def requirement
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
112
|
+
@specific_requirement || @requirement
|
113
|
+
end
|
114
|
+
|
115
|
+
# @param [Version] version the specific version to point to
|
116
|
+
#
|
117
|
+
def specific_version=(version)
|
118
|
+
@specific_version = version
|
119
|
+
@specific_requirement = if version
|
120
|
+
Requirement.new(Version.new(version.version))
|
121
|
+
end
|
117
122
|
end
|
118
123
|
|
119
124
|
# @return [Bool] whether the dependency points to a subspec.
|
@@ -196,9 +201,9 @@ module Pod
|
|
196
201
|
def ==(other)
|
197
202
|
self.class == other.class &&
|
198
203
|
name == other.name &&
|
199
|
-
requirement == other.requirement &&
|
200
204
|
external_source == other.external_source &&
|
201
|
-
podspec_repo == other.podspec_repo
|
205
|
+
podspec_repo == other.podspec_repo &&
|
206
|
+
requirement == other.requirement
|
202
207
|
end
|
203
208
|
alias_method :eql?, :==
|
204
209
|
|
@@ -921,9 +921,7 @@ module Pod
|
|
921
921
|
# This hook allows you to make any changes to the Pods after they have
|
922
922
|
# been downloaded but before they are installed.
|
923
923
|
#
|
924
|
-
# It receives the
|
925
|
-
# [`Pod::Installer`](http://rubydoc.info/gems/cocoapods/Pod/Installer/)
|
926
|
-
# as its only argument.
|
924
|
+
# It receives the [Pod::Installer] as its only argument.
|
927
925
|
#
|
928
926
|
# @example Defining a pre-install hook in a Podfile.
|
929
927
|
#
|
@@ -936,15 +934,31 @@ module Pod
|
|
936
934
|
@pre_install_callback = block
|
937
935
|
end
|
938
936
|
|
937
|
+
# This hook allows you to make changes before the project is written
|
938
|
+
# to disk.
|
939
|
+
#
|
940
|
+
# It receives the [Pod::Installer] as its only argument.
|
941
|
+
#
|
942
|
+
# @example Customizing the dependencies before integration
|
943
|
+
#
|
944
|
+
# pre_integrate do |installer|
|
945
|
+
# # perform some changes on dependencies
|
946
|
+
# end
|
947
|
+
#
|
948
|
+
# @return [void]
|
949
|
+
#
|
950
|
+
def pre_integrate(&block)
|
951
|
+
raise Informative, 'Specifying multiple `pre_integrate` hooks is unsupported.' if @pre_integrate_callback
|
952
|
+
@pre_integrate_callback = block
|
953
|
+
end
|
954
|
+
|
939
955
|
# This hook allows you to make any last changes to the generated Xcode
|
940
956
|
# project before it is written to disk, or any other tasks you might want
|
941
957
|
# to perform.
|
942
958
|
#
|
943
|
-
# It receives the
|
944
|
-
# [`Pod::Installer`](http://rubydoc.info/gems/cocoapods/Pod/Installer/)
|
945
|
-
# as its only argument.
|
959
|
+
# It receives the [Pod::Installer] as its only argument.
|
946
960
|
#
|
947
|
-
# @example
|
961
|
+
# @example Customizing the build settings of all targets
|
948
962
|
#
|
949
963
|
# post_install do |installer|
|
950
964
|
# installer.pods_project.targets.each do |target|
|
@@ -964,11 +978,9 @@ module Pod
|
|
964
978
|
# This hook allows you to make changes after the project is written
|
965
979
|
# to disk.
|
966
980
|
#
|
967
|
-
# It receives the
|
968
|
-
# [`Pod::Installer`](http://rubydoc.info/gems/cocoapods/Pod/Installer/)
|
969
|
-
# as its only argument.
|
981
|
+
# It receives the [Pod::Installer] as its only argument.
|
970
982
|
#
|
971
|
-
# @example
|
983
|
+
# @example Customizing the build settings of all targets
|
972
984
|
#
|
973
985
|
# post_integrate do |installer|
|
974
986
|
# # some change after project write to disk
|
@@ -963,7 +963,7 @@ module Pod
|
|
963
963
|
if exclusive?
|
964
964
|
whitelist_hash
|
965
965
|
else
|
966
|
-
parent.send(:configuration_pod_whitelist).merge(whitelist_hash) { |l, r| (l
|
966
|
+
parent.send(:configuration_pod_whitelist).merge(whitelist_hash) { |_, l, r| Array(l).concat(r).uniq }
|
967
967
|
end
|
968
968
|
end
|
969
969
|
|
@@ -166,6 +166,23 @@ module Pod
|
|
166
166
|
end
|
167
167
|
end
|
168
168
|
|
169
|
+
# Calls the pre integrate callback if defined.
|
170
|
+
#
|
171
|
+
# @param [Pod::Installer] installer
|
172
|
+
# the installer that is performing the installation.
|
173
|
+
#
|
174
|
+
# @return [Bool] whether a pre integrate callback was specified and it was
|
175
|
+
# called.
|
176
|
+
#
|
177
|
+
def pre_integrate!(installer)
|
178
|
+
if @pre_integrate_callback
|
179
|
+
@pre_integrate_callback.call(installer)
|
180
|
+
true
|
181
|
+
else
|
182
|
+
false
|
183
|
+
end
|
184
|
+
end
|
185
|
+
|
169
186
|
# Calls the post install callback if defined.
|
170
187
|
#
|
171
188
|
# @param [Pod::Installer] installer
|
@@ -310,9 +327,9 @@ module Pod
|
|
310
327
|
podfile = Podfile.new(path) do
|
311
328
|
# rubocop:disable Lint/RescueException
|
312
329
|
begin
|
313
|
-
# rubocop:disable Eval
|
330
|
+
# rubocop:disable Security/Eval
|
314
331
|
eval(contents, nil, path.to_s)
|
315
|
-
# rubocop:enable Eval
|
332
|
+
# rubocop:enable Security/Eval
|
316
333
|
rescue Exception => e
|
317
334
|
message = "Invalid `#{path.basename}` file: #{e.message}"
|
318
335
|
raise DSLError.new(message, path, e, contents)
|
@@ -15,7 +15,7 @@ module Pod
|
|
15
15
|
#
|
16
16
|
PATTERN = /\A\s*(#{quoted_operators})?\s*(#{Version::VERSION_PATTERN})\s*\z/
|
17
17
|
|
18
|
-
DefaultRequirement = ['>=', Version.new(0)] # rubocop:disable
|
18
|
+
DefaultRequirement = ['>=', Version.new(0)] # rubocop:disable Naming/ConstantName
|
19
19
|
|
20
20
|
#-------------------------------------------------------------------------#
|
21
21
|
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'public_suffix'
|
2
|
+
|
1
3
|
module Pod
|
2
4
|
class Source
|
3
5
|
class Manager
|
@@ -265,6 +267,11 @@ module Pod
|
|
265
267
|
require 'json'
|
266
268
|
begin
|
267
269
|
index = JSON.parse(search_index_path.read)
|
270
|
+
unless index # JSON.parse("null") => nil
|
271
|
+
search_index_path.delete
|
272
|
+
return nil
|
273
|
+
end
|
274
|
+
|
268
275
|
index if index.is_a?(Hash) # TODO: should we also check if hash has correct hierarchy?
|
269
276
|
rescue JSON::ParserError
|
270
277
|
search_index_path.delete
|
@@ -404,12 +411,12 @@ module Pod
|
|
404
411
|
# @example A non-Github.com URL
|
405
412
|
#
|
406
413
|
# name_for_url('https://sourceforge.org/Artsy/Specs.git')
|
407
|
-
# # sourceforge-artsy
|
414
|
+
# # sourceforge-artsy
|
408
415
|
#
|
409
416
|
# @example A file URL
|
410
417
|
#
|
411
418
|
# name_for_url('file:///Artsy/Specs.git')
|
412
|
-
# # artsy
|
419
|
+
# # artsy
|
413
420
|
#
|
414
421
|
# @param [#to_s] url
|
415
422
|
# The URL of the source.
|
@@ -419,33 +426,52 @@ module Pod
|
|
419
426
|
def name_for_url(url)
|
420
427
|
base_from_host_and_path = lambda do |host, path|
|
421
428
|
if host && !host.empty?
|
422
|
-
|
423
|
-
base
|
429
|
+
domain = PublicSuffix.parse(host) rescue nil
|
430
|
+
base = [domain&.sld || host]
|
431
|
+
base = [] if base == %w(github)
|
424
432
|
else
|
425
|
-
base =
|
433
|
+
base = []
|
426
434
|
end
|
427
435
|
|
428
|
-
|
436
|
+
path = path.gsub(/.git$/, '').gsub(%r{^/}, '').split('/')
|
437
|
+
path.pop if path.last == 'specs'
|
438
|
+
|
439
|
+
(base + path).join('-')
|
440
|
+
end
|
441
|
+
|
442
|
+
valid_url = lambda do |url|
|
443
|
+
url =~ URI.regexp && (URI(url) rescue false)
|
429
444
|
end
|
430
445
|
|
431
|
-
|
446
|
+
valid_scp_url = lambda do |url|
|
447
|
+
valid_url['scp://' + url]
|
448
|
+
end
|
449
|
+
|
450
|
+
url = url.to_s.downcase
|
451
|
+
|
452
|
+
case url
|
432
453
|
when %r{https://#{Regexp.quote(trunk_repo_hostname)}}i
|
454
|
+
# Main CDN repo
|
433
455
|
base = Pod::TrunkSource::TRUNK_REPO_NAME
|
434
|
-
when
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
url =
|
456
|
+
when valid_url
|
457
|
+
# HTTPS URL or something similar
|
458
|
+
url = valid_url[url]
|
459
|
+
base = base_from_host_and_path[url.host, url.path]
|
460
|
+
when valid_scp_url
|
461
|
+
# SCP-style URLs for private git repos
|
462
|
+
url = valid_scp_url[url]
|
441
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
|
465
|
+
# Additional SCP-style URLs for private git repos
|
466
|
+
host, _, path = Regexp.last_match.captures
|
467
|
+
base = base_from_host_and_path[host, path]
|
442
468
|
else
|
443
|
-
|
469
|
+
# This is nearly impossible, with all the previous cases
|
470
|
+
raise Informative, "Couldn't determine repo name for URL: #{url}"
|
444
471
|
end
|
445
472
|
|
446
473
|
name = base
|
447
|
-
|
448
|
-
(1..infinity).each do |i|
|
474
|
+
(1..).each do |i|
|
449
475
|
break unless source_dir(name).exist?
|
450
476
|
name = "#{base}-#{i}"
|
451
477
|
end
|
@@ -167,9 +167,11 @@ module Pod
|
|
167
167
|
pod_dir = pod_path(name)
|
168
168
|
return unless pod_dir.exist?
|
169
169
|
@versions_by_name[name] ||= pod_dir.children.map do |v|
|
170
|
+
next nil unless v.directory?
|
170
171
|
basename = v.basename.to_s
|
172
|
+
next unless basename[0, 1] != '.'
|
171
173
|
begin
|
172
|
-
Version.new(basename)
|
174
|
+
Version.new(basename)
|
173
175
|
rescue ArgumentError
|
174
176
|
raise Informative, 'An unexpected version directory ' \
|
175
177
|
"`#{basename}` was encountered for the " \
|
@@ -266,6 +268,11 @@ module Pod
|
|
266
268
|
query = query.root_name
|
267
269
|
end
|
268
270
|
|
271
|
+
if (versions = @versions_by_name[query]) && !versions.empty?
|
272
|
+
set = set(query)
|
273
|
+
return set if set.specification_name == query
|
274
|
+
end
|
275
|
+
|
269
276
|
found = []
|
270
277
|
Pathname.glob(pod_path(query)) do |path|
|
271
278
|
next unless Dir.foreach(path).any? { |child| child != '.' && child != '..' }
|
@@ -168,6 +168,10 @@ module Pod
|
|
168
168
|
#
|
169
169
|
spec_attr_accessor :public_header_files
|
170
170
|
|
171
|
+
# @return [Array<String>] the project headers of the Pod.
|
172
|
+
#
|
173
|
+
spec_attr_accessor :project_header_files
|
174
|
+
|
171
175
|
# @return [Array<String>] the private headers of the Pod.
|
172
176
|
#
|
173
177
|
spec_attr_accessor :private_header_files
|
@@ -182,7 +186,13 @@ module Pod
|
|
182
186
|
#
|
183
187
|
spec_attr_accessor :vendored_libraries
|
184
188
|
|
185
|
-
# @return [Hash{String=>String}]
|
189
|
+
# @return [Hash{String => Array<String>}] hash where the keys are the tags of
|
190
|
+
# the on demand resources and the values are their relative file
|
191
|
+
# patterns.
|
192
|
+
#
|
193
|
+
spec_attr_accessor :on_demand_resources
|
194
|
+
|
195
|
+
# @return [Hash{String=>String}]] hash where the keys are the names of
|
186
196
|
# the resource bundles and the values are their relative file
|
187
197
|
# patterns.
|
188
198
|
#
|
@@ -455,6 +465,32 @@ module Pod
|
|
455
465
|
Specification.convert_keys_to_symbol(value, :recursive => false) if value && value.is_a?(Hash)
|
456
466
|
end
|
457
467
|
|
468
|
+
# Ensures that the file patterns of the on demand resources are contained in
|
469
|
+
# an array.
|
470
|
+
#
|
471
|
+
# @param [String, Array, Hash] value.
|
472
|
+
# The value of the attribute as specified by the user.
|
473
|
+
#
|
474
|
+
# @return [Hash] the on demand resources.
|
475
|
+
#
|
476
|
+
def _prepare_on_demand_resources(value)
|
477
|
+
result = {}
|
478
|
+
if value
|
479
|
+
value.each do |key, patterns|
|
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
|
489
|
+
end
|
490
|
+
end
|
491
|
+
result
|
492
|
+
end
|
493
|
+
|
458
494
|
# Ensures that the file patterns of the resource bundles are contained in
|
459
495
|
# an array.
|
460
496
|
#
|
@@ -1077,7 +1077,7 @@ module Pod
|
|
1077
1077
|
SCRIPT_PHASE_OPTIONAL_KEYS = [:shell_path, :input_files, :output_files, :input_file_lists, :output_file_lists,
|
1078
1078
|
:show_env_vars_in_log, :execution_position, :dependency_file].freeze
|
1079
1079
|
|
1080
|
-
EXECUTION_POSITION_KEYS = [:before_compile, :after_compile, :any].freeze
|
1080
|
+
EXECUTION_POSITION_KEYS = [:before_compile, :after_compile, :before_headers, :after_headers, :any].freeze
|
1081
1081
|
|
1082
1082
|
ALL_SCRIPT_PHASE_KEYS = (SCRIPT_PHASE_REQUIRED_KEYS + SCRIPT_PHASE_OPTIONAL_KEYS).freeze
|
1083
1083
|
|
@@ -1259,6 +1259,32 @@ module Pod
|
|
1259
1259
|
|
1260
1260
|
#------------------#
|
1261
1261
|
|
1262
|
+
# @!method project_header_files=(project_header_files)
|
1263
|
+
#
|
1264
|
+
# A list of file patterns that should be used to mark project headers.
|
1265
|
+
#
|
1266
|
+
# ---
|
1267
|
+
#
|
1268
|
+
# These patterns are matched against the public headers (or all the
|
1269
|
+
# headers if no public headers have been specified) to exclude those
|
1270
|
+
# headers which should not be exposed to the user project and which
|
1271
|
+
# should not be used to generate the documentation. When the library
|
1272
|
+
# is built, these headers will _not_ appear in the build directory.
|
1273
|
+
#
|
1274
|
+
#
|
1275
|
+
# @example
|
1276
|
+
#
|
1277
|
+
# spec.project_header_files = 'Headers/Project/*.h'
|
1278
|
+
#
|
1279
|
+
# @param [String, Array<String>] project_header_files
|
1280
|
+
# the project headers of the Pod.
|
1281
|
+
#
|
1282
|
+
attribute :project_header_files,
|
1283
|
+
:container => Array,
|
1284
|
+
:file_patterns => true
|
1285
|
+
|
1286
|
+
#------------------#
|
1287
|
+
|
1262
1288
|
# @!method private_header_files=(private_header_files)
|
1263
1289
|
#
|
1264
1290
|
# A list of file patterns that should be used to mark private headers.
|
@@ -1271,7 +1297,7 @@ module Pod
|
|
1271
1297
|
# should not be used to generate the documentation. When the library
|
1272
1298
|
# is built, these headers will appear in the build directory.
|
1273
1299
|
#
|
1274
|
-
# Header files that are not listed as neither public nor private will
|
1300
|
+
# Header files that are not listed as neither public nor project or private will
|
1275
1301
|
# be treated as private, but in addition will not appear in the build
|
1276
1302
|
# directory at all.
|
1277
1303
|
#
|
@@ -1335,6 +1361,58 @@ module Pod
|
|
1335
1361
|
|
1336
1362
|
#------------------#
|
1337
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
|
+
|
1368
|
+
# @!method on_demand_resources=(on_demand_resources)
|
1369
|
+
#
|
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
|
+
# }
|
1392
|
+
#
|
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.
|
1407
|
+
#
|
1408
|
+
attribute :on_demand_resources,
|
1409
|
+
:types => [String, Array, Hash],
|
1410
|
+
:container => Hash,
|
1411
|
+
:file_patterns => true,
|
1412
|
+
:singularize => true
|
1413
|
+
|
1414
|
+
#------------------#
|
1415
|
+
|
1338
1416
|
# @!method resource_bundles=(*resource_bundles)
|
1339
1417
|
#
|
1340
1418
|
# This attribute allows to define the name and the file of the resource
|
@@ -1458,6 +1536,12 @@ module Pod
|
|
1458
1536
|
# The module map file that should be used when this pod is integrated as
|
1459
1537
|
# a framework.
|
1460
1538
|
#
|
1539
|
+
# `false` indicates that the default CocoaPods `modulemap` file should not
|
1540
|
+
# be generated.
|
1541
|
+
#
|
1542
|
+
# `true` is the default and indicates that the default CocoaPods
|
1543
|
+
# `modulemap` file should be generated.
|
1544
|
+
#
|
1461
1545
|
# ---
|
1462
1546
|
#
|
1463
1547
|
# By default, CocoaPods creates a module map file based upon the public
|
@@ -1467,11 +1551,17 @@ module Pod
|
|
1467
1551
|
#
|
1468
1552
|
# spec.module_map = 'source/module.modulemap'
|
1469
1553
|
#
|
1470
|
-
# @
|
1471
|
-
#
|
1554
|
+
# @example
|
1555
|
+
#
|
1556
|
+
# spec.module_map = false
|
1557
|
+
#
|
1558
|
+
# @param [String, Bool] module_map
|
1559
|
+
# the path to the module map file that should be used
|
1560
|
+
# or whether to disable module_map generation.
|
1472
1561
|
#
|
1473
1562
|
attribute :module_map,
|
1474
|
-
:
|
1563
|
+
:types => [TrueClass, FalseClass, String],
|
1564
|
+
:root_only => true
|
1475
1565
|
|
1476
1566
|
#-----------------------------------------------------------------------#
|
1477
1567
|
|
@@ -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}).")
|
@@ -102,7 +103,7 @@ module Pod
|
|
102
103
|
# Check empty subspec attributes
|
103
104
|
#
|
104
105
|
def check_if_spec_is_empty
|
105
|
-
methods = %w( source_files resources resource_bundles preserve_paths
|
106
|
+
methods = %w( source_files on_demand_resources resources resource_bundles preserve_paths
|
106
107
|
dependencies vendored_libraries vendored_frameworks )
|
107
108
|
empty_patterns = methods.all? { |m| consumer.send(m).empty? }
|
108
109
|
empty = empty_patterns && consumer.spec.subspecs.empty?
|
@@ -242,9 +242,6 @@ module Pod
|
|
242
242
|
def _validate_version(v)
|
243
243
|
if v.to_s.empty?
|
244
244
|
results.add_error('version', 'A version is required.')
|
245
|
-
elsif v <= Version::ZERO
|
246
|
-
results.add_error('version', 'The version of the spec should be' \
|
247
|
-
' higher than 0.')
|
248
245
|
end
|
249
246
|
end
|
250
247
|
|
@@ -337,19 +334,6 @@ module Pod
|
|
337
334
|
end
|
338
335
|
end
|
339
336
|
|
340
|
-
# Performs validations related to the `vendored_libraries` attribute.
|
341
|
-
#
|
342
|
-
# @param [Array<String>] vendored_libraries the values specified in the `vendored_libraries` attribute
|
343
|
-
#
|
344
|
-
def _validate_vendored_libraries(vendored_libraries)
|
345
|
-
vendored_libraries.each do |lib|
|
346
|
-
lib_name = lib.downcase
|
347
|
-
unless lib_name.end_with?('.a') && lib_name.start_with?('lib')
|
348
|
-
results.add_warning('vendored_libraries', "`#{File.basename(lib)}` does not match the expected static library name format `lib[name].a`")
|
349
|
-
end
|
350
|
-
end
|
351
|
-
end
|
352
|
-
|
353
337
|
# Performs validations related to the `license` attribute.
|
354
338
|
#
|
355
339
|
def _validate_license(l)
|
@@ -450,6 +434,17 @@ module Pod
|
|
450
434
|
end
|
451
435
|
end
|
452
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
|
+
|
453
448
|
# Performs validation related to the `scheme` attribute.
|
454
449
|
#
|
455
450
|
def _validate_scheme(s)
|
@@ -463,6 +463,12 @@ module Pod
|
|
463
463
|
end
|
464
464
|
end
|
465
465
|
|
466
|
+
# @return [Hash] The on demand resources value.
|
467
|
+
#
|
468
|
+
def on_demand_resources
|
469
|
+
attributes_hash['on_demand_resources'] || {}
|
470
|
+
end
|
471
|
+
|
466
472
|
# @return [Hash] The scheme value.
|
467
473
|
#
|
468
474
|
def scheme
|
@@ -824,9 +830,9 @@ module Pod
|
|
824
830
|
#
|
825
831
|
#
|
826
832
|
def self._eval_podspec(string, path)
|
827
|
-
# rubocop:disable Eval
|
833
|
+
# rubocop:disable Security/Eval
|
828
834
|
eval(string, nil, path.to_s)
|
829
|
-
# rubocop:enable Eval
|
835
|
+
# rubocop:enable Security/Eval
|
830
836
|
|
831
837
|
# rubocop:disable Lint/RescueException
|
832
838
|
rescue Exception => e
|
@@ -212,8 +212,6 @@ module Pod
|
|
212
212
|
|
213
213
|
#-----------------------------------------------------------------------#
|
214
214
|
|
215
|
-
private
|
216
|
-
|
217
215
|
# @!group Array Sorting
|
218
216
|
|
219
217
|
# Sorts an array using another one as a sort hint. All the values of the
|
@@ -291,21 +289,21 @@ module Pod
|
|
291
289
|
/0x[0-9a-fA-F]+/, # base 16 int
|
292
290
|
/[-+]?(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][-+]?[0-9]+)?/, # float
|
293
291
|
/[-+]?\.(inf|Inf|INF)/, # infinity
|
294
|
-
/\.(nan|NaN|NAN)
|
292
|
+
/\.(nan|NaN|NAN)/ # NaN
|
295
293
|
)
|
296
294
|
private_constant :RESOLVED_TAGS
|
297
295
|
|
298
296
|
INDICATOR_START_CHARS = %w(- ? : , [ ] { } # & * ! | > ' " % @ `).freeze
|
299
|
-
INDICATOR_START = /\A#{Regexp.union(INDICATOR_START_CHARS)}
|
297
|
+
INDICATOR_START = /\A#{Regexp.union(INDICATOR_START_CHARS)}/.freeze
|
300
298
|
private_constant :INDICATOR_START_CHARS, :INDICATOR_START
|
301
299
|
|
302
|
-
RESOLVED_TAGS_PATTERN = /\A#{Regexp.union(RESOLVED_TAGS)}\z
|
300
|
+
RESOLVED_TAGS_PATTERN = /\A#{Regexp.union(RESOLVED_TAGS)}\z/.freeze
|
303
301
|
private_constant :RESOLVED_TAGS_PATTERN
|
304
302
|
|
305
303
|
VALID_PLAIN_SCALAR_STRING = %r{\A
|
306
304
|
[\w&&[^#{INDICATOR_START_CHARS}]] # valid first character
|
307
305
|
[\w/\ \(\)~<>=\.:`,-]* # all characters allowed after the first one
|
308
|
-
\z}ox
|
306
|
+
\z}ox.freeze
|
309
307
|
private_constant :VALID_PLAIN_SCALAR_STRING
|
310
308
|
|
311
309
|
def process_string(string)
|
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.
|
4
|
+
version: 1.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eloy Duran
|
@@ -9,28 +9,28 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-
|
12
|
+
date: 2021-09-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - "
|
18
|
+
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '5.0'
|
21
21
|
- - "<"
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: '
|
23
|
+
version: '7'
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
27
27
|
requirements:
|
28
|
-
- - "
|
28
|
+
- - ">="
|
29
29
|
- !ruby/object:Gem::Version
|
30
30
|
version: '5.0'
|
31
31
|
- - "<"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '7'
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: nap
|
36
36
|
requirement: !ruby/object:Gem::Requirement
|
@@ -121,28 +121,28 @@ dependencies:
|
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: '2.
|
124
|
+
version: '2.8'
|
125
125
|
type: :runtime
|
126
126
|
prerelease: false
|
127
127
|
version_requirements: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: '2.
|
131
|
+
version: '2.8'
|
132
132
|
- !ruby/object:Gem::Dependency
|
133
133
|
name: public_suffix
|
134
134
|
requirement: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- - "
|
136
|
+
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: '0'
|
138
|
+
version: '4.0'
|
139
139
|
type: :runtime
|
140
140
|
prerelease: false
|
141
141
|
version_requirements: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
|
-
- - "
|
143
|
+
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: '0'
|
145
|
+
version: '4.0'
|
146
146
|
- !ruby/object:Gem::Dependency
|
147
147
|
name: bacon
|
148
148
|
requirement: !ruby/object:Gem::Requirement
|
@@ -224,15 +224,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
224
224
|
requirements:
|
225
225
|
- - ">="
|
226
226
|
- !ruby/object:Gem::Version
|
227
|
-
version: 2.
|
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
232
|
version: '0'
|
233
233
|
requirements: []
|
234
|
-
rubygems_version: 3.0.
|
234
|
+
rubygems_version: 3.0.9
|
235
235
|
signing_key:
|
236
|
-
specification_version:
|
236
|
+
specification_version: 4
|
237
237
|
summary: The models of CocoaPods
|
238
238
|
test_files: []
|