cocoapods 1.0.0.beta.1 → 1.0.0.beta.2

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: 314a9c28d7e724d52123840995db3f62cca1f870
4
- data.tar.gz: 6f932912c5fbbc7bd9e71a96e89055bddfb860e1
3
+ metadata.gz: 99aac79324a67815f74a8175fa16465c8b7a3c21
4
+ data.tar.gz: 234cd7e4caa85cd06b38e04037ceff2ab548d29b
5
5
  SHA512:
6
- metadata.gz: 6f02253e12e95ee996665f234a070536cf672af5ef4890cf12dc005bf8f5c8fd9c78b6f505767c2053868e08c6a12b0ccdb0206e9a2e2dd38a3dc73983534a21
7
- data.tar.gz: 3fe3bafbeff16966db0506d358747682031c2dc13d99d2367937e51793f17a7d5d37018a03771943dac94619d28e1e6c6aa124ed9eda65296fcd49303d9f4ee4
6
+ metadata.gz: 45a4d7e290988cd133109a74ae79268ccc3229a8f5772aff37d6b1205ca71d3d279acbc642f41f881be97b21c1f4dbd45d160692ce9e5266af5e97661e04c30b
7
+ data.tar.gz: a6da707743eb4dd997d5496d0071bb31b471701604192c3c8b1a08604fd076262a7c54153a022aa8a0b15be5f9b5c365b33c2dab258dd1c0a6ec0fdbe94864d2
@@ -4,6 +4,44 @@ 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.0.0.beta.2 (2016-01-05)
8
+
9
+ ##### Enhancements
10
+
11
+ * Present a friendly error suggesting running `pod install` when there are
12
+ missing local podspecs when running `pod outdated`.
13
+ [Samuel Giddins](https://github.com/segiddins)
14
+ [#4716](https://github.com/CocoaPods/CocoaPods/issues/4716)
15
+
16
+ * Don't warn about setting base config when identical to current config.
17
+ [Jed Lewison](https://github.com/jedlewison)
18
+ [#4722](https://github.com/CocoaPods/CocoaPods/issues/4722)
19
+
20
+ * Add `user_targets` method to the `UmbrellaTargetDescription` in the
21
+ post-install hooks context.
22
+ [Samuel Giddins](https://github.com/segiddins)
23
+
24
+ ##### Bug Fixes
25
+
26
+ * Always fetch a `:podspec` dependency's podspec when it is missing in the
27
+ `Pods` directory.
28
+ [Samuel Giddins](https://github.com/segiddins)
29
+ [#4717](https://github.com/CocoaPods/CocoaPods/issues/4717)
30
+
31
+ * The `Info.plist` file will now be generated properly for resource bundles,
32
+ setting the proper `CFBundlePackageType` and omitting the `CFBundleExecutable`
33
+ key.
34
+ [Samuel Giddins](https://github.com/segiddins)
35
+ [Xcodeproj#259](https://github.com/CocoaPods/Xcodeproj/issues/259)
36
+
37
+ * Fix crash when deintegrating due to major version change and there are
38
+ multiple root-level Xcode projects.
39
+ [Samuel Giddins](https://github.com/segiddins)
40
+
41
+ * Ensure the `sandbox_root` attribute is set on the pre-install hooks context.
42
+ [Samuel Giddins](https://github.com/segiddins)
43
+
44
+
7
45
  ## 1.0.0.beta.1 (2015-12-30)
8
46
 
9
47
  ##### Breaking
@@ -52,6 +52,7 @@ module Pod
52
52
 
53
53
  def updates
54
54
  @updates ||= begin
55
+ ensure_external_podspecs_present!
55
56
  spec_sets.map do |set|
56
57
  spec = set.specification
57
58
  source_version = set.versions.first
@@ -111,6 +112,17 @@ module Pod
111
112
  config.lockfile
112
113
  end
113
114
  end
115
+
116
+ def ensure_external_podspecs_present!
117
+ return unless config.podfile
118
+ config.podfile.dependencies.each do |dep|
119
+ next if dep.external_source.nil?
120
+ unless config.sandbox.specification(dep.root_name)
121
+ raise Informative, 'You must run `pod install` first to ensure that the ' \
122
+ "podspec for `#{dep.root_name}` has been fetched."
123
+ end
124
+ end
125
+ end
114
126
  end
115
127
  end
116
128
  end
@@ -1,5 +1,5 @@
1
1
  module Pod
2
2
  # The version of the CocoaPods command line tool.
3
3
  #
4
- VERSION = '1.0.0.beta.1'.freeze unless defined? Pod::VERSION
4
+ VERSION = '1.0.0.beta.2'.freeze unless defined? Pod::VERSION
5
5
  end
@@ -9,12 +9,20 @@ module Pod
9
9
  #
10
10
  attr_reader :target
11
11
 
12
+ # @return [Symbol] the CFBundlePackageType of the target this Info.plist
13
+ # file is for.
14
+ #
15
+ attr_reader :bundle_package_type
16
+
12
17
  # Initialize a new instance
13
18
  #
14
19
  # @param [Target] target @see target
15
20
  #
16
- def initialize(target)
21
+ # @param [Symbol] bundle_package_type @see bundle_package_type
22
+ #
23
+ def initialize(target, bundle_package_type: :fmwk)
17
24
  @target = target
25
+ @bundle_package_type = bundle_package_type
18
26
  end
19
27
 
20
28
  # Generates and saves the Info.plist to the given path.
@@ -51,7 +59,7 @@ module Pod
51
59
  # @return [String]
52
60
  #
53
61
  def generate
54
- header + dict + footer
62
+ to_plist(info)
55
63
  end
56
64
 
57
65
  private
@@ -61,51 +69,56 @@ module Pod
61
69
  <?xml version="1.0" encoding="UTF-8"?>
62
70
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
63
71
  <plist version="1.0">
64
- <dict>
65
72
  PLIST
66
73
  end
67
74
 
68
75
  def footer
69
76
  <<-PLIST
70
- </dict>
71
77
  </plist>
72
78
  PLIST
73
79
  end
74
80
 
75
- def dict
76
- dict = <<-PLIST
77
- <key>CFBundleDevelopmentRegion</key>
78
- <string>en</string>
79
- <key>CFBundleExecutable</key>
80
- <string>${EXECUTABLE_NAME}</string>
81
- <key>CFBundleIdentifier</key>
82
- <string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
83
- <key>CFBundleInfoDictionaryVersion</key>
84
- <string>6.0</string>
85
- <key>CFBundleName</key>
86
- <string>${PRODUCT_NAME}</string>
87
- <key>CFBundlePackageType</key>
88
- <string>FMWK</string>
89
- <key>CFBundleShortVersionString</key>
90
- <string>#{target_version}</string>
91
- <key>CFBundleSignature</key>
92
- <string>????</string>
93
- <key>CFBundleVersion</key>
94
- <string>${CURRENT_PROJECT_VERSION}</string>
95
- <key>NSPrincipalClass</key>
96
- <string></string>
97
- PLIST
81
+ def to_plist(root)
82
+ serialize(root, header) << footer
83
+ end
98
84
 
99
- if target.platform.name == :tvos
100
- dict << <<-PLIST
101
- <key>UIRequiredDeviceCapabilities</key>
102
- <array>
103
- <string>arm64</string>
104
- </array>
105
- PLIST
85
+ def serialize(value, output, indentation = 0)
86
+ indent = ' ' * indentation
87
+ case value
88
+ when Array
89
+ output << indent << "<array>\n"
90
+ value.each { |v| serialize(v, output, indentation + 2) }
91
+ output << indent << "</array>\n"
92
+ when Hash
93
+ output << indent << "<dict>\n"
94
+ value.to_a.sort_by(&:first).each do |key, v|
95
+ output << indent << ' ' << "<key>#{key}</key>\n"
96
+ serialize(v, output, indentation + 2)
97
+ end
98
+ output << indent << "</dict>\n"
99
+ when String
100
+ output << indent << "<string>#{value}</string>\n"
106
101
  end
102
+ output
103
+ end
104
+
105
+ def info
106
+ info = {
107
+ 'CFBundleIdentifier' => '${PRODUCT_BUNDLE_IDENTIFIER}',
108
+ 'CFBundleInfoDictionaryVersion' => '6.0',
109
+ 'CFBundleName' => '${PRODUCT_NAME}',
110
+ 'CFBundlePackageType' => bundle_package_type.to_s.upcase,
111
+ 'CFBundleShortVersionString' => target_version,
112
+ 'CFBundleSignature' => '????',
113
+ 'CFBundleVersion' => '${CURRENT_PROJECT_VERSION}',
114
+ 'NSPrincipalClass' => '',
115
+ 'CFBundleDevelopmentRegion' => 'en',
116
+ }
117
+
118
+ info['CFBundleExecutable'] = '${EXECUTABLE_NAME}' if bundle_package_type != :bndl
119
+ info['UIRequiredDeviceCapabilities'] = %w(arm64) if target.platform.name == :tvos
107
120
 
108
- dict
121
+ info
109
122
  end
110
123
  end
111
124
  end
@@ -502,11 +502,11 @@ module Pod
502
502
  def deintegrate_if_different_major_version
503
503
  return unless lockfile
504
504
  return if lockfile.cocoapods_version.major == Version.create(VERSION).major
505
- UI.section('Fully deintegrating due to major version update') do
505
+ UI.section('Re-creating CocoaPods due to major version update.') do
506
506
  projects = Pathname.glob(config.installation_root + '*.xcodeproj').map { |path| Xcodeproj::Project.open(path) }
507
507
  deintegrator = Deintegrator.new
508
- projects.sort.each do |project|
509
- deintegrator.deintegrate_project(project)
508
+ projects.each do |project|
509
+ config.with_changes(:silent => true) { deintegrator.deintegrate_project(project) }
510
510
  project.save if project.dirty?
511
511
  end
512
512
  end
@@ -443,7 +443,7 @@ module Pod
443
443
  unless dependencies_to_fetch.empty?
444
444
  UI.section 'Fetching external sources' do
445
445
  dependencies_to_fetch.sort.each do |dependency|
446
- fetch_external_source(dependency, !pods_to_fetch.include?(dependency.name))
446
+ fetch_external_source(dependency, !pods_to_fetch.include?(dependency.root_name))
447
447
  end
448
448
  end
449
449
  end
@@ -481,7 +481,7 @@ module Pod
481
481
  deps_to_fetch = deps_with_external_source.select { |dep| pods_to_fetch.include?(dep.name) }
482
482
  deps_to_fetch_if_needed = deps_with_external_source.select { |dep| result.podfile_state.unchanged.include?(dep.name) }
483
483
  deps_to_fetch += deps_to_fetch_if_needed.select do |dep|
484
- sandbox.specification(dep.name).nil? ||
484
+ sandbox.specification(dep.root_name).nil? ||
485
485
  !dep.external_source[:path].nil? ||
486
486
  !sandbox.pod_dir(dep.root_name).directory? ||
487
487
  checkout_requires_update?(dep)
@@ -506,6 +506,9 @@ module Pod
506
506
  elsif update_mode == :all
507
507
  pods_to_fetch += result.podfile_state.unchanged + result.podfile_state.deleted
508
508
  end
509
+ pods_to_fetch += podfile.dependencies.
510
+ select { |dep| Hash(dep.external_source).key?(:podspec) && sandbox.specification_path(dep.root_name).nil? }.
511
+ map(&:root_name)
509
512
  pods_to_fetch
510
513
  end
511
514
  end
@@ -38,7 +38,7 @@ module Pod
38
38
  aggregate_targets.each do |umbrella|
39
39
  desc = UmbrellaTargetDescription.new
40
40
  desc.user_project = umbrella.user_project
41
- desc.user_target_uuids = umbrella.user_target_uuids
41
+ desc.user_targets = umbrella.user_targets
42
42
  desc.specs = umbrella.specs
43
43
  desc.platform_name = umbrella.platform.name
44
44
  desc.platform_deployment_target = umbrella.platform.deployment_target.to_s
@@ -69,6 +69,11 @@ module Pod
69
69
  user_project.path if user_project
70
70
  end
71
71
 
72
+ # @return [Array<PBXNativeTarget>]
73
+ # The list of user targets integrated by this umbrella target.
74
+ #
75
+ attr_accessor :user_targets
76
+
72
77
  # @return [Array<String>] The list of the UUIDs of the
73
78
  # user targets integrated by this umbrella
74
79
  # target. They can be used to find the
@@ -76,7 +81,9 @@ module Pod
76
81
  # to find the targets opening the project with
77
82
  # Xcodeproj.
78
83
  #
79
- attr_accessor :user_target_uuids
84
+ def user_target_uuids
85
+ user_targets.map(&:uuid)
86
+ end
80
87
 
81
88
  # @return [Array<Specification>] The list of the
82
89
  # specifications of the target.
@@ -33,6 +33,7 @@ module Pod
33
33
  result = new
34
34
  result.podfile = podfile
35
35
  result.sandbox = sandbox
36
+ result.sandbox_root = sandbox.root.to_s
36
37
  result.lockfile = lockfile
37
38
  result
38
39
  end
@@ -169,7 +169,7 @@ module Pod
169
169
  path = target.info_plist_path
170
170
  path.dirname.mkdir unless path.dirname.exist?
171
171
  info_plist_path = path.dirname + "ResourceBundle-#{bundle_name}-#{path.basename}"
172
- generator = Generator::InfoPlistFile.new(target)
172
+ generator = Generator::InfoPlistFile.new(target, :bundle_package_type => :bndl)
173
173
  generator.save_as(info_plist_path)
174
174
  add_file_to_support_group(info_plist_path)
175
175
 
@@ -88,12 +88,14 @@ module Pod
88
88
  if existing.real_path.to_path.start_with?(pod_bundle.sandbox.root.to_path << '/')
89
89
  set_base_configuration_reference.call
90
90
  elsif !xcconfig_includes_target_xcconfig?(config.base_configuration_reference, path)
91
- UI.warn 'CocoaPods did not set the base configuration of your ' \
92
- 'project because your project already has a custom ' \
93
- 'config set. In order for CocoaPods integration to work at ' \
94
- 'all, please either set the base configurations of the target ' \
95
- "`#{target.name}` to `#{path}` or include the `#{path}` in your " \
96
- "build configuration (#{UI.path(existing.real_path)})."
91
+ unless existing_config_is_identical_to_pod_config?(existing.real_path, pod_bundle.xcconfig_path(config.name))
92
+ UI.warn 'CocoaPods did not set the base configuration of your ' \
93
+ 'project because your project already has a custom ' \
94
+ 'config set. In order for CocoaPods integration to work at ' \
95
+ 'all, please either set the base configurations of the target ' \
96
+ "`#{target.name}` to `#{path}` or include the `#{path}` in your " \
97
+ "build configuration (#{UI.path(existing.real_path)})."
98
+ end
97
99
  end
98
100
  elsif config.base_configuration_reference.nil? || file_ref.nil?
99
101
  set_base_configuration_reference.call
@@ -159,6 +161,16 @@ module Pod
159
161
  /x
160
162
  base_config_ref.real_path.readlines.find { |line| line =~ regex }
161
163
  end
164
+
165
+ # Checks to see if the config files at two paths exist and are identical
166
+ #
167
+ # @param The existing config path
168
+ #
169
+ # @param The pod config path
170
+ #
171
+ def self.existing_config_is_identical_to_pod_config?(existing_config_path, pod_config_path)
172
+ existing_config_path.file? && (!pod_config_path.file? || FileUtils.compare_file(existing_config_path, pod_config_path))
173
+ end
162
174
  end
163
175
  end
164
176
  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.0.0.beta.1
4
+ version: 1.0.0.beta.2
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: 2015-12-30 00:00:00.000000000 Z
14
+ date: 2016-01-05 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.0.0.beta.1
22
+ version: 1.0.0.beta.2
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.0.0.beta.1
29
+ version: 1.0.0.beta.2
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: claide
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -133,7 +133,7 @@ dependencies:
133
133
  requirements:
134
134
  - - '>='
135
135
  - !ruby/object:Gem::Version
136
- version: 1.0.0.beta.1
136
+ version: 1.0.0.beta.2
137
137
  - - <
138
138
  - !ruby/object:Gem::Version
139
139
  version: '2.0'
@@ -143,7 +143,7 @@ dependencies:
143
143
  requirements:
144
144
  - - '>='
145
145
  - !ruby/object:Gem::Version
146
- version: 1.0.0.beta.1
146
+ version: 1.0.0.beta.2
147
147
  - - <
148
148
  - !ruby/object:Gem::Version
149
149
  version: '2.0'
@@ -173,7 +173,7 @@ dependencies:
173
173
  requirements:
174
174
  - - '>='
175
175
  - !ruby/object:Gem::Version
176
- version: 1.0.0.beta.1
176
+ version: 1.0.0.beta.2
177
177
  - - <
178
178
  - !ruby/object:Gem::Version
179
179
  version: '2.0'
@@ -183,7 +183,7 @@ dependencies:
183
183
  requirements:
184
184
  - - '>='
185
185
  - !ruby/object:Gem::Version
186
- version: 1.0.0.beta.1
186
+ version: 1.0.0.beta.2
187
187
  - - <
188
188
  - !ruby/object:Gem::Version
189
189
  version: '2.0'