cocoapods-core 1.1.0.beta.2 → 1.1.0.rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 68101ad3a4782fc7e4f443d0f6770056fcd5ce95
4
- data.tar.gz: f6988ebcecede78fc19c151838496d053ab93579
3
+ metadata.gz: 8dd8493ba3541dfee0d29c01a6bc17e5631b1688
4
+ data.tar.gz: fc5724cf0f4a28abae4c6f8032fd62bf1d441d40
5
5
  SHA512:
6
- metadata.gz: 439ec090f0e1e103578185ce13d4a80a70f3799b75317b664c88f183dd178eae4c4c328d5e46397d4d547754dd2d37768022952c5ff9082855183b0101236029
7
- data.tar.gz: 1fe27f51aa33521f776ff2c384e7e81c38ef7b6418863441fdc2d4c7b2875c4bd83046b84a32de1e1f7f0c24ecf20f51f2bcec3800d163050946dfb98439d76b
6
+ metadata.gz: cf6d0562c39e02525338a4c3009156b5599bc1c9238612af5febef7b94fa3da0cb9ccd713a65a21a8948bb3a07a550aeda05102035d581fc7d8d7af7f74794b7
7
+ data.tar.gz: 120832f370c037c813d7860b6fd085b6634b774bae26d3b71a608614b4768c7be1cb017c6ec1a56bca12da88132345c20bf1bade3433b37129beb51c5e2ebd56
@@ -1,5 +1,5 @@
1
1
  module Pod
2
2
  # The version of the cocoapods-core.
3
3
  #
4
- CORE_VERSION = '1.1.0.beta.2'.freeze unless defined? Pod::CORE_VERSION
4
+ CORE_VERSION = '1.1.0.rc.1'.freeze unless defined? Pod::CORE_VERSION
5
5
  end
@@ -28,7 +28,7 @@ module Pod
28
28
  # @return [Bool] Whether the given source should be updated.
29
29
  #
30
30
  def requires_update?
31
- commit_hash = Dir.chdir(repo) { git_commit_hash }
31
+ commit_hash = git_commit_hash
32
32
  GitHub.modified_since_commit('CocoaPods/Specs', commit_hash)
33
33
  end
34
34
  end
@@ -41,14 +41,11 @@ module Pod
41
41
  # option. See https://github.com/CocoaPods/CocoaPods/issues/2724.
42
42
  #
43
43
  def url
44
- Dir.chdir(repo) do
45
- remote = git(%w(config --get remote.origin.url))
46
-
47
- if !remote.empty?
48
- remote
49
- elsif (repo + '.git').exist?
50
- "file://#{repo}/.git"
51
- end
44
+ remote = repo_git(%w(config --get remote.origin.url))
45
+ if !remote.empty?
46
+ remote
47
+ elsif (repo + '.git').exist?
48
+ "file://#{repo}/.git"
52
49
  end
53
50
  end
54
51
 
@@ -333,26 +330,20 @@ module Pod
333
330
  # Returns the list of changed spec paths.
334
331
  #
335
332
  def update(show_output)
336
- changed_spec_paths = []
337
- Dir.chdir(repo) do
338
- prev_commit_hash = git_commit_hash
339
- update_git_repo(show_output)
340
- refresh_metadata
341
- if version = metadata.last_compatible_version(Version.new(CORE_VERSION))
342
- tag = "v#{version}"
343
- CoreUI.warn "Using the `#{tag}` tag of the `#{name}` source because " \
344
- "it is the last version compatible with CocoaPods #{CORE_VERSION}."
345
- git(['checkout', tag])
346
- end
347
- changed_spec_paths = diff_until_commit_hash(prev_commit_hash)
333
+ prev_commit_hash = git_commit_hash
334
+ update_git_repo(show_output)
335
+ refresh_metadata
336
+ if version = metadata.last_compatible_version(Version.new(CORE_VERSION))
337
+ tag = "v#{version}"
338
+ CoreUI.warn "Using the `#{tag}` tag of the `#{name}` source because " \
339
+ "it is the last version compatible with CocoaPods #{CORE_VERSION}."
340
+ repo_git(['checkout', tag])
348
341
  end
349
- changed_spec_paths
342
+ diff_until_commit_hash(prev_commit_hash)
350
343
  end
351
344
 
352
345
  def git?
353
- Dir.chdir(repo) do
354
- !git(%w(rev-parse HEAD)).empty?
355
- end
346
+ !repo_git(%w(rev-parse HEAD)).empty?
356
347
  end
357
348
 
358
349
  def verify_compatibility!
@@ -398,12 +389,6 @@ module Pod
398
389
  # @group Private Helpers
399
390
  #-------------------------------------------------------------------------#
400
391
 
401
- def ensure_in_repo!
402
- return if File.identical?(Pathname.pwd.realpath.to_s, repo.realpath.to_s)
403
- raise StandardError, "Must be in the root of the repo (#{repo}), " \
404
- "instead in #{Pathname.pwd}."
405
- end
406
-
407
392
  # Loads the specification for the given Pod gracefully.
408
393
  #
409
394
  # @param [String] name
@@ -428,14 +413,12 @@ module Pod
428
413
  end
429
414
 
430
415
  def git_commit_hash
431
- ensure_in_repo!
432
- git(%w(rev-parse HEAD))
416
+ repo_git(%w(rev-parse HEAD))
433
417
  end
434
418
 
435
419
  def update_git_repo(show_output = false)
436
- ensure_in_repo!
437
- git(['checkout', git_tracking_branch])
438
- output = git(%w(pull --ff-only), :include_error => true)
420
+ repo_git(['checkout', git_tracking_branch])
421
+ output = repo_git(%w(pull --ff-only), :include_error => true)
439
422
  CoreUI.puts output if show_output
440
423
  end
441
424
 
@@ -445,12 +428,11 @@ module Pod
445
428
  end
446
429
 
447
430
  def diff_until_commit_hash(commit_hash)
448
- ensure_in_repo!
449
- git(%W(diff --name-only #{commit_hash}..HEAD)).split("\n")
431
+ repo_git(%W(diff --name-only #{commit_hash}..HEAD)).split("\n")
450
432
  end
451
433
 
452
- def git(args, include_error: false)
453
- command = 'git ' << args.join(' ')
434
+ def repo_git(args, include_error: false)
435
+ command = "git -C \"#{repo}\" " << args.join(' ')
454
436
  command << ' 2>&1' if include_error
455
437
  (`#{command}` || '').strip
456
438
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0.beta.2
4
+ version: 1.1.0.rc.1
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: 2016-08-30 00:00:00.000000000 Z
12
+ date: 2016-09-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport