cocoapods 1.10.2 → 1.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +214 -5
  3. data/README.md +11 -11
  4. data/lib/cocoapods/command/outdated.rb +12 -1
  5. data/lib/cocoapods/command/repo/push.rb +17 -0
  6. data/lib/cocoapods/command/spec/cat.rb +3 -1
  7. data/lib/cocoapods/command/spec/lint.rb +1 -1
  8. data/lib/cocoapods/command/spec/which.rb +3 -1
  9. data/lib/cocoapods/command/spec.rb +18 -9
  10. data/lib/cocoapods/config.rb +1 -1
  11. data/lib/cocoapods/downloader/cache.rb +95 -6
  12. data/lib/cocoapods/downloader.rb +4 -2
  13. data/lib/cocoapods/external_sources/podspec_source.rb +1 -1
  14. data/lib/cocoapods/gem_version.rb +1 -1
  15. data/lib/cocoapods/generator/acknowledgements.rb +1 -1
  16. data/lib/cocoapods/generator/app_target_helper.rb +7 -3
  17. data/lib/cocoapods/generator/copy_dsyms_script.rb +4 -4
  18. data/lib/cocoapods/generator/copy_xcframework_script.rb +4 -48
  19. data/lib/cocoapods/generator/embed_frameworks_script.rb +2 -1
  20. data/lib/cocoapods/generator/script_phase_constants.rb +1 -0
  21. data/lib/cocoapods/installer/analyzer/sandbox_analyzer.rb +31 -4
  22. data/lib/cocoapods/installer/analyzer.rb +12 -8
  23. data/lib/cocoapods/installer/podfile_validator.rb +2 -2
  24. data/lib/cocoapods/installer/pre_integrate_hooks_context.rb +9 -0
  25. data/lib/cocoapods/installer/project_cache/project_cache_analyzer.rb +9 -2
  26. data/lib/cocoapods/installer/project_cache/project_installation_cache.rb +15 -2
  27. data/lib/cocoapods/installer/project_cache/target_cache_key.rb +7 -4
  28. data/lib/cocoapods/installer/user_project_integrator/target_integrator.rb +149 -9
  29. data/lib/cocoapods/installer/xcode/pods_project_generator/app_host_installer.rb +10 -3
  30. data/lib/cocoapods/installer/xcode/pods_project_generator/file_references_installer.rb +25 -6
  31. data/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_dependency_installer.rb +6 -19
  32. data/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb +63 -56
  33. data/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_integrator.rb +48 -6
  34. data/lib/cocoapods/installer/xcode/pods_project_generator/target_installation_result.rb +2 -2
  35. data/lib/cocoapods/installer/xcode/pods_project_generator/target_installer.rb +2 -5
  36. data/lib/cocoapods/installer/xcode/pods_project_generator.rb +1 -1
  37. data/lib/cocoapods/installer.rb +52 -4
  38. data/lib/cocoapods/resolver.rb +4 -4
  39. data/lib/cocoapods/sandbox/file_accessor.rb +48 -10
  40. data/lib/cocoapods/sandbox/headers_store.rb +3 -1
  41. data/lib/cocoapods/sandbox/path_list.rb +1 -1
  42. data/lib/cocoapods/sandbox/pod_dir_cleaner.rb +1 -1
  43. data/lib/cocoapods/sources_manager.rb +14 -8
  44. data/lib/cocoapods/target/aggregate_target.rb +23 -1
  45. data/lib/cocoapods/target/build_settings.rb +45 -20
  46. data/lib/cocoapods/target/pod_target.rb +47 -22
  47. data/lib/cocoapods/user_interface.rb +4 -0
  48. data/lib/cocoapods/validator.rb +24 -4
  49. data/lib/cocoapods/version_metadata.rb +1 -1
  50. data/lib/cocoapods/xcode/xcframework.rb +8 -3
  51. metadata +26 -19
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9c9864dec487d5e04b5d9cf7f4bc36a25ba9793c629ae64bf71eabb30cc8b040
4
- data.tar.gz: 70643343f2fc6e263c7fbcd41df19646b6c321d5c3b7d112b1a674bc72bdbdf1
3
+ metadata.gz: 4e617acf0486b439b72d009eb2905d7b78853b6ff52d8bd0c9e303534ad978e5
4
+ data.tar.gz: ea674c9a2524f0ea96b413037afe634b72a53e8f5d8e0c44253e7ba559e5c19e
5
5
  SHA512:
6
- metadata.gz: d1b48cdba64b6721446371c392d5fb1f93a28854addcc7dc4724e79484cbe995b75f46675ffd0a0ba3feafb60590e60baf22b725062119bf0e64246e68c5502c
7
- data.tar.gz: de5fa055225078932fac6470a3fda8bb0deef31f6a9165a4b77c84efb778989e82edb9e54197a319b9704c1f0c415516fe703a6333f05f47401087d1e78efa18
6
+ metadata.gz: 4c2a0a0a9a3d92658aa77309c41f51f0385d0d0556ab649fdfeed07996c8e7310c6adb2c09fcb6b3490c0ffe2e004df0a4c7ca8d1d15fe40a4adec40be923c96
7
+ data.tar.gz: d91ebdc6f396a6f04a13439362131247037e7c477ef207c37f3432b383a7552d8e21ab5ffd408c6c8307a77de61476dbd428ff8109bc2d0f3c0f28d1f9cd55c8
data/CHANGELOG.md CHANGED
@@ -4,6 +4,216 @@ To install or update CocoaPods see this [guide](https://guides.cocoapods.org/usi
4
4
 
5
5
  To install release candidates run `[sudo] gem install cocoapods --pre`
6
6
 
7
+ ## 1.11.0 (2021-09-01)
8
+
9
+ ##### Enhancements
10
+
11
+ * None.
12
+
13
+ ##### Bug Fixes
14
+
15
+ * None.
16
+
17
+
18
+ ## 1.11.0.rc.1 (2021-08-25)
19
+
20
+ ##### Enhancements
21
+
22
+ * None.
23
+
24
+ ##### Bug Fixes
25
+
26
+ * Correctly process multiple `xcframeworks` a pod provides.
27
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
28
+ [#10378](https://github.com/CocoaPods/CocoaPods/issues/10378)
29
+
30
+
31
+ ## 1.11.0.beta.2 (2021-08-11)
32
+
33
+ ##### Enhancements
34
+
35
+ * Integrate ODR categories into projects.
36
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
37
+ [#10855](https://github.com/CocoaPods/CocoaPods/pull/10855)
38
+
39
+ ##### Bug Fixes
40
+
41
+ * Pass correct paths for `select_slice` method.
42
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
43
+ [#10430](https://github.com/CocoaPods/CocoaPods/issues/10430)
44
+
45
+
46
+ ## 1.11.0.beta.1 (2021-08-09)
47
+
48
+ ##### Enhancements
49
+
50
+ * Add support for integrating on demand resources.
51
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
52
+ [JunyiXie](https://github.com/JunyiXie)
53
+ [#9606](https://github.com/CocoaPods/CocoaPods/issues/9606)
54
+ [#10845](https://github.com/CocoaPods/CocoaPods/pull/10845)
55
+
56
+ * Integrate `project_header_files` specified by specs.
57
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
58
+ [#9820](https://github.com/CocoaPods/CocoaPods/issues/9820)
59
+
60
+ * Mark RealityComposer-projects (`.rcproject`) files defined in resources for compilation.
61
+ [Hendrik von Prince](https://github.com/parallaxe)
62
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
63
+ [#10793](https://github.com/CocoaPods/CocoaPods/pull/10793)
64
+
65
+ * Integrate test specs and app specs of pre-built pods.
66
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
67
+ [#10795](https://github.com/CocoaPods/CocoaPods/pull/10795)
68
+
69
+ * Add support for `before_headers` and `after_headers` script phase DSL.
70
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
71
+ [#10770](https://github.com/CocoaPods/CocoaPods/issues/10770)
72
+
73
+ * Fix touch on a missing directory for dSYM copy phase script.
74
+ [alvarollmenezes](https://github.com/alvarollmenezes)
75
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
76
+ [#10488](https://github.com/CocoaPods/CocoaPods/issues/10488)
77
+
78
+ * Check the podfile sources and plugin sources when printing warnings without explicitly using the master source.
79
+ [gonghonglou](https://github.com/gonghonglou)
80
+ [#10764](https://github.com/CocoaPods/CocoaPods/pull/10764)
81
+
82
+ * Use relative paths in copy dsyms script.
83
+ [Mickey Knox](https://github.com/knox)
84
+ [#10583](https://github.com/CocoaPods/CocoaPods/pull/10583)
85
+
86
+ * Use `OpenURI.open_uri` instead.
87
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
88
+ [#10597](https://github.com/CocoaPods/CocoaPods/issues/10597)
89
+
90
+ * Set minimum supported Ruby version to 2.6.
91
+ [Igor Makarov](https://github.com/igor-makarov)
92
+ [#10412](https://github.com/CocoaPods/CocoaPods/pull/10412)
93
+
94
+ * Improve compatibility with ActiveSupport 6
95
+ [Jun Jiang](https://github.com/jasl)
96
+ [#10364](https://github.com/CocoaPods/CocoaPods/pull/10364)
97
+
98
+ * Add a `pre_integrate_hook` API
99
+ [dcvz](https://github.com/dcvz)
100
+ [#9935](https://github.com/CocoaPods/CocoaPods/pull/9935)
101
+
102
+ * Rewrite the only place dependent on `typhoeus`.
103
+ [Jun Jiang](https://github.com/jasl), [Igor Makarov](https://github.com/igor-makarov)
104
+ [#10346](https://github.com/CocoaPods/CocoaPods/pull/10346)
105
+
106
+ * Add a `--update-sources` option to `pod repo push` so one can ensure sources are up-to-date.
107
+ [Elton Gao](https://github.com/gyfelton)
108
+ [Justin Martin](https://github.com/justinseanmartin)
109
+
110
+ * Installing a local (`:path`) pod that defines script phases will no longer
111
+ produce warnings.
112
+ [Samuel Giddins](https://github.com/segiddins)
113
+
114
+ * Allow building app & test spec targets that depend on a library that uses
115
+ Swift without requiring an empty Swift file be present.
116
+ [Samuel Giddins](https://github.com/segiddins)
117
+
118
+ * Add flag to ignore prerelease versions when reporting latest version for outdated pods.
119
+ [cltnschlosser](https://github.com/cltnschlosser)
120
+ [#9916](https://github.com/CocoaPods/CocoaPods/pull/9916)
121
+
122
+ * Add possibility to skip modulemap generation
123
+ [till0xff](https://github.com/till0xff)
124
+ [#10235](https://github.com/CocoaPods/CocoaPods/issues/10235)
125
+
126
+ * Add a `--version` option to `pod spec cat` and `pod spec which` for listing the podspec of a specific version
127
+ [pietbrauer](https://github.com/pietbrauer)
128
+ [#10609](https://github.com/CocoaPods/CocoaPods/pull/10609)
129
+
130
+ ##### Bug Fixes
131
+
132
+ * Fix resource variant groups in static frameworks
133
+ [Igor Makarov](https://github.com/igor-makarov)
134
+ [#10834](https://github.com/CocoaPods/CocoaPods/pull/10834)
135
+ [#10605](https://github.com/CocoaPods/CocoaPods/issues/10605)
136
+
137
+ * Fix adding embed frameworks script phase to unit test targets if xcframeworks are present.
138
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
139
+ [#10652](https://github.com/CocoaPods/CocoaPods/issues/10652)
140
+
141
+ * Remove unused `install_xcframework_library` code.
142
+ [Gio Lodi](https://github.com/mokagio)
143
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
144
+ [#10831](https://github.com/CocoaPods/CocoaPods/pull/10831)
145
+
146
+ * Validate vendored library names after they have been expanded.
147
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
148
+ [#10832](https://github.com/CocoaPods/CocoaPods/pull/10832)
149
+
150
+ * Place frameworks from xcframeworks into a unique folder name to avoid duplicate outputs.
151
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
152
+ [#10106](https://github.com/CocoaPods/CocoaPods/issues/10106)
153
+
154
+ * Update pod in Pods folder when changing the pod from branch to version in Podfie.
155
+ [gonghonglou](https://github.com/gonghonglou)
156
+ [#10825](https://github.com/CocoaPods/CocoaPods/pull/10825)
157
+
158
+ * Bump addressable dependency to 2.8.
159
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
160
+ [#10802](https://github.com/CocoaPods/CocoaPods/issues/10802)
161
+
162
+ * Dedup bcsymbolmap paths found from multiple vendored frameworks.
163
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
164
+ [#10373](https://github.com/CocoaPods/CocoaPods/issues/10373)
165
+
166
+ * Correctly filter dependencies for pod variants across different platforms.
167
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
168
+ [#10777](https://github.com/CocoaPods/CocoaPods/issues/10777)
169
+
170
+ * Generate default `Info.plist` for consumer app during validation.
171
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
172
+ [#8570](https://github.com/CocoaPods/CocoaPods/issues/8570)
173
+
174
+ * Fix lint subspec error when the name of subspec start with the pod name.
175
+ [XianpuMeng](https://github.com/XianpuMeng)
176
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
177
+ [#9906](https://github.com/CocoaPods/CocoaPods/issues/9906)
178
+
179
+ * Update `ruby-macho` gem version to support 1.x and 2.x.
180
+ [Eric Chamberlain](https://github.com/PeqNP)
181
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
182
+ [#10390](https://github.com/CocoaPods/CocoaPods/issues/10390)
183
+
184
+ * Respect `--configuration` option when analyzing via `pod lib lint --analyze`.
185
+ [Jenn Magder](https://github.com/jmagman)
186
+ [#10476](https://github.com/CocoaPods/CocoaPods/issues/10476)
187
+
188
+ * Do not add dependencies to 'Link Binary With Libraries' phase.
189
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
190
+ [#10133](https://github.com/CocoaPods/CocoaPods/pull/10133)
191
+
192
+ * Ensure cache integrity on concurrent installations.
193
+ [Erik Blomqvist](https://github.com/codiophile)
194
+ [#10013](https://github.com/CocoaPods/CocoaPods/issues/10013)
195
+
196
+ * Force a clean install if installation options change.
197
+ [Sebastian Shanus](https://github.com/sebastianv1)
198
+ [#10016](https://github.com/CocoaPods/CocoaPods/pull/10016)
199
+
200
+ * Correctly detect that a prebuilt pod uses Swift.
201
+ [Elton Gao](https://github.com/gyfelton)
202
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
203
+ [#8649](https://github.com/CocoaPods/CocoaPods/issues/8649)
204
+
205
+ * fix: ensure cached spec path uniq
206
+ [SolaWing](https://github.com/SolaWing)
207
+ [#10231](https://github.com/CocoaPods/CocoaPods/issues/10231)
208
+
209
+ * Set `knownRegions` on generated projects with localized resources to prevent Xcode from re-saving projects to disk.
210
+ [Eric Amorde](https://github.com/amorde)
211
+ [#10290](https://github.com/CocoaPods/CocoaPods/pull/10290)
212
+
213
+ * Serialize schemes that do not need to be rewritten by Xcode.
214
+ [Samuel Giddins](https://github.com/segiddins)
215
+
216
+
7
217
  ## 1.10.2 (2021-07-28)
8
218
 
9
219
  ##### Enhancements
@@ -29,7 +239,7 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
29
239
 
30
240
  ##### Enhancements
31
241
 
32
- * None.
242
+ * None.
33
243
 
34
244
  ##### Bug Fixes
35
245
 
@@ -138,12 +348,11 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
138
348
  [Gereon Steffens](https://github.com/gereons)
139
349
  [#9686](https://github.com/CocoaPods/CocoaPods/issues/9686)
140
350
 
141
- * Add a post_integrate_hook API
351
+ * Add a `post_integrate_hook` API
142
352
  [lucasmpaim](https://github.com/lucasmpaim)
143
353
  [#7432](https://github.com/CocoaPods/CocoaPods/issues/7432)
144
354
 
145
- * Set the `BUILD_LIBRARY_FOR_DISTRIBUTION` build setting if integrating with
146
- a target that has the setting set to `YES` (directly or in an .xcconfig).
355
+ * Set the `BUILD_LIBRARY_FOR_DISTRIBUTION` build setting if integrating with a target that has the setting set to `YES`.
147
356
  [Juanjo López](https://github.com/juanjonol)
148
357
  [#9232](https://github.com/CocoaPods/CocoaPods/issues/9232)
149
358
 
@@ -151,7 +360,7 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
151
360
  [Paul Beusterien](https://github.com/paulb777)
152
361
  [#9392](https://github.com/CocoaPods/CocoaPods/pull/9392)
153
362
 
154
- * Add --use-static-frameworks lint option
363
+ * Add `--use-static-frameworks` lint option
155
364
  [Paul Beusterien](https://github.com/paulb777)
156
365
  [#9632](https://github.com/CocoaPods/CocoaPods/pull/9632)
157
366
 
data/README.md CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  ### CocoaPods: The Cocoa dependency manager
4
4
 
5
- [![Build Status](http://img.shields.io/travis/CocoaPods/CocoaPods/master.svg?style=flat)](https://travis-ci.org/CocoaPods/CocoaPods)
6
- [![Gem Version](http://img.shields.io/gem/v/cocoapods.svg?style=flat)](http://badge.fury.io/rb/cocoapods)
5
+ [![Build Status](https://img.shields.io/github/workflow/status/CocoaPods/CocoaPods/Specs)](https://github.com/CocoaPods/CocoaPods/actions)
6
+ [![Gem Version](https://img.shields.io/gem/v/cocoapods)](https://rubygems.org/gems/cocoapods)
7
7
  [![Maintainability](https://api.codeclimate.com/v1/badges/8f0fe544baf2ae1acc2b/maintainability)](https://codeclimate.com/github/CocoaPods/CocoaPods/maintainability)
8
8
  [![Test Coverage](https://api.codeclimate.com/v1/badges/8f0fe544baf2ae1acc2b/test_coverage)](https://codeclimate.com/github/CocoaPods/CocoaPods/test_coverage)
9
9
 
@@ -70,13 +70,13 @@ contributor [code of conduct](CODE_OF_CONDUCT.md).
70
70
 
71
71
  CocoaPods is composed of the following projects:
72
72
 
73
- | Status | Project | Description | Info |
74
- | :----- | :------ | :--- | :--- |
75
- | [![Build Status](http://img.shields.io/travis/CocoaPods/CocoaPods/master.svg?style=flat)](https://travis-ci.org/CocoaPods/CocoaPods) | [CocoaPods](https://github.com/CocoaPods/CocoaPods) | The CocoaPods command line tool. | [guides](https://guides.cocoapods.org)
76
- | [![Build Status](http://img.shields.io/travis/CocoaPods/Core/master.svg?style=flat)](https://travis-ci.org/CocoaPods/Core) | [CocoaPods Core](https://github.com/CocoaPods/Core) | Support for working with specifications and podfiles. | [docs](https://guides.cocoapods.org/contributing/components.html)
77
- | [![Build Status](http://img.shields.io/travis/CocoaPods/cocoapods-downloader/master.svg?style=flat)](https://travis-ci.org/CocoaPods/cocoapods-downloader) |[CocoaPods Downloader](https://github.com/CocoaPods/cocoapods-downloader) | Downloaders for various source types. | [docs](https://www.rubydoc.info/gems/cocoapods-downloader)
78
- | [![Build Status](http://img.shields.io/travis/CocoaPods/Xcodeproj/master.svg?style=flat)](https://travis-ci.org/CocoaPods/Xcodeproj) | [Xcodeproj](https://github.com/CocoaPods/Xcodeproj) | Create and modify Xcode projects from Ruby. | [docs](https://www.rubydoc.info/gems/xcodeproj)
79
- | [![Build Status](http://img.shields.io/travis/CocoaPods/CLAide/master.svg?style=flat)](https://travis-ci.org/CocoaPods/CLAide) | [CLAide](https://github.com/CocoaPods/CLAide) | A small command-line interface framework. | [docs](https://www.rubydoc.info/gems/claide)
80
- | [![Build Status](http://img.shields.io/travis/CocoaPods/Molinillo/master.svg?style=flat)](https://travis-ci.org/CocoaPods/Molinillo) | [Molinillo](https://github.com/CocoaPods/Molinillo) | A powerful generic dependency resolver. | [docs](https://www.rubydoc.info/gems/molinillo)
81
- | [![Build Status](http://img.shields.io/travis/CocoaPods/CocoaPods-app/master.svg?style=flat)](https://travis-ci.org/CocoaPods/CocoaPods-app) | [CocoaPods.app](https://github.com/CocoaPods/CocoaPods-app) | A full-featured and standalone installation of CocoaPods. | [info](https://cocoapods.org/app)
73
+ | Status | Project | Description | Info |
74
+ | :-------- | :------ | :--- | :--- |
75
+ | [![Build Status](https://img.shields.io/github/workflow/status/CocoaPods/CocoaPods/Specs)](https://github.com/CocoaPods/CocoaPods/actions) | [CocoaPods](https://github.com/CocoaPods/CocoaPods) | The CocoaPods command line tool. | [guides](https://guides.cocoapods.org)
76
+ | [![Build Status](https://img.shields.io/github/workflow/status/CocoaPods/Core/Specs)](https://github.com/CocoaPods/Core/actions) | [CocoaPods Core](https://github.com/CocoaPods/Core) | Support for working with specifications and podfiles. | [docs](https://guides.cocoapods.org/contributing/components.html)
77
+ | [![Build Status](https://img.shields.io/travis/CocoaPods/cocoapods-downloader/master.svg?style=flat)](https://travis-ci.org/CocoaPods/cocoapods-downloader) |[CocoaPods Downloader](https://github.com/CocoaPods/cocoapods-downloader) | Downloaders for various source types. | [docs](https://www.rubydoc.info/gems/cocoapods-downloader)
78
+ | [![Build Status](https://img.shields.io/travis/CocoaPods/Xcodeproj/master.svg?style=flat)](https://travis-ci.org/CocoaPods/Xcodeproj) | [Xcodeproj](https://github.com/CocoaPods/Xcodeproj) | Create and modify Xcode projects from Ruby. | [docs](https://www.rubydoc.info/gems/xcodeproj)
79
+ | [![Build Status](https://img.shields.io/travis/CocoaPods/CLAide/master.svg?style=flat)](https://travis-ci.org/CocoaPods/CLAide) | [CLAide](https://github.com/CocoaPods/CLAide) | A small command-line interface framework. | [docs](https://www.rubydoc.info/gems/claide)
80
+ | [![Build Status](https://img.shields.io/travis/CocoaPods/Molinillo/master.svg?style=flat)](https://travis-ci.org/CocoaPods/Molinillo) | [Molinillo](https://github.com/CocoaPods/Molinillo) | A powerful generic dependency resolver. | [docs](https://www.rubydoc.info/gems/molinillo)
81
+ | [![Build Status](https://img.shields.io/travis/CocoaPods/CocoaPods-app/master.svg?style=flat)](https://travis-ci.org/CocoaPods/CocoaPods-app) | [CocoaPods.app](https://github.com/CocoaPods/CocoaPods-app) | A full-featured and standalone installation of CocoaPods. | [info](https://cocoapods.org/app)
82
82
  | | [Master Repo ](https://github.com/CocoaPods/Specs) | Master repository of specifications. | [guides](https://guides.cocoapods.org/making/specs-and-specs-repo.html)
@@ -11,6 +11,17 @@ module Pod
11
11
  spec repos, not those from local/external sources.
12
12
  DESC
13
13
 
14
+ def self.options
15
+ [
16
+ ['--ignore-prerelease', "Don't consider prerelease versions to be updates"],
17
+ ].concat(super)
18
+ end
19
+
20
+ def initialize(argv)
21
+ @ignore_prerelease = argv.flag?('ignore-prerelease')
22
+ super
23
+ end
24
+
14
25
  # Run the command
15
26
  #
16
27
  def run
@@ -67,7 +78,7 @@ module Pod
67
78
  ensure_external_podspecs_present!
68
79
  spec_sets.map do |set|
69
80
  spec = set.specification
70
- source_version = set.versions.first
81
+ source_version = set.versions.find { |version| !@ignore_prerelease || !version.prerelease? }
71
82
  pod_name = spec.root.name
72
83
  lockfile_version = lockfile.version(pod_name)
73
84
  if source_version > lockfile_version
@@ -37,6 +37,7 @@ module Pod
37
37
  ['--swift-version=VERSION', 'The `SWIFT_VERSION` that should be used when linting the spec. ' \
38
38
  'This takes precedence over the Swift versions specified by the spec or a `.swift-version` file'],
39
39
  ['--no-overwrite', 'Disallow pushing that would overwrite an existing spec'],
40
+ ['--update-sources', 'Make sure sources are up-to-date before a push'],
40
41
  ].concat(super)
41
42
  end
42
43
 
@@ -46,6 +47,7 @@ module Pod
46
47
  @repo = argv.shift_argument
47
48
  @source = source_for_repo
48
49
  @source_urls = argv.option('sources', config.sources_manager.all.map(&:url).append(Pod::TrunkSource::TRUNK_REPO_URL).uniq.join(',')).split(',')
50
+ @update_sources = argv.flag?('update-sources')
49
51
  @podspec = argv.shift_argument
50
52
  @use_frameworks = !argv.flag?('use-libraries')
51
53
  @use_modular_headers = argv.flag?('use-modular-headers', false)
@@ -73,6 +75,7 @@ module Pod
73
75
  def run
74
76
  open_editor if @commit_message && @message.nil?
75
77
  check_if_push_allowed
78
+ update_sources if @update_sources
76
79
  validate_podspec_files
77
80
  check_repo_status
78
81
  update_repo
@@ -177,6 +180,20 @@ module Pod
177
180
  git!(%W(-C #{repo_dir} pull))
178
181
  end
179
182
 
183
+ # Update sources if present
184
+ #
185
+ # @return [void]
186
+ #
187
+ def update_sources
188
+ return if @source_urls.nil?
189
+ @source_urls.each do |source_url|
190
+ source = config.sources_manager.source_with_name_or_url(source_url)
191
+ dir = source.specs_dir
192
+ UI.puts "Updating a source at #{dir} for #{source}"
193
+ git!(%W(-C #{dir} pull))
194
+ end
195
+ end
196
+
180
197
  # Commits the podspecs to the source, which should be a git repo.
181
198
  #
182
199
  # @note The pre commit hook of the repo is skipped as the podspecs have
@@ -16,6 +16,7 @@ module Pod
16
16
  [
17
17
  ['--regex', 'Interpret the `QUERY` as a regular expression'],
18
18
  ['--show-all', 'Pick from all versions of the given podspec'],
19
+ ['--version', 'Print a specific version of the given podspec'],
19
20
  ].concat(super)
20
21
  end
21
22
 
@@ -24,6 +25,7 @@ module Pod
24
25
  @show_all = argv.flag?('show-all')
25
26
  @query = argv.shift_argument
26
27
  @query = @query.gsub('.podspec', '') unless @query.nil?
28
+ @version = argv.option('version')
27
29
  super
28
30
  end
29
31
 
@@ -40,7 +42,7 @@ module Pod
40
42
  index = UI.choose_from_array(specs, "Which spec would you like to print [1-#{specs.count}]? ")
41
43
  specs[index]
42
44
  else
43
- get_path_of_spec(query)
45
+ get_path_of_spec(query, @version)
44
46
  end
45
47
 
46
48
  UI.puts File.read(filepath)
@@ -122,7 +122,7 @@ module Pod
122
122
  output_path = podspecs_tmp_dir + File.basename(path)
123
123
  output_path.dirname.mkpath
124
124
  begin
125
- open(path) do |io|
125
+ OpenURI.open_uri(path) do |io|
126
126
  output_path.open('w') { |f| f << io.read }
127
127
  end
128
128
  rescue => e
@@ -16,12 +16,14 @@ module Pod
16
16
  [
17
17
  ['--regex', 'Interpret the `QUERY` as a regular expression'],
18
18
  ['--show-all', 'Print all versions of the given podspec'],
19
+ ['--version', 'Print a specific version of the given podspec'],
19
20
  ].concat(super)
20
21
  end
21
22
 
22
23
  def initialize(argv)
23
24
  @use_regex = argv.flag?('regex')
24
25
  @show_all = argv.flag?('show-all')
26
+ @version = argv.option('version')
25
27
  @query = argv.shift_argument
26
28
  @query = @query.gsub('.podspec', '') unless @query.nil?
27
29
  super
@@ -35,7 +37,7 @@ module Pod
35
37
 
36
38
  def run
37
39
  query = @use_regex ? @query : Regexp.escape(@query)
38
- UI.puts get_path_of_spec(query, @show_all)
40
+ UI.puts get_path_of_spec(query, @show_all || @version)
39
41
  end
40
42
  end
41
43
  end
@@ -33,13 +33,14 @@ module Pod
33
33
  # @param [String] spec
34
34
  # The name of the specification.
35
35
  #
36
- # @param [Bool] show_all
37
- # Whether the paths for all the versions should be returned or
38
- # only the one for the last version.
36
+ # @param [Bool,String] version_filter
37
+ # - If set to false, will return only the spec path for the latest version (the default).
38
+ # - If set to true, will return a list of all paths of all the versions of that spec.
39
+ # - If set to a String, will return only the spec path for the version specified by that string.
39
40
  #
40
41
  # @return [Pathname] the absolute path or paths of the given podspec
41
42
  #
42
- def get_path_of_spec(spec, show_all = false)
43
+ def get_path_of_spec(spec, version_filter = false)
43
44
  sets = config.sources_manager.search_by_name(spec)
44
45
 
45
46
  if sets.count == 1
@@ -51,12 +52,14 @@ module Pod
51
52
  raise Informative, "More than one spec found for '#{spec}':\n#{names}"
52
53
  end
53
54
 
54
- unless show_all
55
+ if version_filter.is_a? String
56
+ all_paths_from_set(set, version_filter).split(/\n/).first
57
+ elsif version_filter == true
58
+ all_paths_from_set(set)
59
+ else
55
60
  best_spec, spec_source = spec_and_source_from_set(set)
56
- return pathname_from_spec(best_spec, spec_source)
61
+ pathname_from_spec(best_spec, spec_source)
57
62
  end
58
-
59
- all_paths_from_set(set)
60
63
  end
61
64
 
62
65
  # @return [Pathname] the absolute path of the given spec and source
@@ -67,7 +70,7 @@ module Pod
67
70
 
68
71
  # @return [String] of spec paths one on each line
69
72
  #
70
- def all_paths_from_set(set)
73
+ def all_paths_from_set(set, specific_version = nil)
71
74
  paths = ''
72
75
 
73
76
  sources = set.sources
@@ -75,12 +78,18 @@ module Pod
75
78
  sources.each do |source|
76
79
  versions = source.versions(set.name)
77
80
 
81
+ if specific_version
82
+ versions = versions.select { |v| v.version == specific_version }
83
+ end
84
+
78
85
  versions.each do |version|
79
86
  spec = source.specification(set.name, version)
80
87
  paths += "#{pathname_from_spec(spec, source)}\n"
81
88
  end
82
89
  end
83
90
 
91
+ raise Informative, "Can't find spec for #{set.name}." if paths.empty?
92
+
84
93
  paths
85
94
  end
86
95