cocoapods 0.14.0.rc2 → 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,24 @@
1
+ ## Master
2
+
3
+ [CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.14.0...master)
4
+
5
+ ## 0.14.0
6
+
7
+ [CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.14.0.rc2...0.14.0) • [Xcodeproj](https://github.com/CocoaPods/Xcodeproj/compare/0.3.2...0.3.3)
8
+
9
+ ###### Bug fixes
10
+
11
+ - In certain conditions the spec of an external would have been overridden
12
+ by the spec in the root of a Pod.
13
+ [#489](https://github.com/CocoaPods/CocoaPods/issues/489)
14
+ - CocoaPods now uses a recent version of Octokit.
15
+ [#490](https://github.com/CocoaPods/CocoaPods/issues/490)
16
+ - Fixed a bug that caused Pods with preferred dependencies to be always
17
+ installed.
18
+ [Specs#464](https://github.com/CocoaPods/CocoaPods/issues/464)
19
+ - Fixed Xcode 4.4+ artwork warning.
20
+ [Specs#508](https://github.com/CocoaPods/CocoaPods/issues/508)
21
+
1
22
  ## 0.14.0.rc2
2
23
 
3
24
  [CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.14.0.rc1...0.14.0.rc2)
@@ -5,8 +26,11 @@
5
26
  ###### Bug fixes
6
27
 
7
28
  - Fix incorrect name for Pods from external sources with preferred subspecs.
29
+ [#485](https://github.com/CocoaPods/CocoaPods/issues/485)
8
30
  - Prevent duplication of Pod with a local source and mutliple activated specs.
31
+ [#485](https://github.com/CocoaPods/CocoaPods/issues/485)
9
32
  - Fixed the `uninitialized constant Pod::Lockfile::Digest` error.
33
+ [#484](https://github.com/CocoaPods/CocoaPods/issues/484)
10
34
 
11
35
  ## 0.14.0.rc1
12
36
 
data/README.md CHANGED
@@ -33,8 +33,7 @@ $ [sudo] gem install cocoapods
33
33
  If you want to have CocoaPods generate documentation for each library, then install the [appledoc](http://gentlebytes.com/appledoc/) tool:
34
34
 
35
35
  ```
36
- $ brew install appledoc --HEAD
37
- $ ln -sf "`brew --prefix`/Cellar/appledoc/HEAD/Templates" ~/Library/Application\ Support/appledoc
36
+ $ brew install appledoc
38
37
  ```
39
38
 
40
39
  Now that you've got CocoaPods installed you can easily add it to your project.
data/lib/cocoapods.rb CHANGED
@@ -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.14.0.rc2'
16
+ VERSION = '0.14.0'
17
17
 
18
18
  class PlainInformative < StandardError
19
19
  end
@@ -165,12 +165,26 @@ module Pod
165
165
  end
166
166
 
167
167
  def specification_from_external(sandbox, platform)
168
- copy_external_source_into_sandbox(sandbox, platform)
168
+ podspec = copy_external_source_into_sandbox(sandbox, platform)
169
169
  spec = specification_from_local(sandbox, platform)
170
170
  raise Informative, "No podspec found for `#{name}' in #{description}" unless spec
171
171
  spec
172
172
  end
173
173
 
174
+ # Can store from a pathname or a string
175
+ #
176
+ def store_podspec(sandbox, podspec)
177
+ output_path = sandbox.root + "Local Podspecs/#{name}.podspec"
178
+ output_path.dirname.mkpath
179
+ if podspec.is_a?(String)
180
+ raise Informative, "No podspec found for `#{name}' in `#{description}'" unless podspec.include?('Spec.new')
181
+ output_path.open('w') { |f| f.puts(podspec) }
182
+ else
183
+ raise Informative, "No podspec found for `#{name}' in `#{description}'" unless podspec.exist?
184
+ FileUtils.copy(podspec, output_path)
185
+ end
186
+ end
187
+
174
188
  def ==(other)
175
189
  return if other.nil?
176
190
  name == other.name && params == other.params
@@ -184,6 +198,7 @@ module Pod
184
198
  target.rmtree if target.exist?
185
199
  downloader = Downloader.for_target(sandbox.root + name, @params)
186
200
  downloader.download
201
+ store_podspec(sandbox, target + "#{name}.podspec")
187
202
  if local_pod = sandbox.installed_pod_named(name, platform)
188
203
  local_pod.downloaded = true
189
204
  end
@@ -201,14 +216,10 @@ module Pod
201
216
  # can be http, file, etc
202
217
  class PodspecSource < AbstractExternalSource
203
218
  def copy_external_source_into_sandbox(sandbox, _)
204
- output_path = sandbox.root + "Local Podspecs/#{name}.podspec"
205
- output_path.dirname.mkpath
206
219
  puts "-> Fetching podspec for `#{name}' from: #{@params[:podspec]}" unless config.silent?
207
220
  path = @params[:podspec]
208
221
  path = Pathname.new(path).expand_path if path.start_with?("~")
209
- open(path) do |io|
210
- output_path.open('w') { |f| f << io.read }
211
- end
222
+ open(path) { |io| store_podspec(sandbox, io.read) }
212
223
  end
213
224
 
214
225
  def description
@@ -224,9 +235,7 @@ module Pod
224
235
  end
225
236
 
226
237
  def copy_external_source_into_sandbox(sandbox, _)
227
- output_path = sandbox.root + "Local Podspecs/#{name}.podspec"
228
- output_path.dirname.mkpath
229
- FileUtils.copy(pod_spec_path, output_path)
238
+ store_podspec(sandbox, pod_spec_path)
230
239
  end
231
240
 
232
241
  def specification_from_local(sandbox, platform)
@@ -95,10 +95,13 @@ module Pod
95
95
  end
96
96
 
97
97
  # @return [String] A string representation of the pod which indicates if
98
- # the pods comes from a local source.
98
+ # the pods comes from a local source or has a preferred
99
+ # dependency.
99
100
  #
100
101
  def to_s
101
- top_specification.to_s
102
+ s = top_specification.to_s
103
+ s << " defaulting to #{top_specification.preferred_dependency} subspec" if top_specification.preferred_dependency
104
+ s
102
105
  end
103
106
 
104
107
  # @return [String] The name of the Pod.
@@ -204,6 +204,7 @@ module Pod
204
204
  # @return [void] Writes the Lockfile to {#path}.
205
205
  #
206
206
  def write_to_disk(path)
207
+ path.dirname.mkpath unless path.dirname.exist?
207
208
  File.open(path, 'w') {|f| f.write(to_yaml) }
208
209
  defined_in_file = path
209
210
  end
@@ -55,11 +55,8 @@ module Pod
55
55
  end
56
56
 
57
57
  def podspec_for_name(name)
58
- if spec_path = Dir[root + "#{name}/*.podspec"].first
59
- Pathname.new(spec_path)
60
- elsif spec_path = Dir[root + "Local Podspecs/#{name}.podspec"].first
61
- Pathname.new(spec_path)
62
- end
58
+ path = root + "Local Podspecs/#{name}.podspec"
59
+ path.exist? ? path : nil
63
60
  end
64
61
  end
65
62
 
@@ -458,8 +458,7 @@ module Pod
458
458
  end
459
459
 
460
460
  def to_s
461
- display_name = preferred_dependency.nil? ? name : "#{name}/#{preferred_dependency}"
462
- "#{display_name} (#{version})"
461
+ "#{name} (#{version})"
463
462
  end
464
463
 
465
464
  def inspect
metadata CHANGED
@@ -1,16 +1,32 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0.rc2
5
- prerelease: 7
4
+ version: 0.14.0
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Eloy Duran
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-30 00:00:00.000000000 Z
12
+ date: 2012-09-10 00:00:00.000000000 Z
13
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: xcodeproj
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: 0.3.3
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 0.3.3
14
30
  - !ruby/object:Gem::Dependency
15
31
  name: faraday
16
32
  requirement: !ruby/object:Gem::Requirement
@@ -34,7 +50,7 @@ dependencies:
34
50
  requirements:
35
51
  - - ~>
36
52
  - !ruby/object:Gem::Version
37
- version: 1.7.0
53
+ version: '1.7'
38
54
  type: :runtime
39
55
  prerelease: false
40
56
  version_requirements: !ruby/object:Gem::Requirement
@@ -42,7 +58,7 @@ dependencies:
42
58
  requirements:
43
59
  - - ~>
44
60
  - !ruby/object:Gem::Version
45
- version: 1.7.0
61
+ version: '1.7'
46
62
  - !ruby/object:Gem::Dependency
47
63
  name: colored
48
64
  requirement: !ruby/object:Gem::Requirement
@@ -123,22 +139,6 @@ dependencies:
123
139
  - - ~>
124
140
  - !ruby/object:Gem::Version
125
141
  version: 0.9.0
126
- - !ruby/object:Gem::Dependency
127
- name: xcodeproj
128
- requirement: !ruby/object:Gem::Requirement
129
- none: false
130
- requirements:
131
- - - ! '>='
132
- - !ruby/object:Gem::Version
133
- version: 0.3.0
134
- type: :runtime
135
- prerelease: false
136
- version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
- requirements:
139
- - - ! '>='
140
- - !ruby/object:Gem::Version
141
- version: 0.3.0
142
142
  - !ruby/object:Gem::Dependency
143
143
  name: activesupport
144
144
  requirement: !ruby/object:Gem::Requirement
@@ -253,7 +253,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
253
253
  version: '0'
254
254
  segments:
255
255
  - 0
256
- hash: 3928809809918317926
256
+ hash: -46450679422976878
257
257
  required_rubygems_version: !ruby/object:Gem::Requirement
258
258
  none: false
259
259
  requirements: