cocoapods 0.31.1 → 0.32.0
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 +4 -4
- data/CHANGELOG.md +97 -0
- data/lib/cocoapods.rb +0 -21
- data/lib/cocoapods/command.rb +3 -0
- data/lib/cocoapods/command/lib.rb +8 -3
- data/lib/cocoapods/command/project.rb +36 -4
- data/lib/cocoapods/command/spec.rb +1 -1
- data/lib/cocoapods/external_sources.rb +18 -363
- data/lib/cocoapods/external_sources/abstract_external_source.rb +139 -0
- data/lib/cocoapods/external_sources/downloader_source.rb +32 -0
- data/lib/cocoapods/external_sources/path_source.rb +58 -0
- data/lib/cocoapods/external_sources/podspec_source.rb +45 -0
- data/lib/cocoapods/gem_version.rb +1 -1
- data/lib/cocoapods/generator/prefix_header.rb +14 -5
- data/lib/cocoapods/installer.rb +16 -8
- data/lib/cocoapods/installer/analyzer.rb +35 -7
- data/lib/cocoapods/sandbox.rb +17 -2
- data/lib/cocoapods/validator.rb +46 -8
- metadata +56 -18
data/lib/cocoapods/sandbox.rb
CHANGED
@@ -69,6 +69,7 @@ module Pod
|
|
69
69
|
@head_pods = []
|
70
70
|
@checkout_sources = {}
|
71
71
|
@development_pods = {}
|
72
|
+
@pods_with_absolute_path = []
|
72
73
|
end
|
73
74
|
|
74
75
|
# @return [Lockfile] the manifest which contains the information about the
|
@@ -158,7 +159,17 @@ module Pod
|
|
158
159
|
root + root_name
|
159
160
|
end
|
160
161
|
end
|
161
|
-
|
162
|
+
|
163
|
+
# Returns true if the path as originally specified was absolute.
|
164
|
+
#
|
165
|
+
# @param [String] name
|
166
|
+
#
|
167
|
+
# @return [Bool] true if originally absolute
|
168
|
+
#
|
169
|
+
def local_path_was_absolute?(name)
|
170
|
+
@pods_with_absolute_path.include? name
|
171
|
+
end
|
172
|
+
|
162
173
|
# @return [Pathname] the directory where to store the documentation.
|
163
174
|
#
|
164
175
|
def documentation_dir
|
@@ -338,11 +349,15 @@ module Pod
|
|
338
349
|
# @param [#to_s] path
|
339
350
|
# The local path where the Pod is stored.
|
340
351
|
#
|
352
|
+
# @param [Bool] was_absolute
|
353
|
+
# True if the specified local path was absolute.
|
354
|
+
#
|
341
355
|
# @return [void]
|
342
356
|
#
|
343
|
-
def store_local_path(name, path)
|
357
|
+
def store_local_path(name, path, was_absolute = false)
|
344
358
|
root_name = Specification.root_name(name)
|
345
359
|
development_pods[root_name] = path.to_s
|
360
|
+
@pods_with_absolute_path << root_name if was_absolute
|
346
361
|
end
|
347
362
|
|
348
363
|
# @return [Hash{String=>String}] The path of the Pods with a local source
|
data/lib/cocoapods/validator.rb
CHANGED
@@ -197,6 +197,7 @@ module Pod
|
|
197
197
|
#
|
198
198
|
def perform_extensive_analysis(spec)
|
199
199
|
validate_homepage(spec)
|
200
|
+
validate_screenshots(spec)
|
200
201
|
|
201
202
|
spec.available_platforms.each do |platform|
|
202
203
|
UI.message "\n\n#{spec} - Analyzing on #{platform} platform.".green.reversed
|
@@ -222,23 +223,60 @@ module Pod
|
|
222
223
|
attr_accessor :consumer
|
223
224
|
attr_accessor :subspec_name
|
224
225
|
|
225
|
-
|
226
|
+
MAX_HTTP_REDIRECTS = 3
|
227
|
+
|
228
|
+
# Performs validation of a URL
|
226
229
|
#
|
227
|
-
def
|
230
|
+
def validate_url(url)
|
228
231
|
require 'rest'
|
229
|
-
homepage = spec.homepage
|
230
|
-
return unless homepage
|
231
|
-
homepage += '/' unless homepage.end_with?('/')
|
232
232
|
|
233
233
|
begin
|
234
|
-
|
234
|
+
redirects = 0
|
235
|
+
resp = nil
|
236
|
+
loop do
|
237
|
+
resp = ::REST.head(url)
|
238
|
+
|
239
|
+
if resp.status_code >= 400
|
240
|
+
resp = ::REST.get(url)
|
241
|
+
end
|
242
|
+
|
243
|
+
if [301, 302, 303, 307, 308].include? resp.status_code
|
244
|
+
url = resp.headers['location'].first
|
245
|
+
redirects += 1
|
246
|
+
else
|
247
|
+
break
|
248
|
+
end
|
249
|
+
|
250
|
+
break unless redirects < MAX_HTTP_REDIRECTS
|
251
|
+
end
|
235
252
|
rescue
|
236
|
-
warning "There was a problem validating the
|
253
|
+
warning "There was a problem validating the URL #{url}."
|
237
254
|
resp = nil
|
238
255
|
end
|
239
256
|
|
240
257
|
if resp && !resp.success?
|
241
|
-
warning "The
|
258
|
+
warning "The URL (#{url}) is not reachable."
|
259
|
+
end
|
260
|
+
|
261
|
+
resp
|
262
|
+
end
|
263
|
+
|
264
|
+
# Performs validations related to the `homepage` attribute.
|
265
|
+
#
|
266
|
+
def validate_homepage(spec)
|
267
|
+
if spec.homepage
|
268
|
+
validate_url(spec.homepage)
|
269
|
+
end
|
270
|
+
end
|
271
|
+
|
272
|
+
# Performs validation related to the `screenshots` attribute.
|
273
|
+
#
|
274
|
+
def validate_screenshots(spec)
|
275
|
+
spec.screenshots.compact.each do |screenshot|
|
276
|
+
request = validate_url(screenshot)
|
277
|
+
if request && !(request.headers['content-type'] && request.headers['content-type'].first =~ /image\/.*/i)
|
278
|
+
warning "The screenshot #{screenshot} is not a valid image."
|
279
|
+
end
|
242
280
|
end
|
243
281
|
end
|
244
282
|
|
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.
|
4
|
+
version: 0.32.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eloy Duran
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-04-
|
12
|
+
date: 2014-04-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cocoapods-core
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - '='
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 0.
|
20
|
+
version: 0.32.0
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - '='
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 0.
|
27
|
+
version: 0.32.0
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: claide
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -45,28 +45,28 @@ dependencies:
|
|
45
45
|
requirements:
|
46
46
|
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: 0.
|
48
|
+
version: 0.5.0
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
53
|
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: 0.
|
55
|
+
version: 0.5.0
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: xcodeproj
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
60
|
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: 0.16.
|
62
|
+
version: 0.16.1
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: 0.16.
|
69
|
+
version: 0.16.1
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: cocoapods-try
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
@@ -163,14 +163,14 @@ dependencies:
|
|
163
163
|
requirements:
|
164
164
|
- - "~>"
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version: '0.
|
166
|
+
version: '0.7'
|
167
167
|
type: :runtime
|
168
168
|
prerelease: false
|
169
169
|
version_requirements: !ruby/object:Gem::Requirement
|
170
170
|
requirements:
|
171
171
|
- - "~>"
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version: '0.
|
173
|
+
version: '0.7'
|
174
174
|
- !ruby/object:Gem::Dependency
|
175
175
|
name: bacon
|
176
176
|
requirement: !ruby/object:Gem::Requirement
|
@@ -223,6 +223,10 @@ files:
|
|
223
223
|
- lib/cocoapods/downloader.rb
|
224
224
|
- lib/cocoapods/executable.rb
|
225
225
|
- lib/cocoapods/external_sources.rb
|
226
|
+
- lib/cocoapods/external_sources/abstract_external_source.rb
|
227
|
+
- lib/cocoapods/external_sources/downloader_source.rb
|
228
|
+
- lib/cocoapods/external_sources/path_source.rb
|
229
|
+
- lib/cocoapods/external_sources/podspec_source.rb
|
226
230
|
- lib/cocoapods/gem_version.rb
|
227
231
|
- lib/cocoapods/generator/acknowledgements.rb
|
228
232
|
- lib/cocoapods/generator/acknowledgements/markdown.rb
|
@@ -268,14 +272,48 @@ homepage: https://github.com/CocoaPods/CocoaPods
|
|
268
272
|
licenses:
|
269
273
|
- MIT
|
270
274
|
metadata: {}
|
271
|
-
post_install_message: "\nCHANGELOG:\n\n## 0.
|
272
|
-
[CocoaPods-Core](https://github.com/CocoaPods/Core/compare/0.31.1
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
\ [
|
277
|
-
|
278
|
-
|
275
|
+
post_install_message: "\nCHANGELOG:\n\n## 0.32.0\n\n[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/master...0.31.1)\n•
|
276
|
+
[CocoaPods-Core](https://github.com/CocoaPods/Core/compare/master...0.31.1)\n\n#####
|
277
|
+
Enhancements\n\n* Allow to update only a list of given pods with `pod update [POD_NAMES...]`.
|
278
|
+
\ \n [Marius Rackwitz](https://github.com/mrackwitz)\n [CocoaPods#760](https://github.com/CocoaPods/CocoaPods/issues/760)\n\n*
|
279
|
+
`pod update` prints the previous version of the updated pods. \n [Andrea Mazzini](https://github.com/andreamazz)\n
|
280
|
+
\ [#2008](https://github.com/CocoaPods/CocoaPods/issues/2008)\n\n* `pod update`
|
281
|
+
falls back to `pod install` if no Lockfile is present. \n [Marius Rackwitz](https://github.com/mrackwitz)\n\n*
|
282
|
+
File references in the Pods project for development Pods now are absolute if\n the
|
283
|
+
dependency is specified with an absolute paths. \n [Samuel Ford](https://github.com/samuelwford)\n
|
284
|
+
\ [#1042](https://github.com/CocoaPods/CocoaPods/issues/1042)\n\n* Added `deprecated`
|
285
|
+
and `deprecated_in_favor_of` attributes to Specification\n DSL. \n [Paul Young](https://github.com/paulyoung)\n
|
286
|
+
\ [Core#87](https://github.com/CocoaPods/Core/pull/87)\n\n* Numerous improvements
|
287
|
+
to the validator and to the linter.\n * Validate the reachability of screenshot
|
288
|
+
URLs in podspecs while linting a\n specification. \n [Kyle Fuller](https://github.com/kylef)\n
|
289
|
+
\ [#2010](https://github.com/CocoaPods/CocoaPods/issues/2010)\n * Support HTTP
|
290
|
+
redirects when linting homepage and screenshots. \n [Boris Bügling](https://github.com/neonichu)\n
|
291
|
+
\ [#2027](https://github.com/CocoaPods/CocoaPods/pull/2027)\n * The linter now
|
292
|
+
checks `framework` and `library` attributes for invalid\n strings. \n [Paul
|
293
|
+
Williamson](https://github.com/squarefrog)\n [Fabio Pelosin](irrationalfab)\n
|
294
|
+
\ [Core#66](https://github.com/CocoaPods/Core/issues/66)\n [Core#96](https://github.com/CocoaPods/Core/pull/96)\n
|
295
|
+
\ [Core#105](https://github.com/CocoaPods/Core/issues/105)\n * The Linter will
|
296
|
+
not check for comments anymore. \n [Fabio Pelosin][irrationalfab]\n [Core#108](https://github.com/CocoaPods/Core/issues/108)\n
|
297
|
+
\ * Removed legacy checks from the linter. \n [Fabio Pelosin][irrationalfab]\n
|
298
|
+
\ [Core#108](https://github.com/CocoaPods/Core/issues/108)\n * Added logic to
|
299
|
+
handle subspecs and platform scopes to linter check of\n the `requries_arc` attribute.
|
300
|
+
\ \n [Fabio Pelosin][irrationalfab]\n [CocoaPods#2005](https://github.com/CocoaPods/CocoaPods/issues/2005)\n
|
301
|
+
\ * The linter no longer considers empty a Specification if it only specifies the\n
|
302
|
+
\ `resource_bundle` attribute. \n [Joshua Kalpin][Kapin]\n [#63](https://github.com/CocoaPods/Core/issues/63)\n
|
303
|
+
\ [#95](https://github.com/CocoaPods/Core/pull/95)\n\n* `pod lib create` is now
|
304
|
+
using the `configure` file instead of the\n `_CONFIGURE.rb` file. \n [Piet Brauer](https://github.com/pietbrauer)\n
|
305
|
+
\ [Orta Therox](https://github.com/orta)\n\n* `pod lib create` now disallows any
|
306
|
+
pod name that begins with a `.` \n [Dustin Clark](https://github.com/clarkda)\n
|
307
|
+
\ [#2026](https://github.com/CocoaPods/CocoaPods/pull/2026)\n [Core#97](https://github.com/CocoaPods/Core/pull/97)\n
|
308
|
+
\ [Core#98](https://github.com/CocoaPods/Core/issues/98)\n\n* Prevent the user from
|
309
|
+
using `pod` commands as root. \n [Kyle Fuller](https://github.com/kylef)\n [#1815](https://github.com/CocoaPods/CocoaPods/issues/1815)\n\n*
|
310
|
+
Dependencies declared with external sources now support HTTP downloads and\n have
|
311
|
+
improved support for all the options supported by the downloader. \n [Fabio Pelosin][irrationalfab]\n\n*
|
312
|
+
An informative error message is presented when merge conflict is detected in\n a
|
313
|
+
YAML file. \n [Luis de la Rosa](https://github.com/luisdelarosa)\n [#69](https://github.com/CocoaPods/Core/issues/69)\n
|
314
|
+
\ [#100](https://github.com/CocoaPods/Core/pull/100)\n\n##### Bug Fixes\n\n* Fixed
|
315
|
+
the Podfile `default_subspec` attribute in nested subspecs. \n [Fabio Pelosin][irrationalfab]\n
|
316
|
+
\ [#1021](https://github.com/CocoaPods/CocoaPods/issues/1021)\n\n\n\n"
|
279
317
|
rdoc_options: []
|
280
318
|
require_paths:
|
281
319
|
- lib
|