cocoapods 0.11.0 → 0.11.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,16 @@
1
+ ## 0.11.1 (Unreleased)
2
+
3
+ [CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.11.0...master)
4
+
5
+ ###### Bug fixes
6
+
7
+ - Fixed a crash related to subspecs without header files. [#449]
8
+ - Git submodules are loaded after the appropriate referenced is checked out and will be not loaded anymore in the cache. [#451]
9
+ - Fixed SVN support for the head version. [#432]
10
+
1
11
  ## 0.11.0
2
12
 
3
- [CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.10.0...master)
13
+ [CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.10.0...0.11.0)
4
14
 
5
15
  ###### Enhancements
6
16
 
data/README.md CHANGED
@@ -41,7 +41,8 @@ Now that you've got CocoaPods installed you can easily add it to your project.
41
41
 
42
42
  **NOTES**
43
43
 
44
- 1. If you're using a fresh out of the box Mac with Lion using Xcode from the Mac App Store, you will need to install the Command Line Tools for Xcode first: [here](https://developer.apple.com/downloads/index.action)
44
+ 1. If you're using a fresh out of the box Mac with Lion using Xcode from the Mac App Store, you will need to install the Command Line Tools for Xcode first: [here](https://developer.apple.com/downloads/index.action)
45
+ Or from `Xcode > Settings > Downloads > Components > Command Line Tools`
45
46
 
46
47
  2. CocoaPods re-uses some of the RubyGems classes. If you have a version older than 1.4.0, you will have to update RubyGems: `$ gem update --system`.
47
48
 
@@ -13,7 +13,7 @@ unless Gem::Version::Requirement.new('>= 1.4.0').satisfied_by?(Gem::Version.new(
13
13
  end
14
14
 
15
15
  module Pod
16
- VERSION = '0.11.0'
16
+ VERSION = '0.11.1'
17
17
 
18
18
  class PlainInformative < StandardError
19
19
  end
@@ -30,7 +30,7 @@ module Pod
30
30
  puts "-> Creating cache git repo (#{cache_path})" if config.verbose?
31
31
  cache_path.rmtree if cache_path.exist?
32
32
  cache_path.mkpath
33
- clone(url, cache_path)
33
+ git %Q|clone "#{url}" "#{cache_path}"|
34
34
  end
35
35
 
36
36
  def prune_cache
@@ -95,7 +95,6 @@ module Pod
95
95
  def ensure_remote_branch_exists(branch)
96
96
  Dir.chdir(cache_path) { git "branch -r | grep #{branch}$" } # check for remote branch and do suffix matching ($ anchor)
97
97
  return if $? == 0
98
-
99
98
  raise Informative, "[!] Cache unable to find git reference `#{branch}' for `#{url}' (#{$?}).".red
100
99
  end
101
100
 
@@ -105,7 +104,8 @@ module Pod
105
104
  else
106
105
  create_cache
107
106
  end
108
- clone(clone_url, target_path)
107
+ git %Q|clone "#{clone_url}" "#{target_path}"|
108
+ Dir.chdir(target_path) { git "submodule update --init" }
109
109
  end
110
110
 
111
111
  def download_tag
@@ -122,27 +122,22 @@ module Pod
122
122
 
123
123
  def download_commit
124
124
  ensure_ref_exists(options[:commit])
125
- clone(clone_url, target_path)
125
+ git %Q|clone "#{clone_url}" "#{target_path}"|
126
126
  Dir.chdir(target_path) do
127
127
  git "checkout -b activated-pod-commit #{options[:commit]}"
128
+ git "submodule update --init"
128
129
  end
129
130
  end
130
131
 
131
132
  def download_branch
132
133
  ensure_remote_branch_exists(options[:branch])
133
- clone(clone_url, target_path)
134
+ git %Q|clone "#{clone_url}" "#{target_path}"|
134
135
  Dir.chdir(target_path) do
135
136
  git "remote add upstream '#{@url}'" # we need to add the original url, not the cache url
136
137
  git "fetch -q upstream" # refresh the branches
137
138
  git "checkout --track -b activated-pod-commit upstream/#{options[:branch]}" # create a new tracking branch
138
- puts "Just downloaded and checked out branch: #{options[:branch]} from upstream #{clone_url}" if config.verbose?
139
- end
140
- end
141
-
142
- def clone(from, to)
143
- git "clone \"#{from}\" \"#{to}\""
144
- Dir.chdir(to) do
145
139
  git "submodule update --init"
140
+ puts "Just downloaded and checked out branch: #{options[:branch]} from upstream #{clone_url}" if config.verbose?
146
141
  end
147
142
  end
148
143
  end
@@ -4,25 +4,26 @@ module Pod
4
4
  executable :svn
5
5
 
6
6
  def download
7
- if options[:revision]
8
- download_revision
9
- elsif options[:tag]
10
- download_tag
11
- else
12
- download_head
13
- end
7
+ svn %|checkout "#{reference_url}" "#{target_path}"|
14
8
  end
15
9
 
16
10
  def download_head
17
- svn %|checkout "#{url}/#{options[:folder]}" "#{target_path}"|
11
+ svn %|checkout "#{trunk_url}" "#{target_path}"|
18
12
  end
19
13
 
20
- def download_revision
21
- svn %|checkout "#{url}/#{options[:folder]}" -r "#{options[:revision]}" "#{target_path}"|
14
+ def reference_url
15
+ result = url.dup
16
+ result << '/' << options[:folder] if options[:folder]
17
+ result << '/tags/' << options[:tag] if options[:tag]
18
+ result << '" -r "' << options[:revision] if options[:revision]
19
+ result
22
20
  end
23
21
 
24
- def download_tag
25
- svn %|checkout "#{url}/tags/#{options[:tag]}/#{options[:folder]}" "#{target_path}"|
22
+ def trunk_url
23
+ result = url.dup
24
+ result << '/' << options[:folder] if options[:folder]
25
+ result << '/trunk'
26
+ result
26
27
  end
27
28
  end
28
29
  end
@@ -229,21 +229,25 @@ module Pod
229
229
  result
230
230
  end
231
231
 
232
- # @return [Hash{Specification => Array<Pathname>}] The paths of the public
233
- # header files grouped by {Specification}.
232
+ # @return [Hash{Specification => Array<Pathname>}] The paths of the header
233
+ # files grouped by {Specification} that should be copied in the public
234
+ # folder.
234
235
  #
235
- # @TODO: complete, fix and comment
236
- # @TODO: decide a policy for subspecs
236
+ # If a spec does not match any public header it means that all the
237
+ # header files (i.e. the build ones) are intended to be public.
237
238
  #
238
- def public_header_files_by_specs
239
- cached_header_files_by_spec = header_files_by_spec
240
- public_header_files = paths_by_spec(:source_files, :glob => '*.h')
239
+ def public_header_files_by_spec
240
+ public_headers = paths_by_spec(:public_header_files, :glob => '*.h')
241
+ build_headers = header_files_by_spec
241
242
 
242
243
  result = {}
243
- public_header_files.map do |spec, paths|
244
- result[spec] = paths.empty? ? cached_header_files_by_spec[spec] : paths
244
+ specifications.each do |spec|
245
+ if (public_h = public_headers[spec]) && !public_h.empty?
246
+ result[spec] = public_h
247
+ elsif (build_h = build_headers[spec]) && !build_h.empty?
248
+ result[spec] = build_h
249
+ end
245
250
  end
246
-
247
251
  result
248
252
  end
249
253
 
@@ -341,12 +345,13 @@ module Pod
341
345
  #
342
346
  def link_headers
343
347
  @sandbox.build_headers.add_search_path(headers_sandbox)
344
- header_mappings.each do |namespaced_path, files|
348
+ @sandbox.public_headers.add_search_path(headers_sandbox)
349
+
350
+ header_mappings(header_files_by_spec).each do |namespaced_path, files|
345
351
  @sandbox.build_headers.add_files(namespaced_path, files)
346
352
  end
347
353
 
348
- @sandbox.public_headers.add_search_path(headers_sandbox)
349
- public_header_mappings.each do |namespaced_path, files|
354
+ header_mappings(public_header_files_by_spec).each do |namespaced_path, files|
350
355
  @sandbox.public_headers.add_files(namespaced_path, files)
351
356
  end
352
357
  end
@@ -399,23 +404,9 @@ module Pod
399
404
  #
400
405
  # @todo This is not overridden anymore in specification refactor and the
401
406
  # code Pod::Specification#copy_header_mapping can be moved here.
402
- def header_mappings
403
- mappings = {}
404
- header_files_by_spec.each do |spec, paths|
405
- paths = paths - headers_excluded_from_search_paths
406
- paths.each do |from|
407
- from_relative = from.relative_path_from(root)
408
- to = headers_sandbox + (spec.header_dir) + spec.copy_header_mapping(from_relative)
409
- (mappings[to.dirname] ||= []) << from
410
- end
411
- end
412
- mappings
413
- end
414
-
415
- # TODO: complete, fix and comment
416
- def public_header_mappings
407
+ def header_mappings(files_by_spec)
417
408
  mappings = {}
418
- public_header_files_by_specs.each do |spec, paths|
409
+ files_by_spec.each do |spec, paths|
419
410
  paths = paths - headers_excluded_from_search_paths
420
411
  paths.each do |from|
421
412
  from_relative = from.relative_path_from(root)
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.11.0
4
+ version: 0.11.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-08 00:00:00.000000000 Z
12
+ date: 2012-08-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday
@@ -249,7 +249,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
249
249
  version: '0'
250
250
  segments:
251
251
  - 0
252
- hash: 3007268623485849260
252
+ hash: -2225480835849784751
253
253
  required_rubygems_version: !ruby/object:Gem::Requirement
254
254
  none: false
255
255
  requirements: