cocoapods 1.10.1 → 1.11.0.rc.1

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 +224 -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 +70 -58
  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 +57 -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 -36
  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 +25 -5
  49. data/lib/cocoapods/version_metadata.rb +1 -1
  50. data/lib/cocoapods/xcode/xcframework.rb +8 -3
  51. metadata +28 -21
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d7d68150bd77329db1e629e610c6a8fa831590339a9502e5bedd4eaeaf1be1f
4
- data.tar.gz: 33a2b4a376e840e9129200ad3d8e2ffc50ff006f53f5963343ec6b75fd0a4baf
3
+ metadata.gz: ecc8327b607b70bebbce4cf7eea523deb7a9fca594c7bf541e7adbfaff3f2c9e
4
+ data.tar.gz: c41f0d93d862c1ba559aebe5f43546a3543c41f3374097dd5e86e2312af37bf6
5
5
  SHA512:
6
- metadata.gz: b501dc64078ee094a69bd497416114c68f226136174eb8c3c18b1e57fdcd37ef7a97c0da2de404f3a4d7433865fb4d952712b717f88d59e3d86ab2a7ce2bed98
7
- data.tar.gz: ffd57b0deec005f87f65856f2eb28902b00dc966336b05d65994e2aa8ede4f02136144aeae82f059d401d2abed5c95f8e836ea46d361aa28f40077b5172d1b48
6
+ metadata.gz: 6484e6130882b45c979a575eb0b92a8fcdaf4846f2dd53fb60b0b19498b4953d7079eb0b57026001a4e540a37e834d98d8a3744c540f7b30d737132f5310b311
7
+ data.tar.gz: 2168a449127973ec7596adacbc7440a23b4c816f9c15f0aa63ad7c582b44be9f217222122b9895bbb17741f4e0f23e2b91ecd12ab3d7b0968c9dcddccbc32eba
data/CHANGELOG.md CHANGED
@@ -4,7 +4,206 @@ 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.10.1 (2021-01-07)
7
+ ## 1.11.0.rc.1 (2021-08-25)
8
+
9
+ ##### Enhancements
10
+
11
+ * None.
12
+
13
+ ##### Bug Fixes
14
+
15
+ * Correctly process multiple `xcframeworks` a pod provides.
16
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
17
+ [#10378](https://github.com/CocoaPods/CocoaPods/issues/10378)
18
+
19
+
20
+ ## 1.11.0.beta.2 (2021-08-11)
21
+
22
+ ##### Enhancements
23
+
24
+ * Integrate ODR categories into projects.
25
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
26
+ [#10855](https://github.com/CocoaPods/CocoaPods/pull/10855)
27
+
28
+ ##### Bug Fixes
29
+
30
+ * Pass correct paths for `select_slice` method.
31
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
32
+ [#10430](https://github.com/CocoaPods/CocoaPods/issues/10430)
33
+
34
+
35
+ ## 1.11.0.beta.1 (2021-08-09)
36
+
37
+ ##### Enhancements
38
+
39
+ * Add support for integrating on demand resources.
40
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
41
+ [JunyiXie](https://github.com/JunyiXie)
42
+ [#9606](https://github.com/CocoaPods/CocoaPods/issues/9606)
43
+ [#10845](https://github.com/CocoaPods/CocoaPods/pull/10845)
44
+
45
+ * Integrate `project_header_files` specified by specs.
46
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
47
+ [#9820](https://github.com/CocoaPods/CocoaPods/issues/9820)
48
+
49
+ * Mark RealityComposer-projects (`.rcproject`) files defined in resources for compilation.
50
+ [Hendrik von Prince](https://github.com/parallaxe)
51
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
52
+ [#10793](https://github.com/CocoaPods/CocoaPods/pull/10793)
53
+
54
+ * Integrate test specs and app specs of pre-built pods.
55
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
56
+ [#10795](https://github.com/CocoaPods/CocoaPods/pull/10795)
57
+
58
+ * Add support for `before_headers` and `after_headers` script phase DSL.
59
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
60
+ [#10770](https://github.com/CocoaPods/CocoaPods/issues/10770)
61
+
62
+ * Fix touch on a missing directory for dSYM copy phase script.
63
+ [alvarollmenezes](https://github.com/alvarollmenezes)
64
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
65
+ [#10488](https://github.com/CocoaPods/CocoaPods/issues/10488)
66
+
67
+ * Check the podfile sources and plugin sources when printing warnings without explicitly using the master source.
68
+ [gonghonglou](https://github.com/gonghonglou)
69
+ [#10764](https://github.com/CocoaPods/CocoaPods/pull/10764)
70
+
71
+ * Use relative paths in copy dsyms script.
72
+ [Mickey Knox](https://github.com/knox)
73
+ [#10583](https://github.com/CocoaPods/CocoaPods/pull/10583)
74
+
75
+ * Use `OpenURI.open_uri` instead.
76
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
77
+ [#10597](https://github.com/CocoaPods/CocoaPods/issues/10597)
78
+
79
+ * Set minimum supported Ruby version to 2.6.
80
+ [Igor Makarov](https://github.com/igor-makarov)
81
+ [#10412](https://github.com/CocoaPods/CocoaPods/pull/10412)
82
+
83
+ * Improve compatibility with ActiveSupport 6
84
+ [Jun Jiang](https://github.com/jasl)
85
+ [#10364](https://github.com/CocoaPods/CocoaPods/pull/10364)
86
+
87
+ * Add a `pre_integrate_hook` API
88
+ [dcvz](https://github.com/dcvz)
89
+ [#9935](https://github.com/CocoaPods/CocoaPods/pull/9935)
90
+
91
+ * Rewrite the only place dependent on `typhoeus`.
92
+ [Jun Jiang](https://github.com/jasl), [Igor Makarov](https://github.com/igor-makarov)
93
+ [#10346](https://github.com/CocoaPods/CocoaPods/pull/10346)
94
+
95
+ * Add a `--update-sources` option to `pod repo push` so one can ensure sources are up-to-date.
96
+ [Elton Gao](https://github.com/gyfelton)
97
+ [Justin Martin](https://github.com/justinseanmartin)
98
+
99
+ * Installing a local (`:path`) pod that defines script phases will no longer
100
+ produce warnings.
101
+ [Samuel Giddins](https://github.com/segiddins)
102
+
103
+ * Allow building app & test spec targets that depend on a library that uses
104
+ Swift without requiring an empty Swift file be present.
105
+ [Samuel Giddins](https://github.com/segiddins)
106
+
107
+ * Add flag to ignore prerelease versions when reporting latest version for outdated pods.
108
+ [cltnschlosser](https://github.com/cltnschlosser)
109
+ [#9916](https://github.com/CocoaPods/CocoaPods/pull/9916)
110
+
111
+ * Add possibility to skip modulemap generation
112
+ [till0xff](https://github.com/till0xff)
113
+ [#10235](https://github.com/CocoaPods/CocoaPods/issues/10235)
114
+
115
+ * Add a `--version` option to `pod spec cat` and `pod spec which` for listing the podspec of a specific version
116
+ [pietbrauer](https://github.com/pietbrauer)
117
+ [#10609](https://github.com/CocoaPods/CocoaPods/pull/10609)
118
+
119
+ ##### Bug Fixes
120
+
121
+ * Fix resource variant groups in static frameworks
122
+ [Igor Makarov](https://github.com/igor-makarov)
123
+ [#10834](https://github.com/CocoaPods/CocoaPods/pull/10834)
124
+ [#10605](https://github.com/CocoaPods/CocoaPods/issues/10605)
125
+
126
+ * Fix adding embed frameworks script phase to unit test targets if xcframeworks are present.
127
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
128
+ [#10652](https://github.com/CocoaPods/CocoaPods/issues/10652)
129
+
130
+ * Remove unused `install_xcframework_library` code.
131
+ [Gio Lodi](https://github.com/mokagio)
132
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
133
+ [#10831](https://github.com/CocoaPods/CocoaPods/pull/10831)
134
+
135
+ * Validate vendored library names after they have been expanded.
136
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
137
+ [#10832](https://github.com/CocoaPods/CocoaPods/pull/10832)
138
+
139
+ * Place frameworks from xcframeworks into a unique folder name to avoid duplicate outputs.
140
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
141
+ [#10106](https://github.com/CocoaPods/CocoaPods/issues/10106)
142
+
143
+ * Update pod in Pods folder when changing the pod from branch to version in Podfie.
144
+ [gonghonglou](https://github.com/gonghonglou)
145
+ [#10825](https://github.com/CocoaPods/CocoaPods/pull/10825)
146
+
147
+ * Bump addressable dependency to 2.8.
148
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
149
+ [#10802](https://github.com/CocoaPods/CocoaPods/issues/10802)
150
+
151
+ * Dedup bcsymbolmap paths found from multiple vendored frameworks.
152
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
153
+ [#10373](https://github.com/CocoaPods/CocoaPods/issues/10373)
154
+
155
+ * Correctly filter dependencies for pod variants across different platforms.
156
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
157
+ [#10777](https://github.com/CocoaPods/CocoaPods/issues/10777)
158
+
159
+ * Generate default `Info.plist` for consumer app during validation.
160
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
161
+ [#8570](https://github.com/CocoaPods/CocoaPods/issues/8570)
162
+
163
+ * Fix lint subspec error when the name of subspec start with the pod name.
164
+ [XianpuMeng](https://github.com/XianpuMeng)
165
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
166
+ [#9906](https://github.com/CocoaPods/CocoaPods/issues/9906)
167
+
168
+ * Update `ruby-macho` gem version to support 1.x and 2.x.
169
+ [Eric Chamberlain](https://github.com/PeqNP)
170
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
171
+ [#10390](https://github.com/CocoaPods/CocoaPods/issues/10390)
172
+
173
+ * Respect `--configuration` option when analyzing via `pod lib lint --analyze`.
174
+ [Jenn Magder](https://github.com/jmagman)
175
+ [#10476](https://github.com/CocoaPods/CocoaPods/issues/10476)
176
+
177
+ * Do not add dependencies to 'Link Binary With Libraries' phase.
178
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
179
+ [#10133](https://github.com/CocoaPods/CocoaPods/pull/10133)
180
+
181
+ * Ensure cache integrity on concurrent installations.
182
+ [Erik Blomqvist](https://github.com/codiophile)
183
+ [#10013](https://github.com/CocoaPods/CocoaPods/issues/10013)
184
+
185
+ * Force a clean install if installation options change.
186
+ [Sebastian Shanus](https://github.com/sebastianv1)
187
+ [#10016](https://github.com/CocoaPods/CocoaPods/pull/10016)
188
+
189
+ * Correctly detect that a prebuilt pod uses Swift.
190
+ [Elton Gao](https://github.com/gyfelton)
191
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
192
+ [#8649](https://github.com/CocoaPods/CocoaPods/issues/8649)
193
+
194
+ * fix: ensure cached spec path uniq
195
+ [SolaWing](https://github.com/SolaWing)
196
+ [#10231](https://github.com/CocoaPods/CocoaPods/issues/10231)
197
+
198
+ * Set `knownRegions` on generated projects with localized resources to prevent Xcode from re-saving projects to disk.
199
+ [Eric Amorde](https://github.com/amorde)
200
+ [#10290](https://github.com/CocoaPods/CocoaPods/pull/10290)
201
+
202
+ * Serialize schemes that do not need to be rewritten by Xcode.
203
+ [Samuel Giddins](https://github.com/segiddins)
204
+
205
+
206
+ ## 1.10.2 (2021-07-28)
8
207
 
9
208
  ##### Enhancements
10
209
 
@@ -12,6 +211,27 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
12
211
 
13
212
  ##### Bug Fixes
14
213
 
214
+ * Fix errors when archiving a Catalyst app which depends on a pod which uses `header_mappings_dir`.
215
+ [Thomas Goyne](https://github.com/tgoyne)
216
+ [#10224](https://github.com/CocoaPods/CocoaPods/pull/10224)
217
+
218
+ * Fix missing `-ObjC` for static XCFrameworks - take 2
219
+ [Paul Beusterien](https://github.com/paulb777)
220
+ [#10459](https://github.com/CocoaPods/CocoaPods/issuess/10459)
221
+
222
+ * Change URL validation failure to a note
223
+ [Paul Beusterien](https://github.com/paulb777)
224
+ [#10291](https://github.com/CocoaPods/CocoaPods/issues/10291)
225
+
226
+
227
+ ## 1.10.1 (2021-01-07)
228
+
229
+ ##### Enhancements
230
+
231
+ * None.
232
+
233
+ ##### Bug Fixes
234
+
15
235
  * Fix library name in LD `-l` flags for XCFrameworks containing libraries
16
236
  [Wes Campaigne](https://github.com/Westacular)
17
237
  [#10165](https://github.com/CocoaPods/CocoaPods/issues/10165)
@@ -117,12 +337,11 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
117
337
  [Gereon Steffens](https://github.com/gereons)
118
338
  [#9686](https://github.com/CocoaPods/CocoaPods/issues/9686)
119
339
 
120
- * Add a post_integrate_hook API
340
+ * Add a `post_integrate_hook` API
121
341
  [lucasmpaim](https://github.com/lucasmpaim)
122
342
  [#7432](https://github.com/CocoaPods/CocoaPods/issues/7432)
123
343
 
124
- * Set the `BUILD_LIBRARY_FOR_DISTRIBUTION` build setting if integrating with
125
- a target that has the setting set to `YES` (directly or in an .xcconfig).
344
+ * Set the `BUILD_LIBRARY_FOR_DISTRIBUTION` build setting if integrating with a target that has the setting set to `YES`.
126
345
  [Juanjo López](https://github.com/juanjonol)
127
346
  [#9232](https://github.com/CocoaPods/CocoaPods/issues/9232)
128
347
 
@@ -130,7 +349,7 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
130
349
  [Paul Beusterien](https://github.com/paulb777)
131
350
  [#9392](https://github.com/CocoaPods/CocoaPods/pull/9392)
132
351
 
133
- * Add --use-static-frameworks lint option
352
+ * Add `--use-static-frameworks` lint option
134
353
  [Paul Beusterien](https://github.com/paulb777)
135
354
  [#9632](https://github.com/CocoaPods/CocoaPods/pull/9632)
136
355
 
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