cocoapods-core 1.0.1 → 1.1.0.beta.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 009722867e661e11100e5acb4e644da6df77ae19
4
- data.tar.gz: d6579347679166a518bdd3213749d6e2fd3862cb
3
+ metadata.gz: cfd44413b1c11622f8632fe1a1d5935c78160f5e
4
+ data.tar.gz: aeeeb3fdf0b91e94a51cc30290c38101bed92308
5
5
  SHA512:
6
- metadata.gz: 9d905a0e7c85771b6766a295a335c15e57784cb7049670ad774694dadbe73b24a14f8997748b9ddbc5bcc85a8ae2134d92fcfb95ae8f8096605e9d2a3102cb4c
7
- data.tar.gz: 29c5d0381dc76a8238597269080381ce2955680080ecc2a30e5f8bc8dd259b3d6c6f16117af4ba442352d4d8ff28ffc869ec404240d92ea50fcb32aa44c748e0
6
+ metadata.gz: 64377d4364a014b95083da6efec735a45fca9aafdbbf7317f6fed0f43fe51697279cca947001afad328ceb7c984f1467c09b509b946d40a1ccfba4a5c3ed79f7
7
+ data.tar.gz: f936d46d5452103fb04b4134dbabea09cd78418a3b8ff75ae4f2af9c85a1360182e1723c0a973e3c41df1759f1a84adc18b8b7b6623643cfded853f99c3171d8
@@ -1,5 +1,5 @@
1
1
  module Pod
2
2
  # The version of the cocoapods-core.
3
3
  #
4
- CORE_VERSION = '1.0.1'.freeze unless defined? Pod::CORE_VERSION
4
+ CORE_VERSION = '1.1.0.beta.1'.freeze unless defined? Pod::CORE_VERSION
5
5
  end
@@ -5,11 +5,10 @@ module Pod
5
5
  # The Podfile is a specification that describes the dependencies of the
6
6
  # targets of an Xcode project.
7
7
  #
8
- # It supports its own DSL and generally is stored in files named
9
- # `CocoaPods.podfile` or `Podfile`.
8
+ # It supports its own DSL and is stored in a file named `Podfile`.
10
9
  #
11
- # The Podfile creates a hierarchy of target definitions that that store the
12
- # information of necessary to generate the CocoaPods libraries.
10
+ # The Podfile creates a hierarchy of target definitions that store the
11
+ # information necessary to generate the CocoaPods libraries.
13
12
  #
14
13
  class Podfile
15
14
  # @!group DSL support
@@ -22,8 +21,8 @@ module Pod
22
21
 
23
22
  #-------------------------------------------------------------------------#
24
23
 
25
- # @return [Pathname] the path where the podfile was loaded from. It is nil
26
- # if the podfile was generated programmatically.
24
+ # @return [Pathname] the path used to load the Podfile. It is nil
25
+ # if the Podfile was generated programmatically.
27
26
  #
28
27
  attr_accessor :defined_in_file
29
28
 
@@ -31,7 +30,7 @@ module Pod
31
30
  # the path of the podfile.
32
31
  #
33
32
  # @param [Proc] block
34
- # an optional block that configures the podfile through the DSL.
33
+ # an optional block that configures the Podfile through the DSL.
35
34
  #
36
35
  # @example Creating a Podfile.
37
36
  #
@@ -65,26 +64,26 @@ module Pod
65
64
 
66
65
  public
67
66
 
68
- # @!group Working with a podfile
67
+ # @!group Working with a Podfile
69
68
 
70
69
  # @return [Hash{Symbol,String => TargetDefinition}] the target definitions
71
- # of the podfile stored by their name.
70
+ # of the Podfile stored by their name.
72
71
  #
73
72
  def target_definitions
74
73
  Hash[target_definition_list.map { |td| [td.name, td] }]
75
74
  end
76
75
 
77
- # @return [Array<TargetDefinition>] all target definitions in the podfile.
76
+ # @return [Array<TargetDefinition>] all target definitions in the Podfile.
78
77
  #
79
78
  def target_definition_list
80
79
  root_target_definitions.map { |td| [td, td.recursive_children] }.flatten
81
80
  end
82
81
 
83
- # @return [Array<TargetDefinition>] The root target definition.
82
+ # @return [Array<TargetDefinition>] The root target definitions.
84
83
  #
85
84
  attr_accessor :root_target_definitions
86
85
 
87
- # @return [Array<Dependency>] the dependencies of the all the target
86
+ # @return [Array<Dependency>] the dependencies of all of the target
88
87
  # definitions.
89
88
  #
90
89
  def dependencies
@@ -97,7 +96,7 @@ module Pod
97
96
 
98
97
  # @!group Attributes
99
98
 
100
- # @return [Array<String>] The name of the sources.
99
+ # @return [Array<String>] The names of the sources.
101
100
  #
102
101
  def sources
103
102
  get_hash_value('sources') || []
@@ -235,12 +234,12 @@ module Pod
235
234
  # @!group Class methods
236
235
  #-------------------------------------------------------------------------#
237
236
 
238
- # Initializes a podfile from the file with the given path.
237
+ # Initializes a Podfile from the file with the given path.
239
238
  #
240
239
  # @param [Pathname] path
241
- # the path from where the podfile should be loaded.
240
+ # the path from where the Podfile should be loaded.
242
241
  #
243
- # @return [Podfile] the generated podfile.
242
+ # @return [Podfile] the generated Podfile.
244
243
  #
245
244
  def self.from_file(path)
246
245
  path = Pathname.new(path)
@@ -264,7 +263,7 @@ module Pod
264
263
  # The path from which the Podfile is loaded.
265
264
  #
266
265
  # @param [String] contents
267
- # The ruby string which will configure the podfile with the DSL.
266
+ # The ruby string which will configure the Podfile with the DSL.
268
267
  #
269
268
  # @return [Podfile] the new Podfile
270
269
  #
@@ -27,7 +27,7 @@ module Pod
27
27
  # end
28
28
  #
29
29
  # post_install do |installer|
30
- # installer.pods_project.pod_targets.each do |target|
30
+ # installer.pods_project.targets.each do |target|
31
31
  # puts "#{target.name}"
32
32
  # end
33
33
  # end
@@ -39,8 +39,15 @@ module Pod
39
39
  # * `install!` declares the installation method and options to be used
40
40
  # during installation.
41
41
 
42
- # Specifies the installation method to be used when CocoaPods installs
43
- # this Podfile.
42
+ # Specifies the installation method and options to be used when
43
+ # CocoaPods installs this Podfile.
44
+ #
45
+ # The first parameter indicates the installation method to use;
46
+ # next parameters indicate installation options.
47
+ #
48
+ # For now the only accepted installation method is `'cocoapods'`, so
49
+ # you'll always use this value for the first parameter; but more
50
+ # installation methods might be available in future versions.
44
51
  #
45
52
  # @param [String] installation_method
46
53
  # the name of the installation strategy.
@@ -95,6 +102,7 @@ module Pod
95
102
  # Besides no version, or a specific one, it is also possible to use
96
103
  # operators:
97
104
  #
105
+ # * `= 0.1` Version 0.1.
98
106
  # * `> 0.1` Any version higher than 0.1.
99
107
  # * `>= 0.1` Version 0.1 and any higher version.
100
108
  # * `< 0.1` Any version lower than 0.1.
@@ -111,7 +119,7 @@ module Pod
111
119
  # For more information, regarding versioning policy, see:
112
120
  #
113
121
  # * [Semantic Versioning](http://semver.org)
114
- # * [RubyGems Versioning Policies](http://docs.rubygems.org/read/chapter/7)
122
+ # * [RubyGems Versioning Policies](http://guides.rubygems.org/patterns/#semantic-versioning)
115
123
  #
116
124
  # ------
117
125
  #
@@ -123,13 +131,13 @@ module Pod
123
131
  #
124
132
  # pod 'PonyDebugger', :configurations => ['Debug', 'Beta']
125
133
  #
126
- # Alternatively, you specify to have it included on a single build
134
+ # Alternatively, you can specify to have it included on a single build
127
135
  # configuration.
128
136
  #
129
137
  # pod 'PonyDebugger', :configuration => 'Debug'
130
138
  #
131
- # Note that transitive dependencies are included in all configurations,
132
- # you have to manually specify build configurations for them as well in
139
+ # Note that transitive dependencies are included in all configurations
140
+ # and you have to manually specify build configurations for them as well in
133
141
  # case this is not desired.
134
142
  #
135
143
  # ------
@@ -389,9 +397,18 @@ module Pod
389
397
 
390
398
  # Sets the inheritance mode for the current target.
391
399
  #
392
- # @param [:complete, :none, :search_paths] inheritance
400
+ # @param [Symbol] inheritance
393
401
  # the inheritance mode to set.
394
402
  #
403
+ # **Available Modes:**
404
+ # + `:complete` The target inherits all
405
+ # behaviour from the parent.
406
+ # + `:none` The target inherits none of
407
+ # the behaviour from the parent.
408
+ # + `:search_paths` The target inherits
409
+ # the search paths of the parent only.
410
+ #
411
+ #
395
412
  # @example Inheriting only search paths
396
413
  #
397
414
  # target 'App' do
@@ -444,7 +461,7 @@ module Pod
444
461
  def platform(name, target = nil)
445
462
  # Support for deprecated options parameter
446
463
  target = target[:deployment_target] if target.is_a?(Hash)
447
- current_target_definition.set_platform(name, target)
464
+ current_target_definition.set_platform!(name, target)
448
465
  end
449
466
 
450
467
  # Specifies the Xcode project that contains the target that the Pods
@@ -506,7 +523,7 @@ module Pod
506
523
  # For pre-1.0 versions use `xcodeproj`.
507
524
  #
508
525
  def xcodeproj(*args)
509
- CoreUI.warn 'xcodeproj was renamed to `project`. Please use that from now on.'
526
+ CoreUI.warn '`xcodeproj` was renamed to `project`. Please update your Podfile accordingly.'
510
527
  project(*args)
511
528
  end
512
529
 
@@ -734,6 +751,7 @@ module Pod
734
751
  # @return [void]
735
752
  #
736
753
  def post_install(&block)
754
+ raise Informative, 'Specifying multiple `post_install` hooks is unsupported.' if @post_install_callback
737
755
  @post_install_callback = block
738
756
  end
739
757
  end
@@ -362,6 +362,26 @@ module Pod
362
362
 
363
363
  #--------------------------------------#
364
364
 
365
+ # Sets the Swift version that the target definition should use.
366
+ #
367
+ # @param [Bool] version
368
+ # The Swift version that the target definition should use.
369
+ #
370
+ # @return [void]
371
+ #
372
+ def swift_version=(version)
373
+ set_hash_value('swift_version', version)
374
+ end
375
+
376
+ # @return [String] the Swift version that the target definition should
377
+ # use.
378
+ #
379
+ def swift_version
380
+ get_hash_value('swift_version')
381
+ end
382
+
383
+ #--------------------------------------#
384
+
365
385
  # Whether a specific pod should be linked to the target when building for
366
386
  # a specific configuration. If a pod has not been explicitly whitelisted
367
387
  # for any configuration, it is implicitly whitelisted.
@@ -473,6 +493,19 @@ module Pod
473
493
  set_hash_value('platform', value)
474
494
  end
475
495
 
496
+ # Sets the platform of the target definition.
497
+ #
498
+ # @see #set_platform
499
+ #
500
+ # @raise When the target definition already has a platform set.
501
+ #
502
+ # @return [void]
503
+ #
504
+ def set_platform!(name, target = nil)
505
+ raise StandardError, "The target `#{label}` already has a platform set." if get_hash_value('platform')
506
+ set_platform(name, target)
507
+ end
508
+
476
509
  #--------------------------------------#
477
510
 
478
511
  # Stores the dependency for a Pod with the given name.
@@ -561,6 +594,7 @@ module Pod
561
594
  uses_frameworks
562
595
  inheritance
563
596
  abstract
597
+ swift_version
564
598
  ).freeze
565
599
 
566
600
  # @return [Hash] The hash representation of the target definition.
@@ -135,7 +135,7 @@ module Pod
135
135
  end
136
136
  if sets.empty?
137
137
  extra = ', author, summary, or description' if full_text_search
138
- raise Informative, "Unable to find a pod with name#{extra}" \
138
+ raise Informative, "Unable to find a pod with name#{extra} " \
139
139
  "matching `#{query}`"
140
140
  end
141
141
  sorted_sets(sets, query_word_regexps)
@@ -524,36 +524,9 @@ module Pod
524
524
 
525
525
  # The minimum deployment targets of the supported platforms.
526
526
  #
527
- # ---
528
- #
529
- # The following behavior is regarding the use of GCD and the
530
- # `OS_OBJECT_USE_OBJC` flag. When set to `0`, it will allow code to use
531
- # `dispatch_release()` on >= iOS 6.0 and OS X >= 10.8.
532
- #
533
- # * New libraries that do *not* require ARC don’t need to care about this
534
- # issue at all.
535
- #
536
- # * New libraries that *do* require ARC _and_ have a deployment target of
537
- # >= iOS 6.0 or OS X >= 10.8:
538
- #
539
- # These *no longer* use `dispatch_release()` and should have the
540
- # `OS_OBJECT_USE_OBJC` flag set to `1`.
541
- #
542
- # **Note:** this means that these libraries *have* to specify the
543
- # deployment target in their specifications in order to have
544
- # CocoaPods set the flag to `1` and ensure proper behaviour.
545
- #
546
- # * New libraries that *do* require ARC, but have a deployment target of
547
- # < iOS 6.0 or OS X < 10.8:
548
- #
549
- # These contain `dispatch_release()` calls and as such need the
550
- # `OS_OBJECT_USE_OBJC` flag set to `0`.
551
- #
552
- # **Note:** libraries that do *not* specify a platform version are
553
- # assumed to have a deployment target of < iOS 6.0 or OS X < 10.8.
554
- #
555
- # For more information, see: http://opensource.apple.com/source/libdispatch/libdispatch-228.18/os/object.h
556
- #
527
+ # As opposed to the `platform` attribute, the `deployment_target`
528
+ # attribute allows to specify multiple platforms on which this pod
529
+ # is supported specifying a different deployment target for each.
557
530
  #
558
531
  # @example
559
532
  #
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.1
4
+ version: 1.1.0.beta.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eloy Duran
@@ -9,62 +9,62 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-06-01 00:00:00.000000000 Z
12
+ date: 2016-07-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - '>='
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: 4.0.2
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
27
  version: 4.0.2
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: nap
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ~>
32
+ - - "~>"
33
33
  - !ruby/object:Gem::Version
34
34
  version: '1.0'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ~>
39
+ - - "~>"
40
40
  - !ruby/object:Gem::Version
41
41
  version: '1.0'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: fuzzy_match
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - ~>
46
+ - - "~>"
47
47
  - !ruby/object:Gem::Version
48
48
  version: 2.0.4
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
55
  version: 2.0.4
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: bacon
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - ~>
60
+ - - "~>"
61
61
  - !ruby/object:Gem::Version
62
62
  version: '1.1'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - ~>
67
+ - - "~>"
68
68
  - !ruby/object:Gem::Version
69
69
  version: '1.1'
70
70
  description: |-
@@ -130,17 +130,17 @@ require_paths:
130
130
  - lib
131
131
  required_ruby_version: !ruby/object:Gem::Requirement
132
132
  requirements:
133
- - - '>='
133
+ - - ">="
134
134
  - !ruby/object:Gem::Version
135
135
  version: 2.0.0
136
136
  required_rubygems_version: !ruby/object:Gem::Requirement
137
137
  requirements:
138
- - - '>='
138
+ - - ">="
139
139
  - !ruby/object:Gem::Version
140
140
  version: '0'
141
141
  requirements: []
142
142
  rubyforge_project:
143
- rubygems_version: 2.6.3
143
+ rubygems_version: 2.6.6
144
144
  signing_key:
145
145
  specification_version: 3
146
146
  summary: The models of CocoaPods