cocoapods-core 1.0.0.beta.3 → 1.0.0.beta.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7613d5a3dbfbfd8dffb9d4c7994a1780ea3dd33b
4
- data.tar.gz: 1ce8e16c31c7582cc9ebb33361ec626cce500c5e
3
+ metadata.gz: b43e8aec572428f764c86aded8766a4d76dccf63
4
+ data.tar.gz: e4ad6bb6b6da4daf4e00919d1287ae6b1c3099a6
5
5
  SHA512:
6
- metadata.gz: 0e42ac029d73c53192a00efc00666a3868f6201e33d5725192f325e9fb57debfbe0a528a5c586b5beeb9395effe36a426bd61c64df3e8328a9f0639877303bcd
7
- data.tar.gz: 35d2626af08e1ef52418e5c21b8e653ff450ff476317bbf4fa25ef7154206182e42edefc8107ebe1a0545b4150f3a0015528e29134fa030645ec965ff8847217
6
+ metadata.gz: 0c33a61f4d272475840975687c8aecbb5f6d48d85a29dabe06f2d10e4e154fd9b7e13f7c0ca9163a6473f1d7cf91f0bdfd014294f949c9126a689ffae32b3c9f
7
+ data.tar.gz: 5e77dee9d7db62e536c1fa3d0b64070ed652c4f6bee05c28af83152c337335810d3289666a6298bbff24e39f0641f7d92ed9b94a65de18cd4ce25e8e053aeeed
@@ -1,5 +1,5 @@
1
1
  module Pod
2
2
  # The version of the cocoapods-core.
3
3
  #
4
- CORE_VERSION = '1.0.0.beta.3'.freeze unless defined? Pod::CORE_VERSION
4
+ CORE_VERSION = '1.0.0.beta.4'.freeze unless defined? Pod::CORE_VERSION
5
5
  end
@@ -200,6 +200,19 @@ module Pod
200
200
  end
201
201
  end
202
202
 
203
+ # @return [String] The string that describes the #symbolic_name.
204
+ #
205
+ def string_name
206
+ self.class.string_name(symbolic_name)
207
+ end
208
+
209
+ # @return [String] The string that describes the #symbolic_name,
210
+ # which doesn't contain spaces and is so safe to use in
211
+ # paths which might not be quoted or escaped consequently.
212
+ def safe_string_name
213
+ string_name.tr(' ', '')
214
+ end
215
+
203
216
  # Converts the symbolic name of a platform to a string name suitable to be
204
217
  # presented to the user.
205
218
  #
@@ -17,7 +17,7 @@ module Pod
17
17
  # platform :ios, '9.0'
18
18
  # inhibit_all_warnings!
19
19
  #
20
- # target "MyApp" do
20
+ # target 'MyApp' do
21
21
  # pod 'ObjectiveSugar', '~> 0.5'
22
22
  #
23
23
  # target "MyAppTests" do
@@ -26,9 +26,8 @@ module Pod
26
26
  # end
27
27
  # end
28
28
  #
29
- #
30
29
  # post_install do |installer|
31
- # installer.pods_project.targets.each do |target|
30
+ # installer.pods_project.pod_targets.each do |target|
32
31
  # puts "#{target.name}"
33
32
  # end
34
33
  # end
@@ -276,16 +275,16 @@ module Pod
276
275
  #
277
276
  # @example Defining a target
278
277
  #
279
- # target "ZipApp" do
278
+ # target 'ZipApp' do
280
279
  # pod 'SSZipArchive'
281
280
  # end
282
281
  #
283
282
  # @example Defining a test target accessing SSZipArchive pod from its parent
284
283
  #
285
- # target "ZipApp" do
284
+ # target 'ZipApp' do
286
285
  # pod 'SSZipArchive'
287
286
  #
288
- # target "ZipAppTests" do
287
+ # target 'ZipAppTests' do
289
288
  # inherit! :search_paths
290
289
  # pod 'Nimble'
291
290
  # end
@@ -293,19 +292,19 @@ module Pod
293
292
  #
294
293
  # @example Defining a target applies Pods to multiple targets via its parent target
295
294
  #
296
- # target "ShowsApp" do
295
+ # target 'ShowsApp' do
297
296
  # pod 'ShowsKit'
298
297
  #
299
298
  # # Has it's own copy of ShowsKit + ShowTVAuth
300
- # target "ShowsTV" do
301
- # pod "ShowTVAuth"
299
+ # target 'ShowsTV' do
300
+ # pod 'ShowTVAuth'
302
301
  # end
303
302
  #
304
303
  # # Has it's own copy of Specta + Expecta
305
304
  # # and has access to ShowsKit via the app
306
305
  # # that the test target is bundled into
307
306
  #
308
- # target "ShowsTests" do
307
+ # target 'ShowsTests' do
309
308
  # inherit! :search_paths
310
309
  # pod 'Specta'
311
310
  # pod 'Expecta'
@@ -346,24 +345,24 @@ module Pod
346
345
  # @example Defining an abstract_target wrapping Pods to multiple targets
347
346
  #
348
347
  # # There are no targets called "Shows" in any Xcode projects
349
- # abstract_target "Shows" do
348
+ # abstract_target 'Shows' do
350
349
  # pod 'ShowsKit'
351
350
  #
352
351
  # # Has it's own copy of ShowsKit + ShowWebAuth
353
- # target "ShowsiOS" do
354
- # pod "ShowWebAuth"
352
+ # target 'ShowsiOS' do
353
+ # pod 'ShowWebAuth'
355
354
  # end
356
355
  #
357
356
  # # Has it's own copy of ShowsKit + ShowTVAuth
358
- # target "ShowsTV" do
359
- # pod "ShowTVAuth"
357
+ # target 'ShowsTV' do
358
+ # pod 'ShowTVAuth'
360
359
  # end
361
360
  #
362
361
  # # Has it's own copy of Specta + Expecta
363
362
  # # and has access to ShowsKit via the app
364
363
  # # that the test target is bundled into
365
364
  #
366
- # target "ShowsTests" do
365
+ # target 'ShowsTests' do
367
366
  # inherit! :search_paths
368
367
  # pod 'Specta'
369
368
  # pod 'Expecta'
@@ -437,7 +436,7 @@ module Pod
437
436
  #
438
437
  # @example Specifying the platform
439
438
  #
440
- # platform :ios, "4.0"
439
+ # platform :ios, '4.0'
441
440
  # platform :ios
442
441
  #
443
442
  # @return [void]
@@ -477,13 +476,13 @@ module Pod
477
476
  # @example Specifying the user project
478
477
  #
479
478
  # # This Target can be found in a Xcode project called `FastGPS`
480
- # target "MyGPSApp" do
479
+ # target 'MyGPSApp' do
481
480
  # project 'FastGPS'
482
481
  # ...
483
482
  # end
484
483
  #
485
484
  # # Same Podfile, multiple Xcodeprojects
486
- # target "MyNotesApp" do
485
+ # target 'MyNotesApp' do
487
486
  # project 'FastNotes'
488
487
  # ...
489
488
  # end
@@ -503,8 +502,8 @@ module Pod
503
502
  #
504
503
  # @deprecated #{xcodeproj} was renamed to #{project}.
505
504
  #
506
- # TODO: This method can be deleted once people have migrated to this 1.0
507
- # DSL.
505
+ # `xcodeproj` is deprecated in [1.0](http://blog.cocoapods.org/CocoaPods-1.0/) and has been renamed to `project`.
506
+ # For pre-1.0 versions use `xcodeproj`.
508
507
  #
509
508
  def xcodeproj(*args)
510
509
  CoreUI.warn 'xcodeproj was renamed to `project`. Please use that from now on.'
@@ -517,8 +516,8 @@ module Pod
517
516
  # longer supported. Use an {#abstract_target} and target
518
517
  # inheritance instead.
519
518
  #
520
- # TODO: This method can be deleted once people have migrated to this 1.0
521
- # DSL.
519
+ # `link_with` is deprecated in [1.0](http://blog.cocoapods.org/CocoaPods-1.0/) in
520
+ # favour of `abstract_target` and target inheritance instead.
522
521
  #
523
522
  def link_with(*)
524
523
  raise Informative, 'The specification of `link_with` in the Podfile ' \
@@ -246,7 +246,7 @@ module Pod
246
246
  end
247
247
  end
248
248
 
249
- # @return [Array] the name of the default subspecs if provided.
249
+ # @return [Array<String>] the name of the default subspecs if provided.
250
250
  #
251
251
  def default_subspecs
252
252
  # TODO: remove singular form and update the JSON specs.
@@ -259,6 +259,9 @@ module Pod
259
259
  # {#default_subspecs} or each of its children subspecs that are
260
260
  # compatible with its platform.
261
261
  #
262
+ # @param [Platform] platform
263
+ # return only dependencies supported on the given platform.
264
+ #
262
265
  # @return [Array<Dependency>] the dependencies on subspecs.
263
266
  #
264
267
  def subspec_dependencies(platform = nil)
@@ -266,15 +266,15 @@ module Pod
266
266
  #
267
267
  # @example Using Subversion with a tag.
268
268
  #
269
- # spec.source = { :svn => "http://svn.code.sf.net/p/polyclipping/code", :tag => '4.8.8' }
269
+ # spec.source = { :svn => 'http://svn.code.sf.net/p/polyclipping/code', :tag => '4.8.8' }
270
270
  #
271
271
  # @example Using Mercurial with the same revision as the spec's semantic version string.
272
272
  #
273
- # spec.source = { :hg => "https://bitbucket.org/dcutting/hyperbek", :revision => "#{s.version}" }
273
+ # spec.source = { :hg => 'https://bitbucket.org/dcutting/hyperbek', :revision => "#{s.version}" }
274
274
  #
275
275
  # @example Using HTTP to download a compressed file of the code. It supports zip, tgz, bz2, txz and tar.
276
276
  #
277
- # spec.source = { :http => "http://dev.wechatapp.com/download/sdk/WeChat_SDK_iOS_en.zip" }
277
+ # spec.source = { :http => 'http://dev.wechatapp.com/download/sdk/WeChat_SDK_iOS_en.zip' }
278
278
  #
279
279
  # @example Using HTTP to download a file using a hash to verify the download. It supports sha1 and sha256.
280
280
  #
@@ -372,12 +372,12 @@ module Pod
372
372
  #
373
373
  # @example
374
374
  #
375
- # spec.screenshot = "http://dl.dropbox.com/u/378729/MBProgressHUD/1.png"
375
+ # spec.screenshot = 'http://dl.dropbox.com/u/378729/MBProgressHUD/1.png'
376
376
  #
377
377
  # @example
378
378
  #
379
- # spec.screenshots = [ "http://dl.dropbox.com/u/378729/MBProgressHUD/1.png",
380
- # "http://dl.dropbox.com/u/378729/MBProgressHUD/2.png" ]
379
+ # spec.screenshots = [ 'http://dl.dropbox.com/u/378729/MBProgressHUD/1.png',
380
+ # 'http://dl.dropbox.com/u/378729/MBProgressHUD/2.png' ]
381
381
  #
382
382
  # @param [String] screenshots
383
383
  # An URL for the screenshot of the Pod.
@@ -496,7 +496,7 @@ module Pod
496
496
  #
497
497
  # @example
498
498
  #
499
- # spec.platform = :osx, "10.8"
499
+ # spec.platform = :osx, '10.8'
500
500
  #
501
501
  # @example
502
502
  #
@@ -557,11 +557,11 @@ module Pod
557
557
  #
558
558
  # @example
559
559
  #
560
- # spec.ios.deployment_target = "6.0"
560
+ # spec.ios.deployment_target = '6.0'
561
561
  #
562
562
  # @example
563
563
  #
564
- # spec.osx.deployment_target = "10.8"
564
+ # spec.osx.deployment_target = '10.8'
565
565
  #
566
566
  # @param [String] _args
567
567
  # The deployment target of the platform.
@@ -991,11 +991,11 @@ module Pod
991
991
  #
992
992
  # @example
993
993
  #
994
- # spec.source_files = "Classes/**/*.{h,m}"
994
+ # spec.source_files = 'Classes/**/*.{h,m}'
995
995
  #
996
996
  # @example
997
997
  #
998
- # spec.source_files = "Classes/**/*.{h,m}", "More_Classes/**/*.{h,m}"
998
+ # spec.source_files = 'Classes/**/*.{h,m}', 'More_Classes/**/*.{h,m}'
999
999
  #
1000
1000
  # @param [String, Array<String>] source_files
1001
1001
  # the source files of the Pod.
@@ -1018,7 +1018,7 @@ module Pod
1018
1018
  #
1019
1019
  # @example
1020
1020
  #
1021
- # spec.public_header_files = "Headers/Public/*.h"
1021
+ # spec.public_header_files = 'Headers/Public/*.h'
1022
1022
  #
1023
1023
  # @param [String, Array<String>] public_header_files
1024
1024
  # the public headers of the Pod.
@@ -1042,7 +1042,7 @@ module Pod
1042
1042
  #
1043
1043
  # @example
1044
1044
  #
1045
- # spec.private_header_files = "Headers/Private/*.h"
1045
+ # spec.private_header_files = 'Headers/Private/*.h'
1046
1046
  #
1047
1047
  # @param [String, Array<String>] private_header_files
1048
1048
  # the private headers of the Pod.
@@ -1150,11 +1150,11 @@ module Pod
1150
1150
  #
1151
1151
  # @example
1152
1152
  #
1153
- # spec.resource = "Resources/HockeySDK.bundle"
1153
+ # spec.resource = 'Resources/HockeySDK.bundle'
1154
1154
  #
1155
1155
  # @example
1156
1156
  #
1157
- # spec.resources = ["Images/*.png", "Sounds/*"]
1157
+ # spec.resources = ['Images/*.png', 'Sounds/*']
1158
1158
  #
1159
1159
  # @param [String, Array<String>] resources
1160
1160
  # The resources shipped with the Pod.
@@ -1173,11 +1173,11 @@ module Pod
1173
1173
  #
1174
1174
  # @example
1175
1175
  #
1176
- # spec.ios.exclude_files = "Classes/osx"
1176
+ # spec.ios.exclude_files = 'Classes/osx'
1177
1177
  #
1178
1178
  # @example
1179
1179
  #
1180
- # spec.exclude_files = "Classes/**/unused.{h,m}"
1180
+ # spec.exclude_files = 'Classes/**/unused.{h,m}'
1181
1181
  #
1182
1182
  # @param [String, Array<String>] exclude_files
1183
1183
  # the file patterns that the Pod should ignore.
@@ -1199,11 +1199,11 @@ module Pod
1199
1199
  #
1200
1200
  # @example
1201
1201
  #
1202
- # spec.preserve_path = "IMPORTANT.txt"
1202
+ # spec.preserve_path = 'IMPORTANT.txt'
1203
1203
  #
1204
1204
  # @example
1205
1205
  #
1206
- # spec.preserve_paths = "Frameworks/*.framework"
1206
+ # spec.preserve_paths = 'Frameworks/*.framework'
1207
1207
  #
1208
1208
  # @param [String, Array<String>] preserve_paths
1209
1209
  # the paths that should be not cleaned.
@@ -1227,7 +1227,7 @@ module Pod
1227
1227
  #
1228
1228
  # @example
1229
1229
  #
1230
- # spec.module_map = "source/module.modulemap"
1230
+ # spec.module_map = 'source/module.modulemap'
1231
1231
  #
1232
1232
  # @param [String] module_map
1233
1233
  # the path to the module map file that should be used.
@@ -1277,12 +1277,12 @@ module Pod
1277
1277
  #
1278
1278
  # @example Subspecs with different source files.
1279
1279
  #
1280
- # subspec "Twitter" do |sp|
1281
- # sp.source_files = "Classes/Twitter"
1280
+ # subspec 'Twitter' do |sp|
1281
+ # sp.source_files = 'Classes/Twitter'
1282
1282
  # end
1283
1283
  #
1284
- # subspec "Pinboard" do |sp|
1285
- # sp.source_files = "Classes/Pinboard"
1284
+ # subspec 'Pinboard' do |sp|
1285
+ # sp.source_files = 'Classes/Pinboard'
1286
1286
  # end
1287
1287
  #
1288
1288
  # @example Subspecs referencing dependencies to other subspecs.
@@ -1349,7 +1349,8 @@ module Pod
1349
1349
  attribute :default_subspecs,
1350
1350
  :container => Array,
1351
1351
  :singularize => true,
1352
- :multi_platform => false
1352
+ :multi_platform => false,
1353
+ :root_only => true
1353
1354
 
1354
1355
  #-----------------------------------------------------------------------#
1355
1356
 
@@ -1363,15 +1364,15 @@ module Pod
1363
1364
  # For example one might want to store resources which are specific to
1364
1365
  # only iOS projects.
1365
1366
  #
1366
- # spec.resources = "Resources/**/*.png"
1367
- # spec.ios.resources = "Resources_ios/**/*.png"
1367
+ # spec.resources = 'Resources/**/*.png'
1368
+ # spec.ios.resources = 'Resources_ios/**/*.png'
1368
1369
 
1369
1370
  #-----------------------------------------------------------------------#
1370
1371
 
1371
1372
  # Provides support for specifying iOS attributes.
1372
1373
  #
1373
1374
  # @example
1374
- # spec.ios.source_files = "Classes/ios/**/*.{h,m}"
1375
+ # spec.ios.source_files = 'Classes/ios/**/*.{h,m}'
1375
1376
  #
1376
1377
  # @return [PlatformProxy] the proxy that will set the attributes.
1377
1378
  #
@@ -1382,7 +1383,7 @@ module Pod
1382
1383
  # Provides support for specifying OS X attributes.
1383
1384
  #
1384
1385
  # @example
1385
- # spec.osx.source_files = "Classes/osx/**/*.{h,m}"
1386
+ # spec.osx.source_files = 'Classes/osx/**/*.{h,m}'
1386
1387
  #
1387
1388
  # @return [PlatformProxy] the proxy that will set the attributes.
1388
1389
  #
@@ -1393,7 +1394,7 @@ module Pod
1393
1394
  # Provides support for specifying tvOS attributes.
1394
1395
  #
1395
1396
  # @example
1396
- # spec.tvos.source_files = "Classes/tvos/**/*.{h,m}"
1397
+ # spec.tvos.source_files = 'Classes/tvos/**/*.{h,m}'
1397
1398
  #
1398
1399
  # @return [PlatformProxy] the proxy that will set the attributes.
1399
1400
  #
@@ -1404,7 +1405,7 @@ module Pod
1404
1405
  # Provides support for specifying watchOS attributes.
1405
1406
  #
1406
1407
  # @example
1407
- # spec.watchos.source_files = "Classes/watchos/**/*.{h,m}"
1408
+ # spec.watchos.source_files = 'Classes/watchos/**/*.{h,m}'
1408
1409
  #
1409
1410
  # @return [PlatformProxy] the proxy that will set the attributes.
1410
1411
  #
@@ -12,7 +12,7 @@ module Pod
12
12
  # @return [Symbol] the platform described by this proxy. Can be either
13
13
  # `:ios` or `:osx`.
14
14
  #
15
- attr_accessor :platform
15
+ attr_reader :platform
16
16
 
17
17
  # @param [Specification] spec @see spec
18
18
  # @param [Symbol] platform @see platform
@@ -29,18 +29,16 @@ module Pod
29
29
  # @return [void]
30
30
  #
31
31
  def method_missing(meth, *args, &block)
32
- attribute = Specification::DSL.attributes.values.find do |attr|
33
- if attr.writer_name.to_sym == meth
34
- true
35
- elsif attr.writer_singular_form
36
- attr.writer_singular_form.to_sym == meth
37
- end
38
- end
39
- if attribute && attribute.multi_platform?
40
- spec.store_attribute(attribute.name, args.first, platform)
41
- else
42
- super
43
- end
32
+ return super unless attribute = attribute_for_method(meth)
33
+ raise NoMethodError, "#{attribute} cannot be set per-platform" unless attribute.multi_platform?
34
+ spec.store_attribute(attribute.name, args.first, platform)
35
+ end
36
+
37
+ # @!visibility private
38
+ #
39
+ def respond_to_missing?(method, include_all)
40
+ attribute = attribute_for_method(method)
41
+ (attribute && attribute.multi_platform?) || super
44
42
  end
45
43
 
46
44
  # Allows to add dependency for the platform.
@@ -65,6 +63,19 @@ module Pod
65
63
  spec.attributes_hash['platforms'] ||= {}
66
64
  spec.attributes_hash['platforms'][platform_name] = value
67
65
  end
66
+
67
+ private
68
+
69
+ def attribute_for_method(method)
70
+ method = method.to_sym
71
+ Specification::DSL.attributes.values.find do |attribute|
72
+ if attribute.writer_name.to_sym == method
73
+ true
74
+ elsif attribute.writer_singular_form
75
+ attribute.writer_singular_form.to_sym == method
76
+ end
77
+ end
78
+ end
68
79
  end
69
80
  end
70
81
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta.3
4
+ version: 1.0.0.beta.4
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: 2016-02-02 00:00:00.000000000 Z
12
+ date: 2016-02-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport