cocoapods-core 1.9.2 → 1.10.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: f68fc2e407a14367abefcd49fe9934a04850fd070ca09e077ff0abe19f7a8bde
4
- data.tar.gz: 6c56ef6c407fa08ac831a64afc0a5a90026189994c0d87651a229070214084e1
3
+ metadata.gz: 7bca0f05c15f31af775ca0324d264d2be2a14beb979212d60b67afa84de4f892
4
+ data.tar.gz: 43036fb73106921d9662e905508e0619a19326ed246db592e59d8ad2fffb80b8
5
5
  SHA512:
6
- metadata.gz: cac009698a41a046bfcf617a8cfcee94dec8c800bdffb29d8854261975eaa9f58fb5b3b7a5d0a963f48baf01cee094f68813192de2c26ad1a666d6401e331c3a
7
- data.tar.gz: e2366a733ec586de15e7eb4c978a1e08012ac5c2d1e917c4f7e6cd46d2d1ee7e13499d69a092d2338a84ffe9a7da9fc5d591cca62f96ac67b8b1d8fc65cd8b2d
6
+ metadata.gz: 3cb469adf2b11f27dc95edbb9fb7188c79e07c2c66406a8f8d34ae4030ed548e8222789e9c466473be2eeac02eb213d108fbeafa96809884d19532a587087c06
7
+ data.tar.gz: '0700791e6fbd5d8ee674bc6e82797eea88e32bc830cd6231ca540199978bf8e395684b981dce4d5f421dd91f113c5018ea4001f9b66de0829e6becdc38102b19'
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # CocoaPods Core
2
2
 
3
3
  [![Build Status](https://img.shields.io/travis/CocoaPods/Core/master.svg?style=flat)](https://travis-ci.org/CocoaPods/Core)
4
- [![Coverage](https://img.shields.io/codeclimate/coverage/github/CocoaPods/Core.svg?style=flat)](https://codeclimate.com/github/CocoaPods/Core)
5
- [![Code Climate](https://img.shields.io/codeclimate/github/CocoaPods/Core.svg?style=flat)](https://codeclimate.com/github/CocoaPods/Core)
4
+ [![Test Coverage](https://api.codeclimate.com/v1/badges/91a2d70b9ed977815c66/test_coverage)](https://codeclimate.com/github/CocoaPods/Core/test_coverage)
5
+ [![Maintainability](https://api.codeclimate.com/v1/badges/91a2d70b9ed977815c66/maintainability)](https://codeclimate.com/github/CocoaPods/Core/maintainability)
6
6
 
7
7
  The CocoaPods-Core gem provides support to work with the models of CocoaPods.
8
8
  It is intended to be used in place of the CocoaPods gem when the installation
@@ -1,8 +1,8 @@
1
1
  require 'cocoapods-core/source'
2
2
  require 'rest'
3
3
  require 'concurrent'
4
- require 'typhoeus'
5
4
  require 'netrc'
5
+ require 'addressable'
6
6
 
7
7
  module Pod
8
8
  # Subclass of Pod::Source to provide support for CDN-based Specs repositories
@@ -315,6 +315,11 @@ module Pod
315
315
  metadata.path_fragment(pod_name)[0..-2]
316
316
  end
317
317
 
318
+ def local_file_okay?(partial_url)
319
+ file_path = repo.join(partial_url)
320
+ File.exist?(file_path) && File.size(file_path) > 0
321
+ end
322
+
318
323
  def local_file(partial_url)
319
324
  file_path = repo.join(partial_url)
320
325
  File.open(file_path) do |file|
@@ -334,10 +339,11 @@ module Pod
334
339
  end
335
340
 
336
341
  def download_file_async(partial_url)
337
- file_remote_url = URI.encode(url + partial_url.to_s)
342
+ file_remote_url = Addressable::URI.encode(url + partial_url.to_s)
338
343
  path = repo + partial_url
339
344
 
340
- if File.exist?(path)
345
+ file_okay = local_file_okay?(partial_url)
346
+ if file_okay
341
347
  if @startup_time < File.mtime(path)
342
348
  debug "CDN: #{name} Relative path: #{partial_url} modified during this run! Returning local"
343
349
  return Promises.fulfilled_future(partial_url, HYDRA_EXECUTOR)
@@ -353,7 +359,7 @@ module Pod
353
359
 
354
360
  etag_path = path.sub_ext(path.extname + '.etag')
355
361
 
356
- etag = File.read(etag_path) if File.exist?(etag_path)
362
+ etag = File.read(etag_path) if file_okay && File.exist?(etag_path)
357
363
  debug "CDN: #{name} Relative path: #{partial_url}, has ETag? #{etag}" unless etag.nil?
358
364
 
359
365
  download_and_save_with_retries_async(partial_url, file_remote_url, etag)
@@ -431,6 +437,8 @@ module Pod
431
437
  end
432
438
 
433
439
  def download_typhoeus_impl_async(file_remote_url, etag)
440
+ require 'typhoeus'
441
+
434
442
  # Create a prefereably HTTP/2 request - the protocol is ultimately responsible for picking
435
443
  # the maximum supported protocol
436
444
  # When debugging with proxy, use the following extra options:
@@ -1,5 +1,5 @@
1
1
  module Pod
2
2
  # The version of the cocoapods-core.
3
3
  #
4
- CORE_VERSION = '1.9.2'.freeze unless defined? Pod::CORE_VERSION
4
+ CORE_VERSION = '1.10.0'.freeze unless defined? Pod::CORE_VERSION
5
5
  end
@@ -183,6 +183,23 @@ module Pod
183
183
  end
184
184
  end
185
185
 
186
+ # Calls the post integrate callback if defined.
187
+ #
188
+ # @param [Pod::Installer] installer
189
+ # the installer that is performing the installation.
190
+ #
191
+ # @return [Bool] whether a post install callback was specified and it was
192
+ # called.
193
+ #
194
+ def post_integrate!(installer)
195
+ if @post_integrate_callback
196
+ @post_integrate_callback.call(installer)
197
+ true
198
+ else
199
+ false
200
+ end
201
+ end
202
+
186
203
  #-------------------------------------------------------------------------#
187
204
 
188
205
  public
@@ -71,6 +71,35 @@ module Pod
71
71
  set_hash_value('installation_method', 'name' => installation_method, 'options' => options)
72
72
  end
73
73
 
74
+ # Raises a warning when CocoaPods is run using the Global Gemset.
75
+ # A Semantic version can be supplied to warn if the bundler version
76
+ # does not match the required version.
77
+ #
78
+ # @param [String] version
79
+ # The required bundler version, in semantic version format.
80
+ #
81
+ # @example
82
+ #
83
+ # ensure_bundler!
84
+ #
85
+ # @example
86
+ #
87
+ # ensure_bundler! '~> 2.0.0'
88
+ #
89
+ # @return [void]
90
+ #
91
+ def ensure_bundler!(version = nil)
92
+ unless current_target_definition.root?
93
+ raise Informative, 'The Ensure Bundler check can only be set at the root level of the Podfile.'
94
+ end
95
+ unless %w(BUNDLE_BIN_PATH BUNDLE_GEMFILE).all? { |key| ENV.key?(key) }
96
+ raise Informative, "CocoaPods was invoked from Global Gemset.\nPlease re-run using: `bundle exec pod #{ARGV.join(' ')}`"
97
+ end
98
+ unless ENV['BUNDLER_VERSION'].nil? || Requirement.create(version).satisfied_by?(Version.new(ENV['BUNDLER_VERSION']))
99
+ raise Informative, "The installed Bundler version: #{ENV['BUNDLER_VERSION']} does not match the required version: #{version}"
100
+ end
101
+ end
102
+
74
103
  #-----------------------------------------------------------------------#
75
104
 
76
105
  # @!group Dependencies
@@ -112,6 +141,7 @@ module Pod
112
141
  # specify in your version requirement. The example is equal to
113
142
  # `>= 0.1.2` combined with `< 0.2.0` and will always match the
114
143
  # latest known version matching your requirements.
144
+ # * `~> 0` Version 0 and the versions up to 1, not including 1.
115
145
  # * `~> 0.1.3-beta.0` Beta and release versions for 0.1.3, release versions
116
146
  # up to 0.2 excluding 0.2. Components separated by a dash (-)
117
147
  # will not be considered for the version requirement.
@@ -930,6 +960,26 @@ module Pod
930
960
  raise Informative, 'Specifying multiple `post_install` hooks is unsupported.' if @post_install_callback
931
961
  @post_install_callback = block
932
962
  end
963
+
964
+ # This hook allows you to make changes after the project is written
965
+ # to disk.
966
+ #
967
+ # It receives the
968
+ # [`Pod::Installer`](http://rubydoc.info/gems/cocoapods/Pod/Installer/)
969
+ # as its only argument.
970
+ #
971
+ # @example Customising the build settings of all targets
972
+ #
973
+ # post_integrate do |installer|
974
+ # # some change after project write to disk
975
+ # end
976
+ #
977
+ # @return [void]
978
+ #
979
+ def post_integrate(&block)
980
+ raise Informative, 'Specifying multiple `post_integrate` hooks is unsupported.' if @post_integrate_callback
981
+ @post_integrate_callback = block
982
+ end
933
983
  end
934
984
  end
935
985
  end
@@ -1261,7 +1261,8 @@ module Pod
1261
1261
 
1262
1262
  # @!method vendored_frameworks=(*frameworks)
1263
1263
  #
1264
- # The paths of the framework bundles that come shipped with the Pod.
1264
+ # The paths of the framework bundles that come shipped with the Pod. Supports both `.framework` and `.xcframework` bundles.
1265
+ # The frameworks will be made available to the Pod and to the consumers of the pod.
1265
1266
  #
1266
1267
  # @example
1267
1268
  #
@@ -1269,7 +1270,7 @@ module Pod
1269
1270
  #
1270
1271
  # @example
1271
1272
  #
1272
- # spec.vendored_frameworks = 'MyFramework.framework', 'TheirFramework.framework'
1273
+ # spec.vendored_frameworks = 'MyFramework.framework', 'TheirFramework.xcframework'
1273
1274
  #
1274
1275
  # @param [String, Array<String>] vendored_frameworks
1275
1276
  # A list of framework bundles paths.
@@ -1283,7 +1284,8 @@ module Pod
1283
1284
 
1284
1285
  # @!method vendored_libraries=(*frameworks)
1285
1286
  #
1286
- # The paths of the libraries that come shipped with the Pod.
1287
+ # The paths of the libraries that come shipped with the Pod. The libraries will be available to the Pod and the
1288
+ # consumers of the Pod.
1287
1289
  #
1288
1290
  # @example
1289
1291
  #
@@ -288,6 +288,7 @@ module Pod
288
288
  # Performs validations related to the `homepage` attribute.
289
289
  #
290
290
  def _validate_homepage(h)
291
+ return unless h.is_a?(String)
291
292
  if h =~ %r{http://EXAMPLE}
292
293
  results.add_warning('homepage', 'The homepage has not been updated' \
293
294
  ' from default')
@@ -336,6 +337,19 @@ module Pod
336
337
  end
337
338
  end
338
339
 
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
+
339
353
  # Performs validations related to the `license` attribute.
340
354
  #
341
355
  def _validate_license(l)
@@ -69,7 +69,8 @@ module Pod
69
69
  #
70
70
  def prerelease?
71
71
  return @prerelease if defined?(@prerelease)
72
- @prerelease = @version =~ /[a-zA-Z\-]/
72
+ comparable_version = @version.sub(/#{METADATA_PATTERN}$/, '')
73
+ @prerelease = comparable_version =~ /[a-zA-Z\-]/
73
74
  end
74
75
 
75
76
  # @return [Bool] Whether a string representation is correct.
@@ -284,6 +284,8 @@ module Pod
284
284
  RESOLVED_TAGS = Regexp.union(
285
285
  'null', 'Null', 'NULL', '~', '', # resolve to null
286
286
  'true', 'True', 'TRUE', 'false', 'False', 'FALSE', # bool
287
+ 'yes', 'Yes', 'YES', 'no', 'No', 'NO', # yes/no
288
+ 'on', 'On', 'ON', 'off', 'Off', 'OFF', # no/off
287
289
  /[-+]?[0-9]+/, # base 10 int
288
290
  /00[0-7]+/, # base 8 int
289
291
  /0x[0-9a-fA-F]+/, # base 16 int
metadata CHANGED
@@ -1,23 +1,23 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.2
4
+ version: 1.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eloy Duran
8
8
  - Fabio Pelosin
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-05-22 00:00:00.000000000 Z
12
+ date: 2020-10-20 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
- version: 4.0.2
20
+ version: '5.0'
21
21
  - - "<"
22
22
  - !ruby/object:Gem::Version
23
23
  version: '6'
@@ -25,9 +25,9 @@ dependencies:
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
27
27
  requirements:
28
- - - ">="
28
+ - - ">"
29
29
  - !ruby/object:Gem::Version
30
- version: 4.0.2
30
+ version: '5.0'
31
31
  - - "<"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '6'
@@ -115,6 +115,34 @@ dependencies:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0.11'
118
+ - !ruby/object:Gem::Dependency
119
+ name: addressable
120
+ requirement: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '2.6'
125
+ type: :runtime
126
+ prerelease: false
127
+ version_requirements: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '2.6'
132
+ - !ruby/object:Gem::Dependency
133
+ name: public_suffix
134
+ requirement: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ type: :runtime
140
+ prerelease: false
141
+ version_requirements: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
118
146
  - !ruby/object:Gem::Dependency
119
147
  name: bacon
120
148
  requirement: !ruby/object:Gem::Requirement
@@ -188,7 +216,7 @@ homepage: https://github.com/CocoaPods/CocoaPods
188
216
  licenses:
189
217
  - MIT
190
218
  metadata: {}
191
- post_install_message:
219
+ post_install_message:
192
220
  rdoc_options: []
193
221
  require_paths:
194
222
  - lib
@@ -196,7 +224,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
196
224
  requirements:
197
225
  - - ">="
198
226
  - !ruby/object:Gem::Version
199
- version: 2.0.0
227
+ version: 2.3.3
200
228
  required_rubygems_version: !ruby/object:Gem::Requirement
201
229
  requirements:
202
230
  - - ">="
@@ -204,7 +232,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
204
232
  version: '0'
205
233
  requirements: []
206
234
  rubygems_version: 3.0.3
207
- signing_key:
235
+ signing_key:
208
236
  specification_version: 3
209
237
  summary: The models of CocoaPods
210
238
  test_files: []