cocoapods 0.20.2 → 0.21.0.rc1

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.
@@ -1,36 +0,0 @@
1
- if RUBY_VERSION >= "1.9"
2
- require 'rake/file_list'
3
- else
4
- require 'rake'
5
- end
6
-
7
- # This makes Rake::FileList usable with the Specification attributes
8
- # source_files, public_header_files, preserve_paths, and resources.
9
- #
10
- # @todo This needs to be deprecated as we no have the PathList List
11
- #
12
- module Rake
13
- class FileList
14
- def prepend_patterns(pathname)
15
- @pending_add.map! { |pattern| (pathname + pattern).to_s }
16
- end
17
-
18
- def directory?
19
- false
20
- end
21
-
22
- def glob
23
- to_a.map { |path| Pathname.new(path) }
24
- end
25
-
26
- def inspect
27
- "<##{self.class} pending_add=#{@pending_add}>"
28
- end
29
- alias :to_s :inspect
30
- end
31
- end
32
-
33
- # TODO Defined in CocoaPods Core
34
- # module Pod
35
- # FileList = Rake::FileList
36
- # end
@@ -1,202 +0,0 @@
1
- module Pod
2
-
3
- # Model class which describes a Pods library.
4
- #
5
- # The Library class stores and provides the information necessary for
6
- # working with a library in the Pods project and in the user projects
7
- # through the installation process.
8
- #
9
- class Library
10
-
11
- # @return [PBXNativeTarget] the target definition of the Podfile that
12
- # generated this library.
13
- #
14
- attr_reader :target_definition
15
-
16
- # @param [TargetDefinition] target_definition @see target_definition
17
- # @param [PBXNativeTarget] target @see target
18
- #
19
- def initialize(target_definition)
20
- @target_definition = target_definition
21
- end
22
-
23
- # @return [String] the label for the library.
24
- #
25
- def label
26
- target_definition.label.to_s
27
- end
28
-
29
- # @return [String] the name of the library.
30
- #
31
- def name
32
- target_definition.label.to_s
33
- end
34
-
35
- # @return [String] the name of the library.
36
- #
37
- def product_name
38
- "lib#{target_definition.label}.a"
39
- end
40
-
41
- # @return [String] A string suitable for debugging.
42
- #
43
- def inspect
44
- "<#{self.class} name=#{name} platform=#{platform}>"
45
- end
46
-
47
- #-------------------------------------------------------------------------#
48
-
49
- # @!group Information storage
50
-
51
- # @return [Pathname] the folder where to store the support files of this
52
- # library.
53
- #
54
- attr_accessor :support_files_root
55
-
56
- # @return [Pathname] the folder where the client is stored used for
57
- # computing the relative paths. If integrating it should be the
58
- # folder where the user project is stored, otherwise it should
59
- # be the installation root.
60
- #
61
- attr_accessor :client_root
62
-
63
- # @return [Pathname] the path of the user project that this library will
64
- # integrate as identified by the analyzer.
65
- #
66
- # @note The project instance is not stored to prevent editing different
67
- # instances.
68
- #
69
- attr_accessor :user_project_path
70
-
71
- # @return [String] the list of the UUIDs of the user targets that will be
72
- # integrated by this library as identified by the analizer.
73
- #
74
- # @note The target instances are not stored to prevent editing different
75
- # instances.
76
- #
77
- attr_accessor :user_target_uuids
78
-
79
- # @return [Hash{String=>Symbol}] A hash representing the user build
80
- # configurations where each key corresponds to the name of a
81
- # configuration and its value to its type (`:debug` or `:release`).
82
- #
83
- attr_accessor :user_build_configurations
84
-
85
- # @return [Platform] the platform for this library.
86
- #
87
- attr_accessor :platform
88
-
89
- # @return [PBXNativeTarget] the target generated in the Pods project for
90
- # this library.
91
- #
92
- attr_accessor :target
93
-
94
- # @return [Xcodeproj::Config] the configuration file of the library
95
- #
96
- # @note The configuration is generated by the {TargetInstaller} and
97
- # used by {UserProjectIntegrator} to check for any overridden
98
- # values.
99
- #
100
- attr_accessor :xcconfig
101
-
102
- # @return [Array<Specification>] the specifications of this library.
103
- #
104
- attr_accessor :specs
105
-
106
- # @return [Array<Sandbox::FileAccessor>] the file accessors for the
107
- # specifications of this library.
108
- #
109
- attr_accessor :file_accessors
110
-
111
- #-------------------------------------------------------------------------#
112
-
113
- # @!group Support files
114
-
115
- # @return [Pathname] the absolute path of the xcconfig file.
116
- #
117
- def xcconfig_path
118
- support_files_root + "#{label}.xcconfig"
119
- end
120
-
121
- # @return [Pathname] the absolute path of the copy resources script.
122
- #
123
- def copy_resources_script_path
124
- support_files_root + "#{label}-resources.sh"
125
- end
126
-
127
- # @return [Pathname] the absolute path of the header file which contains
128
- # the information about the installed pods.
129
- #
130
- def target_environment_header_path
131
- support_files_root + "#{label}-environment.h"
132
- end
133
-
134
- # @return [Pathname] the absolute path of the prefix header file.
135
- #
136
- def prefix_header_path
137
- support_files_root + "#{label}-prefix.pch"
138
- end
139
-
140
- # @return [Pathname] the absolute path of the bridge support file.
141
- #
142
- def bridge_support_path
143
- support_files_root + "#{label}.bridgesupport"
144
- end
145
-
146
- # @return [Pathname] the absolute path of acknowledgements file.
147
- #
148
- # @note The acknowledgements generators add the extension according to
149
- # the file type.
150
- #
151
- def acknowledgements_basepath
152
- support_files_root + "#{label}-acknowledgements"
153
- end
154
-
155
- # @return [Pathname] the path of the dummy source generated by CocoaPods
156
- #
157
- def dummy_source_path
158
- support_files_root + "#{label}-dummy.m"
159
- end
160
-
161
- #--------------------------------------#
162
-
163
- # @return [String] The xcconfig path of the root from the `$(SRCROOT)`
164
- # variable of the user's project.
165
- #
166
- def relative_pods_root
167
- "${SRCROOT}/#{support_files_root.relative_path_from(client_root)}"
168
- end
169
-
170
- # @return [String] the path of the xcconfig file relative to the root of
171
- # the user project.
172
- #
173
- def xcconfig_relative_path
174
- relative_to_srcroot(xcconfig_path).to_s
175
- end
176
-
177
- # @return [String] the path of the copy resources script relative to the
178
- # root of the user project.
179
- #
180
- def copy_resources_script_relative_path
181
- "${SRCROOT}/#{relative_to_srcroot(copy_resources_script_path)}"
182
- end
183
-
184
- #-------------------------------------------------------------------------#
185
-
186
- # @!group Private Helpers
187
-
188
- private
189
-
190
- # Computes the relative path of a sandboxed file from the `$(SRCROOT)`
191
- # variable of the user's project.
192
- #
193
- # @param [Pathname] path
194
- # A relative path from the root of the sandbox.
195
- #
196
- # @return [String] the computed path.
197
- #
198
- def relative_to_srcroot(path)
199
- path.relative_path_from(client_root).to_s
200
- end
201
- end
202
- end