cocoapods-core 0.24.0 → 0.25.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cocoapods-core/gem_version.rb +1 -1
- data/lib/cocoapods-core/specification/dsl/deprecations.rb +70 -1
- data/lib/cocoapods-core/specification/dsl.rb +0 -68
- data/lib/cocoapods-core/specification/linter.rb +2 -2
- data/lib/cocoapods-core/specification.rb +6 -8
- data/lib/cocoapods-core/standard_error.rb +8 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0747551216b8eae2637c46bc6d036857aa9d3f07
|
4
|
+
data.tar.gz: 67336f56b3a1835367eee3845fbdd9c5e58a16ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e2c569452087333e69618f77cd72e06ab246d4f2d52cb5f7db22b41ffa628d6d0e598d2b4bfd248a5d6edaf7fa779998d67575d92d51edf66ee349584449cdf
|
7
|
+
data.tar.gz: 772837fb61c5395dd824e91495ed9fb5f361f01c7ef461244403722c3c3c7a00764304584b1e28c1e24822fe8ab3878b63212ce8d46fbbc5f88f736c3227b751
|
@@ -35,7 +35,7 @@ module Pod
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def documentation=(value)
|
38
|
-
CoreUI.warn "The `documentation` DSL directive of the podspec format has been deprecated."
|
38
|
+
CoreUI.warn "[#{to_s}] The `documentation` DSL directive of the podspec format has been deprecated."
|
39
39
|
end
|
40
40
|
|
41
41
|
def clean_paths=(value)
|
@@ -49,6 +49,75 @@ module Pod
|
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
52
|
+
# @!group Hooks
|
53
|
+
#
|
54
|
+
# The specification class provides hooks which are called by CocoaPods
|
55
|
+
# when a Pod is installed.
|
56
|
+
|
57
|
+
#-----------------------------------------------------------------------#
|
58
|
+
|
59
|
+
# This is a convenience method which gets called after all pods have been
|
60
|
+
# downloaded but before they have been installed, and the Xcode project
|
61
|
+
# and related files have been generated. Note that this hook is called
|
62
|
+
# for each Pods library and only for installations where the Pod is
|
63
|
+
# installed.
|
64
|
+
#
|
65
|
+
# This hook should be used to generate and modify the files of the Pod.
|
66
|
+
#
|
67
|
+
# It receives the
|
68
|
+
# [`Pod::Hooks::PodRepresentation`](http://docs.cocoapods.org/cocoapods/pod/hooks/podrepresentation/)
|
69
|
+
# and the
|
70
|
+
# [`Pod::Hooks::LibraryRepresentation`](http://docs.cocoapods.org/cocoapods/pod/hooks/libraryrepresentation/)
|
71
|
+
# instances.
|
72
|
+
#
|
73
|
+
# Override this to, for instance, to run any build script.
|
74
|
+
#
|
75
|
+
# @example
|
76
|
+
#
|
77
|
+
# spec.pre_install do |pod, target_definition|
|
78
|
+
# Dir.chdir(pod.root){ `sh make.sh` }
|
79
|
+
# end
|
80
|
+
#
|
81
|
+
def pre_install(&block)
|
82
|
+
CoreUI.warn "[#{to_s}] The pre install hook of the specification " \
|
83
|
+
"DSL has been deprecated, use the `resource_bundles` or the " \
|
84
|
+
"`prepare_command` attributes."
|
85
|
+
@pre_install_callback = block
|
86
|
+
end
|
87
|
+
|
88
|
+
# This is a convenience method which gets called after all pods have been
|
89
|
+
# downloaded, installed, and the Xcode project and related files have
|
90
|
+
# been generated. Note that this hook is called for each Pods library and
|
91
|
+
# only for installations where the Pod is installed.
|
92
|
+
#
|
93
|
+
# To modify and generate files for the Pod the pre install hook should be
|
94
|
+
# used instead of this one.
|
95
|
+
#
|
96
|
+
# It receives a
|
97
|
+
# [`Pod::Hooks::LibraryRepresentation`](http://docs.cocoapods.org/cocoapods/pod/hooks/libraryrepresentation/)
|
98
|
+
# instance for the current target.
|
99
|
+
#
|
100
|
+
# Override this to, for instance, add to the prefix header.
|
101
|
+
#
|
102
|
+
# @example
|
103
|
+
#
|
104
|
+
# spec.post_install do |library_representation|
|
105
|
+
# prefix_header = library_representation.prefix_header_path
|
106
|
+
# prefix_header.open('a') do |file|
|
107
|
+
# file.puts('#ifdef __OBJC__\n#import "SSToolkitDefines.h"\n#endif')
|
108
|
+
# end
|
109
|
+
# end
|
110
|
+
#
|
111
|
+
def post_install(&block)
|
112
|
+
CoreUI.warn "[#{to_s}] The post install hook of the specification " \
|
113
|
+
"DSL has been deprecated, use the `resource_bundles` or the " \
|
114
|
+
"`prepare_command` attributes."
|
115
|
+
@post_install_callback = block
|
116
|
+
end
|
117
|
+
|
118
|
+
#-----------------------------------------------------------------------#
|
119
|
+
|
120
|
+
|
52
121
|
end
|
53
122
|
|
54
123
|
end
|
@@ -989,74 +989,6 @@ module Pod
|
|
989
989
|
|
990
990
|
#-----------------------------------------------------------------------#
|
991
991
|
|
992
|
-
# @!group Hooks
|
993
|
-
#
|
994
|
-
# The specification class provides hooks which are called by CocoaPods
|
995
|
-
# when a Pod is installed.
|
996
|
-
|
997
|
-
#-----------------------------------------------------------------------#
|
998
|
-
|
999
|
-
# This is a convenience method which gets called after all pods have been
|
1000
|
-
# downloaded but before they have been installed, and the Xcode project
|
1001
|
-
# and related files have been generated. Note that this hook is called
|
1002
|
-
# for each Pods library and only for installations where the Pod is
|
1003
|
-
# installed.
|
1004
|
-
#
|
1005
|
-
# This hook should be used to generate and modify the files of the Pod.
|
1006
|
-
#
|
1007
|
-
# It receives the
|
1008
|
-
# [`Pod::Hooks::PodRepresentation`](http://docs.cocoapods.org/cocoapods/pod/hooks/podrepresentation/)
|
1009
|
-
# and the
|
1010
|
-
# [`Pod::Hooks::LibraryRepresentation`](http://docs.cocoapods.org/cocoapods/pod/hooks/libraryrepresentation/)
|
1011
|
-
# instances.
|
1012
|
-
#
|
1013
|
-
# Override this to, for instance, to run any build script.
|
1014
|
-
#
|
1015
|
-
# @example
|
1016
|
-
#
|
1017
|
-
# spec.pre_install do |pod, target_definition|
|
1018
|
-
# Dir.chdir(pod.root){ `sh make.sh` }
|
1019
|
-
# end
|
1020
|
-
#
|
1021
|
-
def pre_install(&block)
|
1022
|
-
CoreUI.warn "The pre install hook of the specification DSL has been " \
|
1023
|
-
"deprecated, use the `resource_bundles` or the `prepare_command` " \
|
1024
|
-
"attributes."
|
1025
|
-
@pre_install_callback = block
|
1026
|
-
end
|
1027
|
-
|
1028
|
-
# This is a convenience method which gets called after all pods have been
|
1029
|
-
# downloaded, installed, and the Xcode project and related files have
|
1030
|
-
# been generated. Note that this hook is called for each Pods library and
|
1031
|
-
# only for installations where the Pod is installed.
|
1032
|
-
#
|
1033
|
-
# To modify and generate files for the Pod the pre install hook should be
|
1034
|
-
# used instead of this one.
|
1035
|
-
#
|
1036
|
-
# It receives a
|
1037
|
-
# [`Pod::Hooks::LibraryRepresentation`](http://docs.cocoapods.org/cocoapods/pod/hooks/libraryrepresentation/)
|
1038
|
-
# instance for the current target.
|
1039
|
-
#
|
1040
|
-
# Override this to, for instance, add to the prefix header.
|
1041
|
-
#
|
1042
|
-
# @example
|
1043
|
-
#
|
1044
|
-
# spec.post_install do |library_representation|
|
1045
|
-
# prefix_header = library_representation.prefix_header_path
|
1046
|
-
# prefix_header.open('a') do |file|
|
1047
|
-
# file.puts('#ifdef __OBJC__\n#import "SSToolkitDefines.h"\n#endif')
|
1048
|
-
# end
|
1049
|
-
# end
|
1050
|
-
#
|
1051
|
-
def post_install(&block)
|
1052
|
-
CoreUI.warn "The post install hook of the specification DSL has been " \
|
1053
|
-
"deprecated, use the `resource_bundles` or the `prepare_command` " \
|
1054
|
-
"attributes."
|
1055
|
-
@post_install_callback = block
|
1056
|
-
end
|
1057
|
-
|
1058
|
-
#-----------------------------------------------------------------------#
|
1059
|
-
|
1060
992
|
# @!group Subspecs
|
1061
993
|
#
|
1062
994
|
# A library can specify a dependency on either another library, a
|
@@ -46,7 +46,7 @@ module Pod
|
|
46
46
|
perform_textual_analysis
|
47
47
|
check_required_root_attributes
|
48
48
|
run_root_validation_hooks
|
49
|
-
|
49
|
+
perform_all_specs_analysis
|
50
50
|
else
|
51
51
|
error "The specification defined in `#{file}` could not be loaded." \
|
52
52
|
"\n\n#{@raise_message}"
|
@@ -137,7 +137,7 @@ module Pod
|
|
137
137
|
#
|
138
138
|
# @return [void]
|
139
139
|
#
|
140
|
-
def
|
140
|
+
def perform_all_specs_analysis
|
141
141
|
all_specs = [ spec, *spec.recursive_subspecs ]
|
142
142
|
all_specs.each do |current_spec|
|
143
143
|
current_spec.available_platforms.each do |platform|
|
@@ -123,10 +123,10 @@ module Pod
|
|
123
123
|
# @return [Array<String, Version>] the name and the version of a
|
124
124
|
# pod.
|
125
125
|
#
|
126
|
-
def self.name_and_version_from_string(
|
127
|
-
match_data =
|
126
|
+
def self.name_and_version_from_string(string_representation)
|
127
|
+
match_data = string_representation.match(/(\S*) \((.*)\)/)
|
128
128
|
unless match_data
|
129
|
-
raise Informative, "Invalid string representation for a Specification: `#{
|
129
|
+
raise Informative, "Invalid string representation for a Specification: `#{string_representation}`."
|
130
130
|
end
|
131
131
|
name = match_data[1]
|
132
132
|
vers = Version.new(match_data[2])
|
@@ -372,11 +372,10 @@ module Pod
|
|
372
372
|
end
|
373
373
|
end
|
374
374
|
|
375
|
-
#-------------------------------------------------------------------------#
|
376
|
-
|
377
375
|
public
|
378
376
|
|
379
|
-
# @!group Hooks support
|
377
|
+
# @!group Deprecated Hooks support
|
378
|
+
#-------------------------------------------------------------------------#
|
380
379
|
|
381
380
|
# @return [Proc] the pre install callback if defined.
|
382
381
|
#
|
@@ -607,8 +606,7 @@ module Pod
|
|
607
606
|
begin
|
608
607
|
eval(string, nil, path.to_s)
|
609
608
|
rescue Exception => e
|
610
|
-
raise DSLError.new("Invalid `#{path.basename}` file: #{e.message}",
|
611
|
-
path, e.backtrace)
|
609
|
+
raise DSLError.new("Invalid `#{path.basename}` file: #{e.message}", path, e.backtrace)
|
612
610
|
end
|
613
611
|
end
|
614
612
|
end
|
@@ -9,7 +9,7 @@ module Pod
|
|
9
9
|
# Wraps an exception raised by a DSL file in order to show to the user the
|
10
10
|
# contents of the line that raised the exception.
|
11
11
|
#
|
12
|
-
class DSLError <
|
12
|
+
class DSLError < Informative
|
13
13
|
|
14
14
|
# @return [String] the description that should be presented to the user.
|
15
15
|
#
|
@@ -53,11 +53,14 @@ module Pod
|
|
53
53
|
#
|
54
54
|
def message
|
55
55
|
unless @message
|
56
|
-
m =
|
56
|
+
m = "\n[!] "
|
57
|
+
m << description
|
58
|
+
m << ". Updating CocoaPods might fix the issue.\n"
|
59
|
+
m = m.red if m.respond_to?(:red)
|
57
60
|
|
58
61
|
return m unless backtrace && dsl_path && File.exist?(dsl_path)
|
59
62
|
|
60
|
-
trace_line = backtrace.find { |l| l
|
63
|
+
trace_line = backtrace.find { |l| l.include?(dsl_path.to_s) }
|
61
64
|
return m unless trace_line
|
62
65
|
line_numer = trace_line.split(':')[1].to_i - 1
|
63
66
|
return m unless line_numer
|
@@ -67,7 +70,7 @@ module Pod
|
|
67
70
|
first_line = ( line_numer.zero? )
|
68
71
|
last_line = ( line_numer == (lines.count - 1) )
|
69
72
|
|
70
|
-
m << "\n
|
73
|
+
m << "\n"
|
71
74
|
m << "#{indent}from #{trace_line.gsub(/:in.*$/,'')}\n"
|
72
75
|
m << "#{indent}-------------------------------------------\n"
|
73
76
|
m << "#{indent}#{ lines[line_numer - 1] }" unless first_line
|
@@ -75,7 +78,7 @@ module Pod
|
|
75
78
|
m << "#{indent}#{ lines[line_numer + 1] }" unless last_line
|
76
79
|
m << "\n" unless m.end_with?("\n")
|
77
80
|
m << "#{indent}-------------------------------------------\n"
|
78
|
-
m << "
|
81
|
+
m << ""
|
79
82
|
@message = m
|
80
83
|
end
|
81
84
|
@message
|
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: 0.
|
4
|
+
version: 0.25.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: 2013-09-
|
12
|
+
date: 2013-09-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|