cocoapods 0.16.3 → 0.16.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,18 @@
1
+ ## 0.16.4
2
+ [CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.16.3...0.16.4)
3
+
4
+ ###### Enhancements
5
+
6
+ - Add explicit flattening option to `Downloader:Http`: `:flatten => true`.
7
+ [#814](https://github.com/CocoaPods/CocoaPods/pull/814)
8
+ [#812](https://github.com/CocoaPods/CocoaPods/issues/812)
9
+ [#1314](https://github.com/CocoaPods/Specs/pull/1314)
10
+
11
+ ###### Bug fixes
12
+
13
+ - Explicitely require `date` in the gemspec for Ruby 2.0.0.
14
+ [34da3f7](https://github.com/CocoaPods/CocoaPods/commit/34da3f792b2a36fafacd4122e29025c9cf2ff38d)
15
+
1
16
  ## 0.16.3
2
17
  [CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.16.2...0.16.3) • [Xcodeproj](https://github.com/CocoaPods/Xcodeproj/compare/0.4.3...0.5.0)
3
18
 
@@ -12,7 +12,7 @@ unless Gem::Version::Requirement.new('>= 1.4.0').satisfied_by?(Gem::Version.new(
12
12
  end
13
13
 
14
14
  module Pod
15
- VERSION = '0.16.3'
15
+ VERSION = '0.16.4'
16
16
 
17
17
  class PlainInformative < StandardError
18
18
  end
@@ -26,6 +26,16 @@ module Pod
26
26
  options[:type] || type_with_url(url)
27
27
  end
28
28
 
29
+ def should_flatten?
30
+ if options.has_key? :flatten
31
+ options[:flatten] # spec file can always override
32
+ elsif [:tgz, :tar, :tbz].include? type
33
+ true # those archives flatten by default
34
+ else
35
+ false # all others (actually only .zip) default not to flatten
36
+ end
37
+ end
38
+
29
39
  private
30
40
  def type_with_url(url)
31
41
  if url =~ /.zip$/
@@ -74,8 +84,7 @@ module Pod
74
84
  raise UnsupportedFileTypeError.new "Unsupported file type: #{type}"
75
85
  end
76
86
 
77
- # If the archive is a tarball and it only contained a folder, move its contents to the target (#727)
78
- if [:tgz, :tar, :tbz].include? type
87
+ if should_flatten?
79
88
  contents = target_path.children
80
89
  contents.delete(full_filename)
81
90
  entry = contents.first
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.16.3
4
+ version: 0.16.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-02-20 00:00:00.000000000 Z
13
+ date: 2013-02-25 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: xcodeproj