cocoapods 0.31.1 → 0.32.0

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: 117688488a845efec8bddd33f13c596243fa2ee3
4
- data.tar.gz: ebbb976236e9b57427e2736fa4a9cbd9be0fab65
3
+ metadata.gz: af7d6a3b7351a1ce2268eaaa3eed8c42cfd4fbdc
4
+ data.tar.gz: f70c26b92240ccd444d2b654d377b008ddd00f68
5
5
  SHA512:
6
- metadata.gz: 9b8d6696c213744889e323b7903fdc44355f32d1325082fb5aab10a50e2df59505c7f58eb9d125e56c00549e66f3353ac8be9442effec4312062715d8a9ef350
7
- data.tar.gz: 926fc7919f094716979f130be82c0e7a7b0446a51741a548110751c91cc1e14d3e3b4d4ae6b7a415501b41e9b44c2ef1a488b702b392708d4b964fc2afd10139
6
+ metadata.gz: cb11133140778a88ed6ffcd50c85fcb9eca03986598396357bd503188ddccd3e91248537d438a7c83233da67db4058729c071cdb988051e2ae64e55dd2a5d971
7
+ data.tar.gz: dc8f39cf7327e565ae923b68daab0385f0917c8288fb7f19640583cba5d787d5cc0a7e2371326d9ad4977eb8f0089ae63aa5b7489747f69688e61e1f0d54a9b5
@@ -2,6 +2,98 @@
2
2
 
3
3
  To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides/installing_cocoapods.html).
4
4
 
5
+ ## 0.32.0
6
+
7
+ [CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/master...0.31.1)
8
+ • [CocoaPods-Core](https://github.com/CocoaPods/Core/compare/master...0.31.1)
9
+
10
+ ##### Enhancements
11
+
12
+ * Allow to update only a list of given pods with `pod update [POD_NAMES...]`.
13
+ [Marius Rackwitz](https://github.com/mrackwitz)
14
+ [CocoaPods#760](https://github.com/CocoaPods/CocoaPods/issues/760)
15
+
16
+ * `pod update` prints the previous version of the updated pods.
17
+ [Andrea Mazzini](https://github.com/andreamazz)
18
+ [#2008](https://github.com/CocoaPods/CocoaPods/issues/2008)
19
+
20
+ * `pod update` falls back to `pod install` if no Lockfile is present.
21
+ [Marius Rackwitz](https://github.com/mrackwitz)
22
+
23
+ * File references in the Pods project for development Pods now are absolute if
24
+ the dependency is specified with an absolute paths.
25
+ [Samuel Ford](https://github.com/samuelwford)
26
+ [#1042](https://github.com/CocoaPods/CocoaPods/issues/1042)
27
+
28
+ * Added `deprecated` and `deprecated_in_favor_of` attributes to Specification
29
+ DSL.
30
+ [Paul Young](https://github.com/paulyoung)
31
+ [Core#87](https://github.com/CocoaPods/Core/pull/87)
32
+
33
+ * Numerous improvements to the validator and to the linter.
34
+ * Validate the reachability of screenshot URLs in podspecs while linting a
35
+ specification.
36
+ [Kyle Fuller](https://github.com/kylef)
37
+ [#2010](https://github.com/CocoaPods/CocoaPods/issues/2010)
38
+ * Support HTTP redirects when linting homepage and screenshots.
39
+ [Boris Bügling](https://github.com/neonichu)
40
+ [#2027](https://github.com/CocoaPods/CocoaPods/pull/2027)
41
+ * The linter now checks `framework` and `library` attributes for invalid
42
+ strings.
43
+ [Paul Williamson](https://github.com/squarefrog)
44
+ [Fabio Pelosin](irrationalfab)
45
+ [Core#66](https://github.com/CocoaPods/Core/issues/66)
46
+ [Core#96](https://github.com/CocoaPods/Core/pull/96)
47
+ [Core#105](https://github.com/CocoaPods/Core/issues/105)
48
+ * The Linter will not check for comments anymore.
49
+ [Fabio Pelosin][irrationalfab]
50
+ [Core#108](https://github.com/CocoaPods/Core/issues/108)
51
+ * Removed legacy checks from the linter.
52
+ [Fabio Pelosin][irrationalfab]
53
+ [Core#108](https://github.com/CocoaPods/Core/issues/108)
54
+ * Added logic to handle subspecs and platform scopes to linter check of
55
+ the `requries_arc` attribute.
56
+ [Fabio Pelosin][irrationalfab]
57
+ [CocoaPods#2005](https://github.com/CocoaPods/CocoaPods/issues/2005)
58
+ * The linter no longer considers empty a Specification if it only specifies the
59
+ `resource_bundle` attribute.
60
+ [Joshua Kalpin][Kapin]
61
+ [#63](https://github.com/CocoaPods/Core/issues/63)
62
+ [#95](https://github.com/CocoaPods/Core/pull/95)
63
+
64
+ * `pod lib create` is now using the `configure` file instead of the
65
+ `_CONFIGURE.rb` file.
66
+ [Piet Brauer](https://github.com/pietbrauer)
67
+ [Orta Therox](https://github.com/orta)
68
+
69
+ * `pod lib create` now disallows any pod name that begins with a `.`
70
+ [Dustin Clark](https://github.com/clarkda)
71
+ [#2026](https://github.com/CocoaPods/CocoaPods/pull/2026)
72
+ [Core#97](https://github.com/CocoaPods/Core/pull/97)
73
+ [Core#98](https://github.com/CocoaPods/Core/issues/98)
74
+
75
+ * Prevent the user from using `pod` commands as root.
76
+ [Kyle Fuller](https://github.com/kylef)
77
+ [#1815](https://github.com/CocoaPods/CocoaPods/issues/1815)
78
+
79
+ * Dependencies declared with external sources now support HTTP downloads and
80
+ have improved support for all the options supported by the downloader.
81
+ [Fabio Pelosin][irrationalfab]
82
+
83
+ * An informative error message is presented when merge conflict is detected in
84
+ a YAML file.
85
+ [Luis de la Rosa](https://github.com/luisdelarosa)
86
+ [#69](https://github.com/CocoaPods/Core/issues/69)
87
+ [#100](https://github.com/CocoaPods/Core/pull/100)
88
+
89
+ ##### Bug Fixes
90
+
91
+ * Fixed the Podfile `default_subspec` attribute in nested subspecs.
92
+ [Fabio Pelosin][irrationalfab]
93
+ [#1021](https://github.com/CocoaPods/CocoaPods/issues/1021)
94
+
95
+
96
+
5
97
  ## 0.31.1
6
98
  [CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.31.1...0.31.0)
7
99
  • [CocoaPods-Core](https://github.com/CocoaPods/Core/compare/0.31.1...0.31.0)
@@ -37,6 +129,11 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
37
129
  [Robert Zuber](https://github.com/z00b)
38
130
  [#1617](https://github.com/CocoaPods/CocoaPods/issues/1617)
39
131
 
132
+ * Generated prefix header file will now have unique prefix_header_contents for
133
+ Pods with subspecs.
134
+ [Luis de la Rosa](https://github.com/luisdelarosa)
135
+ [#1449](https://github.com/CocoaPods/CocoaPods/issues/1449)
136
+
40
137
  * The linter will now check the reachability of the homepage of Podspecs during
41
138
  a full lint.
42
139
  [Richard Lee](https://github.com/dlackty)
@@ -72,24 +72,3 @@ if ENV['COCOA_PODS_ENV'] == 'development'
72
72
  # require 'awesome_print'
73
73
  # require 'pry'
74
74
  end
75
-
76
- # TODO remove for CocoaPods 0.31
77
- #
78
- module Pod
79
- class Specification
80
- def pre_install(&block)
81
- UI.warn "[#{self}] The pre install hook of the specification " \
82
- "DSL has been deprecated, use the `resource_bundles` or the " \
83
- "`prepare_command` attributes."
84
- UI.puts "[#{self}] The pre_install hook will be removed in the next release".red
85
- @pre_install_callback = block
86
- end
87
- def post_install(&block)
88
- UI.warn "[#{self}] The post install hook of the specification " \
89
- "DSL has been deprecated, use the `resource_bundles` or the " \
90
- "`prepare_command` attributes."
91
- UI.puts "[#{self}] The post_install hook will be removed in the next release".red
92
- @post_install_callback = block
93
- end
94
- end
95
- end
@@ -43,11 +43,14 @@ module Pod
43
43
  end
44
44
 
45
45
  def self.run(argv)
46
+ help! "You cannot run CocoaPods as root." if Process.uid == 0
47
+
46
48
  argv = CLAide::ARGV.new(argv)
47
49
  if argv.flag?('version')
48
50
  UI.puts VERSION
49
51
  exit 0
50
52
  end
53
+
51
54
  super(argv)
52
55
  UI.print_warnings
53
56
  end
@@ -26,6 +26,7 @@ module Pod
26
26
  super
27
27
  help! "A name for the Pod is required." unless @name
28
28
  help! "The Pod name cannot contain spaces." if @name.match(/\s/)
29
+ help! "The Pod name cannot begin with a '.'" if @name[0, 1] == '.'
29
30
  end
30
31
 
31
32
  def run
@@ -54,7 +55,7 @@ module Pod
54
55
  # @return [void]
55
56
  #
56
57
  def clone_template
57
- UI.section("Creating `#{@name}` Pod") do
58
+ UI.section("Cloning `#{template_repo_url}` into `#{@name}`.") do
58
59
  git!"clone '#{template_repo_url}' #{@name}"
59
60
  end
60
61
  end
@@ -64,9 +65,13 @@ module Pod
64
65
  # @return [void]
65
66
  #
66
67
  def configure_template
67
- UI.section("Configuring template") do
68
+ UI.section("Configuring #{@name} template.") do
68
69
  Dir.chdir(@name) do
69
- ruby! "_CONFIGURE.rb #{@name}"
70
+ if File.exists? "configure"
71
+ system "./configure #{@name}"
72
+ else
73
+ UI.warn "Template does not have a configure file."
74
+ end
70
75
  end
71
76
  end
72
77
  end
@@ -28,13 +28,15 @@ module Pod
28
28
 
29
29
  # Runs the installer.
30
30
  #
31
- # @param [update] whether the installer should be run in update mode.
31
+ # @param [Hash, Boolean, nil] update
32
+ # Pods that have been requested to be updated or true if all Pods
33
+ # should be updated
32
34
  #
33
35
  # @return [void]
34
36
  #
35
37
  def run_install_with_update(update)
36
38
  installer = Installer.new(config.sandbox, config.podfile, config.lockfile)
37
- installer.update_mode = update
39
+ installer.update = update
38
40
  installer.install!
39
41
  end
40
42
  end
@@ -76,10 +78,40 @@ module Pod
76
78
 
77
79
  self.summary = 'Update outdated project dependencies'
78
80
 
81
+ self.description = <<-DESC
82
+ Updates the Pods identified by the specified POD_NAMES. If no POD_NAMES are
83
+ specified it updates all the Pods ignoring the contents of the Podfile.lock.
84
+ This command is reserved to the update of dependencies and pod install should
85
+ be used to install changes to the Podfile.
86
+ DESC
87
+
88
+ self.arguments = '[POD_NAMES...]'
89
+
90
+ def initialize(argv)
91
+ @pods = argv.arguments! unless argv.arguments.empty?
92
+ super
93
+ end
94
+
79
95
  def run
80
96
  verify_podfile_exists!
81
- verify_lockfile_exists!
82
- run_install_with_update(true)
97
+
98
+ if @pods
99
+ verify_lockfile_exists!
100
+
101
+ # Check if all given pods are installed
102
+ missing_pods = @pods.select { |pod| !config.lockfile.pod_names.include?(pod) }
103
+ if missing_pods.length > 0
104
+ raise Informative, (missing_pods.length > 1 \
105
+ ? "Pods %s are not installed and cannot be updated" \
106
+ : "Pod %s is not installed and cannot be updated"
107
+ ) % missing_pods.map { |p| "`#{p}'" }.join(', ')
108
+ end
109
+
110
+ run_install_with_update(:pods => @pods)
111
+ else
112
+ UI.puts "Update all pods".yellow unless @pods
113
+ run_install_with_update(true)
114
+ end
83
115
  end
84
116
  end
85
117
 
@@ -480,7 +480,7 @@ Pod::Spec.new do |s|
480
480
  DESC
481
481
 
482
482
  s.homepage = "#{data[:homepage]}"
483
- # s.screenshots = "www.example.com/screenshots_1", "www.example.com/screenshots_2"
483
+ # s.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif"
484
484
 
485
485
 
486
486
  # ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
@@ -1,3 +1,8 @@
1
+ require 'cocoapods/external_sources/abstract_external_source'
2
+ require 'cocoapods/external_sources/downloader_source'
3
+ require 'cocoapods/external_sources/path_source'
4
+ require 'cocoapods/external_sources/podspec_source'
5
+
1
6
  module Pod
2
7
 
3
8
  # Provides support for initializing the correct concrete class of an external
@@ -13,20 +18,7 @@ module Pod
13
18
  name = dependency.root_name
14
19
  params = dependency.external_source
15
20
 
16
- klass = if params.key?(:git) then GitSource
17
- elsif params.key?(:svn) then SvnSource
18
- elsif params.key?(:hg) then MercurialSource
19
- elsif params.key?(:bzr) then BazaarSource
20
- elsif params.key?(:podspec) then PodspecSource
21
- elsif params.key?(:path) then PathSource
22
- end
23
-
24
- if params.key?(:local)
25
- klass = PathSource
26
- UI.warn "The `:local` option of the Podfile has been renamed to `:path` and is deprecated." \
27
- end
28
-
29
- if klass
21
+ if klass = concrete_class_from_params(params)
30
22
  klass.new(name, params, podfile_path)
31
23
  else
32
24
  msg = "Unknown external source parameters for `#{name}`: `#{params}`"
@@ -34,357 +26,20 @@ module Pod
34
26
  end
35
27
  end
36
28
 
37
- #-------------------------------------------------------------------------#
38
-
39
- # Abstract class that defines the common behaviour of external sources.
40
- #
41
- class AbstractExternalSource
42
-
43
- # @return [String] the name of the Pod described by this external source.
44
- #
45
- attr_reader :name
46
-
47
- # @return [Hash{Symbol => String}] the hash representation of the
48
- # external source.
49
- #
50
- attr_reader :params
51
-
52
- # @return [String] the path where the podfile is defined to resolve
53
- # relative paths.
54
- #
55
- attr_reader :podfile_path
56
-
57
- # @param [String] name @see name
58
- # @param [Hash] params @see params
59
- # @param [String] podfile_path @see podfile_path
60
- #
61
- def initialize(name, params, podfile_path)
62
- @name = name
63
- @params = params
64
- @podfile_path = podfile_path
65
- end
66
-
67
- # @return [Bool] whether an external source source is equal to another
68
- # according to the {#name} and to the {#params}.
69
- #
70
- def ==(other)
71
- return false if other.nil?
72
- name == other.name && params == other.params
73
- end
74
-
75
- #--------------------------------------#
76
-
77
- public
78
-
79
- # @!group Fetching
80
-
81
- # Fetches the external source from the remote according to the params.
82
- #
83
- # @param [Sandbox] sandbox
84
- # the sandbox where the specification should be stored.
85
- #
86
- # @return [void]
87
- #
88
- def fetch(sandbox)
89
- raise "Abstract method"
90
- end
91
-
92
- #--------------------------------------#
93
-
94
- public
95
-
96
- # @!group Subclasses hooks
97
-
98
- # Fetches the external source from the remote according to the params.
99
- #
100
- # @param [Sandbox] sandbox
101
- # the sandbox where the specification should be stored.
102
- #
103
- # @return [void]
104
- #
105
- def fetch(sandbox)
106
- raise "Abstract method"
107
- end
108
-
109
- # @return [String] a string representation of the source suitable for UI.
110
- #
111
- def description
112
- raise "Abstract method"
113
- end
114
-
115
- #--------------------------------------#
116
-
117
- private
118
-
119
- # @! Subclasses helpers
120
-
121
- # Pre-downloads a Pod passing the options to the downloader and informing
122
- # the sandbox.
123
- #
124
- # @param [Sandbox] sandbox
125
- # The sandbox where the Pod should be downloaded.
126
- #
127
- # @note To prevent a double download of the repository the pod is
128
- # marked as pre-downloaded indicating to the installer that only
129
- # clean operations are needed.
130
- #
131
- # @todo The downloader configuration is the same of the
132
- # #{PodSourceInstaller} and it needs to be kept in sync.
133
- #
134
- # @return [void]
135
- #
136
- def pre_download(sandbox)
137
- UI.titled_section("Pre-downloading: `#{name}` #{description}", { :verbose_prefix => "-> " }) do
138
- target = sandbox.root + name
139
- target.rmtree if target.exist?
140
- downloader = Config.instance.downloader(target, params)
141
- downloader.download
142
- store_podspec(sandbox, target + "#{name}.podspec")
143
- sandbox.store_pre_downloaded_pod(name)
144
- if downloader.options_specific?
145
- source = params
146
- else
147
- source = downloader.checkout_options
148
- end
149
- sandbox.store_checkout_source(name, source)
150
- end
151
- end
152
-
153
- # Stores the podspec in the sandbox and marks it as from an external
154
- # source.
155
- #
156
- # @param [Sandbox] sandbox
157
- # The sandbox where the specification should be stored.
158
- #
159
- # @param [Pathname, String] spec
160
- # The path of the specification or its contents.
161
- #
162
- # @note All the concrete implementations of #{fetch} should invoke this
163
- # method.
164
- #
165
- # @note The sandbox ensures that the podspec exists and that the names
166
- # match.
167
- #
168
- # @return [void]
169
- #
170
- def store_podspec(sandbox, spec)
171
- sandbox.store_podspec(name, spec, true)
172
- end
173
-
174
- end
175
-
176
- #-------------------------------------------------------------------------#
177
-
178
- # Provides support for fetching a specification file from a Git remote.
179
- #
180
- # Supports all the options of the downloader (is similar to the git key of
181
- # `source` attribute of a specification).
182
- #
183
- # @note The podspec must be in the root of the repository and should have a
184
- # name matching the one of the dependency.
185
- #
186
- class GitSource < AbstractExternalSource
187
-
188
- # @see AbstractExternalSource#fetch
189
- #
190
- def fetch(sandbox)
191
- pre_download(sandbox)
192
- end
193
-
194
- # @see AbstractExternalSource#description
195
- #
196
- def description
197
- "from `#{params[:git]}`".tap do |description|
198
- description << ", commit `#{params[:commit]}`" if params[:commit]
199
- description << ", branch `#{params[:branch]}`" if params[:branch]
200
- description << ", tag `#{params[:tag]}`" if params[:tag]
201
- end
202
- end
203
- end
204
-
205
- #-------------------------------------------------------------------------#
206
-
207
- # Provides support for fetching a specification file from a SVN source
208
- # remote.
209
- #
210
- # Supports all the options of the downloader (is similar to the git key of
211
- # `source` attribute of a specification).
212
- #
213
- # @note The podspec must be in the root of the repository and should have a
214
- # name matching the one of the dependency.
215
- #
216
- class SvnSource < AbstractExternalSource
217
-
218
- # @see AbstractExternalSource#fetch
219
- #
220
- def fetch(sandbox)
221
- pre_download(sandbox)
222
- end
223
-
224
- # @see AbstractExternalSource#description
225
- #
226
- def description
227
- "from `#{params[:svn]}`".tap do |description|
228
- description << ", folder `#{params[:folder]}`" if params[:folder]
229
- description << ", tag `#{params[:tag]}`" if params[:tag]
230
- description << ", revision `#{params[:revision]}`" if params[:revision]
231
- end
232
- end
233
- end
234
-
235
- #-------------------------------------------------------------------------#
236
-
237
- # Provides support for fetching a specification file from a Mercurial
238
- # source remote.
239
- #
240
- # Supports all the options of the downloader (is similar to the git key of
241
- # `source` attribute of a specification).
242
- #
243
- # @note The podspec must be in the root of the repository and should have a
244
- # name matching the one of the dependency.
245
- #
246
- class MercurialSource < AbstractExternalSource
247
-
248
- # @see AbstractExternalSource#fetch
249
- #
250
- def fetch(sandbox)
251
- pre_download(sandbox)
252
- end
253
-
254
- # @see AbstractExternalSource#description
255
- #
256
- def description
257
- "from `#{params[:hg]}`".tap do |description|
258
- description << ", revision `#{params[:revision]}`" if params[:revision]
259
- end
260
- end
261
- end
262
-
263
- #-------------------------------------------------------------------------#
264
-
265
- # Provides support for fetching a specification file from a Bazaar
266
- # source remote.
267
- #
268
- # Supports all the options of the downloader (is similar to the git key of
269
- # `source` attribute of a specification).
270
- #
271
- # @note The podspec must be in the root of the repository and should have a
272
- # name matching the one of the dependency.
29
+ # @return [Class]
273
30
  #
274
- class BazaarSource < AbstractExternalSource
275
-
276
- # @see AbstractExternalSource#fetch
277
- #
278
- def fetch(sandbox)
279
- pre_download(sandbox)
280
- end
281
-
282
- # @see AbstractExternalSource#description
283
- #
284
- def description
285
- "from `#{params[:bzr]}`".tap do |description|
286
- description << ", tag `#{params[:tag]}`" if params[:tag]
287
- description << ", revision `#{params[:revision]}`" if params[:revision]
288
- end
31
+ def self.concrete_class_from_params(params)
32
+ if params.key?(:podspec)
33
+ PodspecSource
34
+ elsif params.key?(:path)
35
+ PathSource
36
+ elsif params.key?(:local)
37
+ UI.warn "The `:local` option of the Podfile has been " \
38
+ "renamed to `:path` and it is deprecated."
39
+ PathSource
40
+ elsif Downloader.strategy_from_options(params)
41
+ DownloaderSource
289
42
  end
290
43
  end
291
-
292
- #-------------------------------------------------------------------------#
293
-
294
- # Provides support for fetching a specification file from an URL. Can be
295
- # http, file, etc.
296
- #
297
- class PodspecSource < AbstractExternalSource
298
-
299
- # @see AbstractExternalSource#fetch
300
- #
301
- def fetch(sandbox)
302
- UI.titled_section("Fetching podspec for `#{name}` #{description}", { :verbose_prefix => "-> " }) do
303
-
304
- require 'open-uri'
305
- open(podspec_uri) { |io| store_podspec(sandbox, io.read) }
306
- end
307
- end
308
-
309
- # @see AbstractExternalSource#description
310
- #
311
- def description
312
- "from `#{params[:podspec]}`"
313
- end
314
-
315
- #--------------------------------------#
316
-
317
- private
318
-
319
- # @!group Helpers
320
-
321
- # @return [String] The uri of the podspec appending the name of the file
322
- # and expanding it if necessary.
323
- #
324
- # @note If the declared path is expanded only if the represents a path
325
- # relative to the file system.
326
- #
327
- def podspec_uri
328
- declared_path = params[:podspec].to_s
329
- if declared_path.match(%r{^.+://})
330
- declared_path
331
- else
332
- path_with_ext = File.extname(declared_path) == '.podspec' ? declared_path : "#{declared_path}/#{name}.podspec"
333
- podfile_dir = File.dirname(podfile_path || '')
334
- absolute_path = File.expand_path(path_with_ext, podfile_dir)
335
- absolute_path
336
- end
337
- end
338
- end
339
-
340
- #-------------------------------------------------------------------------#
341
-
342
- # Provides support for fetching a specification file from a path local to
343
- # the machine running the installation.
344
- #
345
- # Works with the {LocalPod::LocalSourcedPod} class.
346
- #
347
- class PathSource < AbstractExternalSource
348
-
349
- # @see AbstractExternalSource#fetch
350
- #
351
- def fetch(sandbox)
352
- UI.titled_section("Fetching podspec for `#{name}` #{description}", { :verbose_prefix => "-> " }) do
353
- podspec = podspec_path
354
- store_podspec(sandbox, podspec)
355
- sandbox.store_local_path(name, podspec.dirname)
356
- end
357
- end
358
-
359
- # @see AbstractExternalSource#description
360
- #
361
- def description
362
- "from `#{params[:path] || params[:local]}`"
363
- end
364
-
365
- #--------------------------------------#
366
-
367
- private
368
-
369
- # @!group Helpers
370
-
371
- # @return [Pathname] the path of the podspec.
372
- #
373
- def podspec_path
374
- declared_path = (params[:path] || params[:local]).to_s
375
- path_with_ext = File.extname(declared_path) == '.podspec' ? declared_path : "#{declared_path}/#{name}.podspec"
376
- podfile_dir = File.dirname(podfile_path || '')
377
- absolute_path = File.expand_path(path_with_ext, podfile_dir)
378
- pathname = Pathname.new(absolute_path)
379
-
380
- unless pathname.exist?
381
- raise Informative, "No podspec found for `#{name}` in `#{declared_path}`"
382
- end
383
- pathname
384
- end
385
- end
386
-
387
- #-------------------------------------------------------------------------#
388
-
389
44
  end
390
45
  end