cocoapods-core 1.9.3 → 1.10.0.beta.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 54fe39c5a8d2e28001ef66999f292a88604274247f3e59655ccd365beaf1b42c
4
- data.tar.gz: 6dcfaa8628e0252eebf2c745a901a5fd78a0a88519d3fc679567f9e5c278fb0e
3
+ metadata.gz: c26e1d542b8fdc61d83c2a522598de7a280be6e5a047fe66917932f74f7741d0
4
+ data.tar.gz: 22ea5140f4148bc6895a1718fd75fcb19a126bea75164a01c8477bf3dc55ee02
5
5
  SHA512:
6
- metadata.gz: 9047cbd1aa7f9bdb1c15aa85e2c837de09289483c029fb375c51dfc62880f5061a606594c5c391d0a9766149e0ba4949032ba763e1b29bfbe3ea0a873f82560c
7
- data.tar.gz: 02ffef659eeeaa0c5bfe8227b030b30e477f6682c45d83ab49886ba29e8853a6483b1f6f97b00f3c07671a82215e4cfeec25405f4acf7f2fb61c8f25dd56665a
6
+ metadata.gz: ad8f952e6b5b8b8f716df0a01427b44d085dc234a3d15f3601b2f09ea8fbcbce301ae769c7229a16b0f1d811630a1de834e36babfcd0b920d59b6c9d211693e8
7
+ data.tar.gz: b8f47cf040266eaffcb4c1b6ce1d8045c3801d3d72769b7596b7e65dfdc217671051ec4f20a54a86999c948a895aabdecaf7b0d7bb3c46ab4e57b5227ecf8c21
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
@@ -339,7 +339,7 @@ module Pod
339
339
  end
340
340
 
341
341
  def download_file_async(partial_url)
342
- file_remote_url = URI.encode(url + partial_url.to_s)
342
+ file_remote_url = Addressable::URI.encode(url + partial_url.to_s)
343
343
  path = repo + partial_url
344
344
 
345
345
  file_okay = local_file_okay?(partial_url)
@@ -437,6 +437,8 @@ module Pod
437
437
  end
438
438
 
439
439
  def download_typhoeus_impl_async(file_remote_url, etag)
440
+ require 'typhoeus'
441
+
440
442
  # Create a prefereably HTTP/2 request - the protocol is ultimately responsible for picking
441
443
  # the maximum supported protocol
442
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.3'.freeze unless defined? Pod::CORE_VERSION
4
+ CORE_VERSION = '1.10.0.beta.1'.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.
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.9.3
4
+ version: 1.10.0.beta.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eloy Duran
@@ -9,15 +9,15 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-05-29 00:00:00.000000000 Z
12
+ date: 2020-07-17 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
@@ -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
  - - ">="