cocoapods 0.34.0.rc2 → 0.34.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: 114f09917e2a16defbb7b61d654759d6815ca920
4
- data.tar.gz: 87793bf336aabe63903e45d1ecb2e3fc680ce68d
3
+ metadata.gz: 1e3f9247d1861693b949301b9ce508e9fd7ccd0a
4
+ data.tar.gz: 552a01f721ebbb407d651c3081132be962453ea5
5
5
  SHA512:
6
- metadata.gz: 7ea6d616848f34f4c377fa69c71c16c0e3bf241ba82e3e044f5342c14bf891af6b3e80624a6d6e6b10af6ef80b6ef7400d25552b5c8412ba46bf9e59de94af64
7
- data.tar.gz: f2239e5f72d377dccb46de1a17c35100128f6556290d33fdd19b29558d5caad74582e973a69afeca3781ab12f4436a00581cbb08e6009f743c5fde89672be1be
6
+ metadata.gz: 23e31603631c405854d4a4f5f9d14c5c391126200950c630ee3d5608e2ff61023f8f4f4710812e184f38a4111d603e2ae7951932057018aafbb1b9a33f8e5932
7
+ data.tar.gz: 62a7fe7c9e7b10eb9b39deac6b2d8a82daefcdf0cf83ab37260d350843f4837db254e1804bd4059f85b07cabb1ef6599b21e7187f6ae05ec1792589d1ccbdccb
@@ -2,6 +2,61 @@
2
2
 
3
3
  To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides/installing_cocoapods.html).
4
4
 
5
+ ## 0.34.0
6
+
7
+ ##### Breaking
8
+
9
+ * Add support for loading podspecs from *only* specific spec-repos via
10
+ `sources`. By default, when there are no sources specified in a Podfile all
11
+ source repos will be used. This has always been the case. However, this
12
+ implicit use of sources is now deprecated. Once you specify specific sources,
13
+ **no** repos wil be included by default. For example:
14
+
15
+ source 'https://github.com/artsy/Specs.git'
16
+ source 'https://github.com/CocoaPods/Specs.git'
17
+
18
+ Any source URLs specified that have not yet been added will be cloned before
19
+ resolution begins.
20
+ [François Benaiteau](https://github.com/netbe)
21
+ [Fabio Pelosin](https://github.com/fabiopelosin)
22
+ [Samuel Giddins](https://github.com/segiddins)
23
+ [#1143](https://github.com/CocoaPods/CocoaPods/pull/1143)
24
+ [Core#19](https://github.com/CocoaPods/Core/pull/19)
25
+ [Core#170](https://github.com/CocoaPods/Core/issues/170)
26
+ [#2515](https://github.com/CocoaPods/CocoaPods/issues/2515)
27
+
28
+ ##### Enhancements
29
+
30
+ * Added the `pod repo list` command which lists all the repositories.
31
+ [Luis Ascorbe](https://github.com/lascorbe)
32
+ [#1455](https://github.com/CocoaPods/CocoaPods/issues/1455)
33
+
34
+ ##### Bug Fixes
35
+
36
+ * Works around an Xcode issue where linting would fail even though `xcodebuild`
37
+ actually succeeds. Xcode.app also doesn't fail when this issue occurs, so it's
38
+ safe for us to do the same.
39
+ [Kra Larivain](https://github.com/olarivain)
40
+ [Boris Bügling](https://github.com/neonichu)
41
+ [Eloy Durán](https://github.com/alloy)
42
+ [Samuel E. Giddins](https://github.com/segiddins)
43
+ [#2394](https://github.com/CocoaPods/CocoaPods/issues/2394)
44
+ [#2395](https://github.com/CocoaPods/CocoaPods/pull/2395)
45
+
46
+ * Fixes the detection of JSON podspecs included via `:path`.
47
+ [laiso](https://github.com/laiso)
48
+ [#2489](https://github.com/CocoaPods/CocoaPods/pull/2489)
49
+
50
+ * Fixes an issue where `pod install` would crash during Plist building if any
51
+ pod has invalid UTF-8 characters in their title or description.
52
+ [Ladislav Martincik](https://github.com/martincik)
53
+ [#2482](https://github.com/CocoaPods/CocoaPods/issues/2482)
54
+
55
+ * Fix crash when the URL of a private GitHub repo is passed to `pod spec
56
+ create` as an argument.
57
+ [Fabio Pelosin](https://github.com/fabiopelosin)
58
+ [#1543](https://github.com/CocoaPods/CocoaPods/issues/1543)
59
+
5
60
 
6
61
  ## 0.34.0.rc2
7
62
 
@@ -12,7 +67,7 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
12
67
  [Kyle Fuller](https://github.com/kylef)
13
68
  [#2147](https://github.com/CocoaPods/CocoaPods/issues/2147)
14
69
 
15
- * Fixes an issue where `pod init` would not add `source 'master'` to newly
70
+ * Fixes an issue where `pod init` would not add `source 'master'` to newly
16
71
  created Podfiles.
17
72
  [Ash Furrow](https://github.com/AshFurrow)
18
73
  [#2473](https://github.com/CocoaPods/CocoaPods/issues/2473)
@@ -35,9 +90,10 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
35
90
  source 'master'
36
91
 
37
92
  [François Benaiteau](https://github.com/netbe)
93
+ [Fabio Pelosin](https://github.com/fabiopelosin)
38
94
  [#1143](https://github.com/CocoaPods/CocoaPods/pull/1143)
39
95
  [Core#19](https://github.com/CocoaPods/Core/pull/19)
40
-
96
+
41
97
  * The `Pods` directory has been reorganized. This might require manual
42
98
  intervention in projects where files generated by CocoaPods have manually been
43
99
  imported into the user's project (common with the acknowledgements files).
@@ -45,6 +101,14 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
45
101
  [Fabio Pelosin](https://github.com/fabiopelosin)
46
102
  [Michele Titolo](https://github.com/mtitolo)
47
103
 
104
+ * Plugins are now expected to include the `cocoapods-plugin.rb` file in
105
+ `./lib`.
106
+ [Fabio Pelosin](https://github.com/fabiopelosin)
107
+ [CLAide#28](https://github.com/CocoaPods/CLAide/pull/28)
108
+
109
+ * The specification `requires_arc` attribute now defaults to true.
110
+ [Fabio Pelosin](https://github.com/fabiopelosin)
111
+ [CocoaPods#267](https://github.com/CocoaPods/CocoaPods/issues/267)
48
112
 
49
113
  ##### Enhancements
50
114
 
@@ -60,6 +124,17 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
60
124
  [#1668](https://github.com/CocoaPods/CocoaPods/pull/1668)
61
125
  [#731](https://github.com/CocoaPods/CocoaPods/pull/731)
62
126
 
127
+ * Improved performance of git downloads using shallow clone.
128
+ [Marin Usalj](https://github.com/supermarin)
129
+ [Fabio Pelosin](https://github.com/fabiopelosin)
130
+ [cocoapods-downloader#29](https://github.com/CocoaPods/cocoapods-downloader/pull/29)
131
+
132
+ * Simplify installation: CocoaPods no longer requires the
133
+ compilation of the troublesome native extensions.
134
+ [Fabio Pelosin](https://github.com/fabiopelosin)
135
+ [Xcodeproj#168](https://github.com/CocoaPods/Xcodeproj/pull/168)
136
+ [Xcodeproj#167](https://github.com/CocoaPods/Xcodeproj/issues/167)
137
+
63
138
  * Add hooks for plugins. Currently only the installer hook is supported.
64
139
  A plugin can register itself to be activated after the installation with the
65
140
  following syntax:
@@ -73,12 +148,15 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
73
148
  [Fabio Pelosin](https://github.com/fabiopelosin)
74
149
  [Core#132](https://github.com/CocoaPods/Core/pull/1755)
75
150
 
76
- * Display indication for deprecated pods when searching for Pods.
77
- [Hugo Tunius][k0nserv]
151
+ * Add a support for migrating the sandbox to new versions of CocoaPods.
152
+ [Fabio Pelosin](https://github.com/fabiopelosin)
153
+
154
+ * Display an indication for deprecated Pods in the command line search.
155
+ [Hugo Tunius](https://github.com/k0nserv)
78
156
  [#2180](https://github.com/CocoaPods/CocoaPods/issues/2180)
79
157
 
80
158
  * Use the CLIntegracon gem for the integration tests.
81
- [Marius Rackwitz][mrackwitz]
159
+ [Marius Rackwitz](https://github.com/mrackwitz)
82
160
  [#2371](https://github.com/CocoaPods/CocoaPods/issues/2371)
83
161
 
84
162
  * Include configurations that a user explicitly specifies, in their Podfile,
@@ -88,24 +166,41 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
88
166
  * Properly quote the `-isystem` values in the xcconfig files.
89
167
  [Eloy Durán](https://github.com/alloy)
90
168
 
91
- * The post install message with the CHANGELOG has been removed from the
92
- gemspec.
169
+ * Remove the installation post install message which presents the CHANGELOG.
93
170
  [Fabio Pelosin](https://github.com/fabiopelosin)
94
171
  [Eloy Durán](https://github.com/alloy)
95
172
 
96
173
  * Add support for user-specified project directories with the
97
174
  `--project-directory` option.
98
- [Samuel Giddins](segiddins)
175
+ [Samuel E. Giddins](https://github.com/segiddins)
99
176
  [#2183](https://github.com/CocoaPods/CocoaPods/issues/2183)
100
177
 
178
+ * Now the `plutil` tool is used when available to produce
179
+ output consistent with Xcode.
180
+ [Fabio Pelosin](https://github.com/fabiopelosin)
181
+
182
+ * Indicate the name of the pod whose requirements cannot be satisfied.
183
+ [Seivan Heidari](https://github.com/seivan)
184
+ [Fabio Pelosin](https://github.com/fabiopelosin)
185
+ [#1938](https://github.com/CocoaPods/CocoaPods/issues/1938)
186
+
187
+ * Add support for JSON specs to external sources (`:path`, `:git`, etc)
188
+ options.
189
+ [Kyle Fuller](https://github.com/kylef)
190
+ [#2320](https://github.com/CocoaPods/CocoaPods/issues/2320)
191
+
192
+ * Generate the workspaces using the same output of Xcode.
193
+ [Fabio Pelosin](https://github.com/fabiopelosin)
194
+
195
+
101
196
  ##### Bug Fixes
102
197
 
103
- * Fixes `pod repo push` to first check if a Specs directory exists and if so
198
+ * Fix `pod repo push` to first check if a Specs directory exists and if so
104
199
  push there.
105
200
  [Edward Valentini](edwardvalentini)
106
201
  [#2060](https://github.com/CocoaPods/CocoaPods/issues/2060)
107
202
 
108
- * Fixes `pod outdated` to not include subspecs.
203
+ * Fix `pod outdated` to not include subspecs.
109
204
  [Ash Furrow](ashfurrow)
110
205
  [#2136](https://github.com/CocoaPods/CocoaPods/issues/2136)
111
206
 
@@ -115,37 +210,41 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
115
210
  [Kyle Fuller](kylef)
116
211
  [pod-template#50](https://github.com/CocoaPods/pod-template/issues/50)
117
212
 
118
- * Fixes spec linting to not warn for missing license file in subspecs.
213
+ * Fix spec linting to not warn for missing license file in subspecs.
119
214
  [Fabio Pelosin](https://github.com/fabiopelosin)
120
215
  [Core#132](https://github.com/CocoaPods/Core/issues/132)
121
216
 
122
- * Fixes `pod init` so that it doesn't recurse when checking for Podfiles.
217
+ * Fix `pod init` so that it doesn't recurse when checking for Podfiles.
123
218
  [Paddy O'Brien](https://github.com/tapi)
124
219
  [#2181](https://github.com/CocoaPods/CocoaPods/issues/2181)
125
220
 
126
- * Fixes missing XCTest framework in Xcode 6.
221
+ * Fix missing XCTest framework in Xcode 6.
127
222
  [Paul Williamson](squarefrog)
128
223
  [#2296](https://github.com/CocoaPods/CocoaPods/issues/2296)
129
224
 
130
- * Support multiple values in ARCHS.
225
+ * Support multiple values in `ARCHS`.
131
226
  [Robert Zuber](https://github.com/z00b)
132
227
  [#1904](https://github.com/CocoaPods/CocoaPods/issues/1904)
133
228
 
134
- * Fixes static analysis in Xcode 6.
135
- [Samuel Giddins](segiddins)
229
+ * Fix static analysis in Xcode 6.
230
+ [Samuel E. Giddins](https://github.com/segiddins)
136
231
  [#2402](https://github.com/CocoaPods/CocoaPods/issues/2402)
137
232
 
138
- * Fixes an issue where a version of a spec will not be locked when using
233
+ * Fix an issue where a version of a spec will not be locked when using
139
234
  multiple subspecs of a podspec.
140
235
  [Kyle Fuller](https://github.com/kylef)
141
236
  [Fabio Pelosin](https://github.com/fabiopelosin)
142
237
  [#2135](https://github.com/CocoaPods/CocoaPods/issues/2135)
143
238
 
144
- * Fixes an issue using JSON podspecs installed directly from a lib's
239
+ * Fix an issue using JSON podspecs installed directly from a lib's
145
240
  repository.
146
241
  [Kyle Fuller](https://github.com/kylef)
147
242
  [#2320](https://github.com/CocoaPods/CocoaPods/issues/2320)
148
243
 
244
+ * Support and use quotes in the `OTHER_LDFLAGS` of xcconfigs to avoid
245
+ issues with targets containing a space character in their name.
246
+ [Fabio Pelosin](https://github.com/fabiopelosin)
247
+
149
248
 
150
249
  ## 0.33.1
151
250
 
@@ -234,17 +333,17 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
234
333
  ##### Bug Fixes
235
334
 
236
335
  * Show the actual executable when external commands fail.
237
- [Boris Bügling][neonichu]
336
+ [Boris Bügling](https://github.com/neonichu)
238
337
  [#2102](https://github.com/CocoaPods/CocoaPods/issues/2102)
239
338
 
240
339
  * Fixed support for file references in the workspace generated by CocoaPods.
241
- [Kyle Fuller][kylef]
340
+ [Kyle Fuller](https://github.com/kylef)
242
341
  [Fabio Pelosin](https://github.com/fabiopelosin)
243
342
  [Xcodeproj#105](https://github.com/CocoaPods/Xcodeproj/pull/150)
244
343
 
245
344
  * Show a helpful error message when reading version information with merge
246
345
  conflict.
247
- [Samuel E. Giddins][segiddins]
346
+ [Samuel E. Giddins](https://github.com/segiddins)
248
347
  [#1853](https://github.com/CocoaPods/CocoaPods/issues/1853)
249
348
 
250
349
  * Show deprecated specs when invoking `pod outdated`.
@@ -252,7 +351,7 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
252
351
  [#2003](https://github.com/CocoaPods/CocoaPods/issues/2003)
253
352
 
254
353
  * Fixes an issue where `pod repo update` may start an un-committed merge.
255
- [Kyle Fuller][kylef]
354
+ [Kyle Fuller](https://github.com/kylef)
256
355
  [#2024](https://github.com/CocoaPods/CocoaPods/issues/2024)
257
356
 
258
357
  ## 0.32.1
@@ -318,7 +417,7 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
318
417
  [CocoaPods#2005](https://github.com/CocoaPods/CocoaPods/issues/2005)
319
418
  * The linter no longer considers empty a Specification if it only specifies the
320
419
  `resource_bundle` attribute.
321
- [Joshua Kalpin][Kapin]
420
+ [Joshua Kalpin](https://github.com/Kapin)
322
421
  [#63](https://github.com/CocoaPods/Core/issues/63)
323
422
  [#95](https://github.com/CocoaPods/Core/pull/95)
324
423
 
@@ -2567,8 +2666,3 @@ allowing you to automate Xcode related tasks.
2567
2666
  [5]: https://github.com/tomaz/appledoc
2568
2667
  [6]: https://github.com/CocoaPods/CocoaPods/compare/0.5.1...0.6.0
2569
2668
  [7]: https://github.com/CocoaPods/CocoaPods/compare/0.3.10...0.5.0
2570
-
2571
- [kylef]: (https://github.com/kylef)
2572
- [neonichu]: (https://github.com/neonichu)
2573
- [mrackwitz]: https://github.com/mrackwitz
2574
- [k0nserv]: https://github.com/k0nserv
@@ -59,7 +59,7 @@ module Pod
59
59
  # Uncomment this line to define a global platform for your project
60
60
  # platform :ios, "6.0"
61
61
 
62
- source 'master'
62
+ source '#{Command::Setup.read_only_url}'
63
63
  PLATFORM
64
64
 
65
65
  project.targets.each do |target|
@@ -9,6 +9,7 @@ module Pod
9
9
  # @todo should not show a usage banner!
10
10
  #
11
11
  self.summary = 'Manage spec-repositories'
12
+ self.default_subcommand = 'list'
12
13
 
13
14
  class Add < Repo
14
15
  self.summary = 'Add a spec repo.'
@@ -185,12 +186,137 @@ module Pod
185
186
  end
186
187
  end
187
188
 
189
+ #-----------------------------------------------------------------------#
190
+
191
+ class List < Repo
192
+ self.summary = 'List repos'
193
+
194
+ self.description = <<-DESC
195
+ List the repos from the local spec-repos directory at `~/.cocoapods/repos/.`
196
+ DESC
197
+
198
+ def self.options
199
+ [["--count-only", "Show the total number of repos"]].concat(super)
200
+ end
201
+
202
+ def initialize(argv)
203
+ @count_only = argv.flag?('count-only')
204
+ super
205
+ end
206
+
207
+ # @output Examples:
208
+ #
209
+ # master
210
+ # - type: git (origin)
211
+ # - URL: https://github.com/CocoaPods/Specs.git
212
+ # - path: /Users/lascorbe/.cocoapods/repos/master
213
+ #
214
+ # test
215
+ # - type: local copy
216
+ # - path: /Users/lascorbe/.cocoapods/repos/test
217
+ #
218
+ def run
219
+ sources = SourcesManager.all
220
+ print_sources(sources) unless @count_only
221
+ print_count_of_sources(sources)
222
+ end
223
+
224
+ private
225
+
226
+ # Pretty-prints the source at the given path.
227
+ #
228
+ # @param [String,Pathname] path
229
+ # The path of the source to be printed.
230
+ #
231
+ # @return [void]
232
+ #
233
+ def print_source_at_path(path)
234
+ Dir.chdir(path) do
235
+ if SourcesManager.git_repo?(path)
236
+ remote_name = branch_remote_name(branch_name)
237
+ if remote_name
238
+ UI.puts "- Type: git (#{remote_name})"
239
+ url = url_of_git_repo(remote_name)
240
+ UI.puts "- URL: #{url}"
241
+ else
242
+ UI.puts "- Type: git (no remote information available)"
243
+ end
244
+ else
245
+ UI.puts "- Type: local copy"
246
+ end
247
+ UI.puts "- Path: #{path}"
248
+ end
249
+ end
250
+
251
+ # Pretty-prints the given sources.
252
+ #
253
+ # @param [Array<Source>] sources
254
+ # The sources that should be printed.
255
+ #
256
+ # @return [void]
257
+ #
258
+ def print_sources(sources)
259
+ sources.each do |source|
260
+ UI.title source.name do
261
+ print_source_at_path source.data_provider.repo
262
+ end
263
+ end
264
+ UI.puts "\n"
265
+ end
266
+
267
+ # Pretty-prints the number of sources.
268
+ #
269
+ # @param [Array<Source>] sources
270
+ # The sources whose count should be printed.
271
+ #
272
+ # @return [void]
273
+ #
274
+ def print_count_of_sources(sources)
275
+ number_of_repos = sources.length
276
+ repo_string = number_of_repos != 1 ? 'repos' : 'repo'
277
+ UI.puts "#{number_of_repos} #{repo_string}".green
278
+ end
279
+ end
280
+
281
+ #-----------------------------------------------------------------------#
282
+
188
283
  extend Executable
189
284
  executable :git
190
285
 
191
286
  def dir
192
287
  config.repos_dir + @name
193
288
  end
289
+
290
+ # Returns the branch name (i.e. master).
291
+ #
292
+ # @return [String] The name of the current branch.
293
+ #
294
+ def branch_name
295
+ `git name-rev --name-only HEAD`.strip
296
+ end
297
+
298
+ # Returns the branch remote name (i.e. origin).
299
+ #
300
+ # @param [#to_s] branch_name
301
+ # The branch name to look for the remote name.
302
+ #
303
+ # @return [String] The given branch's remote name.
304
+ #
305
+ def branch_remote_name(branch_name)
306
+ `git config branch.#{branch_name}.remote`.strip
307
+ end
308
+
309
+ # Returns the url of the given remote name
310
+ # (i.e. git@github.com:CocoaPods/Specs.git).
311
+ #
312
+ # @param [#to_s] remote_name
313
+ # The branch remote name to look for the url.
314
+ #
315
+ # @return [String] The URL of the given remote.
316
+ #
317
+ def url_of_git_repo(remote_name)
318
+ `git config remote.#{remote_name}.url`.strip
319
+ end
194
320
  end
195
321
  end
196
322
  end
@@ -116,18 +116,18 @@ module Pod
116
116
  # be enabled.
117
117
  #
118
118
  def url
119
- push? ? read_write_url : read_only_url
119
+ push? ? self.class.read_write_url : self.class.read_only_url
120
120
  end
121
121
 
122
122
  # @return [String] the read only url of the master repo.
123
123
  #
124
- def read_only_url
124
+ def self.read_only_url
125
125
  'https://github.com/CocoaPods/Specs.git'
126
126
  end
127
127
 
128
128
  # @return [String] the read-write url of the master repo.
129
129
  #
130
- def read_write_url
130
+ def self.read_write_url
131
131
  'git@github.com:CocoaPods/Specs.git'
132
132
  end
133
133
 
@@ -146,7 +146,7 @@ module Pod
146
146
  return false unless master_repo_dir.exist?
147
147
  Dir.chdir(master_repo_dir) do
148
148
  url = git('config --get remote.origin.url')
149
- url.chomp == read_write_url
149
+ url.chomp == self.class.read_write_url
150
150
  end
151
151
  end
152
152
 
@@ -426,7 +426,9 @@ module Pod
426
426
 
427
427
  def github_data_for_template(repo_id)
428
428
  repo = GitHub.repo(repo_id)
429
+ raise Informative, "Unable to fetch data for `#{repo_id}`" unless repo
429
430
  user = GitHub.user(repo['owner']['login'])
431
+ raise Informative, "Unable to fetch data for `#{repo['owner']['login']}`" unless user
430
432
  data = {}
431
433
 
432
434
  data[:name] = repo['name']
@@ -16,7 +16,7 @@ module Pod
16
16
  raise Informative, "No podspec found for `#{name}` in " \
17
17
  "`#{declared_path}`"
18
18
  end
19
- store_podspec(sandbox, podspec)
19
+ store_podspec(sandbox, podspec, podspec.extname == '.json')
20
20
  is_absolute = absolute?(declared_path)
21
21
  sandbox.store_local_path(name, podspec.dirname, is_absolute)
22
22
  end
@@ -42,7 +42,8 @@ module Pod
42
42
  # @return [Pathname] The absolute path of the podspec.
43
43
  #
44
44
  def podspec_path
45
- Pathname(normalized_podspec_path(declared_path))
45
+ path = Pathname(normalized_podspec_path(declared_path))
46
+ path.exist? ? path : Pathname("#{path}.json")
46
47
  end
47
48
 
48
49
  # @return [Bool]
@@ -1,5 +1,5 @@
1
1
  module Pod
2
2
  # The version of the cocoapods command line tool.
3
3
  #
4
- VERSION = '0.34.0.rc2' unless defined? Pod::VERSION
4
+ VERSION = '0.34.0' unless defined? Pod::VERSION
5
5
  end
@@ -36,8 +36,8 @@ module Pod
36
36
  if (license = license_text(spec))
37
37
  {
38
38
  :Type => 'PSGroupSpecifier',
39
- :Title => spec.name,
40
- :FooterText => license,
39
+ :Title => sanitize_encoding(spec.name),
40
+ :FooterText => sanitize_encoding(license),
41
41
  }
42
42
  end
43
43
  end
@@ -45,18 +45,42 @@ module Pod
45
45
  def header_hash
46
46
  {
47
47
  :Type => 'PSGroupSpecifier',
48
- :Title => header_title,
49
- :FooterText => header_text,
48
+ :Title => sanitize_encoding(header_title),
49
+ :FooterText => sanitize_encoding(header_text),
50
50
  }
51
51
  end
52
52
 
53
53
  def footnote_hash
54
54
  {
55
55
  :Type => 'PSGroupSpecifier',
56
- :Title => footnote_title,
57
- :FooterText => footnote_text,
56
+ :Title => sanitize_encoding(footnote_title),
57
+ :FooterText => sanitize_encoding(footnote_text),
58
58
  }
59
59
  end
60
+
61
+ #-----------------------------------------------------------------------#
62
+
63
+ private
64
+
65
+ # !@group Private methods
66
+
67
+ # Returns the sanitized text with UTF-8 eliminating invalid characters if
68
+ # Ruby version >=1.9 else will return the text.
69
+ #
70
+ # @param [String] text
71
+ # the text we want to sanitize.
72
+ #
73
+ # @return [String] The sanitized text if Ruby >=1.9 else text.
74
+ #
75
+ def sanitize_encoding(text)
76
+ if RUBY_VERSION >= '1.9'
77
+ text.encode('UTF-8', :invalid => :replace, :undef => :replace, :replace => '')
78
+ else
79
+ text
80
+ end
81
+ end
82
+
83
+ #-----------------------------------------------------------------------#
60
84
  end
61
85
  end
62
86
  end
@@ -95,7 +95,7 @@ module Pod
95
95
  end
96
96
 
97
97
  def prepare
98
- UI.section 'Preparing' do
98
+ UI.message 'Preparing' do
99
99
  sandbox.prepare
100
100
  Migrator.migrate(sandbox)
101
101
  end
@@ -94,7 +94,7 @@ module Pod
94
94
  #
95
95
  attr_accessor :update
96
96
 
97
- # @return [Bool] Whether the version of the dependencies which did non
97
+ # @return [Bool] Whether the version of the dependencies which did not
98
98
  # change in the Podfile should be locked.
99
99
  #
100
100
  def update_mode?
@@ -169,7 +169,7 @@ module Pod
169
169
  def update_repositories_if_needed
170
170
  unless config.skip_repo_update?
171
171
  UI.section 'Updating spec repositories' do
172
- SourcesManager.update
172
+ sources.each { |source| SourcesManager.update(source.name) }
173
173
  end
174
174
  end
175
175
  end
@@ -318,12 +318,6 @@ module Pod
318
318
  def resolve_dependencies
319
319
  specs_by_target = nil
320
320
  UI.section "Resolving dependencies of #{UI.path podfile.defined_in_file}" do
321
- if podfile.sources.empty?
322
- sources = SourcesManager.master
323
- else
324
- sources = SourcesManager.sources(podfile.sources)
325
- end
326
-
327
321
  resolver = Resolver.new(sandbox, podfile, locked_dependencies, sources)
328
322
  specs_by_target = resolver.resolve
329
323
  end
@@ -367,6 +361,33 @@ module Pod
367
361
 
368
362
  private
369
363
 
364
+ # Returns the sources used to query for specifications
365
+ #
366
+ # @note Currently, this defaults to {SourcesManager.all} when no
367
+ # Podfile sources are defined, but this implicit declaration of
368
+ # sources is deprecated.
369
+ #
370
+ # @return [Array<Source>] the sources to be used in finding
371
+ # specifications, as specified by the {#podfile}.
372
+ #
373
+ def sources
374
+ @sources ||= begin
375
+ sources = podfile.sources
376
+ if sources.empty?
377
+ SourcesManager.all.tap do |all|
378
+ UI.warn all.reduce("The use of implicit sources has been " \
379
+ "deprecated. To continue using all of the sources currently " \
380
+ "on your machine, add the following to the top of your " \
381
+ "Podfile:\n") { |w, s| w << "\n source '#{s.url}'" } + "\n"
382
+ end
383
+ else
384
+ sources.map do |url|
385
+ SourcesManager.find_or_create_source_with_url(url)
386
+ end
387
+ end
388
+ end
389
+ end
390
+
370
391
  # @!group Analysis sub-steps
371
392
 
372
393
  # Returns the path of the user project that the {TargetDefinition}
@@ -74,7 +74,6 @@ module Pod
74
74
  end
75
75
  end
76
76
 
77
- cached_specs.values.sort_by(&:name)
78
77
  specs_by_target
79
78
  end
80
79
 
@@ -23,6 +23,37 @@ module Pod
23
23
  dirs.map { |repo| Source.new(repo) }
24
24
  end
25
25
 
26
+ # Returns the source whose {Source#url} is equal to `url`, adding the repo
27
+ # in a manner similarly to `pod repo add` if it is not found.
28
+ #
29
+ # @raise If no source with the given `url` could be created,
30
+ #
31
+ # @return [Source] The source whose {Source#url} is equal to `url`,
32
+ #
33
+ # @param [String] url
34
+ # The URL of the source.
35
+ #
36
+ def find_or_create_source_with_url(url)
37
+ unless source = source_with_url(url)
38
+ name = name_for_url(url)
39
+ # Hack to ensure that `repo add` output is shown.
40
+ previous_title_level = UI.title_level
41
+ UI.title_level = 0
42
+ begin
43
+ Command::Repo::Add.new(CLAide::ARGV.new([name, url])).run
44
+ rescue Informative => e
45
+ raise Informative, "Unable to add a source with url `#{url}` " \
46
+ "named `#{name}`.\nYou can try adding it manually in " \
47
+ '`~/.cocoapods/repos` or via `pod repo add`.'
48
+ ensure
49
+ UI.title_level = previous_title_level
50
+ end
51
+ source = source_with_url(url)
52
+ end
53
+
54
+ source
55
+ end
56
+
26
57
  # @return [Array<Source>] The list of all the sources known to this
27
58
  # installation of CocoaPods.
28
59
  #
@@ -31,7 +62,7 @@ module Pod
31
62
  dirs.map { |repo| Source.new(repo) }
32
63
  end
33
64
 
34
- # @return [Source] The CocoaPods Master Repo source.
65
+ # @return [Array<Source>] The CocoaPods Master Repo source.
35
66
  #
36
67
  def master
37
68
  sources(['master'])
@@ -215,7 +246,7 @@ module Pod
215
246
  install_message << 'gem install cocoapods'
216
247
  install_message << ' --pre' if Gem::Version.new(last).prerelease?
217
248
  UI.puts "\nCocoaPods #{versions['last']} is available.\n" \
218
- "To update use: `#{install_message}`\n".green
249
+ "To update use: `#{install_message}`".green + "\n"
219
250
  end
220
251
  end
221
252
 
@@ -343,6 +374,57 @@ module Pod
343
374
  raise Informative, "Unable to find the `#{name}` repo."
344
375
  end
345
376
  end
377
+
378
+ # @return [Source] The source whose {Source#url} is equal to `url`.
379
+ #
380
+ # @param [String] url
381
+ # The URL of the source.
382
+ #
383
+ def source_with_url(url)
384
+ url = url.downcase
385
+ aggregate.sources.find { |s| s.url.downcase == url }
386
+ end
387
+
388
+ # Returns a suitable repository name for `url`.
389
+ #
390
+ # @example A GitHub.com URL
391
+ #
392
+ # name_for_url('https://github.com/Artsy/Specs.git')
393
+ # # "artsy"
394
+ # name_for_url('https://github.com/Artsy/Specs.git')
395
+ # # "artsy-1"
396
+ #
397
+ # @example A non-Github.com URL
398
+ #
399
+ # name_for_url('https://sourceforge.org/Artsy/Specs.git')
400
+ # # sourceforge-artsy-specs
401
+ #
402
+ # @param [#to_s] url
403
+ # The URL of the source.
404
+ #
405
+ # @return [String] A suitable repository name for `url`.
406
+ #
407
+ def name_for_url(url)
408
+ case url.downcase
409
+ when %r{github.com(:|/)cocoapods/specs}
410
+ base = 'master'
411
+ when %r{github.com(:|/)(.+)/(.+)}
412
+ base = Regexp.last_match[2]
413
+ else
414
+ raise Informative,
415
+ "`#{url}` is not a valid URL." unless url =~ URI.regexp
416
+ url = URI(url.downcase)
417
+ base = url.host.split('.')[-2] +
418
+ url.path.gsub(/.git$/, '').split('/').join('-')
419
+ end
420
+ name = base
421
+ infinity = 1.0 / 0
422
+ (1..infinity).each do |i|
423
+ break unless source_dir(name).exist?
424
+ name = "#{base}-#{i}"
425
+ end
426
+ name
427
+ end
346
428
  end
347
429
  end
348
430
  end
@@ -170,7 +170,7 @@ module Pod
170
170
  end
171
171
 
172
172
  title(colored_title, '', 1) do
173
- puts_indented pod.summary
173
+ puts_indented pod.summary if pod.summary
174
174
  puts_indented "pod '#{pod.name}', '~> #{pod.version}'"
175
175
  labeled('Homepage', pod.homepage)
176
176
  labeled('Source', pod.source_url)
@@ -325,7 +325,14 @@ module Pod
325
325
  UI.puts output
326
326
  parsed_output = parse_xcodebuild_output(output)
327
327
  parsed_output.each do |message|
328
- if message.include?('error: ')
328
+ # Checking the error for `InputFile` is to work around an Xcode
329
+ # issue where linting would fail even though `xcodebuild` actually
330
+ # succeeds. Xcode.app also doesn't fail when this issue occurs, so
331
+ # it's safe for us to do the same.
332
+ #
333
+ # For more details see https://github.com/CocoaPods/CocoaPods/issues/2394#issuecomment-56658587
334
+ #
335
+ if message.include?('error: ') && !message.include?("'InputFile' should have")
329
336
  error "[xcodebuild] #{message}"
330
337
  else
331
338
  note "[xcodebuild] #{message}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.34.0.rc2
4
+ version: 0.34.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: 2014-09-16 00:00:00.000000000 Z
12
+ date: 2014-09-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cocoapods-core
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - '='
19
19
  - !ruby/object:Gem::Version
20
- version: 0.34.0.rc2
20
+ version: 0.34.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - '='
26
26
  - !ruby/object:Gem::Version
27
- version: 0.34.0.rc2
27
+ version: 0.34.0
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: claide
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -45,14 +45,14 @@ dependencies:
45
45
  requirements:
46
46
  - - "~>"
47
47
  - !ruby/object:Gem::Version
48
- version: 0.19.1
48
+ version: 0.19.2
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - "~>"
54
54
  - !ruby/object:Gem::Version
55
- version: 0.19.1
55
+ version: 0.19.2
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: cocoapods-downloader
58
58
  requirement: !ruby/object:Gem::Requirement
@@ -256,13 +256,6 @@ executables:
256
256
  extensions: []
257
257
  extra_rdoc_files: []
258
258
  files:
259
- - CHANGELOG.md
260
- - LICENSE
261
- - README.md
262
- - bin/pod
263
- - bin/sandbox-pod
264
- - lib/cocoapods.rb
265
- - lib/cocoapods/command.rb
266
259
  - lib/cocoapods/command/init.rb
267
260
  - lib/cocoapods/command/inter_process_communication.rb
268
261
  - lib/cocoapods/command/lib.rb
@@ -270,64 +263,71 @@ files:
270
263
  - lib/cocoapods/command/outdated.rb
271
264
  - lib/cocoapods/command/project.rb
272
265
  - lib/cocoapods/command/push.rb
273
- - lib/cocoapods/command/repo.rb
274
266
  - lib/cocoapods/command/repo/push.rb
267
+ - lib/cocoapods/command/repo.rb
275
268
  - lib/cocoapods/command/search.rb
276
269
  - lib/cocoapods/command/setup.rb
277
270
  - lib/cocoapods/command/spec.rb
271
+ - lib/cocoapods/command.rb
278
272
  - lib/cocoapods/config.rb
279
273
  - lib/cocoapods/downloader.rb
280
274
  - lib/cocoapods/executable.rb
281
- - lib/cocoapods/external_sources.rb
282
275
  - lib/cocoapods/external_sources/abstract_external_source.rb
283
276
  - lib/cocoapods/external_sources/downloader_source.rb
284
277
  - lib/cocoapods/external_sources/path_source.rb
285
278
  - lib/cocoapods/external_sources/podspec_source.rb
279
+ - lib/cocoapods/external_sources.rb
286
280
  - lib/cocoapods/gem_version.rb
287
- - lib/cocoapods/generator/acknowledgements.rb
288
281
  - lib/cocoapods/generator/acknowledgements/markdown.rb
289
282
  - lib/cocoapods/generator/acknowledgements/plist.rb
283
+ - lib/cocoapods/generator/acknowledgements.rb
290
284
  - lib/cocoapods/generator/bridge_support.rb
291
285
  - lib/cocoapods/generator/copy_resources_script.rb
292
286
  - lib/cocoapods/generator/dummy_source.rb
293
287
  - lib/cocoapods/generator/prefix_header.rb
294
288
  - lib/cocoapods/generator/target_environment_header.rb
295
- - lib/cocoapods/generator/xcconfig.rb
296
289
  - lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb
297
290
  - lib/cocoapods/generator/xcconfig/private_pod_xcconfig.rb
298
291
  - lib/cocoapods/generator/xcconfig/public_pod_xcconfig.rb
299
292
  - lib/cocoapods/generator/xcconfig/xcconfig_helper.rb
293
+ - lib/cocoapods/generator/xcconfig.rb
300
294
  - lib/cocoapods/hooks/installer_representation.rb
301
295
  - lib/cocoapods/hooks/library_representation.rb
302
296
  - lib/cocoapods/hooks/pod_representation.rb
303
297
  - lib/cocoapods/hooks_manager.rb
304
- - lib/cocoapods/installer.rb
305
- - lib/cocoapods/installer/analyzer.rb
306
298
  - lib/cocoapods/installer/analyzer/sandbox_analyzer.rb
299
+ - lib/cocoapods/installer/analyzer.rb
307
300
  - lib/cocoapods/installer/file_references_installer.rb
308
301
  - lib/cocoapods/installer/hooks_context.rb
309
302
  - lib/cocoapods/installer/migrator.rb
310
303
  - lib/cocoapods/installer/pod_source_installer.rb
311
- - lib/cocoapods/installer/target_installer.rb
312
304
  - lib/cocoapods/installer/target_installer/aggregate_target_installer.rb
313
305
  - lib/cocoapods/installer/target_installer/pod_target_installer.rb
314
- - lib/cocoapods/installer/user_project_integrator.rb
315
- - lib/cocoapods/installer/user_project_integrator/target_integrator.rb
306
+ - lib/cocoapods/installer/target_installer.rb
316
307
  - lib/cocoapods/installer/user_project_integrator/target_integrator/xcconfig_integrator.rb
308
+ - lib/cocoapods/installer/user_project_integrator/target_integrator.rb
309
+ - lib/cocoapods/installer/user_project_integrator.rb
310
+ - lib/cocoapods/installer.rb
317
311
  - lib/cocoapods/open_uri.rb
318
312
  - lib/cocoapods/project.rb
319
313
  - lib/cocoapods/resolver.rb
320
- - lib/cocoapods/sandbox.rb
321
314
  - lib/cocoapods/sandbox/file_accessor.rb
322
315
  - lib/cocoapods/sandbox/headers_store.rb
323
316
  - lib/cocoapods/sandbox/path_list.rb
317
+ - lib/cocoapods/sandbox.rb
324
318
  - lib/cocoapods/sources_manager.rb
325
- - lib/cocoapods/target.rb
326
319
  - lib/cocoapods/target/aggregate_target.rb
327
320
  - lib/cocoapods/target/pod_target.rb
328
- - lib/cocoapods/user_interface.rb
321
+ - lib/cocoapods/target.rb
329
322
  - lib/cocoapods/user_interface/error_report.rb
323
+ - lib/cocoapods/user_interface.rb
330
324
  - lib/cocoapods/validator.rb
325
+ - lib/cocoapods.rb
326
+ - bin/pod
327
+ - bin/sandbox-pod
328
+ - README.md
329
+ - LICENSE
330
+ - CHANGELOG.md
331
331
  homepage: https://github.com/CocoaPods/CocoaPods
332
332
  licenses:
333
333
  - MIT
@@ -348,7 +348,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
348
348
  version: '0'
349
349
  requirements: []
350
350
  rubyforge_project:
351
- rubygems_version: 2.2.2
351
+ rubygems_version: 2.0.14
352
352
  signing_key:
353
353
  specification_version: 3
354
354
  summary: An Objective-C library package manager.