cocoapods 1.7.0.beta.2 → 1.7.0.beta.3

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: 91a0b13ca93c3781d072736e1e1ff9d200dd43c9
4
- data.tar.gz: '0265518cae07022eca43ac72ae9e011dbc9b93bc'
2
+ SHA256:
3
+ metadata.gz: 1ee8d12451f183094a65d40b6e47d8748aa0fa4eea250c41d9c7a5f482f955b1
4
+ data.tar.gz: 53769ab0555e4c167f0157a9531d0218b920a005363ac53f838a6e0aba13f844
5
5
  SHA512:
6
- metadata.gz: faf6624fea1e6e33486154b899249c986058e121801e50109ec60fad4c4ee10f3b9669b5a814d2c1a7915e6013cc7d7870942a9b1898e28b53d049876b54388f
7
- data.tar.gz: 9d102fcddf3d7e680fdfa3d9a6665be1a644ebf8b9489556f084c5d0d2fe71be5187f04427f2fd803730344c50c5b5cb30b18083406d3c942fac145d85b6f28a
6
+ metadata.gz: 3b5533caea792d552f80b53b9003f1929e6ddb730ea85f53b46572fdc2077088df36ddf1d0e9673f7d8b9c647944ec04c025e2f4b3183930598230da1c8f0834
7
+ data.tar.gz: 4741c555db345c178def609f871abd490ed023dc88c9ee18e32fa7a6fbb01b4d73a1ffd89e94bf9e98917281d3641dcaa7ff1fc614fc61e99ca946b45d451316
@@ -4,6 +4,25 @@ 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.7.0.beta.3 (2019-03-28)
8
+
9
+ ##### Enhancements
10
+
11
+ * Adds support for referring to other podspecs during validation
12
+ [Orta Therox](https://github.com/orta)
13
+ [#8536](https://github.com/CocoaPods/CocoaPods/pull/8536)
14
+
15
+ ##### Bug Fixes
16
+
17
+ * Deintegrate deleted targets even if `incremental_installation` is turned on.
18
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso) & [Doug Mead](https://github.com/dmead28)
19
+ [#8638](https://github.com/CocoaPods/CocoaPods/pull/8638)
20
+
21
+ * Reduce the probability of multiple project UUID collisions.
22
+ [Sebastian Shanus](https://github.com/sebastianv1)
23
+ [#8636](https://github.com/CocoaPods/CocoaPods/pull/8636)
24
+
25
+
7
26
  ## 1.7.0.beta.2 (2019-03-08)
8
27
 
9
28
  ##### Enhancements
@@ -42,6 +61,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
42
61
  [tripleCC](https://github.com/tripleCC)
43
62
  [#7958](https://github.com/CocoaPods/CocoaPods/issues/7958)
44
63
 
64
+ * Fix crash when running `pod update` with `--sources` and `--project-directory`
65
+ [tripleCC](https://github.com/tripleCC)
66
+ [#8565](https://github.com/CocoaPods/CocoaPods/issues/8565)
67
+
45
68
  * Do not use spaces around variable assignment in generated embed framework script
46
69
  [florianbuerger](https://github.com/florianbuerger)
47
70
  [#8548](https://github.com/CocoaPods/CocoaPods/pull/8548)
@@ -49,6 +72,7 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
49
72
  * Do not link specs into user targets that are only used by app specs.
50
73
  [Samuel Giddins](https://github.com/segiddins)
51
74
 
75
+
52
76
  ## 1.7.0.beta.1 (2019-02-22)
53
77
 
54
78
  ##### Enhancements
@@ -57,7 +81,7 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
57
81
  [dacaiguoguogmail](https://github.com/dacaiguoguogmail)
58
82
  [#8461](https://github.com/CocoaPods/CocoaPods/issues/8461)
59
83
 
60
- * Set the path of development pod groups to root directory of the Pod
84
+ * Set the path of development pod groups to root directory of the Pod
61
85
  [Eric Amorde](https://github.com/amorde)
62
86
  [#8445](https://github.com/CocoaPods/CocoaPods/pull/8445)
63
87
  [#8503](https://github.com/CocoaPods/CocoaPods/pull/8503)
@@ -31,24 +31,29 @@ module Pod
31
31
  ['--private', 'Lint skips checks that apply only to public specs'],
32
32
  ['--swift-version=VERSION', 'The SWIFT_VERSION that should be used to lint the spec. ' \
33
33
  'This takes precedence over the Swift versions specified by the spec or a `.swift-version` file.'],
34
+ ['--include-podspecs=**/*.podspec', 'Additional ancillary podspecs which are used for linting via :path.'],
35
+ ['--external-podspecs=**/*.podspec', 'Additional ancillary podspecs which are used for linting '\
36
+ 'via :podspec. If there are --include-podspecs, then these are removed from them.'],
34
37
  ['--skip-import-validation', 'Lint skips validating that the pod can be imported'],
35
38
  ['--skip-tests', 'Lint skips building and running tests during validation'],
36
39
  ].concat(super)
37
40
  end
38
41
 
39
42
  def initialize(argv)
40
- @quick = argv.flag?('quick')
41
- @allow_warnings = argv.flag?('allow-warnings')
42
- @clean = argv.flag?('clean', true)
43
- @fail_fast = argv.flag?('fail-fast', false)
44
- @subspecs = argv.flag?('subspecs', true)
45
- @only_subspec = argv.option('subspec')
46
- @use_frameworks = !argv.flag?('use-libraries')
43
+ @quick = argv.flag?('quick')
44
+ @allow_warnings = argv.flag?('allow-warnings')
45
+ @clean = argv.flag?('clean', true)
46
+ @fail_fast = argv.flag?('fail-fast', false)
47
+ @subspecs = argv.flag?('subspecs', true)
48
+ @only_subspec = argv.option('subspec')
49
+ @use_frameworks = !argv.flag?('use-libraries')
47
50
  @use_modular_headers = argv.flag?('use-modular-headers')
48
- @source_urls = argv.option('sources', 'https://github.com/CocoaPods/Specs.git').split(',')
49
- @platforms = argv.option('platforms', '').split(',')
50
- @private = argv.flag?('private', false)
51
- @swift_version = argv.option('swift-version', nil)
51
+ @source_urls = argv.option('sources', 'https://github.com/CocoaPods/Specs.git').split(',')
52
+ @platforms = argv.option('platforms', '').split(',')
53
+ @private = argv.flag?('private', false)
54
+ @swift_version = argv.option('swift-version', nil)
55
+ @include_podspecs = argv.option('include-podspecs', nil)
56
+ @external_podspecs = argv.option('external-podspecs', nil)
52
57
  @skip_import_validation = argv.flag?('skip-import-validation', false)
53
58
  @skip_tests = argv.flag?('skip-tests', false)
54
59
  @podspecs_paths = argv.arguments!
@@ -76,6 +81,8 @@ module Pod
76
81
  validator.swift_version = @swift_version
77
82
  validator.skip_import_validation = @skip_import_validation
78
83
  validator.skip_tests = @skip_tests
84
+ validator.include_podspecs = @include_podspecs
85
+ validator.external_podspecs = @external_podspecs
79
86
  validator.validate
80
87
 
81
88
  unless @clean
@@ -29,47 +29,45 @@ module Pod
29
29
  end
30
30
 
31
31
  def initialize(argv)
32
- @pods = argv.arguments! unless argv.arguments.empty?
32
+ @pods = argv.arguments!
33
33
 
34
- source_urls = argv.option('sources', '').split(',')
35
- excluded_pods = argv.option('exclude-pods', '').split(',')
34
+ @source_urls = argv.option('sources', '').split(',')
35
+ @excluded_pods = argv.option('exclude-pods', '').split(',')
36
36
  @clean_install = argv.flag?('clean-install', false)
37
- unless source_urls.empty?
38
- source_pods = source_urls.flat_map { |url| config.sources_manager.source_with_name_or_url(url).pods }
39
- unless source_pods.empty?
40
- source_pods = source_pods.select { |pod| config.lockfile.pod_names.include?(pod) }
41
- if @pods
42
- @pods += source_pods
43
- else
44
- @pods = source_pods unless source_pods.empty?
45
- end
46
- end
47
- end
37
+ @source_pods = @source_urls.flat_map { |url| config.sources_manager.source_with_name_or_url(url).pods }
48
38
 
49
- unless excluded_pods.empty?
50
- @pods ||= config.lockfile.pod_names.dup
39
+ super
40
+ end
51
41
 
52
- non_installed_pods = (excluded_pods - @pods)
53
- unless non_installed_pods.empty?
54
- pluralized_words = non_installed_pods.length > 1 ? %w(Pods are) : %w(Pod is)
55
- message = "Trying to skip `#{non_installed_pods.join('`, `')}` #{pluralized_words.first} " \
56
- "which #{pluralized_words.last} not installed"
57
- raise Informative, message
58
- end
42
+ def run
43
+ verify_podfile_exists!
59
44
 
60
- @pods.delete_if { |pod| excluded_pods.include?(pod) }
61
- end
45
+ installer = installer_for_config
46
+ installer.repo_update = repo_update?(:default => true)
47
+ installer.clean_install = @clean_install
48
+ if @pods.any? || @excluded_pods.any? || @source_pods.any?
49
+ verify_lockfile_exists!
50
+ verify_pods_are_installed!
51
+ verify_excluded_pods_are_installed!
62
52
 
63
- super
53
+ @pods += @source_pods.select { |pod| config.lockfile.pod_names.include?(pod) }
54
+ @pods = config.lockfile.pod_names.dup if @pods.empty?
55
+ @pods -= @excluded_pods
56
+
57
+ installer.update = { :pods => @pods }
58
+ else
59
+ UI.puts 'Update all pods'.yellow
60
+ installer.update = true
61
+ end
62
+ installer.install!
64
63
  end
65
64
 
65
+ private
66
+
66
67
  # Check if all given pods are installed
67
68
  #
68
69
  def verify_pods_are_installed!
69
- lockfile_roots = config.lockfile.pod_names.map { |p| Specification.root_name(p) }
70
- missing_pods = @pods.map { |p| Specification.root_name(p) }.select do |pod|
71
- !lockfile_roots.include?(pod)
72
- end
70
+ missing_pods = lockfile_missing_pods(@pods)
73
71
 
74
72
  unless missing_pods.empty?
75
73
  message = if missing_pods.length > 1
@@ -83,21 +81,22 @@ module Pod
83
81
  end
84
82
  end
85
83
 
86
- def run
87
- verify_podfile_exists!
84
+ # Check if excluded pods are installed
85
+ #
86
+ def verify_excluded_pods_are_installed!
87
+ missing_pods = lockfile_missing_pods(@excluded_pods)
88
88
 
89
- installer = installer_for_config
90
- installer.repo_update = repo_update?(:default => true)
91
- installer.clean_install = @clean_install
92
- if @pods
93
- verify_lockfile_exists!
94
- verify_pods_are_installed!
95
- installer.update = { :pods => @pods }
96
- else
97
- UI.puts 'Update all pods'.yellow
98
- installer.update = true
89
+ unless missing_pods.empty?
90
+ pluralized_words = missing_pods.length > 1 ? %w(Pods are) : %w(Pod is)
91
+ message = "Trying to skip `#{missing_pods.join('`, `')}` #{pluralized_words.first} " \
92
+ "which #{pluralized_words.last} not installed"
93
+ raise Informative, message
99
94
  end
100
- installer.install!
95
+ end
96
+
97
+ def lockfile_missing_pods(pods)
98
+ lockfile_roots = config.lockfile.pod_names.map { |pod| Specification.root_name(pod) }
99
+ pods.map { |pod| Specification.root_name(pod) }.uniq - lockfile_roots
101
100
  end
102
101
  end
103
102
  end
@@ -1,5 +1,5 @@
1
1
  module Pod
2
2
  # The version of the CocoaPods command line tool.
3
3
  #
4
- VERSION = '1.7.0.beta.2'.freeze unless defined? Pod::VERSION
4
+ VERSION = '1.7.0.beta.3'.freeze unless defined? Pod::VERSION
5
5
  end
@@ -179,7 +179,7 @@ module Pod
179
179
  @metadata_cache = ProjectCache::ProjectMetadataCache.from_file(sandbox.project_metadata_cache_path)
180
180
  @project_cache_version = ProjectCache::ProjectCacheVersion.from_file(sandbox.project_version_cache_path)
181
181
 
182
- force_clean_install = clean_install || project_cache_version.version != Version.create(VersionMetadata.gem_version)
182
+ force_clean_install = clean_install || project_cache_version.version != Version.create(VersionMetadata.project_cache_version)
183
183
  cache_result = ProjectCache::ProjectCacheAnalyzer.new(sandbox, installation_cache, analysis_result.all_user_build_configurations,
184
184
  object_version, pod_targets, aggregate_targets, :clean_install => force_clean_install).analyze
185
185
  aggregate_targets_to_generate = cache_result.aggregate_targets_to_generate || []
@@ -459,7 +459,7 @@ module Pod
459
459
  new_lockfile = generate_lockfile
460
460
  return if new_lockfile == lockfile
461
461
 
462
- diff = Xcodeproj::Differ.hash_diff(lockfile.to_hash, new_lockfile.to_hash, :key_1 => 'Old Lockfile', :key_2 => 'New Lockfile')
462
+ return unless diff = Xcodeproj::Differ.hash_diff(lockfile.to_hash, new_lockfile.to_hash, :key_1 => 'Old Lockfile', :key_2 => 'New Lockfile')
463
463
  pretty_diff = YAMLHelper.convert_hash(diff, Lockfile::HASH_KEY_ORDER, "\n\n")
464
464
  pretty_diff.gsub!(':diff:', 'diff:'.yellow)
465
465
 
@@ -761,7 +761,7 @@ module Pod
761
761
  target_installation_results.aggregate_target_installation_results || {})
762
762
  metadata_cache.save_as(sandbox.project_metadata_cache_path)
763
763
 
764
- cache_version = ProjectCache::ProjectCacheVersion.new(VersionMetadata.gem_version)
764
+ cache_version = ProjectCache::ProjectCacheVersion.new(VersionMetadata.project_cache_version)
765
765
  cache_version.save_as(sandbox.project_version_cache_path)
766
766
  end
767
767
 
@@ -775,7 +775,8 @@ module Pod
775
775
  def integrate_user_project
776
776
  UI.section "Integrating client #{'project'.pluralize(aggregate_targets.map(&:user_project_path).uniq.count)}" do
777
777
  installation_root = config.installation_root
778
- integrator = UserProjectIntegrator.new(podfile, sandbox, installation_root, generated_aggregate_targets, :use_input_output_paths => !installation_options.disable_input_output_paths?)
778
+ integrator = UserProjectIntegrator.new(podfile, sandbox, installation_root, aggregate_targets, generated_aggregate_targets,
779
+ :use_input_output_paths => !installation_options.disable_input_output_paths?)
779
780
  integrator.integrate!
780
781
  end
781
782
  end
@@ -138,7 +138,7 @@ module Pod
138
138
  @podfile_dependency_cache.target_definition_list.group_by { |td| [td.name, td.user_project_path] }.
139
139
  each do |(name, project), definitions|
140
140
  next unless definitions.size > 1
141
- error = "The target `#{name}` is declared twice"
141
+ error = "The target `#{name}` is declared multiple times"
142
142
  error << " for the project `#{project}`" if project
143
143
  add_error(error << '.')
144
144
  end
@@ -26,7 +26,7 @@ module Pod
26
26
  #
27
27
  attr_reader :build_configurations
28
28
 
29
- # @return [String]
29
+ # @return [Integer]
30
30
  # The project object version to install with each target.
31
31
  #
32
32
  attr_reader :project_object_version
@@ -37,7 +37,7 @@ module Pod
37
37
  # @param [Array<AggregateTarget] aggregate_targets_to_generate @see #aggregate_targets_to_generate
38
38
  # @param [Hash{String => TargetCacheKey}] cache_key_by_target_label @see #cache_key_by_target_label
39
39
  # @param [Hash{String => Symbol}] build_configurations @see #build_configurations
40
- # @param [String] project_object_version @see #project_object_version
40
+ # @param [Integer] project_object_version @see #project_object_version
41
41
  #
42
42
  def initialize(pod_targets_to_generate, aggregate_targets_to_generate, cache_key_by_target_label,
43
43
  build_configurations, project_object_version)
@@ -18,7 +18,7 @@ module Pod
18
18
  #
19
19
  attr_reader :build_configurations
20
20
 
21
- # @return [String] The object version from the user project.
21
+ # @return [Integer] The object version from the user project.
22
22
  #
23
23
  attr_reader :project_object_version
24
24
 
@@ -39,7 +39,7 @@ module Pod
39
39
  # @param [Sandbox] sandbox @see #sandbox
40
40
  # @param [ProjectInstallationCache] cache @see #cache
41
41
  # @param [Hash{String => Symbol}] build_configurations @see #build_configurations
42
- # @param [String] project_object_version @see #project_object_version
42
+ # @param [Integer] project_object_version @see #project_object_version
43
43
  # @param [Array<PodTarget>] pod_targets @see #pod_targets
44
44
  # @param [Array<AggregateTarget>] aggregate_targets @see #aggregate_targets
45
45
  # @param [Bool] clean_install @see #clean_install
@@ -16,7 +16,7 @@ module Pod
16
16
  #
17
17
  attr_reader :build_configurations
18
18
 
19
- # @return [String]
19
+ # @return [Integer]
20
20
  # Project object stored in the cache.
21
21
  #
22
22
  attr_reader :project_object_version
@@ -25,7 +25,7 @@ module Pod
25
25
  #
26
26
  # @param [Hash{String => TargetCacheKey}] cache_key_by_target_label @see #cache_key_by_target_label
27
27
  # @param [Hash{String => Symbol}] build_configurations @see #build_configurations
28
- # @param [String] project_object_version @see #project_object_version
28
+ # @param [Integer] project_object_version @see #project_object_version
29
29
  #
30
30
  def initialize(cache_key_by_target_label = {}, build_configurations = nil, project_object_version = nil)
31
31
  @cache_key_by_target_label = cache_key_by_target_label
@@ -18,11 +18,8 @@ module Pod
18
18
  #
19
19
  attr_reader :podfile
20
20
 
21
- # @return [Project] the pods project which contains the libraries to
22
- # integrate.
21
+ # @return [Sandbox] The sandbox used for this installation.
23
22
  #
24
- # attr_reader :pods_project
25
-
26
23
  attr_reader :sandbox
27
24
 
28
25
  # @return [Pathname] the path of the installation.
@@ -37,23 +34,31 @@ module Pod
37
34
  #
38
35
  attr_reader :targets
39
36
 
37
+ # @return [Array<AggregateTarget>] the targets that require integration. This will always be equal or a smaller
38
+ # subset of #targets.
39
+ #
40
+ attr_reader :targets_to_integrate
41
+
40
42
  # @return [Boolean] whether to use input/output paths for build phase scripts
41
43
  #
42
44
  attr_reader :use_input_output_paths
43
45
  alias use_input_output_paths? use_input_output_paths
44
46
 
45
- # Init a new UserProjectIntegrator
47
+ # Initialize a new instance
46
48
  #
47
- # @param [Podfile] podfile @see #podfile
48
- # @param [Sandbox] sandbox @see #sandbox
49
+ # @param [Podfile] podfile @see #podfile
50
+ # @param [Sandbox] sandbox @see #sandbox
49
51
  # @param [Pathname] installation_root @see #installation_root
50
52
  # @param [Array<AggregateTarget>] targets @see #targets
53
+ # @param [Array<AggregateTarget>] targets_to_integrate @see #targets_to_integrate
54
+ # @param [Boolean] use_input_output_paths @see #use_input_output_paths
51
55
  #
52
- def initialize(podfile, sandbox, installation_root, targets, use_input_output_paths: true)
56
+ def initialize(podfile, sandbox, installation_root, targets, targets_to_integrate, use_input_output_paths: true)
53
57
  @podfile = podfile
54
58
  @sandbox = sandbox
55
59
  @installation_root = installation_root
56
60
  @targets = targets
61
+ @targets_to_integrate = targets_to_integrate
57
62
  @use_input_output_paths = use_input_output_paths
58
63
  end
59
64
 
@@ -64,9 +69,11 @@ module Pod
64
69
  #
65
70
  def integrate!
66
71
  create_workspace
72
+ deintegrated_projects = deintegrate_removed_targets
67
73
  integrate_user_targets
68
74
  warn_about_xcconfig_overrides
69
- save_projects
75
+ projects_to_save = (user_projects_to_integrate + deintegrated_projects).uniq
76
+ save_projects(projects_to_save)
70
77
  end
71
78
 
72
79
  #-----------------------------------------------------------------------#
@@ -85,7 +92,7 @@ module Pod
85
92
  # @return [void]
86
93
  #
87
94
  def create_workspace
88
- all_projects = user_project_paths.sort.push(sandbox.project_path).uniq
95
+ all_projects = user_project_paths_to_integrate.sort.push(sandbox.project_path).uniq
89
96
  file_references = all_projects.map do |path|
90
97
  relative_path = path.relative_path_from(workspace_path.dirname).to_s
91
98
  Xcodeproj::Workspace::FileReference.new(relative_path, 'group')
@@ -106,6 +113,23 @@ module Pod
106
113
  end
107
114
  end
108
115
 
116
+ # Deintegrates the targets of the user projects that are no longer part of the installation.
117
+ #
118
+ # @return [Array<Xcodeproj::PBXProject>] The list of projects that were deintegrated.
119
+ #
120
+ def deintegrate_removed_targets
121
+ Config.instance.with_changes(:silent => true) do
122
+ deintegrator = Deintegrator.new
123
+ all_project_targets = user_projects.flat_map(&:native_targets).uniq
124
+ all_native_targets = targets.flat_map(&:user_targets).uniq
125
+ targets_to_deintegrate = all_project_targets - all_native_targets
126
+ targets_to_deintegrate.each do |target|
127
+ deintegrator.deintegrate_target(target)
128
+ end
129
+ return targets_to_deintegrate.map(&:project).select(&:dirty?).uniq
130
+ end
131
+ end
132
+
109
133
  # Integrates the targets of the user projects with the libraries
110
134
  # generated from the {Podfile}.
111
135
  #
@@ -119,26 +143,17 @@ module Pod
119
143
  target_integrators = targets_to_integrate.sort_by(&:name).map do |target|
120
144
  TargetIntegrator.new(target, :use_input_output_paths => use_input_output_paths?)
121
145
  end
122
-
123
- Config.instance.with_changes(:silent => true) do
124
- deintegrator = Deintegrator.new
125
- all_project_targets = user_projects.flat_map(&:native_targets).uniq
126
- all_native_targets = targets_to_integrate.flat_map(&:user_targets).uniq
127
- targets_to_deintegrate = all_project_targets - all_native_targets
128
- targets_to_deintegrate.each do |target|
129
- deintegrator.deintegrate_target(target)
130
- end
131
- end
132
-
133
146
  target_integrators.each(&:integrate!)
134
147
  end
135
148
 
136
149
  # Save all user projects.
137
150
  #
151
+ # @param [Array<Xcodeproj::PBXProject>] projects The projects to save.
152
+ #
138
153
  # @return [void]
139
154
  #
140
- def save_projects
141
- user_projects.each do |project|
155
+ def save_projects(projects)
156
+ projects.each do |project|
142
157
  if project.dirty?
143
158
  project.save
144
159
  else
@@ -163,7 +178,7 @@ module Pod
163
178
  # warning to inform the user if needed.
164
179
  #
165
180
  def warn_about_xcconfig_overrides
166
- targets.each do |aggregate_target|
181
+ targets_to_integrate.each do |aggregate_target|
167
182
  aggregate_target.user_targets.each do |user_target|
168
183
  user_target.build_configurations.each do |config|
169
184
  xcconfig = aggregate_target.xcconfigs[config.name]
@@ -207,20 +222,38 @@ module Pod
207
222
  end
208
223
 
209
224
  # @return [Array<Pathname>] the paths of all the user projects referenced
210
- # by the target definitions.
225
+ # by the targets that require integration.
211
226
  #
212
227
  # @note Empty target definitions are ignored.
213
228
  #
214
- def user_project_paths
215
- targets.map(&:user_project_path).compact.uniq
229
+ def user_project_paths_to_integrate
230
+ targets_to_integrate.map(&:user_project_path).compact.uniq
231
+ end
232
+
233
+ # @return [Array<Xcodeproj::Project>] the projects of all the targets that require integration.
234
+ #
235
+ # @note Empty target definitions are ignored.
236
+ #
237
+ def user_projects_to_integrate
238
+ targets_to_integrate.map(&:user_project).compact.uniq
216
239
  end
217
240
 
241
+ # @return [Array<Xcodeproj::Project>] the projects of all the targets regardless of whether they are integrated
242
+ # or not.
243
+ #
244
+ # @note Empty target definitions are ignored.
245
+ #
218
246
  def user_projects
219
247
  targets.map(&:user_project).compact.uniq
220
248
  end
221
249
 
222
- def targets_to_integrate
223
- targets
250
+ # @return [Array<Pathname>] the paths of all the user projects from all targets regardless of whether they are
251
+ # integrated or not.
252
+ #
253
+ # @note Empty target definitions are ignored.
254
+ #
255
+ def user_project_paths
256
+ targets.map(&:user_project_path).compact.uniq
224
257
  end
225
258
 
226
259
  # Prints a warning informing the user that a build configuration of
@@ -229,7 +262,7 @@ module Pod
229
262
  # @param [Target::AggregateTarget] aggregate_target
230
263
  # The umbrella target.
231
264
  #
232
- # @param [XcodeProj::PBXNativeTarget] user_target
265
+ # @param [Xcodeproj::PBXNativeTarget] user_target
233
266
  # The native target.
234
267
  #
235
268
  # @param [Xcodeproj::XCBuildConfiguration] config
@@ -40,8 +40,7 @@ module Pod
40
40
 
41
41
  def create_pods_project(pod_targets, path, parent_project)
42
42
  platforms = pod_targets.map(&:platform)
43
- project = ProjectGenerator.new(sandbox, path,
44
- pod_targets, build_configurations, platforms,
43
+ project = ProjectGenerator.new(sandbox, path, pod_targets, build_configurations, platforms,
45
44
  project_object_version, false, :pod_target_subproject => true).generate!
46
45
  # Instead of saving every subproject to disk, we can optimize this by creating a temporary folder
47
46
  # the file reference can use so that we only have to call `save` once for all projects.
@@ -43,7 +43,7 @@ module Pod
43
43
  #
44
44
  attr_reader :config
45
45
 
46
- # @return [String] the object version for the projects we will generate.
46
+ # @return [Integer] the object version for the projects we will generate.
47
47
  #
48
48
  attr_reader :project_object_version
49
49
 
@@ -59,7 +59,7 @@ module Pod
59
59
  # @param [Hash{String => Symbol}] build_configurations @see #build_configurations
60
60
  # @param [InstallationOptions] installation_options @see #installation_options
61
61
  # @param [Config] config @see #config
62
- # @param [String] project_object_version @see #project_object_version
62
+ # @param [Integer] project_object_version @see #project_object_version
63
63
  # @param [ProjectMetadataCache] metadata_cache @see #metadata_cache
64
64
  #
65
65
  def initialize(sandbox, aggregate_targets, pod_targets, build_configurations, installation_options, config,
@@ -69,7 +69,7 @@ module Pod
69
69
  #
70
70
  def generate_available_uuid_list(count = 100)
71
71
  start = @generated_uuids.size
72
- uniques = Array.new(count) { |i| format('%.4s%07X0', @uuid_prefix, start + i) }
72
+ uniques = Array.new(count) { |i| format('%.6s%07X0', @uuid_prefix, start + i) }
73
73
  @generated_uuids += uniques
74
74
  @available_uuids += uniques
75
75
  end
@@ -197,7 +197,7 @@ module Pod
197
197
 
198
198
  #-------------------------------------------------------------------------#
199
199
 
200
- #  @!group Configuration
200
+ # @!group Configuration
201
201
 
202
202
  # @return [Bool] whether the validation should skip the checks that
203
203
  # requires the download of the library.
@@ -252,6 +252,16 @@ module Pod
252
252
  #
253
253
  attr_accessor :ignore_public_only_results
254
254
 
255
+ # @return [String] A glob for podspecs to be used during building of
256
+ # the local Podfile via :path.
257
+ #
258
+ attr_accessor :include_podspecs
259
+
260
+ # @return [String] A glob for podspecs to be used during building of
261
+ # the local Podfile via :podspec.
262
+ #
263
+ attr_accessor :external_podspecs
264
+
255
265
  attr_accessor :skip_import_validation
256
266
  alias_method :skip_import_validation?, :skip_import_validation
257
267
 
@@ -894,6 +904,10 @@ module Pod
894
904
  podspec = file.realpath
895
905
  local = local?
896
906
  urls = source_urls
907
+
908
+ additional_podspec_pods = external_podspecs ? Dir.glob(external_podspecs) : []
909
+ additional_path_pods = (include_podspecs ? Dir.glob(include_podspecs) : []) .select { |path| spec.name != Specification.from_file(path).name } - additional_podspec_pods
910
+
897
911
  Pod::Podfile.new do
898
912
  install! 'cocoapods', :deterministic_uuids => false
899
913
  # By default inhibit warnings for all pods, except the one being validated.
@@ -908,6 +922,17 @@ module Pod
908
922
  else
909
923
  pod name, :podspec => podspec.to_s, :inhibit_warnings => false
910
924
  end
925
+
926
+ additional_path_pods.each do |podspec_path|
927
+ podspec_name = File.basename(podspec_path, '.*')
928
+ pod podspec_name, :path => File.dirname(podspec_path)
929
+ end
930
+
931
+ additional_podspec_pods.each do |podspec_path|
932
+ podspec_name = File.basename(podspec_path, '.*')
933
+ pod podspec_name, :podspec => podspec_path
934
+ end
935
+
911
936
  test_spec_names.each do |test_spec_name|
912
937
  if local
913
938
  pod test_spec_name, :path => podspec.dirname.to_s, :inhibit_warnings => false
@@ -3,5 +3,9 @@ module Pod
3
3
  def self.gem_version
4
4
  Pod::VERSION
5
5
  end
6
+
7
+ def self.project_cache_version
8
+ VersionMetadata.gem_version
9
+ end
6
10
  end
7
11
  end
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.7.0.beta.2
4
+ version: 1.7.0.beta.3
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: 2019-03-08 00:00:00.000000000 Z
14
+ date: 2019-03-27 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.7.0.beta.2
22
+ version: 1.7.0.beta.3
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.7.0.beta.2
29
+ version: 1.7.0.beta.3
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: claide
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -207,7 +207,7 @@ dependencies:
207
207
  requirements:
208
208
  - - ">="
209
209
  - !ruby/object:Gem::Version
210
- version: 1.8.1
210
+ version: 1.8.2
211
211
  - - "<"
212
212
  - !ruby/object:Gem::Version
213
213
  version: '2.0'
@@ -217,7 +217,7 @@ dependencies:
217
217
  requirements:
218
218
  - - ">="
219
219
  - !ruby/object:Gem::Version
220
- version: 1.8.1
220
+ version: 1.8.2
221
221
  - - "<"
222
222
  - !ruby/object:Gem::Version
223
223
  version: '2.0'
@@ -557,8 +557,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
557
557
  - !ruby/object:Gem::Version
558
558
  version: '0'
559
559
  requirements: []
560
- rubyforge_project:
561
- rubygems_version: 2.6.14
560
+ rubygems_version: 3.0.1
562
561
  signing_key:
563
562
  specification_version: 3
564
563
  summary: The Cocoa library package manager.