cocoapods 0.37.0 → 0.37.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
  SHA1:
3
- metadata.gz: b22362269f9331be853e50503dbd688fc7c7fb8e
4
- data.tar.gz: 06d85077733f0d308b7713d6c47907c0665b05cb
3
+ metadata.gz: b26721da5616743033e4f4da36b3513e73a8d364
4
+ data.tar.gz: c4cbc740b6362f10186b1dd194e6f7177eff6bf1
5
5
  SHA512:
6
- metadata.gz: 4ce806f4ce0a23242570c6b7185d8868f8fc11c11e14ac907564717edb2aa72801d25995029d23d63cb850865e85e4a3849f9eb72b3838ca3477af7471d1d9f5
7
- data.tar.gz: 332cd2d31e2bfefedc05a39d2dfda4a757247feda89e5e97d1c5f4652443ee1e04c84747f14fdca4343f7ff1fde7926c6d2eec0ea7aa9286a719b23f32f2839e
6
+ metadata.gz: 96968927ffc9bc4f081a2c617815f61209612d7615960ffa3e24bf0d65edd1cf43425fefbb94643466232ec8a311597ac65a5cc37e4ecff343e8bb02a1c3d1c9
7
+ data.tar.gz: 8c729bea9a3b519050522b945107d67623e35e45d6e96059f40c7ed7344b29031733f8a08e384d540e9c0215a1665ed0596805d9601bd8be30ddf5c8da616e8d
@@ -4,8 +4,50 @@ 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
+ ## 0.37.1
8
+
9
+ ##### Bug Fixes
10
+
11
+ * [Cache] Fixes a bug that caused that a pod, which was cached once is not updated
12
+ correctly when needed e.g. for `pod spec lint`.
13
+ [Marius Rackwitz](https://github.com/mrackwitz)
14
+ [#3498](https://github.com/CocoaPods/CocoaPods/issues/3498)
15
+
16
+ * Only add the "Embed Pods Frameworks" script for application and unit test targets.
17
+ [Marius Rackwitz](https://github.com/mrackwitz)
18
+ [#3440](https://github.com/CocoaPods/CocoaPods/issues/3440)
19
+
20
+ * C++ source files with `.cc`, `.cxx` and `.c++` extensions now have their
21
+ compiler flags set correctly.
22
+ [Chongyu Zhu](https://github.com/lembacon)
23
+ [Kyle Fuller](https://github.com/kylef)
24
+
25
+ * Handle broken symlinks when installing a Pod.
26
+ [Daniel Barden](https://github.com/dbarden)
27
+ [#3515](https://github.com/cocoapods/cocoapods/issues/3515)
28
+
29
+ * Just remove write permissions from files, so executables are unaffected.
30
+ [Mason Glidden](https://github.com/mglidden)
31
+ [#3501](https://github.com/CocoaPods/CocoaPods/issues/3501)
32
+
33
+ * Always copy the generated `Podfile.lock` to `Pods/Manifest.lock` so they are
34
+ guaranteed to match, character-by-character, after installation.
35
+ [Samuel Giddins](https://github.com/segiddins)
36
+ [#3502](https://github.com/CocoaPods/CocoaPods/issues/3502)
37
+
38
+ * Don't generate an umbrella header when a custom module map is specified. This
39
+ avoids an incomplete module map warning.
40
+ [Samuel Giddins](https://github.com/segiddins)
41
+
42
+ * Actually allow skipping the download cache by downloading directly to the
43
+ download target when requested.
44
+ [Samuel Giddins](https://github.com/segiddins)
45
+
46
+
7
47
  ## 0.37.0
8
48
 
49
+ For more details, see 📝 [CocoaPods 0.37](http://blog.cocoapods.org/CocoaPods-0.37/) on our blog.
50
+
9
51
  ##### Bug Fixes
10
52
 
11
53
  * Print the UTF-8 warning to STDERR.
@@ -24,9 +24,9 @@ module Pod
24
24
  #
25
25
  def run
26
26
  if updates.empty?
27
- UI.puts 'No updates are available.'.yellow
27
+ UI.puts 'No pod updates are available.'.yellow
28
28
  else
29
- UI.section 'The following updates are available:' do
29
+ UI.section 'The following pod updates are available:' do
30
30
  updates.each do |(name, from_version, matching_version, to_version)|
31
31
  UI.puts "- #{name} #{from_version} -> #{matching_version} " \
32
32
  "(latest version #{to_version})"
@@ -24,6 +24,21 @@ module Pod
24
24
  :cache_root => Pathname.new(Dir.home) + 'Library/Caches/CocoaPods',
25
25
  }
26
26
 
27
+ # Applies the given changes to the config for the duration of the given
28
+ # block.
29
+ #
30
+ def with_changes(changes)
31
+ old = {}
32
+ changes.keys.each do |key|
33
+ key = key.to_sym
34
+ old[key] = send(key) if respond_to?(key)
35
+ end
36
+ configure_with(changes)
37
+ yield if block_given?
38
+ ensure
39
+ configure_with(old)
40
+ end
41
+
27
42
  public
28
43
 
29
44
  #-------------------------------------------------------------------------#
@@ -27,22 +27,97 @@ module Pod
27
27
  def self.download(
28
28
  request,
29
29
  target,
30
- cache_path: !Config.instance.skip_download_cache && Config.instance.cache_root + 'Pods'
30
+ cache_path: !Config.instance.skip_download_cache && Config.instance.clean? && Config.instance.cache_root + 'Pods'
31
31
  )
32
- cache_path, tmp_cache = Pathname(Dir.mktmpdir), true unless cache_path
33
- cache = Cache.new(cache_path)
34
- result = cache.download_pod(request)
35
- if target && result.location
32
+ if cache_path
33
+ cache = Cache.new(cache_path)
34
+ result = cache.download_pod(request)
35
+ else
36
+ result, _ = download_request(request, target)
37
+ end
38
+
39
+ if target && result.location && target != result.location
36
40
  UI.message "Copying #{request.name} from `#{result.location}` to #{UI.path target}", '> ' do
37
41
  FileUtils.rm_rf target
38
42
  FileUtils.cp_r(result.location, target)
39
43
  end
40
44
  end
41
45
  result
42
- ensure
43
- FileUtils.rm_r cache_path if tmp_cache
44
46
  end
45
47
 
48
+ # Performs the download from the given `request` to the given `target` location.
49
+ #
50
+ # @return [Response, Hash<String,Specification>]
51
+ # The download response for this download, and the specifications
52
+ # for this download grouped by name.
53
+ #
54
+ # @param [Request] request
55
+ # the request that describes this pod download.
56
+ #
57
+ # @param [Pathname,Nil] target
58
+ # the location to which this pod should be downloaded. If `nil`,
59
+ # then the pod will only be cached.
60
+ #
61
+ def self.download_request(request, target)
62
+ result = Response.new
63
+ result.checkout_options = download_source(request.name, target, request.params, request.head?)
64
+ result.location = target
65
+
66
+ if request.released_pod?
67
+ result.spec = request.spec
68
+ podspecs = { request.name => request.spec }
69
+ else
70
+ podspecs = Sandbox::PodspecFinder.new(target).podspecs
71
+ podspecs[request.name] = request.spec if request.spec
72
+ podspecs.each do |name, spec|
73
+ if request.name == name
74
+ result.spec = spec
75
+ end
76
+ end
77
+ end
78
+
79
+ [result, podspecs]
80
+ end
81
+
82
+ private
83
+
84
+ # Downloads a pod with the given `name` and `params` to `target`.
85
+ #
86
+ # @param [String] name
87
+ #
88
+ # @param [Pathname] target
89
+ #
90
+ # @param [Hash<Symbol,String>] params
91
+ #
92
+ # @param [Boolean] head
93
+ #
94
+ # @return [Hash] The checkout options required to re-download this exact
95
+ # same source.
96
+ #
97
+ def self.download_source(name, target, params, head)
98
+ FileUtils.rm_rf(target)
99
+ downloader = Downloader.for_target(target, params)
100
+ if head
101
+ unless downloader.head_supported?
102
+ raise Informative, "The pod '#{name}' does not " \
103
+ "support the :head option, as it uses a #{downloader.name} " \
104
+ 'source. Remove that option to use this pod.'
105
+ end
106
+ downloader.download_head
107
+ else
108
+ downloader.download
109
+ end
110
+ target.mkpath
111
+
112
+ if downloader.options_specific? && !head
113
+ params
114
+ else
115
+ downloader.checkout_options
116
+ end
117
+ end
118
+
119
+ public
120
+
46
121
  class DownloaderError; include CLAide::InformativeError; end
47
122
 
48
123
  class Base
@@ -99,25 +99,14 @@ module Pod
99
99
  #
100
100
  def uncached_pod(request)
101
101
  in_tmpdir do |target|
102
- result = Response.new
103
- result.checkout_options = download(request.name, target, request.params, request.head?)
104
-
105
- if request.released_pod?
106
- result.spec = request.spec
107
- result.location = destination = path_for_pod(request, :params => result.checkout_options)
108
- copy_and_clean(target, destination, request.spec)
109
- write_spec(request.spec, path_for_spec(request, :params => result.checkout_options))
110
- else
111
- podspecs = Sandbox::PodspecFinder.new(target).podspecs
112
- podspecs[request.name] = request.spec if request.spec
113
- podspecs.each do |name, spec|
114
- destination = path_for_pod(request, :name => name, :params => result.checkout_options)
115
- copy_and_clean(target, destination, spec)
116
- write_spec(spec, path_for_spec(request, :name => name, :params => result.checkout_options))
117
- if request.name == name
118
- result.location = destination
119
- result.spec = spec
120
- end
102
+ result, podspecs = download(request, target)
103
+
104
+ podspecs.each do |name, spec|
105
+ destination = path_for_pod(request, :name => name, :params => result.checkout_options)
106
+ copy_and_clean(target, destination, spec)
107
+ write_spec(spec, path_for_spec(request, :name => name, :params => result.checkout_options))
108
+ if request.name == name
109
+ result.location = destination
121
110
  end
122
111
  end
123
112
 
@@ -125,37 +114,8 @@ module Pod
125
114
  end
126
115
  end
127
116
 
128
- # Downloads a pod with the given `name` and `params` to `target`.
129
- #
130
- # @param [String] name
131
- #
132
- # @param [Pathname] target
133
- #
134
- # @param [Hash<Symbol,String>] params
135
- #
136
- # @param [Boolean] head
137
- #
138
- # @return [Hash] The checkout options required to re-download this exact
139
- # same source.
140
- #
141
- def download(name, target, params, head)
142
- downloader = Downloader.for_target(target, params)
143
- if head
144
- unless downloader.head_supported?
145
- raise Informative, "The pod '#{name}' does not " \
146
- "support the :head option, as it uses a #{downloader.name} " \
147
- 'source. Remove that option to use this pod.'
148
- end
149
- downloader.download_head
150
- else
151
- downloader.download
152
- end
153
-
154
- if downloader.options_specific? && !head
155
- params
156
- else
157
- downloader.checkout_options
158
- end
117
+ def download(request, target)
118
+ Downloader.download_request(request, target)
159
119
  end
160
120
 
161
121
  # Performs the given block inside a temporary directory,
@@ -184,6 +144,7 @@ module Pod
184
144
  def copy_and_clean(source, destination, spec)
185
145
  specs_by_platform = group_subspecs_by_platform(spec)
186
146
  destination.parent.mkpath
147
+ FileUtils.rm_rf(destination)
187
148
  FileUtils.cp_r(source, destination)
188
149
  Pod::Installer::PodSourcePreparer.new(spec, destination).prepare!
189
150
  Sandbox::PodDirCleaner.new(destination, specs_by_platform).clean!
@@ -54,7 +54,7 @@ module Pod
54
54
  require 'shellwords'
55
55
 
56
56
  command = command.map(&:to_s)
57
- full_command = "#{bin.shellescape} #{command.map(&:shellescape).join(' ')}"
57
+ full_command = "#{bin} #{command.join(' ')}"
58
58
 
59
59
  if Config.instance.verbose?
60
60
  UI.message("$ #{full_command}")
@@ -1,5 +1,5 @@
1
1
  module Pod
2
2
  # The version of the cocoapods command line tool.
3
3
  #
4
- VERSION = '0.37.0' unless defined? Pod::VERSION
4
+ VERSION = '0.37.1' unless defined? Pod::VERSION
5
5
  end
@@ -605,7 +605,9 @@ module Pod
605
605
  end
606
606
 
607
607
  UI.message "- Writing Manifest in #{UI.path sandbox.manifest_path}" do
608
- @lockfile.write_to_disk(sandbox.manifest_path)
608
+ sandbox.manifest_path.open('w') do |f|
609
+ f.write config.lockfile_path.read
610
+ end
609
611
  end
610
612
  end
611
613
 
@@ -103,8 +103,11 @@ module Pod
103
103
  # We don't want to lock diretories, as that forces you to override
104
104
  # those permissions if you decide to delete the Pods folder.
105
105
  Dir.glob(root + '**/*').each do |file|
106
- unless File.directory?(file)
107
- File.chmod(0444, file)
106
+ if File.file?(file)
107
+ # Only remove write permission, since some pods (like Crashlytics)
108
+ # have executable files.
109
+ new_permissions = File.stat(file).mode & ~0222
110
+ File.chmod(new_permissions, file)
108
111
  end
109
112
  end
110
113
  end
@@ -256,10 +256,10 @@ module Pod
256
256
  end
257
257
 
258
258
  def create_module_map
259
- return super unless module_map = target.file_accessors.first.module_map
259
+ return super unless custom_module_map
260
260
  path = target.module_map_path
261
261
  UI.message "- Copying module map file to #{UI.path(path)}" do
262
- FileUtils.cp(module_map, path)
262
+ FileUtils.cp(custom_module_map, path)
263
263
  add_file_to_support_group(path)
264
264
 
265
265
  native_target.build_configurations.each do |c|
@@ -269,6 +269,14 @@ module Pod
269
269
  end
270
270
  end
271
271
 
272
+ def create_umbrella_header
273
+ return super unless custom_module_map
274
+ end
275
+
276
+ def custom_module_map
277
+ @custom_module_map ||= target.file_accessors.first.module_map
278
+ end
279
+
272
280
  #-----------------------------------------------------------------------#
273
281
  end
274
282
  end
@@ -9,6 +9,11 @@ module Pod
9
9
  class TargetIntegrator
10
10
  autoload :XCConfigIntegrator, 'cocoapods/installer/user_project_integrator/target_integrator/xcconfig_integrator'
11
11
 
12
+ # @return [Array<Symbol>] the symbol types, which require that the pod
13
+ # frameworks are embedded in the output directory / product bundle.
14
+ #
15
+ EMBED_FRAMEWORK_TARGET_TYPES = [:application, :unit_test_bundle].freeze
16
+
12
17
  # @return [Target] the target that should be integrated.
13
18
  #
14
19
  attr_reader :target
@@ -136,7 +141,10 @@ module Pod
136
141
  #
137
142
  def add_embed_frameworks_script_phase
138
143
  phase_name = 'Embed Pods Frameworks'
139
- native_targets_to_integrate.each do |native_target|
144
+ targets_to_embed_in = native_targets_to_integrate.select do |target|
145
+ EMBED_FRAMEWORK_TARGET_TYPES.include?(target.symbol_type)
146
+ end
147
+ targets_to_embed_in.each do |native_target|
140
148
  embed_build_phase = native_target.shell_script_build_phases.find { |bp| bp.name == phase_name }
141
149
  unless embed_build_phase.present?
142
150
  UI.message("Adding Build Phase '#{phase_name}' to project.")
@@ -8,7 +8,7 @@ module Pod
8
8
  #
9
9
  class FileAccessor
10
10
  HEADER_EXTENSIONS = Xcodeproj::Constants::HEADER_FILES_EXTENSIONS
11
- SOURCE_FILE_EXTENSIONS = (%w(.m .mm .c .cpp .swift) + HEADER_EXTENSIONS).uniq.freeze
11
+ SOURCE_FILE_EXTENSIONS = (%w(.m .mm .c .cc .cxx .cpp .c++ .swift) + HEADER_EXTENSIONS).uniq.freeze
12
12
 
13
13
  GLOB_PATTERNS = {
14
14
  :readme => 'readme{*,.*}'.freeze,
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: 0.37.0
4
+ version: 0.37.1
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-05-03 00:00:00.000000000 Z
14
+ date: 2015-05-06 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: 0.37.0
22
+ version: 0.37.1
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: 0.37.0
29
+ version: 0.37.1
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: claide
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -89,14 +89,14 @@ dependencies:
89
89
  requirements:
90
90
  - - ~>
91
91
  - !ruby/object:Gem::Version
92
- version: 0.4.3
92
+ version: 0.4.4
93
93
  type: :runtime
94
94
  prerelease: false
95
95
  version_requirements: !ruby/object:Gem::Requirement
96
96
  requirements:
97
97
  - - ~>
98
98
  - !ruby/object:Gem::Version
99
- version: 0.4.3
99
+ version: 0.4.4
100
100
  - !ruby/object:Gem::Dependency
101
101
  name: cocoapods-trunk
102
102
  requirement: !ruby/object:Gem::Requirement