cocoapods-core 1.11.3 → 1.12.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: 60f2597476e8ac8b2ce1052e59eab620d75c953b9a673eb525f2a9fa99d8a263
4
- data.tar.gz: 624b7dd45014942d9f754a576b9fcb447e757b1fb4893035a955b17346e1667c
3
+ metadata.gz: 824c7944892cc517687d058e3c9719a6b8290438b99ca19643588e13fe7595a5
4
+ data.tar.gz: 17180f2d30e429c2d78ed8b838e17177f555713d2f5383623d0f40006c1b68e6
5
5
  SHA512:
6
- metadata.gz: dc5195c1d5a4ba9c01fcc9e6e1f3cba21ac58be9fd764c03f5bd4eb239e9d733dff724f911d24b138095e199aa7c01d49799dc33e618af772ae164034c8fafeb
7
- data.tar.gz: 6642a80ab34ea1d147deb6b605e85147ce9bb906ee1b63fd611afd077678b62b63c552c4356df9e82f93cd535d751336d3c709d5bf0132d9c544add39d8c42fc
6
+ metadata.gz: 9cb1eed9a33ea1c0a5d4ab14840dc4eb01c69a8f3436617f80f66e4f3732c6d6d900ce67910f074fd8eac9c830c0ed06b96287e08275c6751ca631c17becdd20
7
+ data.tar.gz: a43df310810994735968f89f129276cc6a914069f7c51c5810ccb93f9b264093926f64fd5a2d2fff92dc46a5cec1cfb68813aae377fa21484f2fa79bdfd4d946
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # CocoaPods Core
2
2
 
3
- [![Build Status](https://img.shields.io/travis/CocoaPods/Core/master.svg?style=flat)](https://travis-ci.org/CocoaPods/Core)
3
+ [![Build Status](https://github.com/CocoaPods/Core/workflows/Specs/badge.svg)](https://github.com/CocoaPods/Core/actions/workflows/Specs.yml)
4
4
  [![Test Coverage](https://api.codeclimate.com/v1/badges/91a2d70b9ed977815c66/test_coverage)](https://codeclimate.com/github/CocoaPods/Core/test_coverage)
5
5
  [![Maintainability](https://api.codeclimate.com/v1/badges/91a2d70b9ed977815c66/maintainability)](https://codeclimate.com/github/CocoaPods/Core/maintainability)
6
6
 
@@ -25,7 +25,7 @@ files.
25
25
  $ [sudo] gem install cocoapods-core
26
26
  ```
27
27
 
28
- The `cocoapods-core` gem requires Ruby 2.0.0 or later.
28
+ The `cocoapods-core` gem requires Ruby 2.6.0 or later.
29
29
 
30
30
  ## Collaborate
31
31
 
@@ -222,7 +222,7 @@ module Pod
222
222
  # @param [String] query
223
223
  # the search term. Can be a regular expression.
224
224
  #
225
- # @param [Bool] full_text_search
225
+ # @param [Boolean] full_text_search
226
226
  # performed using Algolia
227
227
  #
228
228
  # @note full text search requires to load the specification for each pod,
@@ -246,7 +246,7 @@ module Pod
246
246
  # Check update dates for all existing files.
247
247
  # Does not download non-existing specs, since CDN-backed repo is updated live.
248
248
  #
249
- # @param [Bool] show_output
249
+ # @param [Boolean] show_output
250
250
  #
251
251
  # @return [Array<String>] Always returns empty array, as it cannot know
252
252
  # everything that actually changed.
@@ -99,11 +99,13 @@ module Pod
99
99
  end
100
100
  @name = name
101
101
  @requirement = Requirement.create(requirements)
102
+ @specific_requirement ||= nil
103
+ @external_source ||= nil
102
104
  end
103
105
 
104
106
  # @return [Version] whether the dependency points to a specific version.
105
107
  #
106
- attr_accessor :specific_version
108
+ attr_reader :specific_version
107
109
 
108
110
  # @return [Requirement] the requirement of this dependency (a set of
109
111
  # one or more version restrictions).
@@ -121,19 +123,19 @@ module Pod
121
123
  end
122
124
  end
123
125
 
124
- # @return [Bool] whether the dependency points to a subspec.
126
+ # @return [Boolean] whether the dependency points to a subspec.
125
127
  #
126
128
  def subspec_dependency?
127
129
  @name.include?('/')
128
130
  end
129
131
 
130
- # @return [Bool] whether the dependency points to an external source.
132
+ # @return [Boolean] whether the dependency points to an external source.
131
133
  #
132
134
  def external?
133
135
  !@external_source.nil?
134
136
  end
135
137
 
136
- # @return [Bool] whether the dependency points to a local path.
138
+ # @return [Boolean] whether the dependency points to a local path.
137
139
  #
138
140
  def local?
139
141
  if external_source
@@ -183,7 +185,7 @@ module Pod
183
185
  # @note This is used by the Lockfile to check if a stored dependency is
184
186
  # still compatible with the Podfile.
185
187
  #
186
- # @return [Bool] whether the dependency is compatible with the given one.
188
+ # @return [Boolean] whether the dependency is compatible with the given one.
187
189
  #
188
190
  def compatible?(other)
189
191
  return false unless name == other.name
@@ -194,7 +196,7 @@ module Pod
194
196
  end
195
197
  end
196
198
 
197
- # @return [Bool] whether the dependency is equal to another taking into
199
+ # @return [Boolean] whether the dependency is equal to another taking into
198
200
  # account the loaded specification, the head options and the
199
201
  # external source.
200
202
  #
@@ -275,7 +277,7 @@ module Pod
275
277
 
276
278
  # Whether the dependency has any pre-release requirements
277
279
  #
278
- # @return [Bool] Whether the dependency has any pre-release requirements
280
+ # @return [Boolean] Whether the dependency has any pre-release requirements
279
281
  #
280
282
  def prerelease?
281
283
  return @prerelease if defined?(@prerelease)
@@ -291,7 +293,7 @@ module Pod
291
293
  # @param [String, Version] version
292
294
  # The proposed version.
293
295
  #
294
- # @return [Bool] Whether the dependency is satisfied.
296
+ # @return [Boolean] Whether the dependency is satisfied.
295
297
  #
296
298
  def match?(name, version)
297
299
  return false unless self.name == name
@@ -1,5 +1,5 @@
1
1
  module Pod
2
2
  # The version of the cocoapods-core.
3
3
  #
4
- CORE_VERSION = '1.11.3'.freeze unless defined? Pod::CORE_VERSION
4
+ CORE_VERSION = '1.12.0'.freeze unless defined? Pod::CORE_VERSION
5
5
  end
@@ -85,7 +85,7 @@ module Pod
85
85
  # @param [String] commit
86
86
  # The current HEAD commit.
87
87
  #
88
- # @return [Bool] Whether the repository has been updated since the commit.
88
+ # @return [Boolean] Whether the repository has been updated since the commit.
89
89
  #
90
90
  def self.modified_since_commit(url, commit)
91
91
  return true unless repo_id = normalized_repo_id(url)
@@ -50,7 +50,7 @@ module Pod
50
50
  #
51
51
  attr_accessor :defined_in_file
52
52
 
53
- # @return [Bool] Whether the Podfiles are equal.
53
+ # @return [Boolean] Whether the Podfiles are equal.
54
54
  #
55
55
  def ==(other)
56
56
  other && to_hash == other.to_hash
@@ -140,7 +140,7 @@ module Pod
140
140
  # one if they have the same name and the other platform has a minor or
141
141
  # equal deployment target.
142
142
  #
143
- # @return [Bool] whether the platform supports another platform.
143
+ # @return [Boolean] whether the platform supports another platform.
144
144
  #
145
145
  def supports?(other)
146
146
  other = Platform.new(other)
@@ -191,7 +191,7 @@ module Pod
191
191
  end
192
192
  end
193
193
 
194
- # @return [Bool] whether the platform requires legacy architectures for
194
+ # @return [Boolean] whether the platform requires legacy architectures for
195
195
  # iOS.
196
196
  #
197
197
  def requires_legacy_ios_archs?
@@ -202,7 +202,7 @@ module Pod
202
202
  end
203
203
  end
204
204
 
205
- # @return [Bool] whether the platform supports dynamic frameworks.
205
+ # @return [Boolean] whether the platform supports dynamic frameworks.
206
206
  #
207
207
  def supports_dynamic_frameworks?
208
208
  if name == :ios
@@ -195,7 +195,7 @@ module Pod
195
195
  # they are specified for a dependency match. This behaviour can be altered
196
196
  # for a specific dependency by specifying the source with the dependency:
197
197
  #
198
- # pod 'PonyDebugger', :source => 'https://github.com/CocoaPods/Specs.git'
198
+ # pod 'PonyDebugger', :source => 'https://cdn.cocoapods.org/'
199
199
  #
200
200
  # In this case only the specified source will be searched for the dependency
201
201
  # and any global sources ignored.
@@ -870,7 +870,7 @@ module Pod
870
870
  # @example Specifying to first use the Artsy repository and then the CocoaPods Master Repository
871
871
  #
872
872
  # source 'https://github.com/artsy/Specs.git'
873
- # source 'https://github.com/CocoaPods/Specs.git'
873
+ # source 'https://cdn.cocoapods.org/'
874
874
  #
875
875
  # @return [void]
876
876
  #
@@ -41,7 +41,7 @@ module Pod
41
41
  (children + children.map(&:recursive_children)).flatten
42
42
  end
43
43
 
44
- # @return [Bool] Whether the target definition is root.
44
+ # @return [Boolean] Whether the target definition is root.
45
45
  #
46
46
  def root?
47
47
  parent.is_a?(Podfile) || parent.nil?
@@ -96,7 +96,7 @@ module Pod
96
96
  pod_dependencies.concat(podspec_dependencies)
97
97
  end
98
98
 
99
- # @return [Bool] Whether the target definition has at least one
99
+ # @return [Boolean] Whether the target definition has at least one
100
100
  # dependency, excluding inherited ones.
101
101
  #
102
102
  def empty?
@@ -211,7 +211,7 @@ module Pod
211
211
  # @note A target is always `exclusive` if the `platform` does
212
212
  # not match the parent's `platform`.
213
213
  #
214
- # @return [Bool] whether is exclusive.
214
+ # @return [Boolean] whether is exclusive.
215
215
  #
216
216
  def exclusive?
217
217
  if root?
@@ -310,7 +310,7 @@ module Pod
310
310
 
311
311
  #--------------------------------------#
312
312
  #
313
- # @return [Bool] whether the target definition should inhibit warnings
313
+ # @return [Boolean] whether the target definition should inhibit warnings
314
314
  # for a single pod. If inhibit_all_warnings is true, it will
315
315
  # return true for any asked pod.
316
316
  #
@@ -329,7 +329,7 @@ module Pod
329
329
  # Sets whether the target definition should inhibit the warnings during
330
330
  # compilation for all pods.
331
331
  #
332
- # @param [Bool] flag
332
+ # @param [Boolean] flag
333
333
  # Whether the warnings should be suppressed.
334
334
  #
335
335
  # @return [void]
@@ -343,7 +343,7 @@ module Pod
343
343
  # @param [String] pod_name
344
344
  # Name of the pod for which the warnings will be inhibited or not.
345
345
  #
346
- # @param [Bool] should_inhibit
346
+ # @param [Boolean] should_inhibit
347
347
  # Whether the warnings should be inhibited or not for given pod.
348
348
  #
349
349
  # @return [void]
@@ -406,7 +406,7 @@ module Pod
406
406
  set_hash_value('uses_frameworks', value.to_hash)
407
407
  end
408
408
 
409
- # @return [Bool] whether the target definition pods should be built as frameworks.
409
+ # @return [Boolean] whether the target definition pods should be built as frameworks.
410
410
  #
411
411
  def uses_frameworks?
412
412
  if internal_hash['uses_frameworks'].nil?
@@ -474,7 +474,7 @@ module Pod
474
474
  # @note Build configurations are case compared case-insensitively in
475
475
  # CocoaPods.
476
476
  #
477
- # @return [Bool] flag
477
+ # @return [Boolean] flag
478
478
  # Whether the pod should be linked with the target
479
479
  #
480
480
  def pod_whitelisted_for_configuration?(pod_name, configuration_name)
@@ -557,7 +557,7 @@ module Pod
557
557
  end
558
558
  end
559
559
 
560
- # @return [Bool] whether the target definition should use modular headers
560
+ # @return [Boolean] whether the target definition should use modular headers
561
561
  # for a single pod. If use_modular_headers! is true, it will
562
562
  # return true for any asked pod.
563
563
  #
@@ -575,7 +575,7 @@ module Pod
575
575
 
576
576
  # Sets whether the target definition should use modular headers for all pods.
577
577
  #
578
- # @param [Bool] flag
578
+ # @param [Boolean] flag
579
579
  # Whether the warnings should be suppressed.
580
580
  #
581
581
  # @return [void]
@@ -589,7 +589,7 @@ module Pod
589
589
  # @param [String] pod_name
590
590
  # Name of the pod for which modular headers will be used.
591
591
  #
592
- # @param [Bool] flag
592
+ # @param [Boolean] flag
593
593
  # Whether modular headers should be used.
594
594
  #
595
595
  # @return [void]
@@ -121,14 +121,14 @@ module Pod
121
121
  end
122
122
  end
123
123
 
124
- # @return [Bool] whether the podfile should generate a BridgeSupport
124
+ # @return [Boolean] whether the podfile should generate a BridgeSupport
125
125
  # metadata document.
126
126
  #
127
127
  def generate_bridge_support?
128
128
  get_hash_value('generate_bridge_support')
129
129
  end
130
130
 
131
- # @return [Bool] whether the -fobjc-arc flag should be added to the
131
+ # @return [Boolean] whether the -fobjc-arc flag should be added to the
132
132
  # OTHER_LD_FLAGS.
133
133
  #
134
134
  def set_arc_compatibility_flag?
@@ -154,7 +154,7 @@ module Pod
154
154
  # @param [Pod::Installer] installer
155
155
  # the installer that is performing the installation.
156
156
  #
157
- # @return [Bool] whether a pre install callback was specified and it was
157
+ # @return [Boolean] whether a pre install callback was specified and it was
158
158
  # called.
159
159
  #
160
160
  def pre_install!(installer)
@@ -171,7 +171,7 @@ module Pod
171
171
  # @param [Pod::Installer] installer
172
172
  # the installer that is performing the installation.
173
173
  #
174
- # @return [Bool] whether a pre integrate callback was specified and it was
174
+ # @return [Boolean] whether a pre integrate callback was specified and it was
175
175
  # called.
176
176
  #
177
177
  def pre_integrate!(installer)
@@ -188,7 +188,7 @@ module Pod
188
188
  # @param [Pod::Installer] installer
189
189
  # the installer that is performing the installation.
190
190
  #
191
- # @return [Bool] whether a post install callback was specified and it was
191
+ # @return [Boolean] whether a post install callback was specified and it was
192
192
  # called.
193
193
  #
194
194
  def post_install!(installer)
@@ -205,7 +205,7 @@ module Pod
205
205
  # @param [Pod::Installer] installer
206
206
  # the installer that is performing the installation.
207
207
  #
208
- # @return [Bool] whether a post install callback was specified and it was
208
+ # @return [Boolean] whether a post install callback was specified and it was
209
209
  # called.
210
210
  #
211
211
  def post_integrate!(installer)
@@ -90,7 +90,7 @@ module Pod
90
90
  end
91
91
 
92
92
  #
93
- # @return [Bool] true if this pod has no requirements.
93
+ # @return [Boolean] true if this pod has no requirements.
94
94
  #
95
95
  def none?
96
96
  if @requirements.size == 1
@@ -81,7 +81,7 @@ module Pod
81
81
  source_dir(Pod::TrunkSource::TRUNK_REPO_NAME)
82
82
  end
83
83
 
84
- # @return [Bool] Checks if the master repo is usable.
84
+ # @return [Boolean] Checks if the master repo is usable.
85
85
  #
86
86
  # @note Note this is used to automatically setup the master repo if
87
87
  # needed.
@@ -108,7 +108,7 @@ module Pod
108
108
  # @param [String] query
109
109
  # The search term.
110
110
  #
111
- # @param [Bool] full_text_search
111
+ # @param [Boolean] full_text_search
112
112
  # Whether the search should be limited to the name of the Pod or
113
113
  # should include also the author, the summary, and the
114
114
  # description.
@@ -64,7 +64,7 @@ module Pod
64
64
  # @param [Pathname] dir
65
65
  # The directory where the source is stored.
66
66
  #
67
- # @return [Bool] whether the source is compatible.
67
+ # @return [Boolean] whether the source is compatible.
68
68
  #
69
69
  def compatible?(version)
70
70
  bin_version = Gem::Version.new(version)
@@ -290,7 +290,7 @@ module Pod
290
290
  # @param [String] query
291
291
  # the search term. Can be a regular expression.
292
292
  #
293
- # @param [Bool] full_text_search
293
+ # @param [Boolean] full_text_search
294
294
  # whether the search should be limited to the name of the Pod or
295
295
  # should include also the author, the summary, and the description.
296
296
  #
@@ -343,7 +343,7 @@ module Pod
343
343
 
344
344
  # Updates the local clone of the source repo.
345
345
  #
346
- # @param [Bool] show_output
346
+ # @param [Boolean] show_output
347
347
  #
348
348
  # @return [Array<String>] changed_spec_paths
349
349
  # Returns the list of changed spec paths.
@@ -68,7 +68,7 @@ module Pod
68
68
  #
69
69
  spec_attr_accessor :name
70
70
 
71
- # @return [Bool] Whether the source files of the specification require to
71
+ # @return [Boolean] Whether the source files of the specification require to
72
72
  # be compiled with ARC.
73
73
  #
74
74
  spec_attr_accessor :requires_arc
@@ -143,7 +143,7 @@ module Pod
143
143
 
144
144
  # @!group Test Support
145
145
 
146
- # @return [Bool] Whether this test specification requires an app host.
146
+ # @return [Boolean] Whether this test specification requires an app host.
147
147
  #
148
148
  spec_attr_accessor :requires_app_host
149
149
  alias_method :requires_app_host?, :requires_app_host
@@ -115,42 +115,42 @@ module Pod
115
115
  #
116
116
  attr_reader :osx_default
117
117
 
118
- # @return [Bool] whether the specification should be considered invalid
118
+ # @return [Boolean] whether the specification should be considered invalid
119
119
  # if a value for the attribute is not specified.
120
120
  #
121
121
  def required?
122
122
  @required
123
123
  end
124
124
 
125
- # @return [Bool] whether the attribute should be specified only on the
125
+ # @return [Boolean] whether the attribute should be specified only on the
126
126
  # root specification.
127
127
  #
128
128
  def root_only?
129
129
  @root_only
130
130
  end
131
131
 
132
- # @return [Bool] whether the attribute should be specified only on
132
+ # @return [Boolean] whether the attribute should be specified only on
133
133
  # test specifications.
134
134
  #
135
135
  def test_only?
136
136
  @spec_types == [:test]
137
137
  end
138
138
 
139
- # @return [Bool] whether the attribute is multi-platform and should
139
+ # @return [Boolean] whether the attribute is multi-platform and should
140
140
  # work in conjunction with #{PlatformProxy}.
141
141
  #
142
142
  def multi_platform?
143
143
  @multi_platform
144
144
  end
145
145
 
146
- # @return [Bool] whether there should be a singular alias for the
146
+ # @return [Boolean] whether there should be a singular alias for the
147
147
  # attribute writer.
148
148
  #
149
149
  def singularize?
150
150
  @singularize
151
151
  end
152
152
 
153
- # @return [Bool] whether the attribute describes file patterns.
153
+ # @return [Boolean] whether the attribute describes file patterns.
154
154
  #
155
155
  # @note This is mostly used by the linter.
156
156
  #
@@ -158,7 +158,7 @@ module Pod
158
158
  @file_patterns
159
159
  end
160
160
 
161
- # @return [Bool] defines whether the attribute reader should join the
161
+ # @return [Boolean] defines whether the attribute reader should join the
162
162
  # values with the parent.
163
163
  #
164
164
  # @note Attributes stored in wrappers are always inherited.
@@ -374,7 +374,7 @@ module Pod
374
374
  # @param [Hash] git
375
375
  # @option git [String] :git git source URI
376
376
  # @option git [String] :tag version tag
377
- # @option git [Bool] :submodules Whether to checkout submodules
377
+ # @option git [Boolean] :submodules Whether to checkout submodules
378
378
  # @option git [String] :branch branch name
379
379
  # @option git [String] :commit commit hash
380
380
  #
@@ -530,7 +530,7 @@ module Pod
530
530
  #
531
531
  # spec.static_framework = true
532
532
  #
533
- # @param [Bool] flag
533
+ # @param [Boolean] flag
534
534
  # Indicates, that if use_frameworks! is specified, the
535
535
  # pod should include a static library framework.
536
536
  #
@@ -548,7 +548,7 @@ module Pod
548
548
  #
549
549
  # spec.deprecated = true
550
550
  #
551
- # @param [Bool] flag
551
+ # @param [Boolean] flag
552
552
  # whether the library has been deprecated.
553
553
  #
554
554
  root_attribute :deprecated,
@@ -1677,7 +1677,7 @@ module Pod
1677
1677
  #
1678
1678
  # test_spec.requires_app_host = true
1679
1679
  #
1680
- # @param [Bool] flag
1680
+ # @param [Boolean] flag
1681
1681
  # whether a test specification requires an app host to run tests.
1682
1682
  #
1683
1683
  attribute :requires_app_host,
@@ -1718,7 +1718,7 @@ module Pod
1718
1718
  :types => [String],
1719
1719
  :spec_types => [:test]
1720
1720
 
1721
- SCHEME_KEYS = [:launch_arguments, :environment_variables, :code_coverage].freeze
1721
+ SCHEME_KEYS = [:launch_arguments, :environment_variables, :code_coverage, :parallelizable, :build_configurations].freeze
1722
1722
 
1723
1723
  # @!method scheme=(flag)
1724
1724
  #
@@ -56,10 +56,17 @@ module Pod
56
56
  #
57
57
  # @return [Specification] the specification
58
58
  #
59
- def self.from_json(json)
59
+ def self.from_json(json, path="")
60
60
  require 'json'
61
- hash = JSON.parse(json)
62
- from_hash(hash)
61
+ begin
62
+ hash = JSON.parse(json)
63
+ from_hash(hash)
64
+ rescue JSON::ParserError => e
65
+ if path != ""
66
+ raise e.class, "Failed to parse JSON at file: '#{path}'.\n\n#{e.message}"
67
+ else raise
68
+ end
69
+ end
63
70
  end
64
71
 
65
72
  # Configures a new specification from the given hash.
@@ -41,7 +41,7 @@ module Pod
41
41
  # Lints the specification adding a {Result} for any failed check to the
42
42
  # {#results} object.
43
43
  #
44
- # @return [Bool] whether the specification passed validation.
44
+ # @return [Boolean] whether the specification passed validation.
45
45
  #
46
46
  def lint
47
47
  @results = Results.new
@@ -462,6 +462,12 @@ module Pod
462
462
  if s.key?(:code_coverage) && ![true, false].include?(s[:code_coverage])
463
463
  results.add_error('scheme', 'Expected a boolean for key `code_coverage`.')
464
464
  end
465
+ if s.key?(:parallelizable) && ![true, false].include?(s[:parallelizable])
466
+ results.add_error('scheme', 'Expected a boolean for key `parallelizable`.')
467
+ end
468
+ if s.key?(:build_configurations) && !s[:build_configurations].is_a?(Hash)
469
+ results.add_error('scheme', 'Expected a hash for key `build_configurations`.')
470
+ end
465
471
  end
466
472
  end
467
473
 
@@ -185,14 +185,14 @@ module Pod
185
185
  command.strip_heredoc.chomp if command
186
186
  end
187
187
 
188
- # @return [Bool] Indicates, that if use_frameworks! is specified, the
188
+ # @return [Boolean] Indicates, that if use_frameworks! is specified, the
189
189
  # framework should include a static library.
190
190
  #
191
191
  def static_framework
192
192
  attributes_hash['static_framework']
193
193
  end
194
194
 
195
- # @return [Bool] Whether the Pod has been deprecated.
195
+ # @return [Boolean] Whether the Pod has been deprecated.
196
196
  #
197
197
  def deprecated
198
198
  attributes_hash['deprecated']
@@ -205,7 +205,7 @@ module Pod
205
205
  attributes_hash['deprecated_in_favor_of']
206
206
  end
207
207
 
208
- # @return [Bool] Wether the pod is deprecated either in favor of some other
208
+ # @return [Boolean] Wether the pod is deprecated either in favor of some other
209
209
  # pod or simply deprecated.
210
210
  #
211
211
  def deprecated?
@@ -34,10 +34,10 @@ module Pod
34
34
  # @param [String] name
35
35
  # the name of the specification.
36
36
  #
37
- # @param [Bool] test_specification
37
+ # @param [Boolean] test_specification
38
38
  # Whether the specification is a test specification
39
39
  #
40
- # @param [Bool] app_specification
40
+ # @param [Boolean] app_specification
41
41
  # Whether the specification is an app specification
42
42
  #
43
43
  def initialize(parent = nil, name = nil, test_specification = false, app_specification: false)
@@ -74,12 +74,12 @@ module Pod
74
74
  #
75
75
  attr_accessor :subspecs
76
76
 
77
- # @return [Bool] If this specification is a test specification.
77
+ # @return [Boolean] If this specification is a test specification.
78
78
  #
79
79
  attr_accessor :test_specification
80
80
  alias_method :test_specification?, :test_specification
81
81
 
82
- # @return [Bool] If this specification is an app specification.
82
+ # @return [Boolean] If this specification is an app specification.
83
83
  #
84
84
  attr_accessor :app_specification
85
85
  alias_method :app_specification?, :app_specification
@@ -94,7 +94,7 @@ module Pod
94
94
  # go. This is used by the installer to group specifications by root
95
95
  # spec.
96
96
  #
97
- # @return [Bool] Whether the specifications are equal.
97
+ # @return [Boolean] Whether the specifications are equal.
98
98
  #
99
99
  def ==(other)
100
100
  other.is_a?(self.class) &&
@@ -173,7 +173,11 @@ module Pod
173
173
  # @return [String] the root name
174
174
  #
175
175
  def self.root_name(full_name)
176
- full_name.split('/', 2).first
176
+ if index = full_name.index('/')
177
+ full_name.slice(0, index)
178
+ else
179
+ full_name
180
+ end
177
181
  end
178
182
 
179
183
  # Returns the module name of a specification
@@ -223,13 +227,13 @@ module Pod
223
227
  parent ? parent.root : self
224
228
  end
225
229
 
226
- # @return [Bool] whether the specification is root.
230
+ # @return [Boolean] whether the specification is root.
227
231
  #
228
232
  def root?
229
233
  parent.nil?
230
234
  end
231
235
 
232
- # @return [Bool] whether the specification is a subspec.
236
+ # @return [Boolean] whether the specification is a subspec.
233
237
  #
234
238
  def subspec?
235
239
  !parent.nil?
@@ -252,7 +256,7 @@ module Pod
252
256
 
253
257
  # @!group Dependencies & Subspecs
254
258
 
255
- # @return [Bool] If this specification is a library specification.
259
+ # @return [Boolean] If this specification is a library specification.
256
260
  #
257
261
  # @note a library specification is a specification that is not of type app or test.
258
262
  #
@@ -260,7 +264,7 @@ module Pod
260
264
  !app_specification? && !test_specification?
261
265
  end
262
266
 
263
- # @return [Bool] If this specification is not a library specification.
267
+ # @return [Boolean] If this specification is not a library specification.
264
268
  #
265
269
  # @note see #library_specification?
266
270
  #
@@ -419,7 +423,7 @@ module Pod
419
423
  # @param [Symbol, String] configuration
420
424
  # the configuration to check against.
421
425
  #
422
- # @return [Bool] whether the dependency is whitelisted or not.
426
+ # @return [Boolean] whether the dependency is whitelisted or not.
423
427
  #
424
428
  def dependency_whitelisted_for_configuration?(dependency, configuration)
425
429
  inherited = -> { root? ? true : parent.dependency_whitelisted_for_configuration?(dependency, configuration) }
@@ -488,7 +492,7 @@ module Pod
488
492
 
489
493
  # @!group DSL helpers
490
494
 
491
- # @return [Bool] whether the specification should use a directory as its
495
+ # @return [Boolean] whether the specification should use a directory as its
492
496
  # source.
493
497
  #
494
498
  def local?
@@ -496,7 +500,7 @@ module Pod
496
500
  false
497
501
  end
498
502
 
499
- # @return [Bool] whether the specification is supported in the given
503
+ # @return [Boolean] whether the specification is supported in the given
500
504
  # platform.
501
505
  #
502
506
  # @overload supported_on_platform?(platform)
@@ -745,7 +749,7 @@ module Pod
745
749
  end
746
750
  end
747
751
  when '.json'
748
- spec = Specification.from_json(spec_contents)
752
+ spec = Specification.from_json(spec_contents, path)
749
753
  else
750
754
  raise Informative, "Unsupported specification format `#{path.extname}` for spec at `#{path}`."
751
755
  end
@@ -73,7 +73,7 @@ module Pod
73
73
  @prerelease = comparable_version =~ /[a-zA-Z\-]/
74
74
  end
75
75
 
76
- # @return [Bool] Whether a string representation is correct.
76
+ # @return [Boolean] Whether a string representation is correct.
77
77
  #
78
78
  def self.correct?(version)
79
79
  version.to_s =~ ANCHORED_VERSION_PATTERN
@@ -86,7 +86,7 @@ module Pod
86
86
  SEMVER_PATTERN = "[0-9]+(\\.[0-9]+(\\.[0-9]+(-[0-9A-Za-z\\-\\.]+)?#{METADATA_PATTERN}?)?)?"
87
87
  ANCHORED_SEMANTIC_VERSION_PATTERN = /\A\s*(#{SEMVER_PATTERN})*\s*\z/
88
88
 
89
- # @return [Bool] Whether the version conforms to the Semantic Versioning
89
+ # @return [Boolean] Whether the version conforms to the Semantic Versioning
90
90
  # specification (2.0.0-rc.1).
91
91
  #
92
92
  # @note This comparison is lenient.
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.3
4
+ version: 1.12.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-11 00:00:00.000000000 Z
12
+ date: 2023-02-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -20,7 +20,7 @@ dependencies:
20
20
  version: '5.0'
21
21
  - - "<"
22
22
  - !ruby/object:Gem::Version
23
- version: '7'
23
+ version: '8'
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
@@ -30,7 +30,7 @@ dependencies:
30
30
  version: '5.0'
31
31
  - - "<"
32
32
  - !ruby/object:Gem::Version
33
- version: '7'
33
+ version: '8'
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: nap
36
36
  requirement: !ruby/object:Gem::Requirement