cocoapods 1.4.0.rc.1 → 1.4.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
- SHA1:
3
- metadata.gz: 3fb1486e8a7724cc9a1ef5a1121aec8cc3b88801
4
- data.tar.gz: 4f61dc7de59a46d9407f427239761da95b4cd72f
2
+ SHA256:
3
+ metadata.gz: 0ef975b90a00794720b4ee7f518780d588916450692e9c8316337cb7035d0714
4
+ data.tar.gz: '048a8ba73eeb3b2630dca90ce7d1dd2f04f9ce68f045f025ed21249c496448d0'
5
5
  SHA512:
6
- metadata.gz: 5b81780a945ded8208719682bea1db9de648a1b0373b3df6454ea1e57e2bc32e561e7bfd3c4170f343d058f949225cf995168db790dd5713e11d734335b2e587
7
- data.tar.gz: 2f1f5de875bc175d019b6ec3f5312d72571708d1c380e19c6326db83071597673993a0f3bce777718eec66b5a3779b435a920ec5de8170f7e9ddeadafb7b898d
6
+ metadata.gz: c71ca98c34dcfac5cec43b9bb2fc16726d5d190b0a6f34d49d06f4189b86d6997b965cf04018b756324597643a35b4df6b5482dc71c06c2d45019fe722d1f676
7
+ data.tar.gz: 9a8521c02a86e9056bc1b8387297b95694e60e2c314cfcac2b5c8b54ccd4a1a8f575f3e6317b5301d7ff5ef94e1e1e88e8f9ea44a619bcec5f72ef03a312b903
@@ -4,6 +4,33 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
4
4
 
5
5
  To install release candidates run `[sudo] gem install cocoapods --pre`
6
6
 
7
+ ## 1.4.0 (2018-01-18)
8
+
9
+ ##### Enhancements
10
+
11
+ * Show warning when Pod source uses unencrypted HTTP
12
+ [KrauseFx](https://github.com/KrauseFx)
13
+ [#7293](https://github.com/CocoaPods/CocoaPods/issues/7293)
14
+
15
+ ##### Bug Fixes
16
+
17
+ * Do not include test spec resources and framework paths of dependent targets into test scripts
18
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
19
+ [#7318](https://github.com/CocoaPods/CocoaPods/pull/7318)
20
+
21
+ * Restore `development_pod_targets` public method in installer
22
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
23
+ [#7292](https://github.com/CocoaPods/CocoaPods/pull/7292)
24
+
25
+ * Fix resolution when multiple sources provide the same pods, and there are
26
+ (potential) dependencies between the sources.
27
+ [Samuel Giddins](https://github.com/segiddins)
28
+ [#7031](https://github.com/CocoaPods/CocoaPods/issues/7031)
29
+
30
+ * Ensure that externally-sourced (e.g. local & git) pods are allowed to resolve
31
+ to prerelease versions.
32
+ [segiddins](https://github.com/segiddins)
33
+
7
34
  ## 1.4.0.rc.1 (2017-12-16)
8
35
 
9
36
  ##### Enhancements
@@ -1,5 +1,5 @@
1
1
  module Pod
2
2
  # The version of the CocoaPods command line tool.
3
3
  #
4
- VERSION = '1.4.0.rc.1'.freeze unless defined? Pod::VERSION
4
+ VERSION = '1.4.0'.freeze unless defined? Pod::VERSION
5
5
  end
@@ -75,8 +75,8 @@ module Pod
75
75
  if @test_xcconfig
76
76
  test_dependent_targets = [target, *target.recursive_test_dependent_targets].uniq
77
77
  @xcconfig.merge! XCConfigHelper.search_paths_for_dependent_targets(target, test_dependent_targets - recursive_dependent_targets, @test_xcconfig)
78
- XCConfigHelper.generate_vendored_build_settings(nil, target.all_test_dependent_targets, @xcconfig, true, @test_xcconfig)
79
- XCConfigHelper.generate_other_ld_flags(nil, target.all_test_dependent_targets, @xcconfig)
78
+ XCConfigHelper.generate_vendored_build_settings(nil, target.all_dependent_targets, @xcconfig, true, @test_xcconfig)
79
+ XCConfigHelper.generate_other_ld_flags(nil, target.all_dependent_targets, @xcconfig)
80
80
  XCConfigHelper.generate_ld_runpath_search_paths(target, false, true, @xcconfig)
81
81
  end
82
82
  @xcconfig
@@ -644,6 +644,19 @@ module Pod
644
644
 
645
645
  #-------------------------------------------------------------------------#
646
646
 
647
+ public
648
+
649
+ # @return [Array<PodTarget>] The targets of the development pods generated by
650
+ # the installation process. This can be used as a convenience method for external scripts.
651
+ #
652
+ def development_pod_targets
653
+ pod_targets.select do |pod_target|
654
+ sandbox.development_pods.keys.include?(pod_target.pod_name)
655
+ end
656
+ end
657
+
658
+ #-------------------------------------------------------------------------#
659
+
647
660
  private
648
661
 
649
662
  # @!group Private helpers
@@ -117,6 +117,7 @@ module Pod
117
117
  # @return [void]
118
118
  #
119
119
  def download_source
120
+ verify_source_is_secure(root_spec)
120
121
  download_result = Downloader.download(download_request, root, :can_cache => can_cache?)
121
122
 
122
123
  if (@specific_source = download_result.checkout_options) && specific_source != root_spec.source
@@ -124,6 +125,21 @@ module Pod
124
125
  end
125
126
  end
126
127
 
128
+ # Verify the source of the spec is secure, which is used to
129
+ # show a warning to the user if that isn't the case
130
+ # This method doesn't verify all protocols, but currently
131
+ # only prohibits unencrypted http:// connections
132
+ #
133
+ def verify_source_is_secure(root_spec)
134
+ return if root_spec.source.nil? || root_spec.source[:http].nil?
135
+ http_source = root_spec.source[:http]
136
+ return if http_source.downcase.start_with?('https://')
137
+
138
+ UI.warn "'#{root_spec.name}' uses the unencrypted http protocol to transfer the Pod. " \
139
+ 'Please be sure you\'re in a safe network with only trusted hosts in there. ' \
140
+ 'Please reach out to the library author to notify them of this security issue.'
141
+ end
142
+
127
143
  def download_request
128
144
  Downloader::Request.new(
129
145
  :spec => root_spec,
@@ -288,7 +288,7 @@ module Pod
288
288
  private
289
289
 
290
290
  def add_pod_target_test_dependencies(pod_target, frameworks_group)
291
- test_dependent_targets = pod_target.all_test_dependent_targets
291
+ test_dependent_targets = pod_target.all_dependent_targets
292
292
  pod_target.test_specs_by_native_target.each do |test_native_target, test_specs|
293
293
  test_dependent_targets.reject(&:should_build?).each do |test_dependent_target|
294
294
  add_resource_bundles_to_native_target(test_dependent_target, test_native_target)
@@ -242,7 +242,7 @@ module Pod
242
242
  product_type = target.product_type_for_test_type(test_type)
243
243
  name = target.test_target_label(test_type)
244
244
  platform_name = target.platform.name
245
- language = target.all_test_dependent_targets.any?(&:uses_swift?) ? :swift : :objc
245
+ language = target.all_dependent_targets.any?(&:uses_swift?) ? :swift : :objc
246
246
  native_test_target = project.new_target(product_type, name, platform_name, deployment_target, nil, language)
247
247
  native_test_target.product_reference.name = name
248
248
 
@@ -401,9 +401,12 @@ module Pod
401
401
  #
402
402
  def create_test_target_copy_resources_script(test_type)
403
403
  path = target.copy_resources_script_path_for_test_type(test_type)
404
- pod_targets = target.all_test_dependent_targets
404
+ pod_targets = target.all_dependent_targets
405
405
  resource_paths_by_config = target.user_build_configurations.keys.each_with_object({}) do |config, resources_by_config|
406
- resources_by_config[config] = pod_targets.flat_map(&:resource_paths)
406
+ resources_by_config[config] = pod_targets.flat_map do |pod_target|
407
+ include_test_spec_paths = pod_target == target
408
+ pod_target.resource_paths(include_test_spec_paths)
409
+ end
407
410
  end
408
411
  generator = Generator::CopyResourcesScript.new(resource_paths_by_config, target.platform)
409
412
  update_changed_file(generator, path)
@@ -419,9 +422,12 @@ module Pod
419
422
  #
420
423
  def create_test_target_embed_frameworks_script(test_type)
421
424
  path = target.embed_frameworks_script_path_for_test_type(test_type)
422
- pod_targets = target.all_test_dependent_targets
425
+ pod_targets = target.all_dependent_targets
423
426
  framework_paths_by_config = target.user_build_configurations.keys.each_with_object({}) do |config, paths_by_config|
424
- paths_by_config[config] = pod_targets.flat_map(&:framework_paths)
427
+ paths_by_config[config] = pod_targets.flat_map do |pod_target|
428
+ include_test_spec_paths = pod_target == target
429
+ pod_target.framework_paths(include_test_spec_paths)
430
+ end
425
431
  end
426
432
  generator = Generator::EmbedFrameworksScript.new(framework_paths_by_config)
427
433
  update_changed_file(generator, path)
@@ -435,7 +441,7 @@ module Pod
435
441
  #
436
442
  def test_target_swift_debug_hack(test_target_bc)
437
443
  return unless test_target_bc.debug?
438
- return unless target.all_test_dependent_targets.any?(&:uses_swift?)
444
+ return unless target.all_dependent_targets.any?(&:uses_swift?)
439
445
  ldflags = test_target_bc.build_settings['OTHER_LDFLAGS'] ||= '$(inherited)'
440
446
  ldflags << ' -lswiftSwiftOnoneSupport'
441
447
  end
@@ -52,7 +52,7 @@ module Pod
52
52
  def add_copy_resources_script_phase(native_target)
53
53
  test_type = target.test_type_for_product_type(native_target.symbol_type)
54
54
  script_path = "${PODS_ROOT}/#{target.copy_resources_script_path_for_test_type(test_type).relative_path_from(target.sandbox.root)}"
55
- resource_paths = target.all_test_dependent_targets.flat_map(&:resource_paths)
55
+ resource_paths = target.all_dependent_targets.flat_map(&:resource_paths)
56
56
  input_paths = []
57
57
  output_paths = []
58
58
  unless resource_paths.empty?
@@ -74,7 +74,7 @@ module Pod
74
74
  def add_embed_frameworks_script_phase(native_target)
75
75
  test_type = target.test_type_for_product_type(native_target.symbol_type)
76
76
  script_path = "${PODS_ROOT}/#{target.embed_frameworks_script_path_for_test_type(test_type).relative_path_from(target.sandbox.root)}"
77
- framework_paths = target.all_test_dependent_targets.flat_map(&:framework_paths)
77
+ framework_paths = target.all_dependent_targets.flat_map(&:framework_paths)
78
78
  input_paths = []
79
79
  output_paths = []
80
80
  unless framework_paths.empty?
@@ -261,6 +261,7 @@ module Pod
261
261
  name = name_for(dependency)
262
262
  [
263
263
  activated.vertex_named(name).payload ? 0 : 1,
264
+ dependency.external_source ? 0 : 1,
264
265
  dependency.prerelease? ? 0 : 1,
265
266
  conflicts[name] ? 0 : 1,
266
267
  search_for(dependency).count,
@@ -351,8 +352,7 @@ module Pod
351
352
  all_specifications(installation_options.warn_for_multiple_pod_sources).
352
353
  select { |s| requirement.satisfied_by? s.version }.
353
354
  map { |s| s.subspec_by_name(dependency.name, false, true) }.
354
- compact.
355
- reverse
355
+ compact
356
356
  end
357
357
 
358
358
  # @return [Set] Loads or returns a previously initialized set for the Pod
@@ -508,7 +508,7 @@ module Pod
508
508
  end,
509
509
  )
510
510
  end
511
- raise type, message
511
+ raise type.new(message).tap { |e| e.set_backtrace(error.backtrace) }
512
512
  end
513
513
 
514
514
  # Returns whether the given spec is platform-compatible with the dependency
@@ -37,12 +37,12 @@ module Pod
37
37
  end
38
38
  end
39
39
 
40
+ # returns the highest versioned spec last
40
41
  def all_specifications(warn_for_multiple_pod_sources)
41
42
  @all_specifications ||= begin
42
43
  sources_by_version = {}
43
44
  versions_by_source.each do |source, versions|
44
45
  versions.each { |v| (sources_by_version[v] ||= []) << source }
45
- sources_by_version
46
46
  end
47
47
 
48
48
  if warn_for_multiple_pod_sources
@@ -56,8 +56,11 @@ module Pod
56
56
  end
57
57
  end
58
58
 
59
- versions_by_source.flat_map do |source, versions|
60
- versions.map { |version| LazySpecification.new(name, version, source) }
59
+ # sort versions from high to low
60
+ sources_by_version.sort_by(&:first).flat_map do |version, sources|
61
+ # within each version, we want the prefered (first-specified) source
62
+ # to be the _last_ one
63
+ sources.reverse_each.map { |source| LazySpecification.new(name, version, source) }
61
64
  end
62
65
  end
63
66
  end
@@ -468,10 +468,10 @@ module Pod
468
468
  end
469
469
  end
470
470
 
471
- # @return [Array<PodTarget>] the canonical list of test dependent targets this target has a dependency upon.
472
- # This includes the parent target as well as its transitive dependencies.
471
+ # @return [Array<PodTarget>] the canonical list of dependent targets this target has a dependency upon.
472
+ # This list includes the target itself as well as its recursive dependent and test dependent targets.
473
473
  #
474
- def all_test_dependent_targets
474
+ def all_dependent_targets
475
475
  [self, *recursive_dependent_targets, *recursive_test_dependent_targets].uniq
476
476
  end
477
477
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0.rc.1
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eloy Duran
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2017-12-16 00:00:00.000000000 Z
14
+ date: 2018-01-18 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: cocoapods-core
@@ -19,14 +19,14 @@ dependencies:
19
19
  requirements:
20
20
  - - '='
21
21
  - !ruby/object:Gem::Version
22
- version: 1.4.0.rc.1
22
+ version: 1.4.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - '='
28
28
  - !ruby/object:Gem::Version
29
- version: 1.4.0.rc.1
29
+ version: 1.4.0
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: claide
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -53,7 +53,7 @@ dependencies:
53
53
  requirements:
54
54
  - - ">="
55
55
  - !ruby/object:Gem::Version
56
- version: 1.0.1
56
+ version: 1.0.2
57
57
  - - "<"
58
58
  - !ruby/object:Gem::Version
59
59
  version: '2.0'
@@ -63,7 +63,7 @@ dependencies:
63
63
  requirements:
64
64
  - - ">="
65
65
  - !ruby/object:Gem::Version
66
- version: 1.0.1
66
+ version: 1.0.2
67
67
  - - "<"
68
68
  - !ruby/object:Gem::Version
69
69
  version: '2.0'
@@ -524,9 +524,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
524
524
  version: '0'
525
525
  requirements: []
526
526
  rubyforge_project:
527
- rubygems_version: 2.4.5.1
527
+ rubygems_version: 2.7.4
528
528
  signing_key:
529
529
  specification_version: 3
530
530
  summary: The Cocoa library package manager.
531
531
  test_files: []
532
- has_rdoc: