cocoapods 1.3.0.rc.1 → 1.3.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
  SHA1:
3
- metadata.gz: 4b7f59b4c0c994860e2d5a181acaa9f6afd0e0c2
4
- data.tar.gz: f8ca3195626762fe8867db815b01936429b91976
3
+ metadata.gz: 5f6244748bfc3f969fcc793ec3334896af97bd5d
4
+ data.tar.gz: 3ae66b4c08893dc13fa0acad1fc5c4ec67719d4b
5
5
  SHA512:
6
- metadata.gz: f8a03b60c0a4d3d31f1349ad7c107a456ef9ccad276db521552621ab4493540d04e93ed381c82f5cebafb3c46c33eaf98a1b1e2aeba78e8205970cc370e43099
7
- data.tar.gz: 33a29f568edddeca5ba65901269565784e0830a37548ba7a21123392201782c2a1af9bf081b28c2d6c8acd9937c4fa534d86877c588dbc90595e55b015319a79
6
+ metadata.gz: caae7644d08c46b119981dd8579666934e185728e5da12614f6c57188a8f2e9b33dbba64c49ec977be9fed9a8a1f181165c48ad78decb412e97b415c288372e9
7
+ data.tar.gz: 0d29a3ed010d12a8550cbe9f0f7c04da1c92aacdd7c75996cc2a7203b6969f38566fdcd8ed7f5a523fc8d1ede01a34a5e62795b2fa40f6ba0e6ce96c92738803
@@ -4,6 +4,26 @@ 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.3.0 (2017-08-02)
8
+
9
+ ##### Enhancements
10
+
11
+ * None.
12
+
13
+ ##### Bug Fixes
14
+
15
+ * Ensure transitive dependencies are linked to test targets
16
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
17
+ [#6917](https://github.com/CocoaPods/CocoaPods/pull/6917)
18
+
19
+ * Properly install pod targets with test specs within subspecs
20
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
21
+ [#6915](https://github.com/CocoaPods/CocoaPods/pull/6915)
22
+
23
+ * Add `--skip-tests` support `push` to push command
24
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
25
+ [#6893](https://github.com/CocoaPods/CocoaPods/pull/6893)
26
+
7
27
  ## 1.3.0.rc.1 (2017-07-27)
8
28
 
9
29
  ##### Enhancements
@@ -30,6 +30,7 @@ module Pod
30
30
  ['--local-only', 'Does not perform the step of pushing REPO to its remote'],
31
31
  ['--no-private', 'Lint includes checks that apply only to public repos'],
32
32
  ['--skip-import-validation', 'Lint skips validating that the pod can be imported'],
33
+ ['--skip-tests', 'Lint skips building and running tests during validation'],
33
34
  ['--commit-message="Fix bug in pod"', 'Add custom commit message. ' \
34
35
  'Opens default editor if no commit message is specified.'],
35
36
  ['--use-json', 'Push JSON spec to repo'],
@@ -52,6 +53,7 @@ module Pod
52
53
  @use_json = argv.flag?('use-json')
53
54
  @swift_version = argv.option('swift-version', nil)
54
55
  @skip_import_validation = argv.flag?('skip-import-validation', false)
56
+ @skip_tests = argv.flag?('skip-tests', false)
55
57
  super
56
58
  end
57
59
 
@@ -130,6 +132,7 @@ module Pod
130
132
  validator.ignore_public_only_results = @private
131
133
  validator.swift_version = @swift_version
132
134
  validator.skip_import_validation = @skip_import_validation
135
+ validator.skip_tests = @skip_tests
133
136
  begin
134
137
  validator.validate
135
138
  rescue => e
@@ -1,5 +1,5 @@
1
1
  module Pod
2
2
  # The version of the CocoaPods command line tool.
3
3
  #
4
- VERSION = '1.3.0.rc.1'.freeze unless defined? Pod::VERSION
4
+ VERSION = '1.3.0'.freeze unless defined? Pod::VERSION
5
5
  end
@@ -72,10 +72,10 @@ module Pod
72
72
  recursive_dependent_targets = target.recursive_dependent_targets
73
73
  @xcconfig.merge! XCConfigHelper.settings_for_dependent_targets(target, recursive_dependent_targets, @test_xcconfig)
74
74
  if @test_xcconfig
75
- test_dependent_targets = [target, *target.test_dependent_targets]
75
+ test_dependent_targets = [target, *target.recursive_test_dependent_targets].uniq
76
76
  @xcconfig.merge! XCConfigHelper.settings_for_dependent_targets(target, test_dependent_targets - recursive_dependent_targets, @test_xcconfig)
77
- XCConfigHelper.generate_vendored_build_settings(nil, test_dependent_targets, @xcconfig)
78
- XCConfigHelper.generate_other_ld_flags(nil, test_dependent_targets, @xcconfig)
77
+ XCConfigHelper.generate_vendored_build_settings(nil, target.all_test_dependent_targets, @xcconfig)
78
+ XCConfigHelper.generate_other_ld_flags(nil, target.all_test_dependent_targets, @xcconfig)
79
79
  XCConfigHelper.generate_ld_runpath_search_paths(target, false, true, @xcconfig)
80
80
  end
81
81
  @xcconfig
@@ -429,17 +429,28 @@ module Pod
429
429
  end
430
430
  end
431
431
 
432
- target.pod_targets = pod_targets.select do |pod_target|
433
- target_definition_included = pod_target.target_definitions.include?(target_definition)
434
- explicitly_defined_in_target_definition = target_definition.non_inherited_dependencies.map(&:name).include?(pod_target.name)
435
- next false unless target_definition_included
436
- next true if explicitly_defined_in_target_definition
437
- !pod_target_test_only?(pod_target, pod_targets)
438
- end
432
+ target.pod_targets = filter_pod_targets_for_target_definition(pod_targets, target_definition)
439
433
 
440
434
  target
441
435
  end
442
436
 
437
+ # Returns a filtered list of pod targets that should or should not be part of the target definition. Pod targets
438
+ # used by tests only are filtered.
439
+ #
440
+ # @param [Array<PodTarget>] pod_targets
441
+ # the array of pod targets to check against
442
+ #
443
+ # @param [TargetDefinition] target_definition
444
+ # the target definition to use as the base for filtering
445
+ #
446
+ # @return [Array<PodTarget>] the filtered list of pod targets.
447
+ #
448
+ def filter_pod_targets_for_target_definition(pod_targets, target_definition)
449
+ pod_targets.select do |pod_target|
450
+ pod_target.target_definitions.include?(target_definition) && !pod_target_test_only?(pod_target, pod_targets)
451
+ end
452
+ end
453
+
443
454
  # Returns true if a pod target is only used by other pod targets as a test dependency and therefore should
444
455
  # not be included as part of the aggregate target.
445
456
  #
@@ -457,8 +468,12 @@ module Pod
457
468
  if @test_pod_target_analyzer_cache.key?(key)
458
469
  return @test_pod_target_analyzer_cache[key]
459
470
  end
460
- source = pod_targets.any? { |pt| pt.dependent_targets.map(&:name).include?(name) }
461
- test = pod_targets.any? { |pt| pt.test_dependent_targets.map(&:name).include?(name) }
471
+ source = pod_targets.any? do |pt|
472
+ pt.dependent_targets.map(&:name).include?(name)
473
+ end
474
+ test = pod_targets.any? do |pt|
475
+ pt.test_dependent_targets.reject { |dpt| dpt.name == pt.name }.map(&:name).include?(name)
476
+ end
462
477
  @test_pod_target_analyzer_cache[key] = !source && test
463
478
  end
464
479
 
@@ -498,6 +513,7 @@ module Pod
498
513
  pod_targets.each do |target|
499
514
  dependencies = transitive_dependencies_for_specs(target.specs.reject(&:test_specification?), target.platform, all_specs).group_by(&:root)
500
515
  test_dependencies = transitive_dependencies_for_specs(target.specs.select(&:test_specification?), target.platform, all_specs).group_by(&:root)
516
+ test_dependencies.delete_if { |k| dependencies.key? k }
501
517
  target.dependent_targets = filter_dependencies(dependencies, pod_targets_by_name, target)
502
518
  target.test_dependent_targets = filter_dependencies(test_dependencies, pod_targets_by_name, target)
503
519
  end
@@ -512,6 +528,7 @@ module Pod
512
528
  pod_targets.each do |target|
513
529
  dependencies = transitive_dependencies_for_specs(target.specs, target.platform, specs).group_by(&:root)
514
530
  test_dependencies = transitive_dependencies_for_specs(target.specs.select(&:test_specification?), target.platform, all_specs).group_by(&:root)
531
+ test_dependencies.delete_if { |k| dependencies.key? k }
515
532
  target.dependent_targets = pod_targets.reject { |t| dependencies[t.root_spec].nil? }
516
533
  target.test_dependent_targets = pod_targets.reject { |t| test_dependencies[t.root_spec].nil? }
517
534
  end
@@ -47,7 +47,7 @@ module Pod
47
47
  def add_copy_resources_script_phase(native_target)
48
48
  test_type = target.test_type_for_product_type(native_target.symbol_type)
49
49
  script_path = "${PODS_ROOT}/#{target.copy_resources_script_path_for_test_type(test_type).relative_path_from(target.sandbox.root)}"
50
- resource_paths = [target, *target.test_dependent_targets].flat_map(&:resource_paths)
50
+ resource_paths = target.all_test_dependent_targets.flat_map(&:resource_paths)
51
51
  input_paths = []
52
52
  output_paths = []
53
53
  unless resource_paths.empty?
@@ -64,7 +64,7 @@ module Pod
64
64
  def add_embed_frameworks_script_phase(native_target)
65
65
  test_type = target.test_type_for_product_type(native_target.symbol_type)
66
66
  script_path = "${PODS_ROOT}/#{target.embed_frameworks_script_path_for_test_type(test_type).relative_path_from(target.sandbox.root)}"
67
- framework_paths = [target, *target.test_dependent_targets].flat_map(&:framework_paths)
67
+ framework_paths = target.all_test_dependent_targets.flat_map(&:framework_paths)
68
68
  input_paths = []
69
69
  output_paths = []
70
70
  unless framework_paths.empty?
@@ -266,7 +266,7 @@ module Pod
266
266
  private
267
267
 
268
268
  def add_pod_target_test_dependencies(pod_target, frameworks_group)
269
- test_dependent_targets = [pod_target, *pod_target.test_dependent_targets]
269
+ test_dependent_targets = pod_target.all_test_dependent_targets
270
270
  pod_target.test_native_targets.each do |test_native_target|
271
271
  test_dependent_targets.reject(&:should_build?).each do |test_dependent_target|
272
272
  add_resource_bundles_to_native_target(test_dependent_target, test_native_target)
@@ -333,7 +333,7 @@ module Pod
333
333
  #
334
334
  def create_test_target_copy_resources_script(test_type)
335
335
  path = target.copy_resources_script_path_for_test_type(test_type)
336
- pod_targets = [target, *target.test_dependent_targets]
336
+ pod_targets = target.all_test_dependent_targets
337
337
  resource_paths_by_config = { 'Debug' => pod_targets.flat_map(&:resource_paths) }
338
338
  generator = Generator::CopyResourcesScript.new(resource_paths_by_config, target.platform)
339
339
  update_changed_file(generator, path)
@@ -349,7 +349,7 @@ module Pod
349
349
  #
350
350
  def create_test_target_embed_frameworks_script(test_type)
351
351
  path = target.embed_frameworks_script_path_for_test_type(test_type)
352
- pod_targets = [target, *target.test_dependent_targets]
352
+ pod_targets = target.all_test_dependent_targets
353
353
  framework_paths_by_config = { 'Debug' => pod_targets.flat_map(&:framework_paths) }
354
354
  generator = Generator::EmbedFrameworksScript.new(framework_paths_by_config)
355
355
  update_changed_file(generator, path)
@@ -355,15 +355,41 @@ module Pod
355
355
  # dependency upon.
356
356
  #
357
357
  def recursive_dependent_targets
358
- targets = dependent_targets.clone
358
+ @recursive_dependent_targets ||= begin
359
+ targets = dependent_targets.clone
359
360
 
360
- targets.each do |target|
361
- target.dependent_targets.each do |t|
362
- targets.push(t) unless t == self || targets.include?(t)
361
+ targets.each do |target|
362
+ target.dependent_targets.each do |t|
363
+ targets.push(t) unless t == self || targets.include?(t)
364
+ end
363
365
  end
366
+
367
+ targets
364
368
  end
369
+ end
365
370
 
366
- targets
371
+ # @return [Array<PodTarget>] the recursive targets that this target has a
372
+ # test dependency upon.
373
+ #
374
+ def recursive_test_dependent_targets
375
+ @recursive_test_dependent_targets ||= begin
376
+ targets = test_dependent_targets.clone
377
+
378
+ targets.each do |target|
379
+ target.test_dependent_targets.each do |t|
380
+ targets.push(t) unless t == self || targets.include?(t)
381
+ end
382
+ end
383
+
384
+ targets
385
+ end
386
+ end
387
+
388
+ # @return [Array<PodTarget>] the canonical list of test dependent targets this target has a dependency upon.
389
+ # This includes the parent target as well as its transitive dependencies.
390
+ #
391
+ def all_test_dependent_targets
392
+ [self, *recursive_dependent_targets, *recursive_test_dependent_targets].uniq
367
393
  end
368
394
 
369
395
  # Checks if the target should be included in the build configuration with
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.3.0.rc.1
4
+ version: 1.3.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-07-28 00:00:00.000000000 Z
14
+ date: 2017-08-02 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.3.0.rc.1
22
+ version: 1.3.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.3.0.rc.1
29
+ version: 1.3.0
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: claide
32
32
  requirement: !ruby/object:Gem::Requirement