cocoapods-core 0.22.3 → 0.23.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/cocoapods-core/gem_version.rb +1 -1
- data/lib/cocoapods-core/specification/consumer.rb +27 -10
- data/lib/cocoapods-core/specification/dsl.rb +114 -57
- data/lib/cocoapods-core/specification/dsl/deprecations.rb +4 -0
- data/lib/cocoapods-core/specification/linter.rb +14 -2
- data/lib/cocoapods-core/specification/root_attribute_accessors.rb +2 -5
- metadata +10 -19
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: ab4d5851e3f4fc7b7155e44625f61e892b2ca7ae
|
4
|
+
data.tar.gz: 9e995723829362c41b3a6f149fd0e14e52e26dcf
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ac262293aba8175d638309837b5742251aacf8f2e8ee376d66384901e5164f3e2b12b8d9393ee24e005671a8f80e2553a56b7d26844c423d20efbca27575e18b
|
7
|
+
data.tar.gz: e05d53477c86dc846ebfe4776e79d3b752cf7607b76bd097efc81e228c2060d10156e2fe4da60e72ef0a5c620afef1e64486ba19c87d39f90410227c28ed1e92
|
@@ -123,6 +123,22 @@ module Pod
|
|
123
123
|
#
|
124
124
|
spec_attr_accessor :private_header_files
|
125
125
|
|
126
|
+
# @return [Array<String>] The paths of the framework bundles shipped with
|
127
|
+
# the Pod.
|
128
|
+
#
|
129
|
+
spec_attr_accessor :vendored_frameworks
|
130
|
+
|
131
|
+
# @return [Array<String>] The paths of the libraries shipped with the
|
132
|
+
# Pod.
|
133
|
+
#
|
134
|
+
spec_attr_accessor :vendored_libraries
|
135
|
+
|
136
|
+
# @return [Hash{String=>String}]] hash where the keys are the names of
|
137
|
+
# the resource bundles and the values are their relative file
|
138
|
+
# patterns.
|
139
|
+
#
|
140
|
+
spec_attr_accessor :resource_bundles
|
141
|
+
|
126
142
|
# @return [Array<String>] A hash where the key represents the
|
127
143
|
# paths of the resources to copy and the values the paths of
|
128
144
|
# the resources that should be copied.
|
@@ -332,22 +348,23 @@ module Pod
|
|
332
348
|
value.is_a?(Array) ? value * "\n" : value
|
333
349
|
end
|
334
350
|
|
335
|
-
#
|
336
|
-
#
|
351
|
+
# Ensures that the file patterns of the resource bundles are contained in
|
352
|
+
# an array.
|
337
353
|
#
|
338
354
|
# @param [String, Array, Hash] value.
|
339
355
|
# The value of the attribute as specified by the user.
|
340
356
|
#
|
341
357
|
# @return [Hash] the resources.
|
342
358
|
#
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
359
|
+
def _prepare_resource_bundles(value)
|
360
|
+
result = {}
|
361
|
+
if value
|
362
|
+
value.each do |key, patterns|
|
363
|
+
result[key] = [*patterns].compact
|
364
|
+
end
|
365
|
+
end
|
366
|
+
result
|
367
|
+
end
|
351
368
|
|
352
369
|
#-----------------------------------------------------------------------#
|
353
370
|
|
@@ -199,10 +199,10 @@ module Pod
|
|
199
199
|
# The keys accepted by the hash of the source attribute.
|
200
200
|
#
|
201
201
|
SOURCE_KEYS = {
|
202
|
-
:git
|
203
|
-
:svn
|
204
|
-
:hg
|
205
|
-
:http
|
202
|
+
:git => [:tag, :branch, :commit, :submodules],
|
203
|
+
:svn => [:folder, :tag, :revision],
|
204
|
+
:hg => [:revision],
|
205
|
+
:http => nil,
|
206
206
|
:path => nil
|
207
207
|
}.freeze
|
208
208
|
|
@@ -302,22 +302,31 @@ module Pod
|
|
302
302
|
|
303
303
|
#------------------#
|
304
304
|
|
305
|
-
# @!method
|
305
|
+
# @!method prepare_command=(command)
|
306
306
|
#
|
307
|
-
#
|
308
|
-
#
|
307
|
+
# A bash script that will be executed after the Pod is downloaded. This
|
308
|
+
# command can be used to create, delete and modify any file downloaded
|
309
|
+
# and will be ran before any paths for other file attributes of the
|
310
|
+
# specification are collected.
|
311
|
+
#
|
312
|
+
# This command is executed before the Pod is cleaned and before the
|
313
|
+
# Pods project is created.
|
309
314
|
#
|
310
315
|
# @example
|
311
316
|
#
|
312
|
-
# spec.
|
313
|
-
# '--no-warn-invalid-crossref'] }
|
317
|
+
# spec.prepare_command = 'ruby build_files.rb'
|
314
318
|
#
|
315
|
-
# @
|
316
|
-
# Additional options to pass to the appledoc tool.
|
319
|
+
# @example
|
317
320
|
#
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
+
# spec.prepare_command = <<-CMD
|
322
|
+
# sed -i 's/MyNameSpacedHeader/Header/g' ./**/*.h
|
323
|
+
# sed -i 's/MyNameOtherSpacedHeader/OtherHeader/g' ./**/*.h
|
324
|
+
# CMD
|
325
|
+
#
|
326
|
+
# @param [String] command
|
327
|
+
# the prepare command of the pod.
|
328
|
+
#
|
329
|
+
root_attribute :prepare_command
|
321
330
|
|
322
331
|
#-----------------------------------------------------------------------#
|
323
332
|
|
@@ -338,8 +347,8 @@ module Pod
|
|
338
347
|
# @todo This currently is not used in the Ruby DSL.
|
339
348
|
#
|
340
349
|
attribute :platforms, {
|
341
|
-
:container
|
342
|
-
:keys
|
350
|
+
:container => Hash,
|
351
|
+
:keys => PLATFORMS,
|
343
352
|
:multi_platform => false,
|
344
353
|
:inherited => true,
|
345
354
|
}
|
@@ -473,7 +482,8 @@ module Pod
|
|
473
482
|
|
474
483
|
# @!method frameworks=(*frameworks)
|
475
484
|
#
|
476
|
-
# A list of frameworks that the user’s target needs to link
|
485
|
+
# A list of system frameworks that the user’s target needs to link
|
486
|
+
# against.
|
477
487
|
#
|
478
488
|
# @example
|
479
489
|
#
|
@@ -501,7 +511,7 @@ module Pod
|
|
501
511
|
#
|
502
512
|
# @example
|
503
513
|
#
|
504
|
-
# spec.
|
514
|
+
# spec.weak_framework = 'Twitter'
|
505
515
|
#
|
506
516
|
# @param [String, Array<String>] weak_frameworks
|
507
517
|
# A list of frameworks names.
|
@@ -809,75 +819,116 @@ module Pod
|
|
809
819
|
|
810
820
|
#------------------#
|
811
821
|
|
812
|
-
# @!method
|
822
|
+
# @!method vendored_frameworks=(*frameworks)
|
813
823
|
#
|
814
|
-
#
|
824
|
+
# The paths of the framework bundles that come shipped with the Pod.
|
815
825
|
#
|
816
826
|
# @example
|
817
827
|
#
|
818
|
-
# spec.
|
828
|
+
# spec.ios.vendored_frameworks = 'Frameworks/MyFramework.framework'
|
819
829
|
#
|
820
830
|
# @example
|
821
831
|
#
|
822
|
-
# spec.
|
832
|
+
# spec.vendored_frameworks = 'MyFramework.framework', 'TheirFramework.framework'
|
823
833
|
#
|
824
|
-
# @param [String, Array<String>]
|
834
|
+
# @param [String, Array<String>] vendored_frameworks
|
835
|
+
# A list of framework bundles paths.
|
825
836
|
#
|
826
|
-
attribute :
|
827
|
-
:container
|
837
|
+
attribute :vendored_frameworks, {
|
838
|
+
:container => Array,
|
828
839
|
:file_patterns => true,
|
829
|
-
:singularize
|
840
|
+
:singularize => true,
|
830
841
|
}
|
831
842
|
|
832
843
|
#------------------#
|
833
844
|
|
834
|
-
#
|
835
|
-
#
|
845
|
+
# @!method vendored_libraries=(*frameworks)
|
846
|
+
#
|
847
|
+
# The paths of the libraries that come shipped with the Pod.
|
848
|
+
#
|
849
|
+
# @example
|
850
|
+
#
|
851
|
+
# spec.ios.vendored_library = 'Libraries/libProj4.a'
|
852
|
+
#
|
853
|
+
# @example
|
854
|
+
#
|
855
|
+
# spec.vendored_libraries = 'libProj4.a', 'libJavaScriptCore.a'
|
836
856
|
#
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
:
|
842
|
-
:
|
843
|
-
:
|
844
|
-
|
845
|
-
:shared_support,
|
846
|
-
:plug_ins,
|
847
|
-
].freeze
|
857
|
+
# @param [String, Array<String>] vendored_libraries
|
858
|
+
# A list of library paths.
|
859
|
+
#
|
860
|
+
attribute :vendored_libraries, {
|
861
|
+
:container => Array,
|
862
|
+
:file_patterns => true,
|
863
|
+
:singularize => true,
|
864
|
+
}
|
848
865
|
|
849
|
-
|
850
|
-
|
866
|
+
#------------------#
|
867
|
+
|
868
|
+
# @!method resource_bundles=(*frameworks)
|
851
869
|
#
|
852
|
-
#
|
870
|
+
# This attribute allows to define the name and the file of the resource
|
871
|
+
# bundles which should be built for the Pod. They are specified as a
|
872
|
+
# hash where the keys represent the name of the bundles and the values
|
873
|
+
# the file patterns that they should include.
|
853
874
|
#
|
854
|
-
#
|
875
|
+
# We strongly **recommend** library developers to adopt resource
|
876
|
+
# bundles as there can be name collisions using the resources
|
877
|
+
# attribute.
|
855
878
|
#
|
856
|
-
#
|
857
|
-
#
|
879
|
+
# The names of the bundles should at least include the name of the Pod
|
880
|
+
# to minimize the change of name collisions.
|
881
|
+
#
|
882
|
+
# To provide different resources per platform namespaced bundles *must*
|
883
|
+
# be used.
|
858
884
|
#
|
859
885
|
# @example
|
860
886
|
#
|
861
|
-
# spec.
|
887
|
+
# spec.ios.resource_bundle = { 'MapBox' => 'MapView/Map/Resources/*.png' }
|
862
888
|
#
|
863
889
|
# @example
|
864
890
|
#
|
865
|
-
# spec.
|
891
|
+
# spec.resource_bundles = { 'MapBox' => ['MapView/Map/Resources/*.png'], 'OtherResources' => ['MapView/Map/OtherResources/*.png'] }
|
892
|
+
#
|
893
|
+
# @param [Hash{String=>String}] resource_bundles
|
894
|
+
# A hash where the keys are the names of the resource bundles
|
895
|
+
# and the values are their relative file patterns.
|
896
|
+
#
|
897
|
+
attribute :resource_bundles, {
|
898
|
+
:types => [String, Array],
|
899
|
+
:container => Hash,
|
900
|
+
:file_patterns => true,
|
901
|
+
:singularize => true,
|
902
|
+
}
|
903
|
+
|
904
|
+
#------------------#
|
905
|
+
|
906
|
+
# @!method resources=(resources)
|
907
|
+
#
|
908
|
+
# A list of resources that should be copied into the target bundle.
|
909
|
+
#
|
910
|
+
# We strongly **recommend** library developers to adopt [resource
|
911
|
+
# bundles](http://docs.cocoapods.org/specification.html#resources) as
|
912
|
+
# there can be name collisions using the resources attribute. Moreover
|
913
|
+
# resources specified with this attribute are copied directly to the
|
914
|
+
# client target and therefore they are not optimized by Xcode.
|
915
|
+
#
|
916
|
+
# @example
|
917
|
+
#
|
918
|
+
# spec.resource = "Resources/HockeySDK.bundle"
|
866
919
|
#
|
867
920
|
# @example
|
868
921
|
#
|
869
|
-
# spec.resources =
|
922
|
+
# spec.resources = ["Images/*.png", "Sounds/*"]
|
870
923
|
#
|
871
|
-
# @param [
|
872
|
-
#
|
924
|
+
# @param [String, Array<String>] resources
|
925
|
+
# The resources shipped with the Pod.
|
873
926
|
#
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
# :singularize => true,
|
880
|
-
# }
|
927
|
+
attribute :resources, {
|
928
|
+
:container => Array,
|
929
|
+
:file_patterns => true,
|
930
|
+
:singularize => true,
|
931
|
+
}
|
881
932
|
|
882
933
|
#------------------#
|
883
934
|
|
@@ -962,6 +1013,9 @@ module Pod
|
|
962
1013
|
# end
|
963
1014
|
#
|
964
1015
|
def pre_install(&block)
|
1016
|
+
CoreUI.warn "The pre install hook of the specification DSL has been " \
|
1017
|
+
"deprecated, use the `resource_bundles` or the `prepare_command` " \
|
1018
|
+
"attributes."
|
965
1019
|
@pre_install_callback = block
|
966
1020
|
end
|
967
1021
|
|
@@ -989,6 +1043,9 @@ module Pod
|
|
989
1043
|
# end
|
990
1044
|
#
|
991
1045
|
def post_install(&block)
|
1046
|
+
CoreUI.warn "The post install hook of the specification DSL has been " \
|
1047
|
+
"deprecated, use the `resource_bundles` or the `prepare_command` " \
|
1048
|
+
"attributes."
|
992
1049
|
@post_install_callback = block
|
993
1050
|
end
|
994
1051
|
|
@@ -34,6 +34,10 @@ module Pod
|
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
|
+
def documentation=(value)
|
38
|
+
CoreUI.warn "The `documentation` DSL directive of the podspec format has been deprecated."
|
39
|
+
end
|
40
|
+
|
37
41
|
def clean_paths=(value)
|
38
42
|
raise Informative, "[#{to_s}] Clean paths are deprecated. CocoaPods now " \
|
39
43
|
"cleans unused files by default. Use the `preserve_paths` attribute if needed."
|
@@ -96,6 +96,7 @@ module Pod
|
|
96
96
|
comments_lines_count = text.scan(/^\s*#\s+/).length
|
97
97
|
comments_ratio = comments_lines_count.fdiv(all_lines_count)
|
98
98
|
warning "Comments must be deleted." if comments_lines_count > 20 && comments_ratio > 0.2
|
99
|
+
warning "Comments placed at the top of the specification must be deleted." if text.lines.first =~ /^\s*#\s+/
|
99
100
|
end
|
100
101
|
|
101
102
|
# Checks that every root only attribute which is required has a value.
|
@@ -145,6 +146,7 @@ module Pod
|
|
145
146
|
validate_file_patterns
|
146
147
|
check_tmp_arc_not_nil
|
147
148
|
check_if_spec_is_empty
|
149
|
+
check_install_hooks
|
148
150
|
@consumer = nil
|
149
151
|
end
|
150
152
|
end
|
@@ -207,14 +209,12 @@ module Pod
|
|
207
209
|
def _validate_summary(s)
|
208
210
|
warning "The summary should be a short version of `description` (max 140 characters)." if s.length > 140
|
209
211
|
warning "The summary is not meaningful." if s =~ /A short description of/
|
210
|
-
warning "The summary should end with proper punctuation." if s !~ /(\.|\?|!)$/
|
211
212
|
end
|
212
213
|
|
213
214
|
# Performs validations related to the `description` attribute.
|
214
215
|
#
|
215
216
|
def _validate_description(d)
|
216
217
|
warning "The description is not meaningful." if d =~ /An optional longer description of/
|
217
|
-
warning "The description should end with proper punctuation." if d !~ /(\.|\?|!)$/
|
218
218
|
warning "The description is equal to the summary." if d == spec.summary
|
219
219
|
warning "The description is shorter than the summary." if d.length < spec.summary.length
|
220
220
|
end
|
@@ -302,6 +302,18 @@ module Pod
|
|
302
302
|
end
|
303
303
|
end
|
304
304
|
|
305
|
+
# Check the hooks
|
306
|
+
#
|
307
|
+
def check_install_hooks
|
308
|
+
warning "The pre install hook of the specification DSL has been " \
|
309
|
+
"deprecated, use the `resource_bundles` or the `prepare_command` " \
|
310
|
+
"attributes." unless consumer.spec.pre_install_callback.nil?
|
311
|
+
|
312
|
+
warning "The post install hook of the specification DSL has been " \
|
313
|
+
"deprecated, use the `resource_bundles` or the `prepare_command` " \
|
314
|
+
"attributes." unless consumer.spec.post_install_callback.nil?
|
315
|
+
end
|
316
|
+
|
305
317
|
#-----------------------------------------------------------------------#
|
306
318
|
|
307
319
|
# !@group Result Helpers
|
@@ -118,11 +118,8 @@ module Pod
|
|
118
118
|
[*value]
|
119
119
|
end
|
120
120
|
|
121
|
-
|
122
|
-
|
123
|
-
#
|
124
|
-
def documentation
|
125
|
-
convert_keys_to_symbol(attributes_hash["documentation"])
|
121
|
+
def prepare_command
|
122
|
+
attributes_hash["prepare_command"]
|
126
123
|
end
|
127
124
|
|
128
125
|
#-----------------------------------------------------------------------#
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.23.0.rc1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Eloy Duran
|
@@ -10,12 +9,11 @@ authors:
|
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date: 2013-
|
12
|
+
date: 2013-08-02 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: activesupport
|
17
16
|
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
17
|
requirements:
|
20
18
|
- - ~>
|
21
19
|
- !ruby/object:Gem::Version
|
@@ -23,7 +21,6 @@ dependencies:
|
|
23
21
|
type: :runtime
|
24
22
|
prerelease: false
|
25
23
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
24
|
requirements:
|
28
25
|
- - ~>
|
29
26
|
- !ruby/object:Gem::Version
|
@@ -31,7 +28,6 @@ dependencies:
|
|
31
28
|
- !ruby/object:Gem::Dependency
|
32
29
|
name: nap
|
33
30
|
requirement: !ruby/object:Gem::Requirement
|
34
|
-
none: false
|
35
31
|
requirements:
|
36
32
|
- - ~>
|
37
33
|
- !ruby/object:Gem::Version
|
@@ -39,7 +35,6 @@ dependencies:
|
|
39
35
|
type: :runtime
|
40
36
|
prerelease: false
|
41
37
|
version_requirements: !ruby/object:Gem::Requirement
|
42
|
-
none: false
|
43
38
|
requirements:
|
44
39
|
- - ~>
|
45
40
|
- !ruby/object:Gem::Version
|
@@ -47,7 +42,6 @@ dependencies:
|
|
47
42
|
- !ruby/object:Gem::Dependency
|
48
43
|
name: json
|
49
44
|
requirement: !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
45
|
requirements:
|
52
46
|
- - ~>
|
53
47
|
- !ruby/object:Gem::Version
|
@@ -55,7 +49,6 @@ dependencies:
|
|
55
49
|
type: :runtime
|
56
50
|
prerelease: false
|
57
51
|
version_requirements: !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
52
|
requirements:
|
60
53
|
- - ~>
|
61
54
|
- !ruby/object:Gem::Version
|
@@ -63,7 +56,6 @@ dependencies:
|
|
63
56
|
- !ruby/object:Gem::Dependency
|
64
57
|
name: bacon
|
65
58
|
requirement: !ruby/object:Gem::Requirement
|
66
|
-
none: false
|
67
59
|
requirements:
|
68
60
|
- - ~>
|
69
61
|
- !ruby/object:Gem::Version
|
@@ -71,14 +63,14 @@ dependencies:
|
|
71
63
|
type: :development
|
72
64
|
prerelease: false
|
73
65
|
version_requirements: !ruby/object:Gem::Requirement
|
74
|
-
none: false
|
75
66
|
requirements:
|
76
67
|
- - ~>
|
77
68
|
- !ruby/object:Gem::Version
|
78
69
|
version: '1.1'
|
79
|
-
description:
|
80
|
-
CocoaPods
|
81
|
-
|
70
|
+
description: |-
|
71
|
+
The CocoaPods-Core gem provides support to work with the models of CocoaPods.
|
72
|
+
|
73
|
+
It is intended to be used in place of the CocoaPods when the the installation of the dependencies is not needed.
|
82
74
|
email:
|
83
75
|
- eloy.de.enige@gmail.com
|
84
76
|
- fabiopelosin@gmail.com
|
@@ -125,25 +117,24 @@ files:
|
|
125
117
|
homepage: https://github.com/CocoaPods/CocoaPods
|
126
118
|
licenses:
|
127
119
|
- MIT
|
120
|
+
metadata: {}
|
128
121
|
post_install_message:
|
129
122
|
rdoc_options: []
|
130
123
|
require_paths:
|
131
124
|
- lib
|
132
125
|
required_ruby_version: !ruby/object:Gem::Requirement
|
133
|
-
none: false
|
134
126
|
requirements:
|
135
|
-
- -
|
127
|
+
- - '>='
|
136
128
|
- !ruby/object:Gem::Version
|
137
129
|
version: '0'
|
138
130
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
139
|
-
none: false
|
140
131
|
requirements:
|
141
|
-
- -
|
132
|
+
- - '>='
|
142
133
|
- !ruby/object:Gem::Version
|
143
134
|
version: '0'
|
144
135
|
requirements: []
|
145
136
|
rubyforge_project:
|
146
|
-
rubygems_version:
|
137
|
+
rubygems_version: 2.0.3
|
147
138
|
signing_key:
|
148
139
|
specification_version: 3
|
149
140
|
summary: The models of CocoaPods
|